-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcef-126-rebase-to-ungoogled.patch
1374 lines (1258 loc) · 72.2 KB
/
cef-126-rebase-to-ungoogled.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -up chromium-126.0.6478.114/cef/patch/patches/base_sandbox_2743.patch.omv~ chromium-126.0.6478.114/cef/patch/patches/base_sandbox_2743.patch
--- chromium-126.0.6478.114/cef/patch/patches/base_sandbox_2743.patch.omv~ 2024-06-20 22:08:18.248011080 +0200
+++ chromium-126.0.6478.114/cef/patch/patches/base_sandbox_2743.patch 2024-06-20 22:08:55.380419701 +0200
@@ -1,7 +1,6 @@
-diff --git base/BUILD.gn base/BUILD.gn
-index 4c7130084a91f..c0e00c6fc2636 100644
---- base/BUILD.gn
-+++ base/BUILD.gn
+diff -up base/BUILD.gn.2743~ base/BUILD.gn
+--- base/BUILD.gn.2743~ 2024-06-18 23:43:18.776013100 +0200
++++ base/BUILD.gn 2024-06-20 22:08:37.808226343 +0200
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
import("//build/timestamp.gni")
import("//build/util/process_version.gni")
@@ -36,10 +35,9 @@ index 4c7130084a91f..c0e00c6fc2636 10064
libs += [
"cfgmgr32.lib",
"ntdll.lib",
-diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc
-index 2c5dfc7870ce8..7ed12711289b4 100644
---- base/allocator/dispatcher/dispatcher.cc
-+++ base/allocator/dispatcher/dispatcher.cc
+diff -up base/allocator/dispatcher/dispatcher.cc.2743~ base/allocator/dispatcher/dispatcher.cc
+--- base/allocator/dispatcher/dispatcher.cc.2743~ 2024-06-18 23:43:17.776013100 +0200
++++ base/allocator/dispatcher/dispatcher.cc 2024-06-20 22:08:37.808226343 +0200
@@ -8,6 +8,7 @@
#include "base/check.h"
#include "base/dcheck_is_on.h"
@@ -57,10 +55,9 @@ index 2c5dfc7870ce8..7ed12711289b4 10064
DCHECK([&]() {
auto const was_set = is_initialized_check_flag_.test_and_set();
is_initialized_check_flag_.clear();
-diff --git base/hash/md5.h base/hash/md5.h
-index 215d636fec275..922e88f31b999 100644
---- base/hash/md5.h
-+++ base/hash/md5.h
+diff -up base/hash/md5.h.2743~ base/hash/md5.h
+--- base/hash/md5.h.2743~ 2024-06-18 23:43:17.916027000 +0200
++++ base/hash/md5.h 2024-06-20 22:08:37.808226343 +0200
@@ -11,8 +11,9 @@
#include "base/base_export.h"
#include "base/containers/span.h"
@@ -72,10 +69,9 @@ index 215d636fec275..922e88f31b999 10064
#include "base/hash/md5_nacl.h"
#else
#include "base/hash/md5_boringssl.h"
-diff --git base/hash/sha1.h base/hash/sha1.h
-index 1891e95fa387d..fc190dc39ae7d 100644
---- base/hash/sha1.h
-+++ base/hash/sha1.h
+diff -up base/hash/sha1.h.2743~ base/hash/sha1.h
+--- base/hash/sha1.h.2743~ 2024-06-18 23:43:17.916027000 +0200
++++ base/hash/sha1.h 2024-06-20 22:08:37.808226343 +0200
@@ -14,7 +14,9 @@
#include "base/base_export.h"
#include "base/containers/span.h"
@@ -87,10 +83,9 @@ index 1891e95fa387d..fc190dc39ae7d 10064
#include "base/hash/sha1_nacl.h"
#else
#include "base/hash/sha1_boringssl.h"
-diff --git base/rand_util.h base/rand_util.h
-index 746166bf75df7..7192a939e4fec 100644
---- base/rand_util.h
-+++ base/rand_util.h
+diff -up base/rand_util.h.2743~ base/rand_util.h
+--- base/rand_util.h.2743~ 2024-06-18 23:43:17.988034000 +0200
++++ base/rand_util.h 2024-06-20 22:08:37.808226343 +0200
@@ -17,8 +17,9 @@
#include "base/containers/span.h"
#include "base/gtest_prod_util.h"
@@ -111,10 +106,9 @@ index 746166bf75df7..7192a939e4fec 10064
class NonAllocatingRandomBitGenerator {
public:
using result_type = uint64_t;
-diff --git base/rand_util_win.cc base/rand_util_win.cc
-index 6961e0ef8153c..8863f4ed65ee8 100644
---- base/rand_util_win.cc
-+++ base/rand_util_win.cc
+diff -up base/rand_util_win.cc.2743~ base/rand_util_win.cc
+--- base/rand_util_win.cc.2743~ 2024-06-18 23:43:18.988034000 +0200
++++ base/rand_util_win.cc 2024-06-20 22:08:37.808226343 +0200
@@ -20,8 +20,12 @@
#include "base/check.h"
@@ -127,7 +121,7 @@ index 6961e0ef8153c..8863f4ed65ee8 10064
+#endif
// Prototype for ProcessPrng.
- // See: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng
+ // See: https://learn.m1cr050ft.qjz9zk/en-us/windows/win32/seccng/processprng
@@ -33,6 +37,7 @@ namespace base {
namespace internal {
@@ -147,7 +141,7 @@ index 6961e0ef8153c..8863f4ed65ee8 10064
} // namespace internal
namespace {
-@@ -71,6 +80,7 @@ decltype(&ProcessPrng) GetProcessPrng() {
+@@ -71,6 +80,7 @@ decltype(&ProcessPrng) GetProcessPrng()
}
void RandBytesInternal(span<uint8_t> output, bool avoid_allocation) {
@@ -155,7 +149,7 @@ index 6961e0ef8153c..8863f4ed65ee8 10064
if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) {
// Ensure BoringSSL is initialized so it can use things like RDRAND.
CRYPTO_library_init();
-@@ -78,6 +88,7 @@ void RandBytesInternal(span<uint8_t> output, bool avoid_allocation) {
+@@ -78,6 +88,7 @@ void RandBytesInternal(span<uint8_t> out
(void)RAND_bytes(output.data(), output.size());
return;
}
@@ -163,10 +157,9 @@ index 6961e0ef8153c..8863f4ed65ee8 10064
static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng();
BOOL success =
-diff --git base/unguessable_token.cc base/unguessable_token.cc
-index 1f91a938caf55..e7b383ebe3986 100644
---- base/unguessable_token.cc
-+++ base/unguessable_token.cc
+diff -up base/unguessable_token.cc.2743~ base/unguessable_token.cc
+--- base/unguessable_token.cc.2743~ 2024-06-18 23:43:18.140049000 +0200
++++ base/unguessable_token.cc 2024-06-20 22:08:37.808226343 +0200
@@ -10,8 +10,9 @@
#include "base/format_macros.h"
#include "base/rand_util.h"
@@ -178,7 +171,7 @@ index 1f91a938caf55..e7b383ebe3986 10064
#include "third_party/boringssl/src/include/openssl/mem.h"
#endif
-@@ -57,7 +58,7 @@ std::optional<UnguessableToken> UnguessableToken::DeserializeFromString(
+@@ -57,7 +58,7 @@ std::optional<UnguessableToken> Unguessa
}
bool operator==(const UnguessableToken& lhs, const UnguessableToken& rhs) {
@@ -187,10 +180,9 @@ index 1f91a938caf55..e7b383ebe3986 10064
// BoringSSL is unavailable for NaCl builds so it remains timing dependent.
return lhs.token_ == rhs.token_;
#else
-diff --git base/win/sid.cc base/win/sid.cc
-index dd063382d97e1..6f8d6a0be91b1 100644
---- base/win/sid.cc
-+++ base/win/sid.cc
+diff -up base/win/sid.cc.2743~ base/win/sid.cc
+--- base/win/sid.cc.2743~ 2024-06-18 23:43:18.160051000 +0200
++++ base/win/sid.cc 2024-06-20 22:08:37.808226343 +0200
@@ -22,6 +22,7 @@
#include <utility>
@@ -212,7 +204,7 @@ index dd063382d97e1..6f8d6a0be91b1 10064
namespace base::win {
-@@ -131,6 +136,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) {
+@@ -131,6 +136,7 @@ Sid Sid::FromNamedCapability(const std::
if (known_cap != known_capabilities->end()) {
return FromKnownCapability(known_cap->second);
}
@@ -220,7 +212,7 @@ index dd063382d97e1..6f8d6a0be91b1 10064
CRYPTO_library_init();
static_assert((SHA256_DIGEST_LENGTH / sizeof(DWORD)) ==
SECURITY_APP_PACKAGE_RID_COUNT);
-@@ -143,6 +149,10 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) {
+@@ -143,6 +149,10 @@ Sid Sid::FromNamedCapability(const std::
reinterpret_cast<uint8_t*>(&rids[2]));
return FromSubAuthorities(SECURITY_APP_PACKAGE_AUTHORITY, std::size(rids),
rids);
diff -up chromium-126.0.6478.114/cef/patch/patches/chrome_runtime_views.patch.omv~ chromium-126.0.6478.114/cef/patch/patches/chrome_runtime_views.patch
--- chromium-126.0.6478.114/cef/patch/patches/chrome_runtime_views.patch.omv~ 2024-06-20 22:05:54.510428153 +0200
+++ chromium-126.0.6478.114/cef/patch/patches/chrome_runtime_views.patch 2024-06-20 22:08:05.223867732 +0200
@@ -1,8 +1,7 @@
-diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
-index 3b992709445b9..822de797dcb3e 100644
---- chrome/browser/ui/browser_command_controller.cc
-+++ chrome/browser/ui/browser_command_controller.cc
-@@ -406,6 +406,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
+diff -up chrome/browser/ui/browser_command_controller.cc.crv~ chrome/browser/ui/browser_command_controller.cc
+--- chrome/browser/ui/browser_command_controller.cc.crv~ 2024-06-20 16:29:52.354895401 +0200
++++ chrome/browser/ui/browser_command_controller.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -405,6 +405,7 @@ bool BrowserCommandController::ExecuteCo
// choose to not implement CommandUpdaterDelegate inside this class and
// therefore command_updater_ doesn't have the delegate set).
if (!SupportsCommand(id) || !IsCommandEnabled(id)) {
@@ -10,7 +9,7 @@ index 3b992709445b9..822de797dcb3e 10064
return false;
}
-@@ -422,6 +423,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
+@@ -421,6 +422,13 @@ bool BrowserCommandController::ExecuteCo
DCHECK(command_updater_.IsCommandEnabled(id))
<< "Invalid/disabled command " << id;
@@ -24,7 +23,7 @@ index 3b992709445b9..822de797dcb3e 10064
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
-@@ -1207,11 +1215,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
+@@ -1206,11 +1214,13 @@ void BrowserCommandController::TabRestor
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@@ -40,11 +39,10 @@ index 3b992709445b9..822de797dcb3e 10064
}
bool BrowserCommandController::IsWebAppOrCustomTab() const {
-diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
-index dca26d57b903d..3de463129b7ac 100644
---- chrome/browser/ui/toolbar/app_menu_model.cc
-+++ chrome/browser/ui/toolbar/app_menu_model.cc
-@@ -739,6 +739,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
+diff -up chrome/browser/ui/toolbar/app_menu_model.cc.crv~ chrome/browser/ui/toolbar/app_menu_model.cc
+--- chrome/browser/ui/toolbar/app_menu_model.cc.crv~ 2024-06-20 16:29:51.302894606 +0200
++++ chrome/browser/ui/toolbar/app_menu_model.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -689,6 +689,57 @@ SaveAndShareSubMenuModel::SaveAndShareSu
}
}
@@ -102,7 +100,7 @@ index dca26d57b903d..3de463129b7ac 10064
} // namespace
////////////////////////////////////////////////////////////////////////////////
-@@ -1583,7 +1634,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
+@@ -1523,7 +1574,7 @@ bool AppMenuModel::IsCommandIdChecked(in
return false;
}
@@ -111,7 +109,7 @@ index dca26d57b903d..3de463129b7ac 10064
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
-@@ -1598,6 +1649,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
+@@ -1538,6 +1589,30 @@ bool AppMenuModel::IsCommandIdEnabled(in
}
}
@@ -142,7 +140,7 @@ index dca26d57b903d..3de463129b7ac 10064
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
-@@ -1763,8 +1838,10 @@ void AppMenuModel::Build() {
+@@ -1703,8 +1778,10 @@ void AppMenuModel::Build() {
IDS_CLEAR_BROWSING_DATA,
kTrashCanRefreshIcon);
@@ -153,7 +151,7 @@ index dca26d57b903d..3de463129b7ac 10064
AddSeparator(ui::NORMAL_SEPARATOR);
AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon);
-@@ -1883,6 +1960,11 @@ void AppMenuModel::Build() {
+@@ -1823,6 +1900,11 @@ void AppMenuModel::Build() {
}
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -165,11 +163,10 @@ index dca26d57b903d..3de463129b7ac 10064
uma_action_recorded_ = false;
}
-diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
-index 0824a0b655cde..507021a7c1b66 100644
---- chrome/browser/ui/toolbar/app_menu_model.h
-+++ chrome/browser/ui/toolbar/app_menu_model.h
-@@ -225,6 +225,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
+diff -up chrome/browser/ui/toolbar/app_menu_model.h.crv~ chrome/browser/ui/toolbar/app_menu_model.h
+--- chrome/browser/ui/toolbar/app_menu_model.h.crv~ 2024-06-18 23:43:24.788704900 +0200
++++ chrome/browser/ui/toolbar/app_menu_model.h 2024-06-20 22:06:12.998631874 +0200
+@@ -225,6 +225,7 @@ class AppMenuModel : public ui::SimpleMe
void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override;
@@ -177,7 +174,7 @@ index 0824a0b655cde..507021a7c1b66 10064
bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
-@@ -265,6 +266,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
+@@ -265,6 +266,8 @@ class AppMenuModel : public ui::SimpleMe
void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module,
int event_flags);
@@ -186,11 +183,10 @@ index 0824a0b655cde..507021a7c1b66 10064
private:
// Adds actionable global error menu items to the menu.
// Examples: Extension permissions and sign in errors.
-diff --git chrome/browser/ui/views/find_bar_host.cc chrome/browser/ui/views/find_bar_host.cc
-index 0ccfe39eb5696..c9424316b6d14 100644
---- chrome/browser/ui/views/find_bar_host.cc
-+++ chrome/browser/ui/views/find_bar_host.cc
-@@ -581,6 +581,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) {
+diff -up chrome/browser/ui/views/find_bar_host.cc.crv~ chrome/browser/ui/views/find_bar_host.cc
+--- chrome/browser/ui/views/find_bar_host.cc.crv~ 2024-06-18 23:43:24.872713000 +0200
++++ chrome/browser/ui/views/find_bar_host.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -581,6 +581,14 @@ gfx::Rect FindBarHost::GetDialogPosition
// The BrowserView does Layout for the components that we care about
// positioning relative to, so we ask it to tell us where we should go.
gfx::Rect find_bar_bounds = browser_view_->GetFindBarBoundingBox();
@@ -205,11 +201,10 @@ index 0ccfe39eb5696..c9424316b6d14 10064
if (find_bar_bounds.IsEmpty()) {
return gfx::Rect();
}
-diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
-index 8dd3620ba2720..bb69a77f9551e 100644
---- chrome/browser/ui/views/frame/browser_frame.cc
-+++ chrome/browser/ui/views/frame/browser_frame.cc
-@@ -114,15 +114,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
+diff -up chrome/browser/ui/views/frame/browser_frame.cc.crv~ chrome/browser/ui/views/frame/browser_frame.cc
+--- chrome/browser/ui/views/frame/browser_frame.cc.crv~ 2024-06-20 16:29:51.438896685 +0200
++++ chrome/browser/ui/views/frame/browser_frame.cc 2024-06-20 22:06:38.562913504 +0200
+@@ -114,15 +114,25 @@ ui::ColorProviderKey::SchemeVariant GetS
////////////////////////////////////////////////////////////////////////////////
// BrowserFrame, public:
@@ -237,7 +232,7 @@ index 8dd3620ba2720..bb69a77f9551e 10064
}
BrowserFrame::~BrowserFrame() {}
-@@ -228,10 +238,20 @@ void BrowserFrame::LayoutWebAppWindowTitle(
+@@ -228,10 +238,20 @@ void BrowserFrame::LayoutWebAppWindowTit
}
int BrowserFrame::GetTopInset() const {
@@ -258,7 +253,7 @@ index 8dd3620ba2720..bb69a77f9551e 10064
browser_frame_view_->UpdateThrobber(running);
}
-@@ -240,6 +260,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const {
+@@ -240,6 +260,8 @@ BrowserNonClientFrameView* BrowserFrame:
}
bool BrowserFrame::UseCustomFrame() const {
@@ -267,7 +262,7 @@ index 8dd3620ba2720..bb69a77f9551e 10064
return native_browser_frame_->UseCustomFrame();
}
-@@ -253,20 +275,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const {
+@@ -253,20 +275,30 @@ bool BrowserFrame::ShouldDrawFrameHeader
void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
@@ -298,7 +293,7 @@ index 8dd3620ba2720..bb69a77f9551e 10064
browser_frame_view_->OnBrowserViewInitViewsComplete();
}
-@@ -367,6 +399,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme()
+@@ -367,6 +399,8 @@ ui::ColorProviderKey::ThemeInitializerSu
}
void BrowserFrame::OnNativeWidgetWorkspaceChanged() {
@@ -321,19 +316,19 @@ index 8dd3620ba2720..bb69a77f9551e 10064
// Ignore the system theme for web apps with window-controls-overlay as the
// display_override so the web contents can blend with the overlay by using
// the developer-provided theme color for a better experience. Context:
-@@ -637,5 +678,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
+@@ -637,6 +678,9 @@ bool BrowserFrame::RegenerateFrameOnThem
}
bool BrowserFrame::IsIncognitoBrowser() const {
+ if (!browser_view_) {
+ return true;
+ }
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-incognito-themes"))
+ return false;
return browser_view_->browser()->profile()->IsIncognitoProfile();
- }
-diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
-index 2e973c9e279b0..07d04a364d60c 100644
---- chrome/browser/ui/views/frame/browser_frame.h
-+++ chrome/browser/ui/views/frame/browser_frame.h
+diff -up chrome/browser/ui/views/frame/browser_frame.h.crv~ chrome/browser/ui/views/frame/browser_frame.h
+--- chrome/browser/ui/views/frame/browser_frame.h.crv~ 2024-06-18 23:43:24.872713000 +0200
++++ chrome/browser/ui/views/frame/browser_frame.h 2024-06-20 22:06:12.998631874 +0200
@@ -58,6 +58,7 @@ enum class TabDragKind {
// This is a virtual interface that allows system specific browser frames.
class BrowserFrame : public views::Widget, public views::ContextMenuController {
@@ -342,7 +337,7 @@ index 2e973c9e279b0..07d04a364d60c 10064
explicit BrowserFrame(BrowserView* browser_view);
BrowserFrame(const BrowserFrame&) = delete;
-@@ -137,7 +138,7 @@ class BrowserFrame : public views::Widget, public views::ContextMenuController {
+@@ -137,7 +138,7 @@ class BrowserFrame : public views::Widge
// ThemeService calls this when a user has changed their theme, indicating
// that it's time to redraw everything.
@@ -351,7 +346,7 @@ index 2e973c9e279b0..07d04a364d60c 10064
// views::Widget:
views::internal::RootView* CreateRootView() override;
-@@ -170,22 +171,26 @@ class BrowserFrame : public views::Widget, public views::ContextMenuController {
+@@ -170,22 +171,26 @@ class BrowserFrame : public views::Widge
void SetTabDragKind(TabDragKind tab_drag_kind);
TabDragKind tab_drag_kind() const { return tab_drag_kind_; }
@@ -383,10 +378,9 @@ index 2e973c9e279b0..07d04a364d60c 10064
// Regenerate the frame on theme change if necessary. Returns true if
// regenerated.
bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type);
-diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc
-index 4b52ce3877855..7dae2a6b1b151 100644
---- chrome/browser/ui/views/frame/browser_view.cc
-+++ chrome/browser/ui/views/frame/browser_view.cc
+diff -up chrome/browser/ui/views/frame/browser_view.cc.crv~ chrome/browser/ui/views/frame/browser_view.cc
+--- chrome/browser/ui/views/frame/browser_view.cc.crv~ 2024-06-20 16:29:51.430896562 +0200
++++ chrome/browser/ui/views/frame/browser_view.cc 2024-06-20 22:06:12.998631874 +0200
@@ -353,11 +353,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
using web_modal::WebContentsModalDialogHost;
@@ -402,7 +396,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
-@@ -690,6 +689,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
+@@ -690,6 +689,14 @@ class BrowserViewLayoutDelegateImpl : pu
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@@ -417,7 +411,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
-@@ -841,11 +848,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
+@@ -841,11 +848,21 @@ class BrowserView::AccessibilityModeObse
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -440,7 +434,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
// Store the actions so that the access is available for other classes.
if (features::IsSidePanelPinningEnabled()) {
browser_->SetUserData(BrowserActions::UserDataKey(),
-@@ -946,8 +963,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
+@@ -946,8 +963,15 @@ BrowserView::BrowserView(std::unique_ptr
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_, watermark_view_));
@@ -501,7 +495,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
}
// static
-@@ -1625,6 +1654,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const {
+@@ -1625,6 +1654,13 @@ gfx::Point BrowserView::GetThemeOffsetFr
ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y());
}
@@ -515,7 +509,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
// static:
BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement(
const gfx::Rect& contents_webview_bounds,
-@@ -2029,9 +2065,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
+@@ -2033,9 +2069,14 @@ void BrowserView::OnExclusiveAccessUserI
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -531,7 +525,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
-@@ -3173,7 +3214,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
+@@ -3177,7 +3218,8 @@ DownloadShelf* BrowserView::GetDownloadS
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -541,7 +535,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
-@@ -3728,7 +3770,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
+@@ -3732,7 +3774,8 @@ void BrowserView::ReparentTopContainerFo
if (top_container()->parent() == this)
return;
@@ -551,7 +545,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
-@@ -4210,11 +4253,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
+@@ -4214,11 +4257,38 @@ void BrowserView::GetAccessiblePanes(std
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -592,7 +586,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
-@@ -4223,7 +4293,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
+@@ -4227,7 +4297,7 @@ bool BrowserView::ShouldDescendIntoChild
// Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar.
@@ -601,7 +595,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
-@@ -4334,8 +4404,10 @@ void BrowserView::Layout(PassKey) {
+@@ -4338,8 +4408,10 @@ void BrowserView::Layout(PassKey) {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -614,7 +608,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
-@@ -4401,6 +4473,11 @@ void BrowserView::AddedToWidget() {
+@@ -4405,6 +4477,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -626,7 +620,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
-@@ -4448,13 +4525,9 @@ void BrowserView::AddedToWidget() {
+@@ -4452,13 +4529,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -642,7 +636,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
-@@ -4828,7 +4901,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
+@@ -4832,7 +4905,8 @@ void BrowserView::ProcessFullscreen(bool
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -652,7 +646,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
}
void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) {
-@@ -5312,6 +5386,8 @@ Profile* BrowserView::GetProfile() {
+@@ -5316,6 +5390,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -661,7 +655,7 @@ index 4b52ce3877855..7dae2a6b1b151 10064
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
-@@ -5334,6 +5410,8 @@ void BrowserView::HideDownloadShelf() {
+@@ -5338,6 +5414,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -670,11 +664,10 @@ index 4b52ce3877855..7dae2a6b1b151 10064
return frame_->GetFrameView()->CanUserExitFullscreen();
}
-diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
-index e7337adf73caf..6130a2eb8fb5c 100644
---- chrome/browser/ui/views/frame/browser_view.h
-+++ chrome/browser/ui/views/frame/browser_view.h
-@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow,
+diff -up chrome/browser/ui/views/frame/browser_view.h.crv~ chrome/browser/ui/views/frame/browser_view.h
+--- chrome/browser/ui/views/frame/browser_view.h.crv~ 2024-06-18 23:43:25.880714000 +0200
++++ chrome/browser/ui/views/frame/browser_view.h 2024-06-20 22:06:12.998631874 +0200
+@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow
METADATA_HEADER(BrowserView, views::ClientView)
public:
@@ -691,7 +684,7 @@ index e7337adf73caf..6130a2eb8fb5c 10064
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
-@@ -850,6 +855,10 @@ class BrowserView : public BrowserWindow,
+@@ -850,6 +855,10 @@ class BrowserView : public BrowserWindow
// TopContainerBackground::PaintThemeCustomImage for details.
gfx::Point GetThemeOffsetFromBrowserView() const;
@@ -702,7 +695,7 @@ index e7337adf73caf..6130a2eb8fb5c 10064
protected:
// Enumerates where the devtools are docked relative to the browser's main
// web contents.
-@@ -873,6 +882,8 @@ class BrowserView : public BrowserWindow,
+@@ -873,6 +882,8 @@ class BrowserView : public BrowserWindow
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
@@ -711,10 +704,9 @@ index e7337adf73caf..6130a2eb8fb5c 10064
private:
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
-diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
-index 96b489221fb3a..b372f67cd5c92 100644
---- chrome/browser/ui/views/frame/browser_view_layout.cc
-+++ chrome/browser/ui/views/frame/browser_view_layout.cc
+diff -up chrome/browser/ui/views/frame/browser_view_layout.cc.crv~ chrome/browser/ui/views/frame/browser_view_layout.cc
+--- chrome/browser/ui/views/frame/browser_view_layout.cc.crv~ 2024-06-18 23:43:24.880714000 +0200
++++ chrome/browser/ui/views/frame/browser_view_layout.cc 2024-06-20 22:06:12.998631874 +0200
@@ -48,6 +48,10 @@
#include "ui/views/window/client_view.h"
#include "ui/views/window/hit_test_utils.h"
@@ -726,7 +718,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
using views::View;
using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost;
-@@ -92,6 +96,10 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
+@@ -92,6 +96,10 @@ class BrowserViewLayout::WebContentsModa
observer.OnHostDestroying();
}
@@ -737,7 +729,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
void NotifyPositionRequiresUpdate() {
for (ModalDialogHostObserver& observer : observer_list_)
observer.OnPositionRequiresUpdate();
-@@ -102,7 +110,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
+@@ -102,7 +110,7 @@ class BrowserViewLayout::WebContentsModa
views::View* view = browser_view_layout_->contents_container_;
gfx::Rect rect = view->ConvertRectToWidget(view->GetLocalBounds());
const int middle_x = rect.x() + rect.width() / 2;
@@ -746,7 +738,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
return gfx::Point(middle_x - size.width() / 2, top);
}
-@@ -117,7 +125,7 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
+@@ -117,7 +125,7 @@ class BrowserViewLayout::WebContentsModa
gfx::Size GetMaximumDialogSize() override {
views::View* view = browser_view_layout_->contents_container_;
gfx::Rect content_area = view->ConvertRectToWidget(view->GetLocalBounds());
@@ -755,7 +747,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
return gfx::Size(content_area.width(), content_area.bottom() - top);
}
-@@ -132,6 +140,13 @@ class BrowserViewLayout::WebContentsModalDialogHostViews
+@@ -132,6 +140,13 @@ class BrowserViewLayout::WebContentsModa
return host_widget ? host_widget->GetNativeView() : nullptr;
}
@@ -769,7 +761,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
// Add/remove observer.
void AddObserver(ModalDialogHostObserver* observer) override {
observer_list_.AddObserver(observer);
-@@ -442,6 +457,8 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
+@@ -442,6 +457,8 @@ void BrowserViewLayout::Layout(views::Vi
if (exclusive_access_bubble)
exclusive_access_bubble->RepositionIfVisible();
@@ -778,7 +770,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
// Adjust any hosted dialogs if the browser's dialog hosting bounds changed.
const gfx::Rect dialog_bounds(dialog_host_->GetDialogPosition(gfx::Size()),
dialog_host_->GetMaximumDialogSize());
-@@ -455,6 +472,7 @@ void BrowserViewLayout::Layout(views::View* browser_view) {
+@@ -455,6 +472,7 @@ void BrowserViewLayout::Layout(views::Vi
latest_dialog_bounds_in_screen_ = dialog_bounds_in_screen;
dialog_host_->NotifyPositionRequiresUpdate();
}
@@ -786,7 +778,7 @@ index 96b489221fb3a..b372f67cd5c92 10064
}
gfx::Size BrowserViewLayout::GetPreferredSize(
-@@ -590,6 +608,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
+@@ -590,6 +608,13 @@ int BrowserViewLayout::LayoutWebUITabStr
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@@ -800,10 +792,9 @@ index 96b489221fb3a..b372f67cd5c92 10064
int browser_view_width = vertical_layout_rect_.width();
bool toolbar_visible = delegate_->IsToolbarVisible();
int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0;
-diff --git chrome/browser/ui/views/frame/browser_view_layout_delegate.h chrome/browser/ui/views/frame/browser_view_layout_delegate.h
-index 29ad5517bd3c9..b0fe093467abc 100644
---- chrome/browser/ui/views/frame/browser_view_layout_delegate.h
-+++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h
+diff -up chrome/browser/ui/views/frame/browser_view_layout_delegate.h.crv~ chrome/browser/ui/views/frame/browser_view_layout_delegate.h
+--- chrome/browser/ui/views/frame/browser_view_layout_delegate.h.crv~ 2024-06-18 23:43:24.880714000 +0200
++++ chrome/browser/ui/views/frame/browser_view_layout_delegate.h 2024-06-20 22:06:12.998631874 +0200
@@ -28,6 +28,7 @@ class BrowserViewLayoutDelegate {
const gfx::Rect& available_space,
views::Label& window_title_label) const = 0;
@@ -812,11 +803,10 @@ index 29ad5517bd3c9..b0fe093467abc 10064
virtual bool IsToolbarVisible() const = 0;
virtual bool IsBookmarkBarVisible() const = 0;
virtual bool IsContentsSeparatorEnabled() const = 0;
-diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
-index 71445bfab1824..c77750ea2a820 100644
---- chrome/browser/ui/views/frame/contents_web_view.cc
-+++ chrome/browser/ui/views/frame/contents_web_view.cc
-@@ -28,6 +28,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
+diff -up chrome/browser/ui/views/frame/contents_web_view.cc.crv~ chrome/browser/ui/views/frame/contents_web_view.cc
+--- chrome/browser/ui/views/frame/contents_web_view.cc.crv~ 2024-06-18 23:43:24.884714400 +0200
++++ chrome/browser/ui/views/frame/contents_web_view.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -28,6 +28,12 @@ ContentsWebView::ContentsWebView(content
: views::WebView(browser_context),
status_bubble_(nullptr) {
SetProperty(views::kElementIdentifierKey, kContentsWebViewElementId);
@@ -829,11 +819,10 @@ index 71445bfab1824..c77750ea2a820 10064
}
ContentsWebView::~ContentsWebView() {
-diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
-index 636be129ccfd6..dbb19d94c1ef9 100644
---- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
-+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
-@@ -604,6 +604,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
+diff -up chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.crv~ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc.crv~ 2024-06-18 23:43:24.888714800 +0200
++++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -604,6 +604,11 @@ PictureInPictureBrowserFrameView::Pictur
frame->GetNativeWindow()->SetEventTargeter(
std::make_unique<chromeos::InteriorResizeHandleTargeter>());
#endif
@@ -845,7 +834,7 @@ index 636be129ccfd6..dbb19d94c1ef9 10064
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
-@@ -731,18 +736,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
+@@ -731,18 +736,42 @@ gfx::Rect PictureInPictureBrowserFrameVi
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@@ -896,7 +885,7 @@ index 636be129ccfd6..dbb19d94c1ef9 10064
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
-@@ -811,7 +840,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) {
+@@ -811,7 +840,8 @@ void PictureInPictureBrowserFrameView::L
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@@ -906,7 +895,7 @@ index 636be129ccfd6..dbb19d94c1ef9 10064
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
-@@ -1298,7 +1328,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
+@@ -1298,7 +1328,8 @@ gfx::Insets PictureInPictureBrowserFrame
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@@ -916,11 +905,10 @@ index 636be129ccfd6..dbb19d94c1ef9 10064
}
gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const {
-diff --git chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
-index b862ceac7225d..9575440a77d67 100644
---- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
-+++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
-@@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(BrowserView* browser_view)
+diff -up chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc.crv~ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
+--- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc.crv~ 2024-06-18 23:43:24.920718000 +0200
++++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(B
OmniboxPopupCloser::~OmniboxPopupCloser() = default;
void OmniboxPopupCloser::OnMouseEvent(ui::MouseEvent* event) {
@@ -930,11 +918,10 @@ index b862ceac7225d..9575440a77d67 10064
event->type() == ui::ET_MOUSE_PRESSED) {
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
-diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
-index e9bc6c28db30f..38ddcb98139b0 100644
---- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
-+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
-@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
+diff -up chrome/browser/ui/views/page_action/page_action_icon_controller.cc.crv~ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc.crv~ 2024-06-18 23:43:24.924718400 +0200
++++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -97,6 +97,12 @@ void PageActionIconController::Init(cons
};
for (PageActionIconType type : params.types_enabled) {
@@ -947,11 +934,10 @@ index e9bc6c28db30f..38ddcb98139b0 10064
switch (type) {
case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon(
-diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
-index 880d83324cfa6..a6a80cd0b3def 100644
---- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
-+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
-@@ -554,29 +554,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
+diff -up chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc.crv~ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc.crv~ 2024-06-18 23:43:25.004726200 +0200
++++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc 2024-06-20 22:06:12.998631874 +0200
+@@ -554,29 +554,41 @@ gfx::Range BrowserTabStripController::Li
}
bool BrowserTabStripController::IsFrameCondensed() const {
@@ -993,11 +979,10 @@ index 880d83324cfa6..a6a80cd0b3def 10064
return GetFrameView()->GetCustomBackgroundId(active_state);
}
-diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
-index e02fe5d5e6290..9e893b2ff1727 100644
---- chrome/browser/ui/views/toolbar/toolbar_view.cc
-+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
-@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background {
+diff -up chrome/browser/ui/views/toolbar/toolbar_view.cc.crv~ chrome/browser/ui/views/toolbar/toolbar_view.cc
+--- chrome/browser/ui/views/toolbar/toolbar_view.cc.crv~ 2024-06-20 16:29:51.414896318 +0200
++++ chrome/browser/ui/views/toolbar/toolbar_view.cc 2024-06-20 22:07:44.883643826 +0200
+@@ -192,7 +192,7 @@ class TabstripLikeBackground : public vi
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -1088,12 +1073,12 @@ index e02fe5d5e6290..9e893b2ff1727 10064
send_tab_to_self_button_ =
container_view_->AddChildView(std::move(send_tab_to_self_button));
-- if (!features::IsSidePanelPinningEnabled()) {
-+ if (!features::IsSidePanelPinningEnabled() && BUTTON_VISIBLE(kSidePanel)) {
+- if (!features::IsSidePanelPinningEnabled() &&
++ if (!features::IsSidePanelPinningEnabled() && BUTTON_VISIBLE(kSidePanel) &&
+ !base::CommandLine::ForCurrentProcess()->HasSwitch("hide-sidepanel-button")) {
if (companion::IsCompanionFeatureEnabled()) {
side_panel_container_ = container_view_->AddChildView(
- std::make_unique<SidePanelToolbarContainer>(browser_view_));
-@@ -828,7 +847,7 @@ void ToolbarView::Layout(PassKey) {
+@@ -840,7 +859,7 @@ void ToolbarView::Layout(PassKey) {
if (display_mode_ == DisplayMode::NORMAL) {
LayoutCommon();
@@ -1102,11 +1087,10 @@ index e02fe5d5e6290..9e893b2ff1727 10064
UpdateClipPath();
}
}
-diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
-index 2437b17ffab96..24ac297165db1 100644
---- chrome/browser/ui/views/toolbar/toolbar_view.h
-+++ chrome/browser/ui/views/toolbar/toolbar_view.h
-@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView,
+diff -up chrome/browser/ui/views/toolbar/toolbar_view.h.crv~ chrome/browser/ui/views/toolbar/toolbar_view.h
+--- chrome/browser/ui/views/toolbar/toolbar_view.h.crv~ 2024-06-18 23:43:25.028728500 +0200
++++ chrome/browser/ui/views/toolbar/toolbar_view.h 2024-06-20 22:06:13.002631917 +0200
+@@ -94,7 +94,8 @@ class ToolbarView : public views::Access
// needs to be displayed.
};
@@ -1116,10 +1100,9 @@ index 2437b17ffab96..24ac297165db1 10064
ToolbarView(const ToolbarView&) = delete;
ToolbarView& operator=(const ToolbarView&) = delete;
~ToolbarView() override;
-diff --git chrome/browser/ui/web_applications/web_app_menu_model.cc chrome/browser/ui/web_applications/web_app_menu_model.cc
-index 09eb9dbce62f6..93e6dde56ca16 100644
---- chrome/browser/ui/web_applications/web_app_menu_model.cc
-+++ chrome/browser/ui/web_applications/web_app_menu_model.cc
+diff -up chrome/browser/ui/web_applications/web_app_menu_model.cc.crv~ chrome/browser/ui/web_applications/web_app_menu_model.cc
+--- chrome/browser/ui/web_applications/web_app_menu_model.cc.crv~ 2024-06-18 23:43:25.068732500 +0200
++++ chrome/browser/ui/web_applications/web_app_menu_model.cc 2024-06-20 22:06:13.002631917 +0200
@@ -216,7 +216,7 @@ void WebAppMenuModel::Build() {
}
if (media_router::MediaRouterEnabled(browser()->profile()))
diff -up chromium-126.0.6478.36/cef/patch/patches/build.patch.omv~ chromium-126.0.6478.36/cef/patch/patches/build.patch
--- chromium-126.0.6478.36/cef/patch/patches/build.patch.omv~ 2024-06-08 00:38:16.231858716 +0200
+++ chromium-126.0.6478.36/cef/patch/patches/build.patch 2024-06-08 00:53:21.776838481 +0200
@@ -1,7 +1,6 @@
-diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
-index 6efe967eb0a1c..429b3d8897085 100644
---- build/config/compiler/BUILD.gn
-+++ build/config/compiler/BUILD.gn
+diff -up build/config/compiler/BUILD.gn.bld~ build/config/compiler/BUILD.gn
+--- build/config/compiler/BUILD.gn.bld~ 2024-06-08 00:00:34.032389465 +0200
++++ build/config/compiler/BUILD.gn 2024-06-08 00:53:10.516723517 +0200
@@ -133,6 +133,9 @@ declare_args() {
# The cache can lead to non-determinism: https://crbug.com/1486045
thin_lto_enable_cache = true
@@ -12,15 +11,13 @@ index 6efe967eb0a1c..429b3d8897085 10064
# Initialize all local variables with a pattern. This flag will fill
# uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
# rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
-@@ -2179,11 +2182,13 @@ config("export_dynamic") {
+@@ -2179,9 +2182,11 @@ config("export_dynamic") {
config("thin_archive") {
# The macOS and iOS default linker ld64 does not support reading thin
# archives.
+ if (use_thin_archives) {
if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
arflags = [ "-T" ]
- } else if (is_win && use_lld) {
- arflags = [ "/llvmlibthin" ]
}
+ }
}
diff -up chromium-126.0.6478.36/cef/patch/patches/chrome_browser_dialogs_native.patch.omv~ chromium-126.0.6478.36/cef/patch/patches/chrome_browser_dialogs_native.patch
--- chromium-126.0.6478.36/cef/patch/patches/chrome_browser_dialogs_native.patch.omv~ 2024-06-08 00:37:58.055688349 +0200
+++ chromium-126.0.6478.36/cef/patch/patches/chrome_browser_dialogs_native.patch 2024-06-08 00:50:16.014947992 +0200
@@ -1,7 +1,6 @@
-diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
-index 447a91b9ac380..0452f0a8b57cf 100644
---- chrome/browser/file_select_helper.cc
-+++ chrome/browser/file_select_helper.cc
+diff -up chrome/browser/file_select_helper.cc.cbdn~ chrome/browser/file_select_helper.cc
+--- chrome/browser/file_select_helper.cc.cbdn~ 2024-06-08 00:00:15.548136555 +0200
++++ chrome/browser/file_select_helper.cc 2024-06-08 00:49:25.378435274 +0200
@@ -20,6 +20,7 @@
#include "base/threading/hang_watcher.h"
#include "build/build_config.h"
@@ -28,7 +27,7 @@ index 447a91b9ac380..0452f0a8b57cf 10064
ShowFolderUploadConfirmationDialog(
path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
-@@ -329,6 +341,14 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
+@@ -329,6 +341,14 @@ void FileSelectHelper::PerformContentAna
if (AbortIfWebContentsDestroyed())
return;
@@ -40,10 +39,10 @@ index 447a91b9ac380..0452f0a8b57cf 10064
+ }
+#endif
+
- #if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
+ #if false
enterprise_connectors::ContentAnalysisDelegate::Data data;
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
-@@ -472,31 +492,51 @@ FileSelectHelper::GetFileTypesFromAcceptType(
+@@ -472,31 +492,51 @@ FileSelectHelper::GetFileTypesFromAccept
std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back();
@@ -99,7 +98,7 @@ index 447a91b9ac380..0452f0a8b57cf 10064
if (extensions->size() > old_extension_size)
valid_type_count++;
}
-@@ -513,12 +553,28 @@ FileSelectHelper::GetFileTypesFromAcceptType(
+@@ -513,12 +553,28 @@ FileSelectHelper::GetFileTypesFromAccept
// dialog uses the first extension in the list to form the description,
// like "EHTML Files". This is not what we want.
if (valid_type_count > 1 ||
@@ -132,7 +131,7 @@ index 447a91b9ac380..0452f0a8b57cf 10064
}
return file_type;
-@@ -528,7 +584,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
+@@ -528,7 +584,8 @@ FileSelectHelper::GetFileTypesFromAccept
void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -150,11 +149,10 @@ index 447a91b9ac380..0452f0a8b57cf 10064
file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
params.Clone());
}
-diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
-index 7194323c36956..fd4a5361798f0 100644
---- chrome/browser/file_select_helper.h
-+++ chrome/browser/file_select_helper.h
-@@ -62,7 +62,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
+diff -up chrome/browser/file_select_helper.h.cbdn~ chrome/browser/file_select_helper.h
+--- chrome/browser/file_select_helper.h.cbdn~ 2024-06-08 00:00:15.548136555 +0200
++++ chrome/browser/file_select_helper.h 2024-06-08 00:47:47.993453097 +0200
+@@ -62,7 +62,8 @@ class FileSelectHelper : public base::Re
static void RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -164,7 +162,7 @@ index 7194323c36956..fd4a5361798f0 10064
// Enumerates all the files in directory.
static void EnumerateDirectory(
-@@ -325,6 +326,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
+@@ -325,6 +326,9 @@ class FileSelectHelper : public base::Re
// Set to false in unit tests since there is no WebContents.
bool abort_on_missing_web_contents_in_tests_ = true;
@@ -174,11 +172,10 @@ index 7194323c36956..fd4a5361798f0 10064
#if BUILDFLAG(IS_CHROMEOS_ASH)
base::WeakPtrFactory<FileSelectHelper> weak_ptr_factory_{this};
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-diff --git chrome/browser/ui/chrome_select_file_policy.h chrome/browser/ui/chrome_select_file_policy.h
-index 49272553c7c53..5ba90c9a06ecf 100644
---- chrome/browser/ui/chrome_select_file_policy.h
-+++ chrome/browser/ui/chrome_select_file_policy.h
-@@ -30,6 +30,8 @@ class ChromeSelectFilePolicy : public ui::SelectFilePolicy {
+diff -up chrome/browser/ui/chrome_select_file_policy.h.cbdn~ chrome/browser/ui/chrome_select_file_policy.h
+--- chrome/browser/ui/chrome_select_file_policy.h.cbdn~ 2024-06-06 02:17:01.390522200 +0200
++++ chrome/browser/ui/chrome_select_file_policy.h 2024-06-08 00:47:47.993453097 +0200
+@@ -30,6 +30,8 @@ class ChromeSelectFilePolicy : public ui
// Returns true if local state allows showing file pickers.
static bool FileSelectDialogsAllowed();
@@ -187,10 +184,9 @@ index 49272553c7c53..5ba90c9a06ecf 10064
private:
raw_ptr<content::WebContents, AcrossTasksDanglingUntriaged> source_contents_;
};
-diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc
-index 9361287ac3411..59567b485bf99 100644
---- ui/shell_dialogs/execute_select_file_win.cc
-+++ ui/shell_dialogs/execute_select_file_win.cc
+diff -up ui/shell_dialogs/execute_select_file_win.cc.cbdn~ ui/shell_dialogs/execute_select_file_win.cc
+--- ui/shell_dialogs/execute_select_file_win.cc.cbdn~ 2024-06-06 02:17:41.890439700 +0200
++++ ui/shell_dialogs/execute_select_file_win.cc 2024-06-08 00:47:47.993453097 +0200
@@ -360,9 +360,7 @@ bool ExecuteSelectSingleFile(HWND owner,
const std::vector<FileFilterSpec>& filter,
int* filter_index,
@@ -202,7 +198,7 @@ index 9361287ac3411..59567b485bf99 10064
default_path, filter, 0, filter_index, paths);
}
-@@ -374,14 +372,13 @@ bool ExecuteSelectMultipleFile(HWND owner,
+@@ -374,14 +372,13 @@ bool ExecuteSelectMultipleFile(HWND owne
std::vector<base::FilePath>* paths) {
DWORD dialog_options = FOS_ALLOWMULTISELECT;
@@ -239,10 +235,9 @@ index 9361287ac3411..59567b485bf99 10064
&file_type_index, &path)) {
paths.push_back(std::move(path));
}
-diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc
-index 68dd62159b686..e94831cd44a2d 100644
---- ui/shell_dialogs/select_file_dialog.cc
-+++ ui/shell_dialogs/select_file_dialog.cc
+diff -up ui/shell_dialogs/select_file_dialog.cc.cbdn~ ui/shell_dialogs/select_file_dialog.cc
+--- ui/shell_dialogs/select_file_dialog.cc.cbdn~ 2024-06-06 02:17:41.890439700 +0200
++++ ui/shell_dialogs/select_file_dialog.cc 2024-06-08 00:47:47.993453097 +0200
@@ -73,8 +73,10 @@ void SelectFileDialog::SetFactory(
// static
scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
@@ -256,11 +251,10 @@ index 68dd62159b686..e94831cd44a2d 10064
return dialog_factory_->Create(listener, std::move(policy));
return CreateSelectFileDialog(listener, std::move(policy));
}