1diff --git a/src/BUILD.gn b/src/BUILD.gn 2index 2c35c744f576c..42c59a4c5f587 3--- a/src/BUILD.gn 4+++ b/src/BUILD.gn 5@@ -104,13 +104,12 @@ group("gn_all") { 6 "//url:url_unittests", 7 ] 8 9- deps += [ "//ohos_nweb:libnweb_adapter" ] 10- 11 #ifdef OHOS_NWEB_EX 12 if (defined(ohos_nweb_ex) && ohos_nweb_ex) { 13 deps += [ 14 "//ohos_browser_shell", 15 "//ohos_nweb_ex/browser_service", 16+ "//ohos_nweb_ex/test:ohos_nweb_ex_unittests", 17 "//ohos_nweb_hap", 18 ] 19 } # endif // OHOS_NWEB_EX 20diff --git a/src/PRESUBMIT.py b/src/PRESUBMIT.py 21index 9e494489f8072..8b6873613163e 22--- a/src/PRESUBMIT.py 23+++ b/src/PRESUBMIT.py 24@@ -985,6 +985,19 @@ _BANNED_CPP_FUNCTIONS = ( 25 r'^base[\\/]win[\\/]scoped_winrt_initializer\.cc$' 26 ), 27 ), 28+ ( 29+ r'\bchartorune\b', 30+ ( 31+ 'chartorune is not memory-safe, unless you can guarantee the input ', 32+ 'string is always null-terminated. Otherwise, please use charntorune ', 33+ 'from libphonenumber instead.' 34+ ), 35+ True, 36+ [ 37+ _THIRD_PARTY_EXCEPT_BLINK, 38+ # Exceptions to this rule should have a fuzzer. 39+ ], 40+ ), 41 ) 42 43 # Format: Sequence of tuples containing: 44diff --git a/src/base/files/file_util_posix.cc b/src/base/files/file_util_posix.cc 45index 7e4b3cd4796f2..584d51b168eda 46--- a/src/base/files/file_util_posix.cc 47+++ b/src/base/files/file_util_posix.cc 48@@ -570,12 +570,6 @@ bool ExecutableExistsInPath(Environment* env, 49 #if !BUILDFLAG(IS_APPLE) 50 // This is implemented in file_util_mac.mm for Mac. 51 bool GetTempDir(FilePath* path) { 52- const char* tmp = getenv("TMPDIR"); 53- if (tmp) { 54- *path = FilePath(tmp); 55- return true; 56- } 57- 58 #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_OHOS) 59 return PathService::Get(DIR_CACHE, path); 60 #else 61diff --git a/src/base/files/memory_mapped_file.cc b/src/base/files/memory_mapped_file.cc 62index f1fbe30072846..6e466b9f3ff4b 63--- a/src/base/files/memory_mapped_file.cc 64+++ b/src/base/files/memory_mapped_file.cc 65@@ -28,7 +28,20 @@ bool MemoryMappedFile::Region::operator!=( 66 } 67 68 MemoryMappedFile::~MemoryMappedFile() { 69+#if BUILDFLAG(IS_OHOS) 70+ if (!customizeData_) { 71+ CloseHandles(); 72+ return; 73+ } 74+ 75+ if (data_) { 76+ delete [] data_; 77+ data_ = nullptr; 78+ } 79+ length_ = 0; 80+#else 81 CloseHandles(); 82+#endif 83 } 84 85 #if !BUILDFLAG(IS_NACL) 86diff --git a/src/base/files/memory_mapped_file.h b/src/base/files/memory_mapped_file.h 87index 88536c5eb436f..2d96dfa52aaea 88--- a/src/base/files/memory_mapped_file.h 89+++ b/src/base/files/memory_mapped_file.h 90@@ -111,6 +111,17 @@ class BASE_EXPORT MemoryMappedFile { 91 // Is file_ a valid file handle that points to an open, memory mapped file? 92 bool IsValid() const; 93 94+#if BUILDFLAG(IS_OHOS) 95+ void SetDataAndLength(std::unique_ptr<uint8_t[]> &data, size_t length) { 96+ if (IsValid() && !customizeData_) { 97+ CloseHandles(); 98+ } 99+ customizeData_ = true; 100+ data_ = data.release(); 101+ length_ = length; 102+ } 103+#endif 104+ 105 private: 106 // Given the arbitrarily aligned memory region [start, size], returns the 107 // boundaries of the region aligned to the granularity specified by the OS, 108@@ -140,6 +151,9 @@ class BASE_EXPORT MemoryMappedFile { 109 File file_; 110 uint8_t* data_; 111 size_t length_; 112+#if BUILDFLAG(IS_OHOS) 113+ bool customizeData_ = false; 114+#endif 115 116 #if BUILDFLAG(IS_WIN) 117 win::ScopedHandle file_mapping_; 118diff --git a/src/base/i18n/icu_util.cc b/src/base/i18n/icu_util.cc 119index b39ad6cc6441c..87283aef6e1f6 120--- a/src/base/i18n/icu_util.cc 121+++ b/src/base/i18n/icu_util.cc 122@@ -57,6 +57,12 @@ 123 #include "third_party/icu/source/i18n/unicode/timezone.h" 124 #endif 125 126+#if BUILDFLAG(IS_OHOS) 127+#include "base/command_line.h" 128+#include "content/public/common/content_switches.h" 129+#include "ohos_adapter_helper.h" 130+#endif 131+ 132 namespace base { 133 namespace i18n { 134 135@@ -265,6 +271,34 @@ int LoadIcuData(PlatformFile data_fd, 136 return 0; 137 } 138 139+#if BUILDFLAG(IS_OHOS) 140+const char kIcuDataFileNameHap[] = "resources/rawfile/icudtl.dat"; 141+int LoadIcuDataByHap(PlatformFile data_fd, 142+ const MemoryMappedFile::Region& data_region, 143+ std::unique_ptr<MemoryMappedFile>* out_mapped_data_file, 144+ UErrorCode* out_error_code) { 145+ size_t length = 0; 146+ std::unique_ptr<uint8_t[]> data; 147+ auto resourceInstance = OHOS::NWeb::OhosAdapterHelper::GetInstance().GetResourceAdapter(); 148+ if (!resourceInstance->GetRawFileData(kIcuDataFileNameHap, length, data, true)) { 149+ LOG(ERROR) << "Couldn't mmap icu data file by hap: " << kIcuDataFileNameHap; 150+ return 1; 151+ } 152+ 153+ *out_mapped_data_file = std::make_unique<MemoryMappedFile>(); 154+ (*out_error_code) = U_ZERO_ERROR; 155+ InitializeExternalTimeZoneData(); 156+ (*out_mapped_data_file)->SetDataAndLength(data, length); 157+ LOG(INFO) << "icu data file length: " << length; 158+ udata_setCommonData(const_cast<uint8_t*>((*out_mapped_data_file)->data()), out_error_code); 159+ if (U_FAILURE(*out_error_code)) { 160+ LOG(ERROR) << "Failed to initialize ICU with data file: " << u_errorName(*out_error_code); 161+ return 3; 162+ } 163+ return 0; 164+} 165+#endif 166+ 167 bool InitializeICUWithFileDescriptorInternal( 168 PlatformFile data_fd, 169 const MemoryMappedFile::Region& data_region) { 170@@ -276,7 +310,15 @@ bool InitializeICUWithFileDescriptorInternal( 171 172 std::unique_ptr<MemoryMappedFile> mapped_file; 173 UErrorCode err; 174+#if BUILDFLAG(IS_OHOS) 175+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOhosHapPath)) { 176+ g_debug_icu_load = LoadIcuDataByHap(data_fd, data_region, &mapped_file, &err); 177+ } else { 178+ g_debug_icu_load = LoadIcuData(data_fd, data_region, &mapped_file, &err); 179+ } 180+#else 181 g_debug_icu_load = LoadIcuData(data_fd, data_region, &mapped_file, &err); 182+#endif 183 if (g_debug_icu_load == 1 || g_debug_icu_load == 2) { 184 return false; 185 } 186@@ -298,7 +340,7 @@ bool InitializeICUFromDataFile() { 187 // cause any problems. 188 LazyOpenIcuDataFile(); 189 bool result = 190- InitializeICUWithFileDescriptorInternal(g_icudtl_pf, g_icudtl_region); 191+ InitializeICUWithFileDescriptorInternal(g_icudtl_pf, g_icudtl_region); 192 193 #if BUILDFLAG(IS_WIN) 194 int debug_icu_load = g_debug_icu_load; 195diff --git a/src/base/logging.cc b/src/base/logging.cc 196index 0de6357094283..6f930c3dbc87d 197--- a/src/base/logging.cc 198+++ b/src/base/logging.cc 199@@ -146,7 +146,7 @@ namespace { 200 VlogInfo* g_vlog_info = nullptr; 201 VlogInfo* g_vlog_info_prev = nullptr; 202 203-const char* const log_severity_names[] = {"INFO", "WARNING", "ERROR", "FATAL"}; 204+const char* const log_severity_names[] = {"INFO", "WARNING", "ERROR", "FATAL", "DEBUG"}; 205 static_assert(LOGGING_NUM_SEVERITIES == base::size(log_severity_names), 206 "Incorrect number of log_severity_names"); 207 208@@ -850,6 +850,8 @@ LogMessage::~LogMessage() { 209 case LOGGING_FATAL: 210 priority = LogLevel::LOG_FATAL; 211 break; 212+ case LOGGING_DEBUG: 213+ priority = LogLevel::LOG_DEBUG; 214 } 215 const char kOHOSLogTag[] = "chromium"; 216 HiLogPrintOHOS(LOG_CORE, priority, 0xD004500, kOHOSLogTag, str_newline.c_str()); 217diff --git a/src/base/logging.h b/src/base/logging.h 218index a3ff92f0fd7df..83a8dc3517608 219--- a/src/base/logging.h 220+++ b/src/base/logging.h 221@@ -359,7 +359,8 @@ constexpr LogSeverity LOGGING_INFO = 0; 222 constexpr LogSeverity LOGGING_WARNING = 1; 223 constexpr LogSeverity LOGGING_ERROR = 2; 224 constexpr LogSeverity LOGGING_FATAL = 3; 225-constexpr LogSeverity LOGGING_NUM_SEVERITIES = 4; 226+constexpr LogSeverity LOGGING_DEBUG = 4; 227+constexpr LogSeverity LOGGING_NUM_SEVERITIES = 5; 228 229 // LOGGING_DFATAL is LOGGING_FATAL in DCHECK-enabled builds, ERROR in normal 230 // mode. 231@@ -373,6 +374,7 @@ constexpr LogSeverity LOGGING_DFATAL = LOGGING_ERROR; 232 // from LOG_FOO to LOGGING_FOO. 233 // TODO(thestig): Convert existing users to LOGGING_FOO and remove this block. 234 constexpr LogSeverity LOG_VERBOSE = LOGGING_VERBOSE; 235+constexpr LogSeverity LOG_DEBUG = LOGGING_DEBUG; 236 constexpr LogSeverity LOG_INFO = LOGGING_INFO; 237 constexpr LogSeverity LOG_WARNING = LOGGING_WARNING; 238 constexpr LogSeverity LOG_ERROR = LOGGING_ERROR; 239@@ -382,6 +384,9 @@ constexpr LogSeverity LOG_DFATAL = LOGGING_DFATAL; 240 // A few definitions of macros that don't generate much code. These are used 241 // by LOG() and LOG_IF, etc. Since these are used all over our code, it's 242 // better to have compact code for these operations. 243+#define COMPACT_GOOGLE_LOG_EX_DEBUG(ClassName, ...) \ 244+ ::logging::ClassName(__FILE__, __LINE__, ::logging::LOGGING_DEBUG, \ 245+ ##__VA_ARGS__) 246 #define COMPACT_GOOGLE_LOG_EX_INFO(ClassName, ...) \ 247 ::logging::ClassName(__FILE__, __LINE__, ::logging::LOGGING_INFO, \ 248 ##__VA_ARGS__) 249@@ -401,6 +406,7 @@ constexpr LogSeverity LOG_DFATAL = LOGGING_DFATAL; 250 ::logging::ClassName(__FILE__, __LINE__, ::logging::LOGGING_DCHECK, \ 251 ##__VA_ARGS__) 252 253+#define COMPACT_GOOGLE_LOG_DEBUG COMPACT_GOOGLE_LOG_EX_DEBUG(LogMessage) 254 #define COMPACT_GOOGLE_LOG_INFO COMPACT_GOOGLE_LOG_EX_INFO(LogMessage) 255 #define COMPACT_GOOGLE_LOG_WARNING COMPACT_GOOGLE_LOG_EX_WARNING(LogMessage) 256 #define COMPACT_GOOGLE_LOG_ERROR COMPACT_GOOGLE_LOG_EX_ERROR(LogMessage) 257diff --git a/src/build/config/compiler/BUILD.gn b/src/build/config/compiler/BUILD.gn 258index da2e9864f99e3..28ee784acd77d 259--- a/src/build/config/compiler/BUILD.gn 260+++ b/src/build/config/compiler/BUILD.gn 261@@ -238,7 +238,7 @@ config("default_include_dirs") { 262 # the executable they are loaded into, so they are unresolved at link-time. 263 config("no_unresolved_symbols") { 264 if (!using_sanitizer && 265- (is_linux || is_chromeos || is_android || is_fuchsia)) { 266+ (is_linux || is_chromeos || is_android || is_fuchsia || is_ohos)) { 267 ldflags = [ 268 "-Wl,-z,defs", 269 "-Wl,--as-needed", 270@@ -692,6 +692,10 @@ config("compiler") { 271 # TODO(thakis): Check if '=0' (that is, number of cores, instead 272 # of "all" which means number of hardware threads) is faster. 273 ldflags += [ "-Wl,--thinlto-jobs=all" ] 274+ if (is_ohos && !use_musl) { 275+ ldflags -= [ "-Wl,--thinlto-jobs=all" ] 276+ ldflags += [ "-Wl,--thinlto-jobs=8" ] 277+ } 278 if (is_mac) { 279 ldflags += 280 [ "-Wl,-cache_path_lto," + 281@@ -720,7 +724,7 @@ config("compiler") { 282 } 283 284 # TODO(https://crbug.com/1211155): investigate why this isn't effective on arm32. 285- if ((!is_android && !is_ohos) || current_cpu == "arm64") { 286+ if (!is_android || current_cpu == "arm64") { 287 cflags += [ "-fwhole-program-vtables" ] 288 if (!is_win) { 289 ldflags += [ "-fwhole-program-vtables" ] 290diff --git a/src/build/config/compiler/compiler.gni b/src/build/config/compiler/compiler.gni 291index 05a30aa62deb8..15fa15254b93c 292--- a/src/build/config/compiler/compiler.gni 293+++ b/src/build/config/compiler/compiler.gni 294@@ -74,7 +74,7 @@ declare_args() { 295 use_thin_lto = 296 is_cfi || 297 (is_clang && is_official_build && chrome_pgo_phase != 1 && 298- (is_linux || is_win || is_mac || 299+ (is_linux || is_win || is_mac || is_ohos || 300 (is_android && target_os != "chromeos") || 301 ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))) 302 303diff --git a/src/build/config/ohos/BUILD.gn b/src/build/config/ohos/BUILD.gn 304index 267a37869f9e7..5cb5cb6ccc4ad 305--- a/src/build/config/ohos/BUILD.gn 306+++ b/src/build/config/ohos/BUILD.gn 307@@ -259,7 +259,11 @@ config("runtime_library") { 308 } 309 310 config("lld_pack_relocations") { 311- ldflags = [ "-Wl,--pack-dyn-relocs=android" ] 312+ if (use_musl) { 313+ ldflags = [ "-Wl,--pack-dyn-relocs=relr" ] 314+ } else { 315+ ldflags = [ "-Wl,--pack-dyn-relocs=android" ] 316+ } 317 } 318 319 # Used for instrumented build to generate the orderfile. 320diff --git a/src/cc/layers/scrollbar_layer_impl_base.cc b/src/cc/layers/scrollbar_layer_impl_base.cc 321index 8afe837d5255f..5c7ecb6ce32c6 322--- a/src/cc/layers/scrollbar_layer_impl_base.cc 323+++ b/src/cc/layers/scrollbar_layer_impl_base.cc 324@@ -7,6 +7,7 @@ 325 #include <algorithm> 326 327 #include "base/cxx17_backports.h" 328+#include "base/logging.h" 329 #include "cc/trees/effect_node.h" 330 #include "cc/trees/layer_tree_impl.h" 331 #include "cc/trees/scroll_node.h" 332diff --git a/src/cc/layers/scrollbar_layer_impl_base.h b/src/cc/layers/scrollbar_layer_impl_base.h 333index b0a5eb3dd8e69..a456eedd6182f 334--- a/src/cc/layers/scrollbar_layer_impl_base.h 335+++ b/src/cc/layers/scrollbar_layer_impl_base.h 336@@ -12,6 +12,10 @@ 337 #include "cc/layers/layer.h" 338 #include "cc/layers/layer_impl.h" 339 #include "cc/trees/layer_tree_settings.h" 340+#if BUILDFLAG(IS_OHOS) 341+#include "display_manager_adapter.h" 342+#include "ohos_adapter_helper.h" 343+#endif 344 345 namespace cc { 346 347@@ -115,6 +119,13 @@ class CC_EXPORT ScrollbarLayerImplBase : public LayerImpl { 348 ScrollbarOrientation orientation_; 349 bool is_left_side_vertical_scrollbar_; 350 351+#if BUILDFLAG(IS_OHOS) 352+ std::unique_ptr<OHOS::NWeb::DisplayManagerAdapter> display_manager_adapter_ = 353+ nullptr; 354+ float initial_layout_size_ratio_ = 2.0f; 355+ void SetInitalLayoutRatio(); 356+#endif 357+ 358 // Difference between the clip layer's height and the visible viewport 359 // height (which may differ in the presence of top-controls hiding). 360 float vertical_adjust_; 361diff --git a/src/cef/BUILD.gn b/src/cef/BUILD.gn 362index 34b45df974a8a..4af75193cdca7 363--- a/src/cef/BUILD.gn 364+++ b/src/cef/BUILD.gn 365@@ -249,7 +249,7 @@ if (is_linux) { 366 367 # Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1. 368 assert(enable_basic_printing) 369-assert(enable_print_preview) 370+assert(enable_print_preview || is_ohos) 371 372 # Enable support for Widevine CDM. 373 assert(enable_widevine || is_ohos) 374@@ -259,6 +259,13 @@ if (is_clang) { 375 assert(!clang_use_chrome_plugins) 376 } 377 378+if (is_ohos) { 379+ import("//pdf/features.gni") 380+ declare_args() { 381+ ohos_enable_cef_chrome_runtime = false 382+ } 383+} 384+ 385 # 386 # Local variables. 387 # 388@@ -449,6 +456,8 @@ static_library("libcef_static") { 389 "libcef/browser/browser_platform_delegate_create.cc", 390 "libcef/browser/browser_util.cc", 391 "libcef/browser/browser_util.h", 392+ "libcef/browser/navigation_state_serializer.cc", 393+ "libcef/browser/navigation_state_serializer.h", 394 "libcef/browser/chrome/browser_delegate.h", 395 "libcef/browser/chrome/browser_platform_delegate_chrome.cc", 396 "libcef/browser/chrome/browser_platform_delegate_chrome.h", 397@@ -863,6 +872,75 @@ static_library("libcef_static") { 398 "//third_party/crashpad/crashpad", 399 ] 400 401+ if (defined(ohos_enable_cef_chrome_runtime) && 402+ !ohos_enable_cef_chrome_runtime) { 403+ sources -= [ 404+ "//chrome/app/chrome_main_delegate.cc", 405+ "//chrome/app/chrome_main_delegate.h", 406+ "libcef/browser/chrome/browser_delegate.h", 407+ "libcef/browser/chrome/browser_platform_delegate_chrome.cc", 408+ "libcef/browser/chrome/browser_platform_delegate_chrome.h", 409+ "libcef/browser/chrome/chrome_browser_context.cc", 410+ "libcef/browser/chrome/chrome_browser_context.h", 411+ "libcef/browser/chrome/chrome_browser_delegate.cc", 412+ "libcef/browser/chrome/chrome_browser_delegate.h", 413+ "libcef/browser/chrome/chrome_browser_host_impl.cc", 414+ "libcef/browser/chrome/chrome_browser_host_impl.h", 415+ "libcef/browser/chrome/chrome_browser_main_extra_parts_cef.cc", 416+ "libcef/browser/chrome/chrome_browser_main_extra_parts_cef.h", 417+ "libcef/browser/chrome/chrome_content_browser_client_cef.cc", 418+ "libcef/browser/chrome/chrome_content_browser_client_cef.h", 419+ "libcef/browser/chrome/chrome_context_menu_handler.cc", 420+ "libcef/browser/chrome/chrome_context_menu_handler.h", 421+ "libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.cc", 422+ "libcef/browser/chrome/extensions/chrome_mime_handler_view_guest_delegate_cef.h", 423+ "libcef/browser/chrome_crash_reporter_client_stub.cc", 424+ "libcef/browser/net/chrome_scheme_handler.cc", 425+ "libcef/browser/net/chrome_scheme_handler.h", 426+ "libcef/common/chrome/chrome_content_client_cef.cc", 427+ "libcef/common/chrome/chrome_content_client_cef.h", 428+ "libcef/common/chrome/chrome_main_delegate_cef.cc", 429+ "libcef/common/chrome/chrome_main_delegate_cef.h", 430+ "libcef/common/chrome/chrome_main_runner_delegate.cc", 431+ "libcef/common/chrome/chrome_main_runner_delegate.h", 432+ "libcef/renderer/chrome/chrome_content_renderer_client_cef.cc", 433+ "libcef/renderer/chrome/chrome_content_renderer_client_cef.h", 434+ ] 435+ } 436+ 437+ if (is_ohos && !enable_print_preview) { 438+ sources -= [ 439+ "libcef/browser/printing/constrained_window_views_client.cc", 440+ "libcef/browser/printing/constrained_window_views_client.h", 441+ "libcef/browser/printing/print_view_manager.cc", 442+ "libcef/browser/printing/print_view_manager.h", 443+ "libcef/renderer/extensions/print_render_frame_helper_delegate.cc", 444+ "libcef/renderer/extensions/print_render_frame_helper_delegate.h", 445+ ] 446+ } 447+ 448+ if (is_ohos && !enable_plugins) { 449+ sources -= [ 450+ "libcef/browser/web_plugin_impl.cc", 451+ "libcef/browser/web_plugin_impl.h", 452+ ] 453+ } 454+ 455+ if (is_ohos && !ohos_enable_media_router) { 456+ sources -= [ 457+ "libcef/browser/media_router/media_route_impl.cc", 458+ "libcef/browser/media_router/media_route_impl.h", 459+ "libcef/browser/media_router/media_router_impl.cc", 460+ "libcef/browser/media_router/media_router_impl.h", 461+ "libcef/browser/media_router/media_router_manager.cc", 462+ "libcef/browser/media_router/media_router_manager.h", 463+ "libcef/browser/media_router/media_sink_impl.cc", 464+ "libcef/browser/media_router/media_sink_impl.h", 465+ "libcef/browser/media_router/media_source_impl.cc", 466+ "libcef/browser/media_router/media_source_impl.h", 467+ ] 468+ } 469+ 470 public_deps = [ 471 # Bring in feature flag defines. 472 "//cef/libcef/features", 473@@ -974,6 +1052,42 @@ static_library("libcef_static") { 474 "//v8", 475 ] 476 477+ if (defined(ohos_enable_cef_chrome_runtime) && 478+ !ohos_enable_cef_chrome_runtime) { 479+ deps -= [ 480+ "//chrome:packed_resources", 481+ "//chrome:resources", 482+ "//chrome:strings", 483+ "//chrome/services/printing:lib", 484+ ] 485+ } 486+ 487+ if (is_ohos && !enable_print_preview) { 488+ deps -= [ 489+ "//components/printing/browser", 490+ "//components/printing/common", 491+ "//components/printing/renderer", 492+ "//components/services/print_compositor/public/cpp", 493+ "//components/services/print_compositor/public/mojom", 494+ ] 495+ } 496+ 497+ if (is_ohos && !enable_plugins) { 498+ deps -= [ "//components/plugins/renderer" ] 499+ } 500+ 501+ if (is_ohos && !enable_pdf) { 502+ deps -= [ 503+ "//components/pdf/browser", 504+ "//components/pdf/renderer", 505+ "//pdf", 506+ ] 507+ } 508+ 509+ if (is_ohos && !ohos_enable_media_router) { 510+ deps -= [ "//components/media_router/common/mojom:media_router" ] 511+ } 512+ 513 if (defined(ohos_nweb_ex) && ohos_nweb_ex) { 514 deps += [ "//ohos_nweb_ex/overrides/cef" ] 515 } 516@@ -1113,7 +1227,7 @@ static_library("libcef_static") { 517 deps += [ "//tools/v8_context_snapshot" ] 518 } 519 520- if (toolkit_views || is_ohos) { 521+ if (toolkit_views) { 522 sources += [ 523 "libcef/browser/chrome/views/browser_platform_delegate_chrome_views.cc", 524 "libcef/browser/chrome/views/browser_platform_delegate_chrome_views.h", 525@@ -1330,6 +1444,58 @@ static_library("libcef_static") { 526 "libcef_dll/views_stub.cc", 527 ] 528 } 529+ 530+ if (is_ohos) { 531+ sources += [ 532+ "libcef/browser/chrome/views/chrome_views_util.cc", 533+ "libcef/browser/chrome/views/chrome_views_util.h", 534+ "libcef/browser/views/view_util.cc", 535+ "libcef/browser/views/view_util.h", 536+ ] 537+ 538+ if (use_aura) { 539+ sources += [ 540+ "libcef/browser/native/browser_platform_delegate_native_aura.cc", 541+ "libcef/browser/native/browser_platform_delegate_native_aura.h", 542+ "libcef/browser/views/view_util_aura.cc", 543+ 544+ # Part of //ui/views:test_support which is testingonly. 545+ "//ui/views/test/desktop_test_views_delegate_aura.cc", 546+ "//ui/views/test/test_views_delegate_aura.cc", 547+ 548+ # Support for UI input events. 549+ # Part of //ui/base:test_support which is testingonly. 550+ "//ui/aura/test/ui_controls_factory_aura.h", 551+ "//ui/base/test/ui_controls_aura.cc", 552+ ] 553+ 554+ deps += [ 555+ "//ui/aura", 556+ "//ui/wm", 557+ "//ui/wm/public", 558+ ] 559+ 560+ if (is_ohos) { 561+ sources += [ 562+ # Support for UI input events. 563+ # Part of //ui/aura:test_support which is testingonly. 564+ "//ui/aura/test/aura_test_utils.cc", 565+ "//ui/aura/test/aura_test_utils.h", 566+ 567+ # Part of //ui/events:test_support which is testingonly. 568+ # "//ui/events/test/x11_event_waiter.cc", 569+ # "//ui/events/test/x11_event_waiter.h", 570+ ] 571+ 572+ deps += [ 573+ "//ui/events", 574+ "//ui/strings", 575+ "//ui/views", 576+ "//ui/views/controls/webview", 577+ ] 578+ } 579+ } 580+ } 581 } 582 583 # 584@@ -1519,7 +1685,27 @@ make_pack_header("resources") { 585 "//ui/resources:webui_resources_grd", 586 ] 587 588- if (toolkit_views || is_ohos) { 589+ if (defined(ohos_enable_cef_chrome_runtime) && 590+ !ohos_enable_cef_chrome_runtime) { 591+ inputs -= [ 592+ "$root_gen_dir/chrome/grit/browser_resources.h", 593+ "$root_gen_dir/chrome/grit/common_resources.h", 594+ "$root_gen_dir/chrome/grit/component_extension_resources.h", 595+ "$root_gen_dir/chrome/grit/dev_ui_browser_resources.h", 596+ "$root_gen_dir/chrome/grit/pdf_resources.h", 597+ "$root_gen_dir/chrome/grit/renderer_resources.h", 598+ ] 599+ deps -= [ 600+ "//chrome/browser:dev_ui_browser_resources", 601+ "//chrome/browser:resources", 602+ "//chrome/browser/resources:component_extension_resources", 603+ "//chrome/browser/resources/pdf:resources", 604+ "//chrome/common:resources", 605+ "//chrome/renderer:resources", 606+ ] 607+ } 608+ 609+ if (toolkit_views) { 610 inputs += [ "$root_gen_dir/ui/views/resources/grit/views_resources.h" ] 611 deps += [ "//ui/views/resources:resources_grd" ] 612 } 613@@ -1561,6 +1747,22 @@ make_pack_header("strings") { 614 "//ui/strings:app_locale_settings", 615 "//ui/strings:ui_strings", 616 ] 617+ 618+ if (defined(ohos_enable_cef_chrome_runtime) && 619+ !ohos_enable_cef_chrome_runtime) { 620+ inputs -= [ 621+ "$root_gen_dir/chrome/grit/chromium_strings.h", 622+ "$root_gen_dir/chrome/grit/generated_resources.h", 623+ "$root_gen_dir/chrome/grit/locale_settings.h", 624+ "$root_gen_dir/chrome/grit/platform_locale_settings.h", 625+ ] 626+ deps -= [ 627+ "//chrome/app:chromium_strings", 628+ "//chrome/app:generated_resources", 629+ "//chrome/app/resources:locale_settings", 630+ "//chrome/app/resources:platform_locale_settings", 631+ ] 632+ } 633 } 634 635 # Generate cef_api_hash.h. 636@@ -1753,6 +1955,18 @@ if (is_mac) { 637 ldflags = [ "-Wl,--version-script=" + 638 rebase_path("//cef/libcef_dll/libcef.lst") ] 639 } 640+ 641+ if (is_ohos) { 642+ deps += [ "//ohos_nweb:nweb_sources" ] 643+ if (defined(ohos_nweb_ex) && ohos_nweb_ex) { 644+ deps += [ "//ohos_nweb_ex:nweb_ex" ] 645+ } 646+ configs += [ "//build/config/ohos:lld_pack_relocations" ] 647+ if (!(defined(testonly) && testonly)) { 648+ configs -= [ "//build/config/compiler:thinlto_optimize_default" ] 649+ configs += [ "//build/config/compiler:thinlto_optimize_max" ] 650+ } 651+ } 652 } 653 } 654 655diff --git a/src/cef/cef_paths.gypi b/src/cef/cef_paths.gypi 656index 45331261cf845..b82cb6579f4e1 657--- a/src/cef/cef_paths.gypi 658+++ b/src/cef/cef_paths.gypi 659@@ -1,4 +1,4 @@ 660-# Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 661+# Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 662 # reserved. Use of this source code is governed by a BSD-style license that 663 # can be found in the LICENSE file. 664 # 665@@ -8,7 +8,7 @@ 666 # by hand. See the translator.README.txt file in the tools directory for 667 # more information. 668 # 669-# $hash=6509e4ab15ca15cfbe46f0e54693db2dcb590810$ 670+# $hash=c0184bbfa08d5b1a2168f3886235203d2fa5b758$ 671 # 672 673 { 674@@ -48,7 +48,6 @@ 675 'include/cef_keyboard_handler.h', 676 'include/cef_life_span_handler.h', 677 'include/cef_load_handler.h', 678- 'include/cef_media_router.h', 679 'include/cef_menu_model.h', 680 'include/cef_menu_model_delegate.h', 681 'include/cef_navigation_entry.h', 682@@ -86,7 +85,6 @@ 683 'include/cef_v8.h', 684 'include/cef_values.h', 685 'include/cef_waitable_event.h', 686- 'include/cef_web_plugin.h', 687 'include/cef_web_storage.h', 688 'include/cef_x509_certificate.h', 689 'include/cef_xml_reader.h', 690@@ -150,7 +148,6 @@ 691 'include/capi/cef_keyboard_handler_capi.h', 692 'include/capi/cef_life_span_handler_capi.h', 693 'include/capi/cef_load_handler_capi.h', 694- 'include/capi/cef_media_router_capi.h', 695 'include/capi/cef_menu_model_capi.h', 696 'include/capi/cef_menu_model_delegate_capi.h', 697 'include/capi/cef_navigation_entry_capi.h', 698@@ -188,7 +185,6 @@ 699 'include/capi/cef_v8_capi.h', 700 'include/capi/cef_values_capi.h', 701 'include/capi/cef_waitable_event_capi.h', 702- 'include/capi/cef_web_plugin_capi.h', 703 'include/capi/cef_web_storage_capi.h', 704 'include/capi/cef_x509_certificate_capi.h', 705 'include/capi/cef_xml_reader_capi.h', 706@@ -348,20 +344,6 @@ 707 'libcef_dll/cpptoc/list_value_cpptoc.h', 708 'libcef_dll/ctocpp/load_handler_ctocpp.cc', 709 'libcef_dll/ctocpp/load_handler_ctocpp.h', 710- 'libcef_dll/ctocpp/media_observer_ctocpp.cc', 711- 'libcef_dll/ctocpp/media_observer_ctocpp.h', 712- 'libcef_dll/cpptoc/media_route_cpptoc.cc', 713- 'libcef_dll/cpptoc/media_route_cpptoc.h', 714- 'libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc', 715- 'libcef_dll/ctocpp/media_route_create_callback_ctocpp.h', 716- 'libcef_dll/cpptoc/media_router_cpptoc.cc', 717- 'libcef_dll/cpptoc/media_router_cpptoc.h', 718- 'libcef_dll/cpptoc/media_sink_cpptoc.cc', 719- 'libcef_dll/cpptoc/media_sink_cpptoc.h', 720- 'libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc', 721- 'libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h', 722- 'libcef_dll/cpptoc/media_source_cpptoc.cc', 723- 'libcef_dll/cpptoc/media_source_cpptoc.h', 724 'libcef_dll/cpptoc/views/menu_button_cpptoc.cc', 725 'libcef_dll/cpptoc/views/menu_button_cpptoc.h', 726 'libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc', 727@@ -452,6 +434,8 @@ 728 'libcef_dll/cpptoc/views/scroll_view_cpptoc.h', 729 'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc', 730 'libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h', 731+ 'libcef_dll/cpptoc/select_popup_callback_cpptoc.cc', 732+ 'libcef_dll/cpptoc/select_popup_callback_cpptoc.h', 733 'libcef_dll/cpptoc/server_cpptoc.cc', 734 'libcef_dll/cpptoc/server_cpptoc.h', 735 'libcef_dll/ctocpp/server_handler_ctocpp.cc', 736@@ -528,12 +512,8 @@ 737 'libcef_dll/ctocpp/views/view_delegate_ctocpp.h', 738 'libcef_dll/cpptoc/waitable_event_cpptoc.cc', 739 'libcef_dll/cpptoc/waitable_event_cpptoc.h', 740- 'libcef_dll/cpptoc/web_plugin_info_cpptoc.cc', 741- 'libcef_dll/cpptoc/web_plugin_info_cpptoc.h', 742- 'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc', 743- 'libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h', 744- 'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc', 745- 'libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h', 746+ 'libcef_dll/ctocpp/web_message_receiver_ctocpp.cc', 747+ 'libcef_dll/ctocpp/web_message_receiver_ctocpp.h', 748 'libcef_dll/cpptoc/web_storage_cpptoc.cc', 749 'libcef_dll/cpptoc/web_storage_cpptoc.h', 750 'libcef_dll/cpptoc/views/window_cpptoc.cc', 751@@ -682,20 +662,6 @@ 752 'libcef_dll/ctocpp/list_value_ctocpp.h', 753 'libcef_dll/cpptoc/load_handler_cpptoc.cc', 754 'libcef_dll/cpptoc/load_handler_cpptoc.h', 755- 'libcef_dll/cpptoc/media_observer_cpptoc.cc', 756- 'libcef_dll/cpptoc/media_observer_cpptoc.h', 757- 'libcef_dll/ctocpp/media_route_ctocpp.cc', 758- 'libcef_dll/ctocpp/media_route_ctocpp.h', 759- 'libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc', 760- 'libcef_dll/cpptoc/media_route_create_callback_cpptoc.h', 761- 'libcef_dll/ctocpp/media_router_ctocpp.cc', 762- 'libcef_dll/ctocpp/media_router_ctocpp.h', 763- 'libcef_dll/ctocpp/media_sink_ctocpp.cc', 764- 'libcef_dll/ctocpp/media_sink_ctocpp.h', 765- 'libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc', 766- 'libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h', 767- 'libcef_dll/ctocpp/media_source_ctocpp.cc', 768- 'libcef_dll/ctocpp/media_source_ctocpp.h', 769 'libcef_dll/ctocpp/views/menu_button_ctocpp.cc', 770 'libcef_dll/ctocpp/views/menu_button_ctocpp.h', 771 'libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc', 772@@ -786,6 +752,8 @@ 773 'libcef_dll/ctocpp/views/scroll_view_ctocpp.h', 774 'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc', 775 'libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h', 776+ 'libcef_dll/ctocpp/select_popup_callback_ctocpp.cc', 777+ 'libcef_dll/ctocpp/select_popup_callback_ctocpp.h', 778 'libcef_dll/ctocpp/server_ctocpp.cc', 779 'libcef_dll/ctocpp/server_ctocpp.h', 780 'libcef_dll/cpptoc/server_handler_cpptoc.cc', 781@@ -862,12 +830,8 @@ 782 'libcef_dll/cpptoc/views/view_delegate_cpptoc.h', 783 'libcef_dll/ctocpp/waitable_event_ctocpp.cc', 784 'libcef_dll/ctocpp/waitable_event_ctocpp.h', 785- 'libcef_dll/ctocpp/web_plugin_info_ctocpp.cc', 786- 'libcef_dll/ctocpp/web_plugin_info_ctocpp.h', 787- 'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc', 788- 'libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h', 789- 'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc', 790- 'libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h', 791+ 'libcef_dll/cpptoc/web_message_receiver_cpptoc.cc', 792+ 'libcef_dll/cpptoc/web_message_receiver_cpptoc.h', 793 'libcef_dll/ctocpp/web_storage_ctocpp.cc', 794 'libcef_dll/ctocpp/web_storage_ctocpp.h', 795 'libcef_dll/ctocpp/views/window_ctocpp.cc', 796diff --git a/src/cef/include/capi/cef_accessibility_handler_capi.h b/src/cef/include/capi/cef_accessibility_handler_capi.h 797index cafa9a27d3c12..40b5a26b2c9cf 798--- a/src/cef/include/capi/cef_accessibility_handler_capi.h 799+++ b/src/cef/include/capi/cef_accessibility_handler_capi.h 800@@ -1,4 +1,4 @@ 801-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 802+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 803 // 804 // Redistribution and use in source and binary forms, with or without 805 // modification, are permitted provided that the following conditions are 806@@ -33,7 +33,7 @@ 807 // by hand. See the translator.README.txt file in the tools directory for 808 // more information. 809 // 810-// $hash=306e44d49ab6198a0fa1bcea50e8a25ee18672be$ 811+// $hash=5dc54f9c45e2a1df857f114a11c97509da95db34$ 812 // 813 814 #ifndef CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_ 815diff --git a/src/cef/include/capi/cef_app_capi.h b/src/cef/include/capi/cef_app_capi.h 816index 4554a25dc0104..f5418cdfd9752 817--- a/src/cef/include/capi/cef_app_capi.h 818+++ b/src/cef/include/capi/cef_app_capi.h 819@@ -1,4 +1,4 @@ 820-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 821+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 822 // 823 // Redistribution and use in source and binary forms, with or without 824 // modification, are permitted provided that the following conditions are 825@@ -33,7 +33,7 @@ 826 // by hand. See the translator.README.txt file in the tools directory for 827 // more information. 828 // 829-// $hash=adfba3dd6479b96a95639c13ee1e07bed7b335d0$ 830+// $hash=7713ef16c0c137b67ad926fafe2dfae35d187b48$ 831 // 832 833 #ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ 834diff --git a/src/cef/include/capi/cef_audio_handler_capi.h b/src/cef/include/capi/cef_audio_handler_capi.h 835index ffb9ff0b18de4..11d69d36c5bd1 836--- a/src/cef/include/capi/cef_audio_handler_capi.h 837+++ b/src/cef/include/capi/cef_audio_handler_capi.h 838@@ -1,4 +1,4 @@ 839-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 840+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 841 // 842 // Redistribution and use in source and binary forms, with or without 843 // modification, are permitted provided that the following conditions are 844@@ -33,7 +33,7 @@ 845 // by hand. See the translator.README.txt file in the tools directory for 846 // more information. 847 // 848-// $hash=fd8d34089842ee8f8490ef1828c3091d12052e28$ 849+// $hash=dca41618f6b4b8c5623912b0637918ab10c61846$ 850 // 851 852 #ifndef CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_ 853diff --git a/src/cef/include/capi/cef_auth_callback_capi.h b/src/cef/include/capi/cef_auth_callback_capi.h 854index fd06fe2312988..97ed88afd31da 855--- a/src/cef/include/capi/cef_auth_callback_capi.h 856+++ b/src/cef/include/capi/cef_auth_callback_capi.h 857@@ -1,4 +1,4 @@ 858-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 859+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 860 // 861 // Redistribution and use in source and binary forms, with or without 862 // modification, are permitted provided that the following conditions are 863@@ -33,7 +33,7 @@ 864 // by hand. See the translator.README.txt file in the tools directory for 865 // more information. 866 // 867-// $hash=0938c1802b077b2b17708c6a8ee305984e079d64$ 868+// $hash=5b63adedf123da2990eef1445830f221e557ce95$ 869 // 870 871 #ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ 872diff --git a/src/cef/include/capi/cef_browser_capi.h b/src/cef/include/capi/cef_browser_capi.h 873index 0f5e4026dbe05..d0d087ab0df9b 874--- a/src/cef/include/capi/cef_browser_capi.h 875+++ b/src/cef/include/capi/cef_browser_capi.h 876@@ -1,4 +1,4 @@ 877-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 878+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 879 // 880 // Redistribution and use in source and binary forms, with or without 881 // modification, are permitted provided that the following conditions are 882@@ -33,7 +33,7 @@ 883 // by hand. See the translator.README.txt file in the tools directory for 884 // more information. 885 // 886-// $hash=e13b741eb5cb983fde79d62937d9eb8a55dd6ebb$ 887+// $hash=097fc69d7b712dde294d45394bc0eff518a34689$ 888 // 889 890 #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ 891@@ -59,6 +59,7 @@ struct _cef_browser_host_t; 892 struct _cef_client_t; 893 struct _cef_java_script_result_callback_t; 894 struct _cef_store_web_archive_result_callback_t; 895+struct _cef_web_message_receiver_t; 896 897 /// 898 // Structure used to represent a browser. When used in the browser process the 899@@ -864,7 +865,7 @@ typedef struct _cef_browser_host_t { 900 /// 901 void(CEF_CALLBACK* post_port_message)(struct _cef_browser_host_t* self, 902 cef_string_t* port_handle, 903- cef_string_t* data); 904+ struct _cef_value_t* message); 905 906 /// 907 // Set the callback of the port. 908@@ -872,7 +873,7 @@ typedef struct _cef_browser_host_t { 909 void(CEF_CALLBACK* set_port_message_callback)( 910 struct _cef_browser_host_t* self, 911 cef_string_t* port_handle, 912- struct _cef_java_script_result_callback_t* callback); 913+ struct _cef_web_message_receiver_t* callback); 914 915 /// 916 // Gets the latest hitdata 917@@ -1195,6 +1196,65 @@ typedef struct _cef_browser_host_t { 918 /// 919 void(CEF_CALLBACK* remove_cache)(struct _cef_browser_host_t* self, 920 int include_disk_files); 921+ 922+ /// 923+ // Scroll page up or down 924+ /// 925+ void(CEF_CALLBACK* scroll_page_up_down)(struct _cef_browser_host_t* self, 926+ int is_up, 927+ int is_half, 928+ float view_height); 929+ 930+ /// 931+ // Get web history state 932+ /// 933+ struct _cef_binary_value_t*(CEF_CALLBACK* get_web_state)( 934+ struct _cef_browser_host_t* self); 935+ 936+ /// 937+ // Restore web history state 938+ /// 939+ int(CEF_CALLBACK* restore_web_state)(struct _cef_browser_host_t* self, 940+ struct _cef_binary_value_t* state); 941+ 942+ /// 943+ // Scroll to the position. 944+ /// 945+ void(CEF_CALLBACK* scroll_to)(struct _cef_browser_host_t* self, 946+ float x, 947+ float y); 948+ 949+ /// 950+ // Scroll by the delta distance. 951+ /// 952+ void(CEF_CALLBACK* scroll_by)(struct _cef_browser_host_t* self, 953+ float delta_x, 954+ float delta_y); 955+ 956+ /// 957+ // Slide Scroll by the speed. 958+ /// 959+ void(CEF_CALLBACK* slide_scroll)(struct _cef_browser_host_t* self, 960+ float vx, 961+ float vy); 962+ 963+ /// 964+ // Set whether webview can access files 965+ /// 966+ void(CEF_CALLBACK* set_file_access)(struct _cef_browser_host_t* self, 967+ int falg); 968+ 969+ /// 970+ // Set whether webview can access network 971+ /// 972+ void(CEF_CALLBACK* set_block_network)(struct _cef_browser_host_t* self, 973+ int falg); 974+ 975+ /// 976+ // Set the cache mode of webview 977+ /// 978+ void(CEF_CALLBACK* set_cache_mode)(struct _cef_browser_host_t* self, 979+ int falg); 980 } cef_browser_host_t; 981 982 /// 983@@ -1269,6 +1329,23 @@ typedef struct _cef_store_web_archive_result_callback_t { 984 const cef_string_t* result); 985 } cef_store_web_archive_result_callback_t; 986 987+/// 988+// Structure to implement to be notified of asynchronous web message channel. 989+/// 990+typedef struct _cef_web_message_receiver_t { 991+ /// 992+ // Base structure. 993+ /// 994+ cef_base_ref_counted_t base; 995+ 996+ /// 997+ // Method that will be called upon |PostPortMessage|. |message| will be sent 998+ // to another end of web message channel. 999+ /// 1000+ void(CEF_CALLBACK* on_message)(struct _cef_web_message_receiver_t* self, 1001+ struct _cef_value_t* message); 1002+} cef_web_message_receiver_t; 1003+ 1004 #ifdef __cplusplus 1005 } 1006 #endif 1007diff --git a/src/cef/include/capi/cef_browser_process_handler_capi.h b/src/cef/include/capi/cef_browser_process_handler_capi.h 1008index 2a3dc178e7353..a53e677b9be24 1009--- a/src/cef/include/capi/cef_browser_process_handler_capi.h 1010+++ b/src/cef/include/capi/cef_browser_process_handler_capi.h 1011@@ -1,4 +1,4 @@ 1012-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1013+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1014 // 1015 // Redistribution and use in source and binary forms, with or without 1016 // modification, are permitted provided that the following conditions are 1017@@ -33,7 +33,7 @@ 1018 // by hand. See the translator.README.txt file in the tools directory for 1019 // more information. 1020 // 1021-// $hash=8c97f9b58c642c144cc37824ad820192640307cb$ 1022+// $hash=e56e9d7bc7bd7d42f768a845cb3dc8ead6475fcd$ 1023 // 1024 1025 #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ 1026diff --git a/src/cef/include/capi/cef_callback_capi.h b/src/cef/include/capi/cef_callback_capi.h 1027index 481e45266351a..05353af3423ee 1028--- a/src/cef/include/capi/cef_callback_capi.h 1029+++ b/src/cef/include/capi/cef_callback_capi.h 1030@@ -1,4 +1,4 @@ 1031-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1032+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1033 // 1034 // Redistribution and use in source and binary forms, with or without 1035 // modification, are permitted provided that the following conditions are 1036@@ -33,7 +33,7 @@ 1037 // by hand. See the translator.README.txt file in the tools directory for 1038 // more information. 1039 // 1040-// $hash=6dabadb8090f82aa929beda6f4724bac4cd17020$ 1041+// $hash=a48ae6711d03e12ddfe94aa3b54a46fbd41bd179$ 1042 // 1043 1044 #ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ 1045diff --git a/src/cef/include/capi/cef_client_capi.h b/src/cef/include/capi/cef_client_capi.h 1046index ce800661252b7..606e22de72f37 1047--- a/src/cef/include/capi/cef_client_capi.h 1048+++ b/src/cef/include/capi/cef_client_capi.h 1049@@ -1,4 +1,4 @@ 1050-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1051+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1052 // 1053 // Redistribution and use in source and binary forms, with or without 1054 // modification, are permitted provided that the following conditions are 1055@@ -33,7 +33,7 @@ 1056 // by hand. See the translator.README.txt file in the tools directory for 1057 // more information. 1058 // 1059-// $hash=d69368574610ae29c8b17bf71174c237fb01ca28$ 1060+// $hash=100836d9c768fb63da4c355cb0571e34d0c6a8dd$ 1061 // 1062 1063 #ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 1064@@ -76,133 +76,137 @@ typedef struct _cef_client_t { 1065 /// 1066 // Return the handler for audio rendering events. 1067 /// 1068- struct _cef_audio_handler_t *(CEF_CALLBACK *get_audio_handler)( 1069- struct _cef_client_t *self); 1070+ struct _cef_audio_handler_t*(CEF_CALLBACK* get_audio_handler)( 1071+ struct _cef_client_t* self); 1072 1073 /// 1074 // Return the handler for context menus. If no handler is provided the default 1075 // implementation will be used. 1076 /// 1077- struct _cef_context_menu_handler_t *(CEF_CALLBACK *get_context_menu_handler)( 1078- struct _cef_client_t *self); 1079+ struct _cef_context_menu_handler_t*(CEF_CALLBACK* get_context_menu_handler)( 1080+ struct _cef_client_t* self); 1081 1082 /// 1083 // Return the handler for dialogs. If no handler is provided the default 1084 // implementation will be used. 1085 /// 1086- struct _cef_dialog_handler_t *(CEF_CALLBACK *get_dialog_handler)( 1087- struct _cef_client_t *self); 1088+ struct _cef_dialog_handler_t*(CEF_CALLBACK* get_dialog_handler)( 1089+ struct _cef_client_t* self); 1090 1091 /// 1092 // Return the handler for browser display state events. 1093 /// 1094- struct _cef_display_handler_t *(CEF_CALLBACK *get_display_handler)( 1095- struct _cef_client_t *self); 1096+ struct _cef_display_handler_t*(CEF_CALLBACK* get_display_handler)( 1097+ struct _cef_client_t* self); 1098 1099 /// 1100 // Return the handler for download events. If no handler is returned downloads 1101 // will not be allowed. 1102 /// 1103- struct _cef_download_handler_t *(CEF_CALLBACK *get_download_handler)( 1104- struct _cef_client_t *self); 1105+ struct _cef_download_handler_t*(CEF_CALLBACK* get_download_handler)( 1106+ struct _cef_client_t* self); 1107 1108 /// 1109 // Return the handler for drag events. 1110 /// 1111- struct _cef_drag_handler_t *(CEF_CALLBACK *get_drag_handler)( 1112- struct _cef_client_t *self); 1113+ struct _cef_drag_handler_t*(CEF_CALLBACK* get_drag_handler)( 1114+ struct _cef_client_t* self); 1115 1116 /// 1117 // Return the handler for find result events. 1118 /// 1119- struct _cef_find_handler_t *(CEF_CALLBACK *get_find_handler)( 1120- struct _cef_client_t *self); 1121+ struct _cef_find_handler_t*(CEF_CALLBACK* get_find_handler)( 1122+ struct _cef_client_t* self); 1123 1124 /// 1125 // Return the handler for focus events. 1126 /// 1127- struct _cef_focus_handler_t *(CEF_CALLBACK *get_focus_handler)( 1128- struct _cef_client_t *self); 1129+ struct _cef_focus_handler_t*(CEF_CALLBACK* get_focus_handler)( 1130+ struct _cef_client_t* self); 1131 1132 /// 1133 // Return the handler for events related to cef_frame_t lifespan. This 1134 // function will be called once during cef_browser_t creation and the result 1135 // will be cached for performance reasons. 1136 /// 1137- struct _cef_frame_handler_t *(CEF_CALLBACK *get_frame_handler)( 1138- struct _cef_client_t *self); 1139+ struct _cef_frame_handler_t*(CEF_CALLBACK* get_frame_handler)( 1140+ struct _cef_client_t* self); 1141 1142 /// 1143 // Return the handler for JavaScript dialogs. If no handler is provided the 1144 // default implementation will be used. 1145 /// 1146- struct _cef_jsdialog_handler_t *(CEF_CALLBACK *get_jsdialog_handler)( 1147- struct _cef_client_t *self); 1148+ struct _cef_jsdialog_handler_t*(CEF_CALLBACK* get_jsdialog_handler)( 1149+ struct _cef_client_t* self); 1150 1151 /// 1152 // Return the handler for keyboard events. 1153 /// 1154- struct _cef_keyboard_handler_t *(CEF_CALLBACK *get_keyboard_handler)( 1155- struct _cef_client_t *self); 1156+ struct _cef_keyboard_handler_t*(CEF_CALLBACK* get_keyboard_handler)( 1157+ struct _cef_client_t* self); 1158 1159 /// 1160 // Return the handler for browser life span events. 1161 /// 1162- struct _cef_life_span_handler_t *(CEF_CALLBACK *get_life_span_handler)( 1163- struct _cef_client_t *self); 1164+ struct _cef_life_span_handler_t*(CEF_CALLBACK* get_life_span_handler)( 1165+ struct _cef_client_t* self); 1166 1167 /// 1168 // Return the handler for browser load status events. 1169 /// 1170- struct _cef_load_handler_t *(CEF_CALLBACK *get_load_handler)( 1171- struct _cef_client_t *self); 1172+ struct _cef_load_handler_t*(CEF_CALLBACK* get_load_handler)( 1173+ struct _cef_client_t* self); 1174 1175 /// 1176 // Return the handler for printing on Linux. If a print handler is not 1177 // provided then printing will not be supported on the Linux platform. 1178 /// 1179- struct _cef_print_handler_t *(CEF_CALLBACK *get_print_handler)( 1180- struct _cef_client_t *self); 1181+ struct _cef_print_handler_t*(CEF_CALLBACK* get_print_handler)( 1182+ struct _cef_client_t* self); 1183 1184 /// 1185 // Return the handler for off-screen rendering events. 1186 /// 1187- struct _cef_render_handler_t *(CEF_CALLBACK *get_render_handler)( 1188- struct _cef_client_t *self); 1189+ struct _cef_render_handler_t*(CEF_CALLBACK* get_render_handler)( 1190+ struct _cef_client_t* self); 1191 1192 /// 1193 // Return the handler for browser request events. 1194 /// 1195- struct _cef_request_handler_t *(CEF_CALLBACK *get_request_handler)( 1196- struct _cef_client_t *self); 1197+ struct _cef_request_handler_t*(CEF_CALLBACK* get_request_handler)( 1198+ struct _cef_client_t* self); 1199 1200 /// 1201 // Return the handler for browser geolocation permission request events. 1202 /// 1203- struct _cef_permission_request_t *(CEF_CALLBACK *get_permission_request)( 1204- struct _cef_client_t *self); 1205+ struct _cef_permission_request_t*(CEF_CALLBACK* get_permission_request)( 1206+ struct _cef_client_t* self); 1207 1208 /// 1209 // Called when a new message is received from a different process. Return true 1210 // (1) if the message was handled or false (0) otherwise. It is safe to keep 1211 // a reference to |message| outside of this callback. 1212 /// 1213- int(CEF_CALLBACK *on_process_message_received)( 1214- struct _cef_client_t *self, struct _cef_browser_t *browser, 1215- struct _cef_frame_t *frame, cef_process_id_t source_process, 1216- struct _cef_process_message_t *message); 1217+ int(CEF_CALLBACK* on_process_message_received)( 1218+ struct _cef_client_t* self, 1219+ struct _cef_browser_t* browser, 1220+ struct _cef_frame_t* frame, 1221+ cef_process_id_t source_process, 1222+ struct _cef_process_message_t* message); 1223 1224 /// 1225 // Returns the list of arguments NotifyJavaScriptResult. 1226 /// 1227- int(CEF_CALLBACK *notify_java_script_result)( 1228- struct _cef_client_t *self, struct _cef_list_value_t *args, 1229- const cef_string_t *method, const cef_string_t *object_name, 1230- struct _cef_list_value_t *result); 1231+ int(CEF_CALLBACK* notify_java_script_result)( 1232+ struct _cef_client_t* self, 1233+ struct _cef_list_value_t* args, 1234+ const cef_string_t* method, 1235+ const cef_string_t* object_name, 1236+ struct _cef_list_value_t* result); 1237 } cef_client_t; 1238 1239 #ifdef __cplusplus 1240 } 1241 #endif 1242 1243-#endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 1244+#endif // CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ 1245diff --git a/src/cef/include/capi/cef_command_line_capi.h b/src/cef/include/capi/cef_command_line_capi.h 1246index 7f69a1d34da58..f1088f0143950 1247--- a/src/cef/include/capi/cef_command_line_capi.h 1248+++ b/src/cef/include/capi/cef_command_line_capi.h 1249@@ -1,4 +1,4 @@ 1250-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1251+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1252 // 1253 // Redistribution and use in source and binary forms, with or without 1254 // modification, are permitted provided that the following conditions are 1255@@ -33,7 +33,7 @@ 1256 // by hand. See the translator.README.txt file in the tools directory for 1257 // more information. 1258 // 1259-// $hash=93f3d769c0d48ed6e1d91ad8a8e2f95d4ee54287$ 1260+// $hash=deb97d81f206e08a6f78510e7f8f1985aef98ff0$ 1261 // 1262 1263 #ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ 1264diff --git a/src/cef/include/capi/cef_context_menu_handler_capi.h b/src/cef/include/capi/cef_context_menu_handler_capi.h 1265index 04dbeaf8390ec..d292f78cec42f 1266--- a/src/cef/include/capi/cef_context_menu_handler_capi.h 1267+++ b/src/cef/include/capi/cef_context_menu_handler_capi.h 1268@@ -1,4 +1,4 @@ 1269-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1270+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1271 // 1272 // Redistribution and use in source and binary forms, with or without 1273 // modification, are permitted provided that the following conditions are 1274@@ -33,7 +33,7 @@ 1275 // by hand. See the translator.README.txt file in the tools directory for 1276 // more information. 1277 // 1278-// $hash=07baaa2ecbddce012a9ef020766e4cb40ff8b9b0$ 1279+// $hash=351828c559518eeefb3b74bb24558ae51a49f2a5$ 1280 // 1281 1282 #ifndef CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ 1283@@ -373,6 +373,20 @@ typedef struct _cef_context_menu_params_t { 1284 // items). 1285 /// 1286 int(CEF_CALLBACK* is_custom_menu)(struct _cef_context_menu_params_t* self); 1287+ 1288+ /// 1289+ // Returns the input field type of context node that the context menu was 1290+ // invoked on. 1291+ /// 1292+ cef_context_menu_input_field_type_t(CEF_CALLBACK* get_input_field_type)( 1293+ struct _cef_context_menu_params_t* self); 1294+ 1295+ /// 1296+ // Returns the source type of context node that the context menu was invoked 1297+ // on. 1298+ /// 1299+ cef_context_menu_source_type_t(CEF_CALLBACK* get_source_type)( 1300+ struct _cef_context_menu_params_t* self); 1301 } cef_context_menu_params_t; 1302 1303 #ifdef __cplusplus 1304diff --git a/src/cef/include/capi/cef_cookie_capi.h b/src/cef/include/capi/cef_cookie_capi.h 1305index fe865a0831b00..d81c9e8f46251 1306--- a/src/cef/include/capi/cef_cookie_capi.h 1307+++ b/src/cef/include/capi/cef_cookie_capi.h 1308@@ -1,4 +1,4 @@ 1309-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1310+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1311 // 1312 // Redistribution and use in source and binary forms, with or without 1313 // modification, are permitted provided that the following conditions are 1314@@ -33,7 +33,7 @@ 1315 // by hand. See the translator.README.txt file in the tools directory for 1316 // more information. 1317 // 1318-// $hash=76bce0d14b3cfcc4afb47d59936e4f2e0932566b$ 1319+// $hash=fcda5b9ec03f8bae722fa681f0cde144caf6c929$ 1320 // 1321 1322 #ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ 1323diff --git a/src/cef/include/capi/cef_crash_util_capi.h b/src/cef/include/capi/cef_crash_util_capi.h 1324index 2a569bdb807d9..4ebf112d358d1 1325--- a/src/cef/include/capi/cef_crash_util_capi.h 1326+++ b/src/cef/include/capi/cef_crash_util_capi.h 1327@@ -1,4 +1,4 @@ 1328-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1329+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1330 // 1331 // Redistribution and use in source and binary forms, with or without 1332 // modification, are permitted provided that the following conditions are 1333@@ -33,7 +33,7 @@ 1334 // by hand. See the translator.README.txt file in the tools directory for 1335 // more information. 1336 // 1337-// $hash=0460e68eb7d1b1188706c42d14beafbf9a6f7126$ 1338+// $hash=dd437f3b8022c0c92074a0d1d9aa5b2cef40e109$ 1339 // 1340 1341 #ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_ 1342diff --git a/src/cef/include/capi/cef_data_base_capi.h b/src/cef/include/capi/cef_data_base_capi.h 1343index a0e1d91eaa644..12b11dd1e81cb 1344--- a/src/cef/include/capi/cef_data_base_capi.h 1345+++ b/src/cef/include/capi/cef_data_base_capi.h 1346@@ -1,4 +1,4 @@ 1347-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1348+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1349 // 1350 // Redistribution and use in source and binary forms, with or without 1351 // modification, are permitted provided that the following conditions are 1352@@ -33,7 +33,7 @@ 1353 // by hand. See the translator.README.txt file in the tools directory for 1354 // more information. 1355 // 1356-// $hash=d2a63576b59c75e748b5a725af9a4337414c82b9$ 1357+// $hash=99bb61cf23fa49b4a7ce08c77d0c98980bc07a1f$ 1358 // 1359 1360 #ifndef CEF_INCLUDE_CAPI_CEF_DATA_BASE_CAPI_H_ 1361@@ -78,11 +78,12 @@ typedef struct _cef_data_base_t { 1362 /// 1363 // get http auth data by host and realm. 1364 /// 1365- void(CEF_CALLBACK* get_http_auth_credentials)( 1366- struct _cef_data_base_t* self, 1367- const cef_string_t* host, 1368- const cef_string_t* realm, 1369- cef_string_list_t username_password); 1370+ void(CEF_CALLBACK* get_http_auth_credentials)(struct _cef_data_base_t* self, 1371+ const cef_string_t* host, 1372+ const cef_string_t* realm, 1373+ cef_string_t* username, 1374+ char* password, 1375+ uint32_t passwordSize); 1376 1377 /// 1378 // gets whether the instance holds the specified permissions for the specified 1379diff --git a/src/cef/include/capi/cef_devtools_message_observer_capi.h b/src/cef/include/capi/cef_devtools_message_observer_capi.h 1380index 137f82136d035..b9e7662ff2908 1381--- a/src/cef/include/capi/cef_devtools_message_observer_capi.h 1382+++ b/src/cef/include/capi/cef_devtools_message_observer_capi.h 1383@@ -1,4 +1,4 @@ 1384-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1385+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1386 // 1387 // Redistribution and use in source and binary forms, with or without 1388 // modification, are permitted provided that the following conditions are 1389@@ -33,7 +33,7 @@ 1390 // by hand. See the translator.README.txt file in the tools directory for 1391 // more information. 1392 // 1393-// $hash=ec62239c2b24ff512b64ca758be825ff57fb3b6b$ 1394+// $hash=bd660c767a942fc27ea2ede0343e029ac8b7c603$ 1395 // 1396 1397 #ifndef CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_ 1398diff --git a/src/cef/include/capi/cef_dialog_handler_capi.h b/src/cef/include/capi/cef_dialog_handler_capi.h 1399index 0071832626b2d..2d5c1438f0756 1400--- a/src/cef/include/capi/cef_dialog_handler_capi.h 1401+++ b/src/cef/include/capi/cef_dialog_handler_capi.h 1402@@ -1,4 +1,4 @@ 1403-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1404+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1405 // 1406 // Redistribution and use in source and binary forms, with or without 1407 // modification, are permitted provided that the following conditions are 1408@@ -33,7 +33,7 @@ 1409 // by hand. See the translator.README.txt file in the tools directory for 1410 // more information. 1411 // 1412-// $hash=abdbb4a150fc310df31ec08d1618e1e557dfe3e2$ 1413+// $hash=999efab317d9de20cf31c967a7facaed253ced56$ 1414 // 1415 1416 #ifndef CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ 1417@@ -73,6 +73,30 @@ typedef struct _cef_file_dialog_callback_t { 1418 void(CEF_CALLBACK* cancel)(struct _cef_file_dialog_callback_t* self); 1419 } cef_file_dialog_callback_t; 1420 1421+/// 1422+// Callback structure for asynchronous continuation of <select> selection. 1423+/// 1424+typedef struct _cef_select_popup_callback_t { 1425+ /// 1426+ // Base structure. 1427+ /// 1428+ cef_base_ref_counted_t base; 1429+ 1430+ /// 1431+ // Continue the <select> selection. |indices| should be the 0-based array 1432+ // index of the value selected from the <select> array passed to 1433+ // cef_dialog_handler_t::ShowSelectPopup. 1434+ /// 1435+ void(CEF_CALLBACK* cont)(struct _cef_select_popup_callback_t* self, 1436+ size_t indicesCount, 1437+ int const* indices); 1438+ 1439+ /// 1440+ // Cancel <select> selection. 1441+ /// 1442+ void(CEF_CALLBACK* cancel)(struct _cef_select_popup_callback_t* self); 1443+} cef_select_popup_callback_t; 1444+ 1445 /// 1446 // Implement this structure to handle dialog events. The functions of this 1447 // structure will be called on the browser process UI thread. 1448@@ -108,6 +132,22 @@ typedef struct _cef_dialog_handler_t { 1449 int selected_accept_filter, 1450 int capture, 1451 struct _cef_file_dialog_callback_t* callback); 1452+ 1453+ /// 1454+ // Show <select> popup menu. 1455+ /// 1456+ void(CEF_CALLBACK* on_select_popup_menu)( 1457+ struct _cef_dialog_handler_t* self, 1458+ struct _cef_browser_t* browser, 1459+ const cef_rect_t* bounds, 1460+ int item_height, 1461+ double item_font_size, 1462+ int selected_item, 1463+ size_t menu_itemsCount, 1464+ cef_select_popup_item_t const* menu_items, 1465+ int right_aligned, 1466+ int allow_multiple_selection, 1467+ struct _cef_select_popup_callback_t* callback); 1468 } cef_dialog_handler_t; 1469 1470 #ifdef __cplusplus 1471diff --git a/src/cef/include/capi/cef_display_handler_capi.h b/src/cef/include/capi/cef_display_handler_capi.h 1472index c59849b24eebd..ed9cc06c26811 1473--- a/src/cef/include/capi/cef_display_handler_capi.h 1474+++ b/src/cef/include/capi/cef_display_handler_capi.h 1475@@ -1,4 +1,4 @@ 1476-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1477+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1478 // 1479 // Redistribution and use in source and binary forms, with or without 1480 // modification, are permitted provided that the following conditions are 1481@@ -33,7 +33,7 @@ 1482 // by hand. See the translator.README.txt file in the tools directory for 1483 // more information. 1484 // 1485-// $hash=98444bfe2f513889b45f8a8c7d047cb21b110243$ 1486+// $hash=a7d326ca19b9ac03c15ed63eed59e0a7f763456b$ 1487 // 1488 1489 #ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ 1490diff --git a/src/cef/include/capi/cef_dom_capi.h b/src/cef/include/capi/cef_dom_capi.h 1491index 97300ec387f46..eab26e375d8fc 1492--- a/src/cef/include/capi/cef_dom_capi.h 1493+++ b/src/cef/include/capi/cef_dom_capi.h 1494@@ -1,4 +1,4 @@ 1495-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1496+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1497 // 1498 // Redistribution and use in source and binary forms, with or without 1499 // modification, are permitted provided that the following conditions are 1500@@ -33,7 +33,7 @@ 1501 // by hand. See the translator.README.txt file in the tools directory for 1502 // more information. 1503 // 1504-// $hash=c6de3fb4d64a2b2ad06a4b9c5e9d7625d40b5bb6$ 1505+// $hash=b01f97e4395b8da428df01f58d8301b3b8c41cc0$ 1506 // 1507 1508 #ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ 1509diff --git a/src/cef/include/capi/cef_download_handler_capi.h b/src/cef/include/capi/cef_download_handler_capi.h 1510index 29b05871030e6..3d3e57314dd05 1511--- a/src/cef/include/capi/cef_download_handler_capi.h 1512+++ b/src/cef/include/capi/cef_download_handler_capi.h 1513@@ -1,4 +1,4 @@ 1514-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1515+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1516 // 1517 // Redistribution and use in source and binary forms, with or without 1518 // modification, are permitted provided that the following conditions are 1519@@ -33,7 +33,7 @@ 1520 // by hand. See the translator.README.txt file in the tools directory for 1521 // more information. 1522 // 1523-// $hash=ec13ec3e2819e4ac49792c3a1c57bc60b45fb95b$ 1524+// $hash=8c9afdb42e9045fad9c6c3a901552f67a69e3f34$ 1525 // 1526 1527 #ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ 1528diff --git a/src/cef/include/capi/cef_download_item_capi.h b/src/cef/include/capi/cef_download_item_capi.h 1529index 2d52f11b42381..b211640529979 1530--- a/src/cef/include/capi/cef_download_item_capi.h 1531+++ b/src/cef/include/capi/cef_download_item_capi.h 1532@@ -1,4 +1,4 @@ 1533-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1534+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1535 // 1536 // Redistribution and use in source and binary forms, with or without 1537 // modification, are permitted provided that the following conditions are 1538@@ -33,7 +33,7 @@ 1539 // by hand. See the translator.README.txt file in the tools directory for 1540 // more information. 1541 // 1542-// $hash=b9f0d91dd2fdb3625365ff8b332b08e1f0ea1187$ 1543+// $hash=91273857318c2755502ed75f36dd9cca4cf3beb1$ 1544 // 1545 1546 #ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ 1547diff --git a/src/cef/include/capi/cef_drag_data_capi.h b/src/cef/include/capi/cef_drag_data_capi.h 1548index 7e133155d6633..927234788fc4d 1549--- a/src/cef/include/capi/cef_drag_data_capi.h 1550+++ b/src/cef/include/capi/cef_drag_data_capi.h 1551@@ -1,4 +1,4 @@ 1552-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1553+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1554 // 1555 // Redistribution and use in source and binary forms, with or without 1556 // modification, are permitted provided that the following conditions are 1557@@ -33,7 +33,7 @@ 1558 // by hand. See the translator.README.txt file in the tools directory for 1559 // more information. 1560 // 1561-// $hash=b6e3236a062cd25ec26c3daeb1940d1e1bf0d96a$ 1562+// $hash=319451cc942ceffde5c1b4f5e19972e5132ee71e$ 1563 // 1564 1565 #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ 1566diff --git a/src/cef/include/capi/cef_drag_handler_capi.h b/src/cef/include/capi/cef_drag_handler_capi.h 1567index 68b26d7165a35..97c56380eada1 1568--- a/src/cef/include/capi/cef_drag_handler_capi.h 1569+++ b/src/cef/include/capi/cef_drag_handler_capi.h 1570@@ -1,4 +1,4 @@ 1571-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1572+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1573 // 1574 // Redistribution and use in source and binary forms, with or without 1575 // modification, are permitted provided that the following conditions are 1576@@ -33,7 +33,7 @@ 1577 // by hand. See the translator.README.txt file in the tools directory for 1578 // more information. 1579 // 1580-// $hash=5b2051c42c1d4c41b85ca823d34b26bfa5de6777$ 1581+// $hash=3c99a3db33be866a89d9600248b9b6ebcc48fbcb$ 1582 // 1583 1584 #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ 1585diff --git a/src/cef/include/capi/cef_extension_capi.h b/src/cef/include/capi/cef_extension_capi.h 1586index 24ba87d64125c..466af7a7207ed 1587--- a/src/cef/include/capi/cef_extension_capi.h 1588+++ b/src/cef/include/capi/cef_extension_capi.h 1589@@ -1,4 +1,4 @@ 1590-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1591+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1592 // 1593 // Redistribution and use in source and binary forms, with or without 1594 // modification, are permitted provided that the following conditions are 1595@@ -33,7 +33,7 @@ 1596 // by hand. See the translator.README.txt file in the tools directory for 1597 // more information. 1598 // 1599-// $hash=fcfe34c1517ebdb3f00c1f737b91361e771b820d$ 1600+// $hash=75dd531ede2169c637c969db447761ca7e59aac9$ 1601 // 1602 1603 #ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_ 1604diff --git a/src/cef/include/capi/cef_extension_handler_capi.h b/src/cef/include/capi/cef_extension_handler_capi.h 1605index 73c4f3bca1b99..04325f3a21976 1606--- a/src/cef/include/capi/cef_extension_handler_capi.h 1607+++ b/src/cef/include/capi/cef_extension_handler_capi.h 1608@@ -1,4 +1,4 @@ 1609-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1610+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1611 // 1612 // Redistribution and use in source and binary forms, with or without 1613 // modification, are permitted provided that the following conditions are 1614@@ -33,7 +33,7 @@ 1615 // by hand. See the translator.README.txt file in the tools directory for 1616 // more information. 1617 // 1618-// $hash=768e2436e54cceb2675ddd03ebdc61b5c0785bdc$ 1619+// $hash=90bd893bc1fdd605330bcfabcab9faeab419c42a$ 1620 // 1621 1622 #ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_ 1623diff --git a/src/cef/include/capi/cef_file_util_capi.h b/src/cef/include/capi/cef_file_util_capi.h 1624index 234f4240f8a76..942ec7d69e15c 1625--- a/src/cef/include/capi/cef_file_util_capi.h 1626+++ b/src/cef/include/capi/cef_file_util_capi.h 1627@@ -1,4 +1,4 @@ 1628-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1629+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1630 // 1631 // Redistribution and use in source and binary forms, with or without 1632 // modification, are permitted provided that the following conditions are 1633@@ -33,7 +33,7 @@ 1634 // by hand. See the translator.README.txt file in the tools directory for 1635 // more information. 1636 // 1637-// $hash=e76fa23e9682bf0865319d93e4009752ac8f854f$ 1638+// $hash=42b3783846c1c99e91e4f69e8d8df2be2c823251$ 1639 // 1640 1641 #ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_ 1642diff --git a/src/cef/include/capi/cef_find_handler_capi.h b/src/cef/include/capi/cef_find_handler_capi.h 1643index fd8a317f67416..10a9c854e67f5 1644--- a/src/cef/include/capi/cef_find_handler_capi.h 1645+++ b/src/cef/include/capi/cef_find_handler_capi.h 1646@@ -1,4 +1,4 @@ 1647-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1648+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1649 // 1650 // Redistribution and use in source and binary forms, with or without 1651 // modification, are permitted provided that the following conditions are 1652@@ -33,7 +33,7 @@ 1653 // by hand. See the translator.README.txt file in the tools directory for 1654 // more information. 1655 // 1656-// $hash=f2e80b8637b07f19adea666e554269de4627e399$ 1657+// $hash=25230ddd8f70b87fd98ba72581e99c3428344f89$ 1658 // 1659 1660 #ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ 1661diff --git a/src/cef/include/capi/cef_focus_handler_capi.h b/src/cef/include/capi/cef_focus_handler_capi.h 1662index 16159861500c2..bfb7fbf286e74 1663--- a/src/cef/include/capi/cef_focus_handler_capi.h 1664+++ b/src/cef/include/capi/cef_focus_handler_capi.h 1665@@ -1,4 +1,4 @@ 1666-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1667+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1668 // 1669 // Redistribution and use in source and binary forms, with or without 1670 // modification, are permitted provided that the following conditions are 1671@@ -33,7 +33,7 @@ 1672 // by hand. See the translator.README.txt file in the tools directory for 1673 // more information. 1674 // 1675-// $hash=a136a2679c8af339b21a89e8ae3090a9dbb8daa7$ 1676+// $hash=dd317f470d2f7096459be0c0fc2cadfd483633b0$ 1677 // 1678 1679 #ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ 1680diff --git a/src/cef/include/capi/cef_frame_capi.h b/src/cef/include/capi/cef_frame_capi.h 1681index 13df7c250c6a3..b89a458a1b735 1682--- a/src/cef/include/capi/cef_frame_capi.h 1683+++ b/src/cef/include/capi/cef_frame_capi.h 1684@@ -1,4 +1,4 @@ 1685-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1686+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1687 // 1688 // Redistribution and use in source and binary forms, with or without 1689 // modification, are permitted provided that the following conditions are 1690@@ -33,7 +33,7 @@ 1691 // by hand. See the translator.README.txt file in the tools directory for 1692 // more information. 1693 // 1694-// $hash=33259e318960845a94c06bca658b46bfb335a23f$ 1695+// $hash=1f592012807b171ad5177d991d53c972559ea56a$ 1696 // 1697 1698 #ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ 1699diff --git a/src/cef/include/capi/cef_frame_handler_capi.h b/src/cef/include/capi/cef_frame_handler_capi.h 1700index 1352ee28f56a6..8b69fd73e6d5c 1701--- a/src/cef/include/capi/cef_frame_handler_capi.h 1702+++ b/src/cef/include/capi/cef_frame_handler_capi.h 1703@@ -1,4 +1,4 @@ 1704-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1705+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1706 // 1707 // Redistribution and use in source and binary forms, with or without 1708 // modification, are permitted provided that the following conditions are 1709@@ -33,7 +33,7 @@ 1710 // by hand. See the translator.README.txt file in the tools directory for 1711 // more information. 1712 // 1713-// $hash=8f791b2d1d5bea27f9e6ca5e0db731a0a76d181c$ 1714+// $hash=3d27496e328f3e76fb05bde7b0da65563604c073$ 1715 // 1716 1717 #ifndef CEF_INCLUDE_CAPI_CEF_FRAME_HANDLER_CAPI_H_ 1718diff --git a/src/cef/include/capi/cef_i18n_util_capi.h b/src/cef/include/capi/cef_i18n_util_capi.h 1719index 7a642b28a77a3..c6ceba4b8b419 1720--- a/src/cef/include/capi/cef_i18n_util_capi.h 1721+++ b/src/cef/include/capi/cef_i18n_util_capi.h 1722@@ -1,4 +1,4 @@ 1723-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1724+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1725 // 1726 // Redistribution and use in source and binary forms, with or without 1727 // modification, are permitted provided that the following conditions are 1728@@ -33,7 +33,7 @@ 1729 // by hand. See the translator.README.txt file in the tools directory for 1730 // more information. 1731 // 1732-// $hash=b6168013910802cf6d7603892741385958026dcd$ 1733+// $hash=4fa59a60e9138f66bf3f290a499f7fc5a69041ae$ 1734 // 1735 1736 #ifndef CEF_INCLUDE_CAPI_CEF_I18N_UTIL_CAPI_H_ 1737diff --git a/src/cef/include/capi/cef_image_capi.h b/src/cef/include/capi/cef_image_capi.h 1738index 99af056297923..56cdb4c4fc8e8 1739--- a/src/cef/include/capi/cef_image_capi.h 1740+++ b/src/cef/include/capi/cef_image_capi.h 1741@@ -1,4 +1,4 @@ 1742-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1743+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1744 // 1745 // Redistribution and use in source and binary forms, with or without 1746 // modification, are permitted provided that the following conditions are 1747@@ -33,7 +33,7 @@ 1748 // by hand. See the translator.README.txt file in the tools directory for 1749 // more information. 1750 // 1751-// $hash=b5a36ef39ff250c9d3cb1e9a8c7ee38d7e0f8b3f$ 1752+// $hash=51ec70e713506e02d7157fc9d8268d02e91d80a3$ 1753 // 1754 1755 #ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_ 1756diff --git a/src/cef/include/capi/cef_jsdialog_handler_capi.h b/src/cef/include/capi/cef_jsdialog_handler_capi.h 1757index c0ab4497edc9e..15d43781582a9 1758--- a/src/cef/include/capi/cef_jsdialog_handler_capi.h 1759+++ b/src/cef/include/capi/cef_jsdialog_handler_capi.h 1760@@ -1,4 +1,4 @@ 1761-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1762+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1763 // 1764 // Redistribution and use in source and binary forms, with or without 1765 // modification, are permitted provided that the following conditions are 1766@@ -33,7 +33,7 @@ 1767 // by hand. See the translator.README.txt file in the tools directory for 1768 // more information. 1769 // 1770-// $hash=c68332a779bab425aa2e6a858d20a43448631890$ 1771+// $hash=f8dc9d32c3f345e1c3b7d02a098bebaafad7e81f$ 1772 // 1773 1774 #ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ 1775diff --git a/src/cef/include/capi/cef_keyboard_handler_capi.h b/src/cef/include/capi/cef_keyboard_handler_capi.h 1776index 3d6c50fc38e3e..cf3746dcc8b52 1777--- a/src/cef/include/capi/cef_keyboard_handler_capi.h 1778+++ b/src/cef/include/capi/cef_keyboard_handler_capi.h 1779@@ -1,4 +1,4 @@ 1780-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1781+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1782 // 1783 // Redistribution and use in source and binary forms, with or without 1784 // modification, are permitted provided that the following conditions are 1785@@ -33,7 +33,7 @@ 1786 // by hand. See the translator.README.txt file in the tools directory for 1787 // more information. 1788 // 1789-// $hash=140d3a3ce78f5e8ab50a24a2fd6377e7a8ea3256$ 1790+// $hash=4ef92123de5221aa1ad5959d004e293d6a966fbd$ 1791 // 1792 1793 #ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ 1794diff --git a/src/cef/include/capi/cef_life_span_handler_capi.h b/src/cef/include/capi/cef_life_span_handler_capi.h 1795index c5e09131cbad3..e1db2aa4605e3 1796--- a/src/cef/include/capi/cef_life_span_handler_capi.h 1797+++ b/src/cef/include/capi/cef_life_span_handler_capi.h 1798@@ -1,4 +1,4 @@ 1799-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1800+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1801 // 1802 // Redistribution and use in source and binary forms, with or without 1803 // modification, are permitted provided that the following conditions are 1804@@ -33,7 +33,7 @@ 1805 // by hand. See the translator.README.txt file in the tools directory for 1806 // more information. 1807 // 1808-// $hash=205d56bf87a049ce7ac21b111d42a99659ad7c76$ 1809+// $hash=f9ae882bb6092d1f94b7c78dc6b45369c8b0ec2e$ 1810 // 1811 1812 #ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ 1813diff --git a/src/cef/include/capi/cef_load_handler_capi.h b/src/cef/include/capi/cef_load_handler_capi.h 1814index 317444b6f19f7..e8f8e10193d2f 1815--- a/src/cef/include/capi/cef_load_handler_capi.h 1816+++ b/src/cef/include/capi/cef_load_handler_capi.h 1817@@ -1,4 +1,4 @@ 1818-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1819+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1820 // 1821 // Redistribution and use in source and binary forms, with or without 1822 // modification, are permitted provided that the following conditions are 1823@@ -33,7 +33,7 @@ 1824 // by hand. See the translator.README.txt file in the tools directory for 1825 // more information. 1826 // 1827-// $hash=812538f84d327ea24469bcfc50957df699dc6edd$ 1828+// $hash=bf5522dc1385a750cad8b9197a588045beaaba58$ 1829 // 1830 1831 #ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ 1832diff --git a/src/cef/include/capi/cef_menu_model_capi.h b/src/cef/include/capi/cef_menu_model_capi.h 1833index a1f7920ce974e..6b260824da7c7 1834--- a/src/cef/include/capi/cef_menu_model_capi.h 1835+++ b/src/cef/include/capi/cef_menu_model_capi.h 1836@@ -1,4 +1,4 @@ 1837-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1838+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1839 // 1840 // Redistribution and use in source and binary forms, with or without 1841 // modification, are permitted provided that the following conditions are 1842@@ -33,7 +33,7 @@ 1843 // by hand. See the translator.README.txt file in the tools directory for 1844 // more information. 1845 // 1846-// $hash=9f30f2caa9eedc0d4fe963dbf0127602ffcbec61$ 1847+// $hash=a64d72dbd200dfb6a03a2a370b756e559422e97f$ 1848 // 1849 1850 #ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ 1851diff --git a/src/cef/include/capi/cef_menu_model_delegate_capi.h b/src/cef/include/capi/cef_menu_model_delegate_capi.h 1852index bd4628568f266..a0b114e251387 1853--- a/src/cef/include/capi/cef_menu_model_delegate_capi.h 1854+++ b/src/cef/include/capi/cef_menu_model_delegate_capi.h 1855@@ -1,4 +1,4 @@ 1856-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1857+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1858 // 1859 // Redistribution and use in source and binary forms, with or without 1860 // modification, are permitted provided that the following conditions are 1861@@ -33,7 +33,7 @@ 1862 // by hand. See the translator.README.txt file in the tools directory for 1863 // more information. 1864 // 1865-// $hash=bdb670bcaa9eb9f5748900ad25bcc061155d6076$ 1866+// $hash=5525030c1b87ab3430a11e7e12db71505531f548$ 1867 // 1868 1869 #ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_ 1870diff --git a/src/cef/include/capi/cef_navigation_entry_capi.h b/src/cef/include/capi/cef_navigation_entry_capi.h 1871index 6115f52a09330..e1202c0483f95 1872--- a/src/cef/include/capi/cef_navigation_entry_capi.h 1873+++ b/src/cef/include/capi/cef_navigation_entry_capi.h 1874@@ -1,4 +1,4 @@ 1875-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1876+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1877 // 1878 // Redistribution and use in source and binary forms, with or without 1879 // modification, are permitted provided that the following conditions are 1880@@ -33,7 +33,7 @@ 1881 // by hand. See the translator.README.txt file in the tools directory for 1882 // more information. 1883 // 1884-// $hash=bdaa64de1cef6de3abdcff88b64b32afc718b238$ 1885+// $hash=0e0d367fabdb12792de5ba8c588fe4bbc035b7a9$ 1886 // 1887 1888 #ifndef CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ 1889diff --git a/src/cef/include/capi/cef_origin_whitelist_capi.h b/src/cef/include/capi/cef_origin_whitelist_capi.h 1890index 563bbdd2cd239..ca47638d2f2e1 1891--- a/src/cef/include/capi/cef_origin_whitelist_capi.h 1892+++ b/src/cef/include/capi/cef_origin_whitelist_capi.h 1893@@ -1,4 +1,4 @@ 1894-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1895+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1896 // 1897 // Redistribution and use in source and binary forms, with or without 1898 // modification, are permitted provided that the following conditions are 1899@@ -33,7 +33,7 @@ 1900 // by hand. See the translator.README.txt file in the tools directory for 1901 // more information. 1902 // 1903-// $hash=0939a44345bea8df7ca5f1dbd6afbe41972121f2$ 1904+// $hash=41e29ffa7778537b0bfec9d7094babf6b3f6db69$ 1905 // 1906 1907 #ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ 1908diff --git a/src/cef/include/capi/cef_parser_capi.h b/src/cef/include/capi/cef_parser_capi.h 1909index d3ec0ee5d4eb5..37d43cf8f12ac 1910--- a/src/cef/include/capi/cef_parser_capi.h 1911+++ b/src/cef/include/capi/cef_parser_capi.h 1912@@ -1,4 +1,4 @@ 1913-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1914+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1915 // 1916 // Redistribution and use in source and binary forms, with or without 1917 // modification, are permitted provided that the following conditions are 1918@@ -33,7 +33,7 @@ 1919 // by hand. See the translator.README.txt file in the tools directory for 1920 // more information. 1921 // 1922-// $hash=f5e1c0fc43c6e85dbafa66975d9dc5e2bc7be69f$ 1923+// $hash=de8e3f97b060588604ec89b3cb5e2ddcd9e11499$ 1924 // 1925 1926 #ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ 1927diff --git a/src/cef/include/capi/cef_path_util_capi.h b/src/cef/include/capi/cef_path_util_capi.h 1928index 3cbb3ba4b01d0..c49b5a0bc3be1 1929--- a/src/cef/include/capi/cef_path_util_capi.h 1930+++ b/src/cef/include/capi/cef_path_util_capi.h 1931@@ -1,4 +1,4 @@ 1932-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1933+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1934 // 1935 // Redistribution and use in source and binary forms, with or without 1936 // modification, are permitted provided that the following conditions are 1937@@ -33,7 +33,7 @@ 1938 // by hand. See the translator.README.txt file in the tools directory for 1939 // more information. 1940 // 1941-// $hash=41ddd04d4efb147b05eb93816af1591ec3b61b76$ 1942+// $hash=9955c85f6282d1ee103791206079c1d2100ab7be$ 1943 // 1944 1945 #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ 1946diff --git a/src/cef/include/capi/cef_permission_request_capi.h b/src/cef/include/capi/cef_permission_request_capi.h 1947index 33c483a4c2b1e..f056f4d95be1d 1948--- a/src/cef/include/capi/cef_permission_request_capi.h 1949+++ b/src/cef/include/capi/cef_permission_request_capi.h 1950@@ -1,4 +1,4 @@ 1951-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 1952+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 1953 // 1954 // Redistribution and use in source and binary forms, with or without 1955 // modification, are permitted provided that the following conditions are 1956@@ -33,7 +33,7 @@ 1957 // by hand. See the translator.README.txt file in the tools directory for 1958 // more information. 1959 // 1960-// $hash=e930f6445aaeb80ff2f6b1a3077d7d0d4bbd7109$ 1961+// $hash=51af1ce96096db7ed212692b5915a74a18e0222d$ 1962 // 1963 1964 #ifndef CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ 1965@@ -60,18 +60,18 @@ typedef struct _cef_access_request_t { 1966 // Get the origin that is trying to acess the resource. 1967 /// 1968 // The resulting string must be freed by calling cef_string_userfree_free(). 1969- cef_string_userfree_t(CEF_CALLBACK *origin)( 1970- struct _cef_access_request_t *self); 1971+ cef_string_userfree_t(CEF_CALLBACK* origin)( 1972+ struct _cef_access_request_t* self); 1973 1974 /// 1975 // Get the resource that the origin is trying to acess. 1976 /// 1977- int(CEF_CALLBACK *resource_acess_id)(struct _cef_access_request_t *self); 1978+ int(CEF_CALLBACK* resource_acess_id)(struct _cef_access_request_t* self); 1979 1980 /// 1981 // Report whether the origin is allowed to acess the resource. 1982 /// 1983- void(CEF_CALLBACK *report_request_result)(struct _cef_access_request_t *self, 1984+ void(CEF_CALLBACK* report_request_result)(struct _cef_access_request_t* self, 1985 int allowed); 1986 } cef_access_request_t; 1987 1988@@ -90,14 +90,15 @@ typedef struct _cef_permission_request_t { 1989 // set for that origin. The host application should invoke the specified 1990 // callback with the desired permission state. 1991 /// 1992- void(CEF_CALLBACK *on_geolocation_show)( 1993- struct _cef_permission_request_t *self, const cef_string_t *origin); 1994+ void(CEF_CALLBACK* on_geolocation_show)( 1995+ struct _cef_permission_request_t* self, 1996+ const cef_string_t* origin); 1997 1998 /// 1999 // Revert the operation in the OnGeolocationShow. 2000 /// 2001- void(CEF_CALLBACK *on_geolocation_hide)( 2002- struct _cef_permission_request_t *self); 2003+ void(CEF_CALLBACK* on_geolocation_hide)( 2004+ struct _cef_permission_request_t* self); 2005 2006 /// 2007 // Notify the host application that web content from the specified origin is 2008@@ -105,16 +106,16 @@ typedef struct _cef_permission_request_t { 2009 // set for that origin. The host application should invoke the specified 2010 // callback with the desired permission state. 2011 /// 2012- void(CEF_CALLBACK *on_permission_request)( 2013- struct _cef_permission_request_t *self, 2014- struct _cef_access_request_t *request); 2015+ void(CEF_CALLBACK* on_permission_request)( 2016+ struct _cef_permission_request_t* self, 2017+ struct _cef_access_request_t* request); 2018 2019 /// 2020 // Revert the operation in the OnPermissionRequest. 2021 /// 2022- void(CEF_CALLBACK *on_permission_request_canceled)( 2023- struct _cef_permission_request_t *self, 2024- struct _cef_access_request_t *request); 2025+ void(CEF_CALLBACK* on_permission_request_canceled)( 2026+ struct _cef_permission_request_t* self, 2027+ struct _cef_access_request_t* request); 2028 } cef_permission_request_t; 2029 2030 /// 2031@@ -129,51 +130,55 @@ typedef struct _cef_browser_permission_request_delegate_t { 2032 /// 2033 // Handle the Geolocation permission requests. 2034 /// 2035- void(CEF_CALLBACK *ask_geolocation_permission)( 2036- struct _cef_browser_permission_request_delegate_t *self, 2037- const cef_string_t *origin, cef_permission_callback_t callback); 2038+ void(CEF_CALLBACK* ask_geolocation_permission)( 2039+ struct _cef_browser_permission_request_delegate_t* self, 2040+ const cef_string_t* origin, 2041+ cef_permission_callback_t callback); 2042 2043 /// 2044 // Cancel the Geolocation permission requests. 2045 /// 2046- void(CEF_CALLBACK *abort_ask_geolocation_permission)( 2047- struct _cef_browser_permission_request_delegate_t *self, 2048- const cef_string_t *origin); 2049+ void(CEF_CALLBACK* abort_ask_geolocation_permission)( 2050+ struct _cef_browser_permission_request_delegate_t* self, 2051+ const cef_string_t* origin); 2052 2053 /// 2054 // Handle the Protected Media Identifier permission requests. 2055 /// 2056- void(CEF_CALLBACK *ask_protected_media_identifier_permission)( 2057- struct _cef_browser_permission_request_delegate_t *self, 2058- const cef_string_t *origin, cef_permission_callback_t callback); 2059+ void(CEF_CALLBACK* ask_protected_media_identifier_permission)( 2060+ struct _cef_browser_permission_request_delegate_t* self, 2061+ const cef_string_t* origin, 2062+ cef_permission_callback_t callback); 2063 2064 /// 2065 // Cancel the Protected Media Identifier permission requests. 2066 /// 2067- void(CEF_CALLBACK *abort_ask_protected_media_identifier_permission)( 2068- struct _cef_browser_permission_request_delegate_t *self, 2069- const cef_string_t *origin); 2070+ void(CEF_CALLBACK* abort_ask_protected_media_identifier_permission)( 2071+ struct _cef_browser_permission_request_delegate_t* self, 2072+ const cef_string_t* origin); 2073 2074 /// 2075 // Handle the MIDI Sysex permission requests. 2076 /// 2077- void(CEF_CALLBACK *ask_midisysex_permission)( 2078- struct _cef_browser_permission_request_delegate_t *self, 2079- const cef_string_t *origin, cef_permission_callback_t callback); 2080+ void(CEF_CALLBACK* ask_midisysex_permission)( 2081+ struct _cef_browser_permission_request_delegate_t* self, 2082+ const cef_string_t* origin, 2083+ cef_permission_callback_t callback); 2084 2085 /// 2086 // Cancel the MIDI Sysex permission requests. 2087 /// 2088- void(CEF_CALLBACK *abort_ask_midisysex_permission)( 2089- struct _cef_browser_permission_request_delegate_t *self, 2090- const cef_string_t *origin); 2091+ void(CEF_CALLBACK* abort_ask_midisysex_permission)( 2092+ struct _cef_browser_permission_request_delegate_t* self, 2093+ const cef_string_t* origin); 2094 2095 /// 2096 // The callback for the Geolocation permission requests. 2097 /// 2098- void(CEF_CALLBACK *notify_geolocation_permission)( 2099- struct _cef_browser_permission_request_delegate_t *self, int value, 2100- const cef_string_t *origin); 2101+ void(CEF_CALLBACK* notify_geolocation_permission)( 2102+ struct _cef_browser_permission_request_delegate_t* self, 2103+ int value, 2104+ const cef_string_t* origin); 2105 } cef_browser_permission_request_delegate_t; 2106 2107 /// 2108@@ -190,32 +195,33 @@ typedef struct _cef_geolocation_acess_t { 2109 // Return true (1) if the geolocation permission state is set for the 2110 // specified origin. 2111 /// 2112- int(CEF_CALLBACK *contain_origin)(struct _cef_geolocation_acess_t *self, 2113- const cef_string_t *origin); 2114+ int(CEF_CALLBACK* contain_origin)(struct _cef_geolocation_acess_t* self, 2115+ const cef_string_t* origin); 2116 2117 /// 2118 // Return true (1) if the geolocation permission state set for the specified 2119 // origin is true (1). 2120 /// 2121- int(CEF_CALLBACK *is_origin_access_enabled)( 2122- struct _cef_geolocation_acess_t *self, const cef_string_t *origin); 2123+ int(CEF_CALLBACK* is_origin_access_enabled)( 2124+ struct _cef_geolocation_acess_t* self, 2125+ const cef_string_t* origin); 2126 2127 /// 2128 // Set the geolocation permission state to true (1) for the specified origin. 2129 /// 2130- void(CEF_CALLBACK *enabled)(struct _cef_geolocation_acess_t *self, 2131- const cef_string_t *origin); 2132+ void(CEF_CALLBACK* enabled)(struct _cef_geolocation_acess_t* self, 2133+ const cef_string_t* origin); 2134 2135 /// 2136 // Set the geolocation permission state to false (0) for the specified 2137 // origin. 2138 /// 2139- void(CEF_CALLBACK *disabled)(struct _cef_geolocation_acess_t *self, 2140- const cef_string_t *origin); 2141+ void(CEF_CALLBACK* disabled)(struct _cef_geolocation_acess_t* self, 2142+ const cef_string_t* origin); 2143 } cef_geolocation_acess_t; 2144 2145 #ifdef __cplusplus 2146 } 2147 #endif 2148 2149-#endif // CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ 2150+#endif // CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ 2151diff --git a/src/cef/include/capi/cef_print_handler_capi.h b/src/cef/include/capi/cef_print_handler_capi.h 2152index df321dea177b1..0563268bfb5e9 2153--- a/src/cef/include/capi/cef_print_handler_capi.h 2154+++ b/src/cef/include/capi/cef_print_handler_capi.h 2155@@ -1,4 +1,4 @@ 2156-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2157+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2158 // 2159 // Redistribution and use in source and binary forms, with or without 2160 // modification, are permitted provided that the following conditions are 2161@@ -33,7 +33,7 @@ 2162 // by hand. See the translator.README.txt file in the tools directory for 2163 // more information. 2164 // 2165-// $hash=e26be3efc18d8c79d019c02b1d73a7ec2866b142$ 2166+// $hash=3a9d7294c9a4c3aeafe1231c7a3ba5afd7fad0b5$ 2167 // 2168 2169 #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ 2170diff --git a/src/cef/include/capi/cef_print_settings_capi.h b/src/cef/include/capi/cef_print_settings_capi.h 2171index e611abfd47243..2b776c142d53a 2172--- a/src/cef/include/capi/cef_print_settings_capi.h 2173+++ b/src/cef/include/capi/cef_print_settings_capi.h 2174@@ -1,4 +1,4 @@ 2175-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2176+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2177 // 2178 // Redistribution and use in source and binary forms, with or without 2179 // modification, are permitted provided that the following conditions are 2180@@ -33,7 +33,7 @@ 2181 // by hand. See the translator.README.txt file in the tools directory for 2182 // more information. 2183 // 2184-// $hash=fdbd26f9dd20dbd7813fc17a8c34650b2da19581$ 2185+// $hash=eef0d62c1e839660037f32600f5a396d3dce3019$ 2186 // 2187 2188 #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ 2189diff --git a/src/cef/include/capi/cef_process_message_capi.h b/src/cef/include/capi/cef_process_message_capi.h 2190index b87770ba48738..206ea501212be 2191--- a/src/cef/include/capi/cef_process_message_capi.h 2192+++ b/src/cef/include/capi/cef_process_message_capi.h 2193@@ -1,4 +1,4 @@ 2194-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2195+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2196 // 2197 // Redistribution and use in source and binary forms, with or without 2198 // modification, are permitted provided that the following conditions are 2199@@ -33,7 +33,7 @@ 2200 // by hand. See the translator.README.txt file in the tools directory for 2201 // more information. 2202 // 2203-// $hash=2549ea10cd3a41bc04ab81bad24eb12787de68b9$ 2204+// $hash=12e4604521c186e03d984931e66613d33fc32ffd$ 2205 // 2206 2207 #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ 2208diff --git a/src/cef/include/capi/cef_process_util_capi.h b/src/cef/include/capi/cef_process_util_capi.h 2209index f22dd7e8ab6e4..3f609f440eb2f 2210--- a/src/cef/include/capi/cef_process_util_capi.h 2211+++ b/src/cef/include/capi/cef_process_util_capi.h 2212@@ -1,4 +1,4 @@ 2213-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2214+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2215 // 2216 // Redistribution and use in source and binary forms, with or without 2217 // modification, are permitted provided that the following conditions are 2218@@ -33,7 +33,7 @@ 2219 // by hand. See the translator.README.txt file in the tools directory for 2220 // more information. 2221 // 2222-// $hash=1f2b752c4e314b240ce95cb3b87863c2f99534a8$ 2223+// $hash=230303a48ff28b79f289c199b06a4d3540cb36af$ 2224 // 2225 2226 #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ 2227diff --git a/src/cef/include/capi/cef_registration_capi.h b/src/cef/include/capi/cef_registration_capi.h 2228index 3285569eb8f08..2bdb0e51830a9 2229--- a/src/cef/include/capi/cef_registration_capi.h 2230+++ b/src/cef/include/capi/cef_registration_capi.h 2231@@ -1,4 +1,4 @@ 2232-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2233+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2234 // 2235 // Redistribution and use in source and binary forms, with or without 2236 // modification, are permitted provided that the following conditions are 2237@@ -33,7 +33,7 @@ 2238 // by hand. See the translator.README.txt file in the tools directory for 2239 // more information. 2240 // 2241-// $hash=d5efa37953d0f0097fef20bc18f4938621c6b168$ 2242+// $hash=9dbe775fa78723fa6695c778fbe8cdbd36b0a888$ 2243 // 2244 2245 #ifndef CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_ 2246diff --git a/src/cef/include/capi/cef_render_handler_capi.h b/src/cef/include/capi/cef_render_handler_capi.h 2247index 605ec1c02ceb2..16c82b8fa0c46 2248--- a/src/cef/include/capi/cef_render_handler_capi.h 2249+++ b/src/cef/include/capi/cef_render_handler_capi.h 2250@@ -1,4 +1,4 @@ 2251-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2252+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2253 // 2254 // Redistribution and use in source and binary forms, with or without 2255 // modification, are permitted provided that the following conditions are 2256@@ -33,7 +33,7 @@ 2257 // by hand. See the translator.README.txt file in the tools directory for 2258 // more information. 2259 // 2260-// $hash=50df1cb9393d36c975aecddb2775ada0d8b9eeec$ 2261+// $hash=3a236866417ec98ad3fb5f325b07250a31c0183c$ 2262 // 2263 2264 #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ 2265diff --git a/src/cef/include/capi/cef_render_process_handler_capi.h b/src/cef/include/capi/cef_render_process_handler_capi.h 2266index 2fea446ebe519..1ab59d126d5b1 2267--- a/src/cef/include/capi/cef_render_process_handler_capi.h 2268+++ b/src/cef/include/capi/cef_render_process_handler_capi.h 2269@@ -1,4 +1,4 @@ 2270-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2271+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2272 // 2273 // Redistribution and use in source and binary forms, with or without 2274 // modification, are permitted provided that the following conditions are 2275@@ -33,7 +33,7 @@ 2276 // by hand. See the translator.README.txt file in the tools directory for 2277 // more information. 2278 // 2279-// $hash=0b8abb0e55cb56fcb778ced72a61a108c2b28011$ 2280+// $hash=5827d7a0ee7343daab5fc2a36bdbfabb9d85bb37$ 2281 // 2282 2283 #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ 2284diff --git a/src/cef/include/capi/cef_request_capi.h b/src/cef/include/capi/cef_request_capi.h 2285index 3ddd18fef51ce..66d1721d93be6 2286--- a/src/cef/include/capi/cef_request_capi.h 2287+++ b/src/cef/include/capi/cef_request_capi.h 2288@@ -1,4 +1,4 @@ 2289-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2290+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2291 // 2292 // Redistribution and use in source and binary forms, with or without 2293 // modification, are permitted provided that the following conditions are 2294@@ -33,7 +33,7 @@ 2295 // by hand. See the translator.README.txt file in the tools directory for 2296 // more information. 2297 // 2298-// $hash=47b361878452f2a94e559782913d80beb0dba25a$ 2299+// $hash=77ebea253e3607ed44c60791bb461a202d95c222$ 2300 // 2301 2302 #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ 2303diff --git a/src/cef/include/capi/cef_request_context_capi.h b/src/cef/include/capi/cef_request_context_capi.h 2304index 857f918122f6e..28508ef72433d 2305--- a/src/cef/include/capi/cef_request_context_capi.h 2306+++ b/src/cef/include/capi/cef_request_context_capi.h 2307@@ -1,4 +1,4 @@ 2308-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2309+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2310 // 2311 // Redistribution and use in source and binary forms, with or without 2312 // modification, are permitted provided that the following conditions are 2313@@ -33,7 +33,7 @@ 2314 // by hand. See the translator.README.txt file in the tools directory for 2315 // more information. 2316 // 2317-// $hash=d2ccf65028b87821b92eda7e8d715ec98f8e1623$ 2318+// $hash=c6c04067690990978ca3bbbbc6ddd6f5a0186f91$ 2319 // 2320 2321 #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ 2322@@ -45,7 +45,6 @@ 2323 #include "include/capi/cef_data_base_capi.h" 2324 #include "include/capi/cef_extension_capi.h" 2325 #include "include/capi/cef_extension_handler_capi.h" 2326-#include "include/capi/cef_media_router_capi.h" 2327 #include "include/capi/cef_values_capi.h" 2328 #include "include/capi/cef_web_storage_capi.h" 2329 2330@@ -370,15 +369,6 @@ typedef struct _cef_request_context_t { 2331 struct _cef_extension_t*(CEF_CALLBACK* get_extension)( 2332 struct _cef_request_context_t* self, 2333 const cef_string_t* extension_id); 2334- 2335- /// 2336- // Returns the MediaRouter object associated with this context. If |callback| 2337- // is non-NULL it will be executed asnychronously on the UI thread after the 2338- // manager's context has been initialized. 2339- /// 2340- struct _cef_media_router_t*(CEF_CALLBACK* get_media_router)( 2341- struct _cef_request_context_t* self, 2342- struct _cef_completion_callback_t* callback); 2343 } cef_request_context_t; 2344 2345 /// 2346diff --git a/src/cef/include/capi/cef_request_context_handler_capi.h b/src/cef/include/capi/cef_request_context_handler_capi.h 2347index eb1e08b0c8a5b..1a2bb1d2d2e99 2348--- a/src/cef/include/capi/cef_request_context_handler_capi.h 2349+++ b/src/cef/include/capi/cef_request_context_handler_capi.h 2350@@ -1,4 +1,4 @@ 2351-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2352+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2353 // 2354 // Redistribution and use in source and binary forms, with or without 2355 // modification, are permitted provided that the following conditions are 2356@@ -33,7 +33,7 @@ 2357 // by hand. See the translator.README.txt file in the tools directory for 2358 // more information. 2359 // 2360-// $hash=b44d320d5cceb5022543e8154170b8d276628c76$ 2361+// $hash=f517370ae17962732a0894555330fd002860b83a$ 2362 // 2363 2364 #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ 2365@@ -45,12 +45,13 @@ 2366 #include "include/capi/cef_frame_capi.h" 2367 #include "include/capi/cef_request_capi.h" 2368 #include "include/capi/cef_resource_request_handler_capi.h" 2369-#include "include/capi/cef_web_plugin_capi.h" 2370 2371 #ifdef __cplusplus 2372 extern "C" { 2373 #endif 2374 2375+// #include "include/cef_web_plugin.h" // !enable_plugins 2376+ 2377 /// 2378 // Implement this structure to provide handler implementations. The handler 2379 // instance will not be released until all objects related to the context have 2380diff --git a/src/cef/include/capi/cef_request_handler_capi.h b/src/cef/include/capi/cef_request_handler_capi.h 2381index a5daa4db861ba..d55682ebb3f26 2382--- a/src/cef/include/capi/cef_request_handler_capi.h 2383+++ b/src/cef/include/capi/cef_request_handler_capi.h 2384@@ -1,4 +1,4 @@ 2385-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2386+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2387 // 2388 // Redistribution and use in source and binary forms, with or without 2389 // modification, are permitted provided that the following conditions are 2390@@ -33,7 +33,7 @@ 2391 // by hand. See the translator.README.txt file in the tools directory for 2392 // more information. 2393 // 2394-// $hash=0a47add5335ff2d73e08d1e491f2561356f63fcd$ 2395+// $hash=76ffdecdfc2fb8b6956b936d0a5762e4f7b122a1$ 2396 // 2397 2398 #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ 2399diff --git a/src/cef/include/capi/cef_resource_bundle_capi.h b/src/cef/include/capi/cef_resource_bundle_capi.h 2400index 9e83df4059bfb..e10a539cdc16b 2401--- a/src/cef/include/capi/cef_resource_bundle_capi.h 2402+++ b/src/cef/include/capi/cef_resource_bundle_capi.h 2403@@ -1,4 +1,4 @@ 2404-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2405+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2406 // 2407 // Redistribution and use in source and binary forms, with or without 2408 // modification, are permitted provided that the following conditions are 2409@@ -33,7 +33,7 @@ 2410 // by hand. See the translator.README.txt file in the tools directory for 2411 // more information. 2412 // 2413-// $hash=a9e35ca17785f77666db7650208cacfd9a85c3e0$ 2414+// $hash=d45529ccb797163f6ff0b790d4959e7644355a8b$ 2415 // 2416 2417 #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ 2418diff --git a/src/cef/include/capi/cef_resource_bundle_handler_capi.h b/src/cef/include/capi/cef_resource_bundle_handler_capi.h 2419index a72d6dffd3f87..c025ec51f7998 2420--- a/src/cef/include/capi/cef_resource_bundle_handler_capi.h 2421+++ b/src/cef/include/capi/cef_resource_bundle_handler_capi.h 2422@@ -1,4 +1,4 @@ 2423-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2424+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2425 // 2426 // Redistribution and use in source and binary forms, with or without 2427 // modification, are permitted provided that the following conditions are 2428@@ -33,7 +33,7 @@ 2429 // by hand. See the translator.README.txt file in the tools directory for 2430 // more information. 2431 // 2432-// $hash=3d7b3d4702c8d35dc8780f9e87eb7560d6ce1dee$ 2433+// $hash=0436aa15546615fe9252d46ea89887ec59c0e85d$ 2434 // 2435 2436 #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ 2437diff --git a/src/cef/include/capi/cef_resource_handler_capi.h b/src/cef/include/capi/cef_resource_handler_capi.h 2438index 4c581cb71fb09..e73f1484e1fec 2439--- a/src/cef/include/capi/cef_resource_handler_capi.h 2440+++ b/src/cef/include/capi/cef_resource_handler_capi.h 2441@@ -1,4 +1,4 @@ 2442-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2443+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2444 // 2445 // Redistribution and use in source and binary forms, with or without 2446 // modification, are permitted provided that the following conditions are 2447@@ -33,7 +33,7 @@ 2448 // by hand. See the translator.README.txt file in the tools directory for 2449 // more information. 2450 // 2451-// $hash=67df3d56f0cc0f58d2b0a2fe884bbb2c1c39813f$ 2452+// $hash=443ce8d80b80b55337069a9a118fb0eb645faba3$ 2453 // 2454 2455 #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ 2456diff --git a/src/cef/include/capi/cef_resource_request_handler_capi.h b/src/cef/include/capi/cef_resource_request_handler_capi.h 2457index 1773465c3aa3e..0f06b2f65f44c 2458--- a/src/cef/include/capi/cef_resource_request_handler_capi.h 2459+++ b/src/cef/include/capi/cef_resource_request_handler_capi.h 2460@@ -1,4 +1,4 @@ 2461-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2462+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2463 // 2464 // Redistribution and use in source and binary forms, with or without 2465 // modification, are permitted provided that the following conditions are 2466@@ -33,7 +33,7 @@ 2467 // by hand. See the translator.README.txt file in the tools directory for 2468 // more information. 2469 // 2470-// $hash=3d5c3c54c9f7eedc5cd1dd61c0f69edcd6a1143a$ 2471+// $hash=d95bcd8d70029011eb9e0f2c64febb627939d121$ 2472 // 2473 2474 #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_ 2475diff --git a/src/cef/include/capi/cef_response_capi.h b/src/cef/include/capi/cef_response_capi.h 2476index d4973e6cdaf75..7e03febd1c38f 2477--- a/src/cef/include/capi/cef_response_capi.h 2478+++ b/src/cef/include/capi/cef_response_capi.h 2479@@ -1,4 +1,4 @@ 2480-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2481+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2482 // 2483 // Redistribution and use in source and binary forms, with or without 2484 // modification, are permitted provided that the following conditions are 2485@@ -33,7 +33,7 @@ 2486 // by hand. See the translator.README.txt file in the tools directory for 2487 // more information. 2488 // 2489-// $hash=6ebf7adcdaee57772810c1528b27140ae95966d0$ 2490+// $hash=0b0b89911503aeb4fc52afa8d0d0f4e103181b6c$ 2491 // 2492 2493 #ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ 2494diff --git a/src/cef/include/capi/cef_response_filter_capi.h b/src/cef/include/capi/cef_response_filter_capi.h 2495index 2267054ca8133..66708ecccb2bc 2496--- a/src/cef/include/capi/cef_response_filter_capi.h 2497+++ b/src/cef/include/capi/cef_response_filter_capi.h 2498@@ -1,4 +1,4 @@ 2499-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2500+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2501 // 2502 // Redistribution and use in source and binary forms, with or without 2503 // modification, are permitted provided that the following conditions are 2504@@ -33,7 +33,7 @@ 2505 // by hand. See the translator.README.txt file in the tools directory for 2506 // more information. 2507 // 2508-// $hash=fb06b9630b95fedb5d202aab7814d914ab7c943b$ 2509+// $hash=557c259e90896df250dafa16c1205a817204dc22$ 2510 // 2511 2512 #ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ 2513diff --git a/src/cef/include/capi/cef_scheme_capi.h b/src/cef/include/capi/cef_scheme_capi.h 2514index 444506c93f356..fa07fd7691c7a 2515--- a/src/cef/include/capi/cef_scheme_capi.h 2516+++ b/src/cef/include/capi/cef_scheme_capi.h 2517@@ -1,4 +1,4 @@ 2518-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2519+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2520 // 2521 // Redistribution and use in source and binary forms, with or without 2522 // modification, are permitted provided that the following conditions are 2523@@ -33,7 +33,7 @@ 2524 // by hand. See the translator.README.txt file in the tools directory for 2525 // more information. 2526 // 2527-// $hash=df8c46dd19ef6a3964c49d79e770de6e4245e208$ 2528+// $hash=2dd528ca9ff88be60782b87036f464a6bd6e69a5$ 2529 // 2530 2531 #ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ 2532diff --git a/src/cef/include/capi/cef_server_capi.h b/src/cef/include/capi/cef_server_capi.h 2533index a3aa6a64d9ad1..f23b3545406dd 2534--- a/src/cef/include/capi/cef_server_capi.h 2535+++ b/src/cef/include/capi/cef_server_capi.h 2536@@ -1,4 +1,4 @@ 2537-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2538+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2539 // 2540 // Redistribution and use in source and binary forms, with or without 2541 // modification, are permitted provided that the following conditions are 2542@@ -33,7 +33,7 @@ 2543 // by hand. See the translator.README.txt file in the tools directory for 2544 // more information. 2545 // 2546-// $hash=72c2b4f976016cea50e54a386c09a786973c01a3$ 2547+// $hash=58c1f77a5342d836003a2246fcbe501a6f05086b$ 2548 // 2549 2550 #ifndef CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_ 2551diff --git a/src/cef/include/capi/cef_ssl_info_capi.h b/src/cef/include/capi/cef_ssl_info_capi.h 2552index b122a75862ceb..2a76452b3b9fe 2553--- a/src/cef/include/capi/cef_ssl_info_capi.h 2554+++ b/src/cef/include/capi/cef_ssl_info_capi.h 2555@@ -1,4 +1,4 @@ 2556-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2557+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2558 // 2559 // Redistribution and use in source and binary forms, with or without 2560 // modification, are permitted provided that the following conditions are 2561@@ -33,7 +33,7 @@ 2562 // by hand. See the translator.README.txt file in the tools directory for 2563 // more information. 2564 // 2565-// $hash=d72f3b34b4150f29f1491b2c729f4a8afc4a33f4$ 2566+// $hash=9a4618d543430a0818201958879d89a6b082019b$ 2567 // 2568 2569 #ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ 2570diff --git a/src/cef/include/capi/cef_ssl_status_capi.h b/src/cef/include/capi/cef_ssl_status_capi.h 2571index 49268b3f2413e..f9467c7c8accf 2572--- a/src/cef/include/capi/cef_ssl_status_capi.h 2573+++ b/src/cef/include/capi/cef_ssl_status_capi.h 2574@@ -1,4 +1,4 @@ 2575-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2576+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2577 // 2578 // Redistribution and use in source and binary forms, with or without 2579 // modification, are permitted provided that the following conditions are 2580@@ -33,7 +33,7 @@ 2581 // by hand. See the translator.README.txt file in the tools directory for 2582 // more information. 2583 // 2584-// $hash=1bc8a73a196fbbb6cec3dd1738b817575b17706d$ 2585+// $hash=60394d189c5dfa8625f7e5fdab03eeda1fce7c5a$ 2586 // 2587 2588 #ifndef CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_ 2589diff --git a/src/cef/include/capi/cef_stream_capi.h b/src/cef/include/capi/cef_stream_capi.h 2590index 3197a5b1f5ddf..357af53881211 2591--- a/src/cef/include/capi/cef_stream_capi.h 2592+++ b/src/cef/include/capi/cef_stream_capi.h 2593@@ -1,4 +1,4 @@ 2594-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2595+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2596 // 2597 // Redistribution and use in source and binary forms, with or without 2598 // modification, are permitted provided that the following conditions are 2599@@ -33,7 +33,7 @@ 2600 // by hand. See the translator.README.txt file in the tools directory for 2601 // more information. 2602 // 2603-// $hash=87f6cad177614ece33d9574f0f2964e5bb97d613$ 2604+// $hash=3c7df6e11c46a966f2bb7d2e751927779ddf4dd2$ 2605 // 2606 2607 #ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ 2608diff --git a/src/cef/include/capi/cef_string_visitor_capi.h b/src/cef/include/capi/cef_string_visitor_capi.h 2609index 4acd1b472ab4e..89499c9ff2e9b 2610--- a/src/cef/include/capi/cef_string_visitor_capi.h 2611+++ b/src/cef/include/capi/cef_string_visitor_capi.h 2612@@ -1,4 +1,4 @@ 2613-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2614+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2615 // 2616 // Redistribution and use in source and binary forms, with or without 2617 // modification, are permitted provided that the following conditions are 2618@@ -33,7 +33,7 @@ 2619 // by hand. See the translator.README.txt file in the tools directory for 2620 // more information. 2621 // 2622-// $hash=398537ec88bfe902c49908db4a549da297594b70$ 2623+// $hash=215af99d25f001165995c9fa88c59d6e8a05f28f$ 2624 // 2625 2626 #ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ 2627diff --git a/src/cef/include/capi/cef_task_capi.h b/src/cef/include/capi/cef_task_capi.h 2628index 5f6281e1b943b..b9d721b00f254 2629--- a/src/cef/include/capi/cef_task_capi.h 2630+++ b/src/cef/include/capi/cef_task_capi.h 2631@@ -1,4 +1,4 @@ 2632-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2633+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2634 // 2635 // Redistribution and use in source and binary forms, with or without 2636 // modification, are permitted provided that the following conditions are 2637@@ -33,7 +33,7 @@ 2638 // by hand. See the translator.README.txt file in the tools directory for 2639 // more information. 2640 // 2641-// $hash=e943dd2af818e5a5f19f6cbd1648896684c666c6$ 2642+// $hash=be97992f2fd5e08cf5483c55a1db72a74a1fa5c6$ 2643 // 2644 2645 #ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ 2646diff --git a/src/cef/include/capi/cef_thread_capi.h b/src/cef/include/capi/cef_thread_capi.h 2647index 4b99983d5b3ba..5f496f2368f92 2648--- a/src/cef/include/capi/cef_thread_capi.h 2649+++ b/src/cef/include/capi/cef_thread_capi.h 2650@@ -1,4 +1,4 @@ 2651-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2652+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2653 // 2654 // Redistribution and use in source and binary forms, with or without 2655 // modification, are permitted provided that the following conditions are 2656@@ -33,7 +33,7 @@ 2657 // by hand. See the translator.README.txt file in the tools directory for 2658 // more information. 2659 // 2660-// $hash=d99ffc2270c1cf8b0f06dd08c1b6e9b27cee4bc8$ 2661+// $hash=6ef25dfdc109d397dd9ac685605c143ed453843d$ 2662 // 2663 2664 #ifndef CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_ 2665diff --git a/src/cef/include/capi/cef_trace_capi.h b/src/cef/include/capi/cef_trace_capi.h 2666index df39462f05228..19792c5ed1145 2667--- a/src/cef/include/capi/cef_trace_capi.h 2668+++ b/src/cef/include/capi/cef_trace_capi.h 2669@@ -1,4 +1,4 @@ 2670-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2671+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2672 // 2673 // Redistribution and use in source and binary forms, with or without 2674 // modification, are permitted provided that the following conditions are 2675@@ -33,7 +33,7 @@ 2676 // by hand. See the translator.README.txt file in the tools directory for 2677 // more information. 2678 // 2679-// $hash=a7b4410e0a35eb0aba747014665419fb6b6fcb67$ 2680+// $hash=95fee99cebd49941b0016a94fe1377a273df875f$ 2681 // 2682 2683 #ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ 2684diff --git a/src/cef/include/capi/cef_urlrequest_capi.h b/src/cef/include/capi/cef_urlrequest_capi.h 2685index 75a834c811c31..50ba3da3394b0 2686--- a/src/cef/include/capi/cef_urlrequest_capi.h 2687+++ b/src/cef/include/capi/cef_urlrequest_capi.h 2688@@ -1,4 +1,4 @@ 2689-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2690+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2691 // 2692 // Redistribution and use in source and binary forms, with or without 2693 // modification, are permitted provided that the following conditions are 2694@@ -33,7 +33,7 @@ 2695 // by hand. See the translator.README.txt file in the tools directory for 2696 // more information. 2697 // 2698-// $hash=a14d77cd7756797afb4db3d28a2359da53011bfa$ 2699+// $hash=1a7f7266ca653ae00fda873d7b1161fda5be5655$ 2700 // 2701 2702 #ifndef CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ 2703diff --git a/src/cef/include/capi/cef_v8_capi.h b/src/cef/include/capi/cef_v8_capi.h 2704index 824c3dbb48e2f..21a1134c93647 2705--- a/src/cef/include/capi/cef_v8_capi.h 2706+++ b/src/cef/include/capi/cef_v8_capi.h 2707@@ -1,4 +1,4 @@ 2708-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2709+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2710 // 2711 // Redistribution and use in source and binary forms, with or without 2712 // modification, are permitted provided that the following conditions are 2713@@ -33,7 +33,7 @@ 2714 // by hand. See the translator.README.txt file in the tools directory for 2715 // more information. 2716 // 2717-// $hash=2bdcad7f8e3c03285a5e5ddb9a02a5a2182f254c$ 2718+// $hash=515a6f62bb5217ba8ec2f7d39ab80c8309969a36$ 2719 // 2720 2721 #ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ 2722diff --git a/src/cef/include/capi/cef_values_capi.h b/src/cef/include/capi/cef_values_capi.h 2723index 90df63d6cedeb..dc4674a91eb70 2724--- a/src/cef/include/capi/cef_values_capi.h 2725+++ b/src/cef/include/capi/cef_values_capi.h 2726@@ -1,4 +1,4 @@ 2727-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2728+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2729 // 2730 // Redistribution and use in source and binary forms, with or without 2731 // modification, are permitted provided that the following conditions are 2732@@ -33,7 +33,7 @@ 2733 // by hand. See the translator.README.txt file in the tools directory for 2734 // more information. 2735 // 2736-// $hash=c557496bdc1403b25b22ca9354a942478131c7ce$ 2737+// $hash=ddc15ea7b9330cf163a23d502e104084469fceee$ 2738 // 2739 2740 #ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ 2741diff --git a/src/cef/include/capi/cef_waitable_event_capi.h b/src/cef/include/capi/cef_waitable_event_capi.h 2742index aa507e1083f85..ba326fa23f21e 2743--- a/src/cef/include/capi/cef_waitable_event_capi.h 2744+++ b/src/cef/include/capi/cef_waitable_event_capi.h 2745@@ -1,4 +1,4 @@ 2746-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2747+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2748 // 2749 // Redistribution and use in source and binary forms, with or without 2750 // modification, are permitted provided that the following conditions are 2751@@ -33,7 +33,7 @@ 2752 // by hand. See the translator.README.txt file in the tools directory for 2753 // more information. 2754 // 2755-// $hash=aff380a4fa3f1a26063170381d47c67971511f1d$ 2756+// $hash=5f8073d54b2908fb4257e39f9a7ec377c904607d$ 2757 // 2758 2759 #ifndef CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_ 2760diff --git a/src/cef/include/capi/cef_web_storage_capi.h b/src/cef/include/capi/cef_web_storage_capi.h 2761index b013bf001c667..97bf6d8a52884 2762--- a/src/cef/include/capi/cef_web_storage_capi.h 2763+++ b/src/cef/include/capi/cef_web_storage_capi.h 2764@@ -1,4 +1,4 @@ 2765-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2766+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2767 // 2768 // Redistribution and use in source and binary forms, with or without 2769 // modification, are permitted provided that the following conditions are 2770@@ -33,7 +33,7 @@ 2771 // by hand. See the translator.README.txt file in the tools directory for 2772 // more information. 2773 // 2774-// $hash=4f98d594eaa1a0b41b534f51da2639bfc9a12778$ 2775+// $hash=94416352092795abfea395fe1b6853fea26edf5e$ 2776 // 2777 2778 #ifndef CEF_INCLUDE_CAPI_CEF_WEB_STORAGE_CAPI_H_ 2779diff --git a/src/cef/include/capi/cef_x509_certificate_capi.h b/src/cef/include/capi/cef_x509_certificate_capi.h 2780index 8650b4055db2a..7c663501075c7 2781--- a/src/cef/include/capi/cef_x509_certificate_capi.h 2782+++ b/src/cef/include/capi/cef_x509_certificate_capi.h 2783@@ -1,4 +1,4 @@ 2784-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2785+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2786 // 2787 // Redistribution and use in source and binary forms, with or without 2788 // modification, are permitted provided that the following conditions are 2789@@ -33,7 +33,7 @@ 2790 // by hand. See the translator.README.txt file in the tools directory for 2791 // more information. 2792 // 2793-// $hash=32b942f6b50b842ddec08addc2b5794f2a272dbe$ 2794+// $hash=50344d992070d4f7c39071988e3df72aa1eab9df$ 2795 // 2796 2797 #ifndef CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_ 2798diff --git a/src/cef/include/capi/cef_xml_reader_capi.h b/src/cef/include/capi/cef_xml_reader_capi.h 2799index 75f32a4d1d897..0245d236da957 2800--- a/src/cef/include/capi/cef_xml_reader_capi.h 2801+++ b/src/cef/include/capi/cef_xml_reader_capi.h 2802@@ -1,4 +1,4 @@ 2803-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2804+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2805 // 2806 // Redistribution and use in source and binary forms, with or without 2807 // modification, are permitted provided that the following conditions are 2808@@ -33,7 +33,7 @@ 2809 // by hand. See the translator.README.txt file in the tools directory for 2810 // more information. 2811 // 2812-// $hash=c3bdf957dfd307568842b95599e3259d4c8d8f44$ 2813+// $hash=48faeb26812f4fa6d8965c47acc96e635c45d27a$ 2814 // 2815 2816 #ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ 2817diff --git a/src/cef/include/capi/cef_zip_reader_capi.h b/src/cef/include/capi/cef_zip_reader_capi.h 2818index 5d899353362ca..27c81799e25bd 2819--- a/src/cef/include/capi/cef_zip_reader_capi.h 2820+++ b/src/cef/include/capi/cef_zip_reader_capi.h 2821@@ -1,4 +1,4 @@ 2822-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2823+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2824 // 2825 // Redistribution and use in source and binary forms, with or without 2826 // modification, are permitted provided that the following conditions are 2827@@ -33,7 +33,7 @@ 2828 // by hand. See the translator.README.txt file in the tools directory for 2829 // more information. 2830 // 2831-// $hash=ac91bcd40e1439ee1e742cc47989530b112c99bd$ 2832+// $hash=28f7ff6c3af903a645adc15ad4b696939e79df19$ 2833 // 2834 2835 #ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ 2836diff --git a/src/cef/include/capi/test/cef_test_helpers_capi.h b/src/cef/include/capi/test/cef_test_helpers_capi.h 2837index 128ab4c64925e..092ebf4d02b81 2838--- a/src/cef/include/capi/test/cef_test_helpers_capi.h 2839+++ b/src/cef/include/capi/test/cef_test_helpers_capi.h 2840@@ -1,4 +1,4 @@ 2841-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2842+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2843 // 2844 // Redistribution and use in source and binary forms, with or without 2845 // modification, are permitted provided that the following conditions are 2846@@ -33,7 +33,7 @@ 2847 // by hand. See the translator.README.txt file in the tools directory for 2848 // more information. 2849 // 2850-// $hash=584acfdb7be699b0192c46ac9fa88084f141e845$ 2851+// $hash=cd0ff16b2ea4d2d973ca9b7c7f503e7c1df0ad26$ 2852 // 2853 2854 #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_ 2855diff --git a/src/cef/include/capi/test/cef_translator_test_capi.h b/src/cef/include/capi/test/cef_translator_test_capi.h 2856index 48811c5e883d6..601c8637e94ac 2857--- a/src/cef/include/capi/test/cef_translator_test_capi.h 2858+++ b/src/cef/include/capi/test/cef_translator_test_capi.h 2859@@ -1,4 +1,4 @@ 2860-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2861+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2862 // 2863 // Redistribution and use in source and binary forms, with or without 2864 // modification, are permitted provided that the following conditions are 2865@@ -33,7 +33,7 @@ 2866 // by hand. See the translator.README.txt file in the tools directory for 2867 // more information. 2868 // 2869-// $hash=d70d5b74890e3ca91f01333ebdb4f3298caeb619$ 2870+// $hash=1f8029c1907d5e1097d7347f03618bec25388f9b$ 2871 // 2872 2873 #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_ 2874diff --git a/src/cef/include/capi/views/cef_box_layout_capi.h b/src/cef/include/capi/views/cef_box_layout_capi.h 2875index 6499ec22fd540..687aa2a3c57a4 2876--- a/src/cef/include/capi/views/cef_box_layout_capi.h 2877+++ b/src/cef/include/capi/views/cef_box_layout_capi.h 2878@@ -1,4 +1,4 @@ 2879-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2880+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2881 // 2882 // Redistribution and use in source and binary forms, with or without 2883 // modification, are permitted provided that the following conditions are 2884@@ -33,7 +33,7 @@ 2885 // by hand. See the translator.README.txt file in the tools directory for 2886 // more information. 2887 // 2888-// $hash=bf1d1dc95fa2053645a348d6f554688b9d06c83a$ 2889+// $hash=5e9d3854f9d31ac72038fb24aa9ef5944691a4ca$ 2890 // 2891 2892 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_ 2893diff --git a/src/cef/include/capi/views/cef_browser_view_capi.h b/src/cef/include/capi/views/cef_browser_view_capi.h 2894index ab629c8a61cbb..3c2942a89061d 2895--- a/src/cef/include/capi/views/cef_browser_view_capi.h 2896+++ b/src/cef/include/capi/views/cef_browser_view_capi.h 2897@@ -1,4 +1,4 @@ 2898-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2899+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2900 // 2901 // Redistribution and use in source and binary forms, with or without 2902 // modification, are permitted provided that the following conditions are 2903@@ -33,7 +33,7 @@ 2904 // by hand. See the translator.README.txt file in the tools directory for 2905 // more information. 2906 // 2907-// $hash=9ae10b92eed7495112c94825521ac46fb9327ef7$ 2908+// $hash=90e42cb56ab7b8b752ddaf9526cb3b6e5af0d0fb$ 2909 // 2910 2911 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_ 2912diff --git a/src/cef/include/capi/views/cef_browser_view_delegate_capi.h b/src/cef/include/capi/views/cef_browser_view_delegate_capi.h 2913index 27ae4c1c4ee72..0a828fd052d26 2914--- a/src/cef/include/capi/views/cef_browser_view_delegate_capi.h 2915+++ b/src/cef/include/capi/views/cef_browser_view_delegate_capi.h 2916@@ -1,4 +1,4 @@ 2917-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2918+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2919 // 2920 // Redistribution and use in source and binary forms, with or without 2921 // modification, are permitted provided that the following conditions are 2922@@ -33,7 +33,7 @@ 2923 // by hand. See the translator.README.txt file in the tools directory for 2924 // more information. 2925 // 2926-// $hash=520df1f3e00efbffc9d499149f2f797bf0f85c99$ 2927+// $hash=ec5c49d383e69a87b525c6e1ec3e2c779db6ab78$ 2928 // 2929 2930 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_ 2931diff --git a/src/cef/include/capi/views/cef_button_capi.h b/src/cef/include/capi/views/cef_button_capi.h 2932index 40e71ec963aee..59699f8ae27b2 2933--- a/src/cef/include/capi/views/cef_button_capi.h 2934+++ b/src/cef/include/capi/views/cef_button_capi.h 2935@@ -1,4 +1,4 @@ 2936-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2937+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2938 // 2939 // Redistribution and use in source and binary forms, with or without 2940 // modification, are permitted provided that the following conditions are 2941@@ -33,7 +33,7 @@ 2942 // by hand. See the translator.README.txt file in the tools directory for 2943 // more information. 2944 // 2945-// $hash=5ebbf84a506d3d4d0bfb3d8db48f060a682f1ac9$ 2946+// $hash=ce7101147c7a834842e1b4006f3d830aa58cfc91$ 2947 // 2948 2949 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_ 2950diff --git a/src/cef/include/capi/views/cef_button_delegate_capi.h b/src/cef/include/capi/views/cef_button_delegate_capi.h 2951index d853dbf97ed59..c9180f5c96122 2952--- a/src/cef/include/capi/views/cef_button_delegate_capi.h 2953+++ b/src/cef/include/capi/views/cef_button_delegate_capi.h 2954@@ -1,4 +1,4 @@ 2955-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2956+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2957 // 2958 // Redistribution and use in source and binary forms, with or without 2959 // modification, are permitted provided that the following conditions are 2960@@ -33,7 +33,7 @@ 2961 // by hand. See the translator.README.txt file in the tools directory for 2962 // more information. 2963 // 2964-// $hash=9f1752ee949e98662a718de764e83f26ce06ec26$ 2965+// $hash=cd06431dcfeb4f0907a478695ff1690da701fa8c$ 2966 // 2967 2968 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_ 2969diff --git a/src/cef/include/capi/views/cef_display_capi.h b/src/cef/include/capi/views/cef_display_capi.h 2970index 40c304b44f512..85e2ce6599231 2971--- a/src/cef/include/capi/views/cef_display_capi.h 2972+++ b/src/cef/include/capi/views/cef_display_capi.h 2973@@ -1,4 +1,4 @@ 2974-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2975+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2976 // 2977 // Redistribution and use in source and binary forms, with or without 2978 // modification, are permitted provided that the following conditions are 2979@@ -33,7 +33,7 @@ 2980 // by hand. See the translator.README.txt file in the tools directory for 2981 // more information. 2982 // 2983-// $hash=2fd0db428ce5902d59a7802c901e1c13b2367b5a$ 2984+// $hash=6cc3e2f52a4e8eab9690225cc085f726032c7bb1$ 2985 // 2986 2987 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_ 2988diff --git a/src/cef/include/capi/views/cef_fill_layout_capi.h b/src/cef/include/capi/views/cef_fill_layout_capi.h 2989index a8778a96d6898..23f4aa770bb7d 2990--- a/src/cef/include/capi/views/cef_fill_layout_capi.h 2991+++ b/src/cef/include/capi/views/cef_fill_layout_capi.h 2992@@ -1,4 +1,4 @@ 2993-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 2994+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 2995 // 2996 // Redistribution and use in source and binary forms, with or without 2997 // modification, are permitted provided that the following conditions are 2998@@ -33,7 +33,7 @@ 2999 // by hand. See the translator.README.txt file in the tools directory for 3000 // more information. 3001 // 3002-// $hash=13972453cdca328c6ee81249aeb202d80da6d290$ 3003+// $hash=477dc88c896170d4b617be9f7ce0bc21ebbbccbe$ 3004 // 3005 3006 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_ 3007diff --git a/src/cef/include/capi/views/cef_label_button_capi.h b/src/cef/include/capi/views/cef_label_button_capi.h 3008index 47ff1de60f6ca..ab9757079cd9c 3009--- a/src/cef/include/capi/views/cef_label_button_capi.h 3010+++ b/src/cef/include/capi/views/cef_label_button_capi.h 3011@@ -1,4 +1,4 @@ 3012-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3013+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3014 // 3015 // Redistribution and use in source and binary forms, with or without 3016 // modification, are permitted provided that the following conditions are 3017@@ -33,7 +33,7 @@ 3018 // by hand. See the translator.README.txt file in the tools directory for 3019 // more information. 3020 // 3021-// $hash=de3e738efca85a84422c92fa8504b24ed4efab8a$ 3022+// $hash=e638b5ad0528625d06234d8a35b44eb11a79fc3c$ 3023 // 3024 3025 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_ 3026diff --git a/src/cef/include/capi/views/cef_layout_capi.h b/src/cef/include/capi/views/cef_layout_capi.h 3027index 8047df752aa6a..1408aa90ca55f 3028--- a/src/cef/include/capi/views/cef_layout_capi.h 3029+++ b/src/cef/include/capi/views/cef_layout_capi.h 3030@@ -1,4 +1,4 @@ 3031-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3032+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3033 // 3034 // Redistribution and use in source and binary forms, with or without 3035 // modification, are permitted provided that the following conditions are 3036@@ -33,7 +33,7 @@ 3037 // by hand. See the translator.README.txt file in the tools directory for 3038 // more information. 3039 // 3040-// $hash=6ef0d3d4390654fc1460a2ff586f2bbfd62e96b8$ 3041+// $hash=8c78341b1803cdcba66c5e95d0eab1ce2dea4e02$ 3042 // 3043 3044 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_ 3045diff --git a/src/cef/include/capi/views/cef_menu_button_capi.h b/src/cef/include/capi/views/cef_menu_button_capi.h 3046index 50aaca9d60ecd..7fbf905e48f80 3047--- a/src/cef/include/capi/views/cef_menu_button_capi.h 3048+++ b/src/cef/include/capi/views/cef_menu_button_capi.h 3049@@ -1,4 +1,4 @@ 3050-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3051+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3052 // 3053 // Redistribution and use in source and binary forms, with or without 3054 // modification, are permitted provided that the following conditions are 3055@@ -33,7 +33,7 @@ 3056 // by hand. See the translator.README.txt file in the tools directory for 3057 // more information. 3058 // 3059-// $hash=925b09f77cd71327a447bf5c9601cc21a7eb7c3a$ 3060+// $hash=6c4206291d525099e382ce8b39b5bc82655455fc$ 3061 // 3062 3063 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_ 3064diff --git a/src/cef/include/capi/views/cef_menu_button_delegate_capi.h b/src/cef/include/capi/views/cef_menu_button_delegate_capi.h 3065index c5f22aabac2a7..e0d2ec5279fcd 3066--- a/src/cef/include/capi/views/cef_menu_button_delegate_capi.h 3067+++ b/src/cef/include/capi/views/cef_menu_button_delegate_capi.h 3068@@ -1,4 +1,4 @@ 3069-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3070+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3071 // 3072 // Redistribution and use in source and binary forms, with or without 3073 // modification, are permitted provided that the following conditions are 3074@@ -33,7 +33,7 @@ 3075 // by hand. See the translator.README.txt file in the tools directory for 3076 // more information. 3077 // 3078-// $hash=ca7948602a0d20a5bd0271065d79e8679898eff6$ 3079+// $hash=357d6e0ba5823c66b72eae87696a33c0855134ee$ 3080 // 3081 3082 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_ 3083diff --git a/src/cef/include/capi/views/cef_overlay_controller_capi.h b/src/cef/include/capi/views/cef_overlay_controller_capi.h 3084index a0d6ac3a7d142..0226cd9c6f340 3085--- a/src/cef/include/capi/views/cef_overlay_controller_capi.h 3086+++ b/src/cef/include/capi/views/cef_overlay_controller_capi.h 3087@@ -1,4 +1,4 @@ 3088-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3089+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3090 // 3091 // Redistribution and use in source and binary forms, with or without 3092 // modification, are permitted provided that the following conditions are 3093@@ -33,7 +33,7 @@ 3094 // by hand. See the translator.README.txt file in the tools directory for 3095 // more information. 3096 // 3097-// $hash=14eaca76dba704ee64f454aaca821a6818012fc6$ 3098+// $hash=55371efcc9d09b9205ce160174a85d1b345d56ea$ 3099 // 3100 3101 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_OVERLAY_CONTROLLER_CAPI_H_ 3102diff --git a/src/cef/include/capi/views/cef_panel_capi.h b/src/cef/include/capi/views/cef_panel_capi.h 3103index 276c6206d488b..7ee9d9faf56ab 3104--- a/src/cef/include/capi/views/cef_panel_capi.h 3105+++ b/src/cef/include/capi/views/cef_panel_capi.h 3106@@ -1,4 +1,4 @@ 3107-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3108+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3109 // 3110 // Redistribution and use in source and binary forms, with or without 3111 // modification, are permitted provided that the following conditions are 3112@@ -33,7 +33,7 @@ 3113 // by hand. See the translator.README.txt file in the tools directory for 3114 // more information. 3115 // 3116-// $hash=d5311ffa72e57d240f6963b1f45a278041bd33f4$ 3117+// $hash=1aee6ef8b8b0c8d6a820f99a17a0d13b417cbe86$ 3118 // 3119 3120 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_ 3121diff --git a/src/cef/include/capi/views/cef_panel_delegate_capi.h b/src/cef/include/capi/views/cef_panel_delegate_capi.h 3122index bef0a26510f8d..76bd0ef5201ff 3123--- a/src/cef/include/capi/views/cef_panel_delegate_capi.h 3124+++ b/src/cef/include/capi/views/cef_panel_delegate_capi.h 3125@@ -1,4 +1,4 @@ 3126-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3127+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3128 // 3129 // Redistribution and use in source and binary forms, with or without 3130 // modification, are permitted provided that the following conditions are 3131@@ -33,7 +33,7 @@ 3132 // by hand. See the translator.README.txt file in the tools directory for 3133 // more information. 3134 // 3135-// $hash=3b6b3ef725189debb1dd43db395a111f50dee60c$ 3136+// $hash=0b27daf9b7ff1378a7404b913d6e7bf778ec4c46$ 3137 // 3138 3139 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_ 3140diff --git a/src/cef/include/capi/views/cef_scroll_view_capi.h b/src/cef/include/capi/views/cef_scroll_view_capi.h 3141index 2c93f45c3a00a..2c8f180a45adc 3142--- a/src/cef/include/capi/views/cef_scroll_view_capi.h 3143+++ b/src/cef/include/capi/views/cef_scroll_view_capi.h 3144@@ -1,4 +1,4 @@ 3145-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3146+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3147 // 3148 // Redistribution and use in source and binary forms, with or without 3149 // modification, are permitted provided that the following conditions are 3150@@ -33,7 +33,7 @@ 3151 // by hand. See the translator.README.txt file in the tools directory for 3152 // more information. 3153 // 3154-// $hash=374b16fddbbb8bedc2dbb2e03dcfaa8cddba6aeb$ 3155+// $hash=bf4d81ab1ea8b9920e890161f32f805c5fcd0622$ 3156 // 3157 3158 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_ 3159diff --git a/src/cef/include/capi/views/cef_textfield_capi.h b/src/cef/include/capi/views/cef_textfield_capi.h 3160index fbb97eea9334b..8e56b964be535 3161--- a/src/cef/include/capi/views/cef_textfield_capi.h 3162+++ b/src/cef/include/capi/views/cef_textfield_capi.h 3163@@ -1,4 +1,4 @@ 3164-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3165+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3166 // 3167 // Redistribution and use in source and binary forms, with or without 3168 // modification, are permitted provided that the following conditions are 3169@@ -33,7 +33,7 @@ 3170 // by hand. See the translator.README.txt file in the tools directory for 3171 // more information. 3172 // 3173-// $hash=798f84672412f544765b800d03cf284b066f818c$ 3174+// $hash=3faf27fd1377ad64fe06aa30e69934b78102456e$ 3175 // 3176 3177 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_ 3178diff --git a/src/cef/include/capi/views/cef_textfield_delegate_capi.h b/src/cef/include/capi/views/cef_textfield_delegate_capi.h 3179index 167249eef60cc..92a115c24c01d 3180--- a/src/cef/include/capi/views/cef_textfield_delegate_capi.h 3181+++ b/src/cef/include/capi/views/cef_textfield_delegate_capi.h 3182@@ -1,4 +1,4 @@ 3183-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3184+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3185 // 3186 // Redistribution and use in source and binary forms, with or without 3187 // modification, are permitted provided that the following conditions are 3188@@ -33,7 +33,7 @@ 3189 // by hand. See the translator.README.txt file in the tools directory for 3190 // more information. 3191 // 3192-// $hash=44337fe515a5acf51829e1dd00a54f2c1230aba5$ 3193+// $hash=c81f3ad4200af508ec18645f9a1c47ca137b2422$ 3194 // 3195 3196 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_ 3197diff --git a/src/cef/include/capi/views/cef_view_capi.h b/src/cef/include/capi/views/cef_view_capi.h 3198index 9907ccc53797b..5fbac19fa73a4 3199--- a/src/cef/include/capi/views/cef_view_capi.h 3200+++ b/src/cef/include/capi/views/cef_view_capi.h 3201@@ -1,4 +1,4 @@ 3202-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3203+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3204 // 3205 // Redistribution and use in source and binary forms, with or without 3206 // modification, are permitted provided that the following conditions are 3207@@ -33,7 +33,7 @@ 3208 // by hand. See the translator.README.txt file in the tools directory for 3209 // more information. 3210 // 3211-// $hash=d2aadfa4159846c2719387e2814d5e108def4b81$ 3212+// $hash=86f76917de91f297c2165a7e2311b8e1220a24ac$ 3213 // 3214 3215 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_ 3216diff --git a/src/cef/include/capi/views/cef_view_delegate_capi.h b/src/cef/include/capi/views/cef_view_delegate_capi.h 3217index 09971e2a201dd..663a9a4bee755 3218--- a/src/cef/include/capi/views/cef_view_delegate_capi.h 3219+++ b/src/cef/include/capi/views/cef_view_delegate_capi.h 3220@@ -1,4 +1,4 @@ 3221-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3222+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3223 // 3224 // Redistribution and use in source and binary forms, with or without 3225 // modification, are permitted provided that the following conditions are 3226@@ -33,7 +33,7 @@ 3227 // by hand. See the translator.README.txt file in the tools directory for 3228 // more information. 3229 // 3230-// $hash=6a8166eca76513b59a4f6355f4f765dc1d77e4ee$ 3231+// $hash=aae94169e63ebfb9223ef32a28eeeb03d5cc710f$ 3232 // 3233 3234 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_ 3235diff --git a/src/cef/include/capi/views/cef_window_capi.h b/src/cef/include/capi/views/cef_window_capi.h 3236index 8e493af11e137..52546b074656b 3237--- a/src/cef/include/capi/views/cef_window_capi.h 3238+++ b/src/cef/include/capi/views/cef_window_capi.h 3239@@ -1,4 +1,4 @@ 3240-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3241+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3242 // 3243 // Redistribution and use in source and binary forms, with or without 3244 // modification, are permitted provided that the following conditions are 3245@@ -33,7 +33,7 @@ 3246 // by hand. See the translator.README.txt file in the tools directory for 3247 // more information. 3248 // 3249-// $hash=1785245d89e84d5a27ce062208bc19a4031ce97f$ 3250+// $hash=3ea36e131dbb52dbe2c80567e38835b6aab1613b$ 3251 // 3252 3253 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_ 3254diff --git a/src/cef/include/capi/views/cef_window_delegate_capi.h b/src/cef/include/capi/views/cef_window_delegate_capi.h 3255index 3bcffb3e2ef42..4fa5096b31dd0 3256--- a/src/cef/include/capi/views/cef_window_delegate_capi.h 3257+++ b/src/cef/include/capi/views/cef_window_delegate_capi.h 3258@@ -1,4 +1,4 @@ 3259-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3260+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3261 // 3262 // Redistribution and use in source and binary forms, with or without 3263 // modification, are permitted provided that the following conditions are 3264@@ -33,7 +33,7 @@ 3265 // by hand. See the translator.README.txt file in the tools directory for 3266 // more information. 3267 // 3268-// $hash=cd5d7c4e83237ceb39c5639489ca6004d2d69f0c$ 3269+// $hash=e8f5a22c50d02ae662383e056d4bf64de235d68d$ 3270 // 3271 3272 #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_ 3273diff --git a/src/cef/include/cef_api_hash.h b/src/cef/include/cef_api_hash.h 3274index 1558dbba069b4..058fd83436f8c 3275--- a/src/cef/include/cef_api_hash.h 3276+++ b/src/cef/include/cef_api_hash.h 3277@@ -1,4 +1,4 @@ 3278-// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. 3279+// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. 3280 // 3281 // Redistribution and use in source and binary forms, with or without 3282 // modification, are permitted provided that the following conditions are 3283@@ -42,15 +42,15 @@ 3284 // way that may cause binary incompatibility with other builds. The universal 3285 // hash value will change if any platform is affected whereas the platform hash 3286 // values will change only if that particular platform is affected. 3287-#define CEF_API_HASH_UNIVERSAL "c731adb5e5a7fdb5c827ccc611df6eb4d4b33717" 3288+#define CEF_API_HASH_UNIVERSAL "fa7171a110d7f5a06e06c770c9224972d99054ec" 3289 #if defined(OS_WIN) 3290-#define CEF_API_HASH_PLATFORM "dc628cf4312be11edcb89422ce900cf7f773c1f0" 3291+#define CEF_API_HASH_PLATFORM "56a3fec8d1782d7f1bf12d13c6f61b5707282879" 3292 #elif defined(OS_MAC) 3293-#define CEF_API_HASH_PLATFORM "f7c028130eb6fefadbb4874ca2b0dac73e8113e7" 3294+#define CEF_API_HASH_PLATFORM "c01d748bab5bbdd4b4ed03a6b91fddf28c5ce635" 3295 #elif defined(OS_LINUX) 3296-#define CEF_API_HASH_PLATFORM "0533f1d7611266b46636c9c75fd4a908a6062f93" 3297+#define CEF_API_HASH_PLATFORM "61c970f2c3d3c064401adeb42d16a19566d577c2" 3298 #elif defined(OS_OHOS) 3299-#define CEF_API_HASH_PLATFORM "0533f1d7611266b46636c9c75fd4a908a6062f93" 3300+#define CEF_API_HASH_PLATFORM "61c970f2c3d3c064401adeb42d16a19566d577c2" 3301 #endif 3302 3303 #ifdef __cplusplus 3304diff --git a/src/cef/include/cef_browser.h b/src/cef/include/cef_browser.h 3305index 56b0cf4594242..33090400deb67 3306--- a/src/cef/include/cef_browser.h 3307+++ b/src/cef/include/cef_browser.h 3308@@ -53,6 +53,7 @@ 3309 class CefBrowserHost; 3310 class CefClient; 3311 class CefJavaScriptResultCallback; 3312+class CefWebMessageReceiver; 3313 class CefStoreWebArchiveResultCallback; 3314 3315 /// 3316@@ -237,7 +238,8 @@ class CefBrowser : public virtual CefBaseRefCounted { 3317 // Returns the Permission Request Delegate object. 3318 /// 3319 /*--cef()--*/ 3320- virtual CefRefPtr<CefBrowserPermissionRequestDelegate> GetPermissionRequestDelegate() = 0; 3321+ virtual CefRefPtr<CefBrowserPermissionRequestDelegate> 3322+ GetPermissionRequestDelegate() = 0; 3323 3324 /// 3325 // Returns the Geolocation Permission handler object. 3326@@ -899,7 +901,7 @@ class CefBrowserHost : public virtual CefBaseRefCounted { 3327 // Post a message to the port. 3328 /// 3329 /*--cef()--*/ 3330- virtual void PostPortMessage(CefString& port_handle, CefString& data) = 0; 3331+ virtual void PostPortMessage(CefString& port_handle, CefRefPtr<CefValue> message) = 0; 3332 3333 /// 3334 // Set the callback of the port. 3335@@ -907,7 +909,7 @@ class CefBrowserHost : public virtual CefBaseRefCounted { 3336 /*--cef()--*/ 3337 virtual void SetPortMessageCallback( 3338 CefString& port_handle, 3339- CefRefPtr<CefJavaScriptResultCallback> callback) = 0; 3340+ CefRefPtr<CefWebMessageReceiver> callback) = 0; 3341 3342 /// 3343 // Gets the latest hitdata 3344@@ -953,7 +955,8 @@ class CefBrowserHost : public virtual CefBaseRefCounted { 3345 // Loads the given data into this WebView 3346 // optional_param=data, optional_param=mimeType, optional_param=encoding, 3347 /// 3348- /*--cef(optional_param=data, optional_param=mimeType, optional_param=encoding,)--*/ 3349+ /*--cef(optional_param=data, optional_param=mimeType, 3350+ optional_param=encoding,)--*/ 3351 virtual void LoadWithData(const CefString& data, 3352 const CefString& mimeType, 3353 const CefString& encoding) = 0; 3354@@ -1235,6 +1238,62 @@ class CefBrowserHost : public virtual CefBaseRefCounted { 3355 /// 3356 /*--cef()--*/ 3357 virtual void RemoveCache(bool include_disk_files) = 0; 3358+ 3359+ /// 3360+ // Scroll page up or down 3361+ /// 3362+ /*--cef()--*/ 3363+ virtual void ScrollPageUpDown(bool is_up, 3364+ bool is_half, 3365+ float view_height) = 0; 3366+ 3367+ /// 3368+ // Get web history state 3369+ /// 3370+ /*--cef()--*/ 3371+ virtual CefRefPtr<CefBinaryValue> GetWebState() = 0; 3372+ 3373+ /// 3374+ // Restore web history state 3375+ /// 3376+ /*--cef()--*/ 3377+ virtual bool RestoreWebState(const CefRefPtr<CefBinaryValue> state) = 0; 3378+ 3379+ /// 3380+ // Scroll to the position. 3381+ /// 3382+ /*--cef()--*/ 3383+ virtual void ScrollTo(float x, float y) = 0; 3384+ 3385+ /// 3386+ // Scroll by the delta distance. 3387+ /// 3388+ /*--cef()--*/ 3389+ virtual void ScrollBy(float delta_x, float delta_y) = 0; 3390+ 3391+ /// 3392+ // Slide Scroll by the speed. 3393+ /// 3394+ /*--cef()--*/ 3395+ virtual void SlideScroll(float vx, float vy) = 0; 3396+ 3397+ /// 3398+ // Set whether webview can access files 3399+ /// 3400+ /*--cef()--*/ 3401+ virtual void SetFileAccess(bool falg) = 0; 3402+ 3403+ /// 3404+ // Set whether webview can access network 3405+ /// 3406+ /*--cef()--*/ 3407+ virtual void SetBlockNetwork(bool falg) = 0; 3408+ 3409+ /// 3410+ // Set the cache mode of webview 3411+ /// 3412+ /*--cef()--*/ 3413+ virtual void SetCacheMode(int falg) = 0; 3414 }; 3415 3416 /// 3417@@ -1268,6 +1327,20 @@ class CefStoreWebArchiveResultCallback : public virtual CefBaseRefCounted { 3418 /*--cef(optional_param=result)--*/ 3419 virtual void OnStoreWebArchiveDone(const CefString& result) = 0; 3420 }; 3421+ 3422+/// 3423+// Interface to implement to be notified of asynchronous web message channel. 3424+/// 3425+/*--cef(source=client)--*/ 3426+class CefWebMessageReceiver : public virtual CefBaseRefCounted { 3427+ public: 3428+ /// 3429+ // Method that will be called upon |PostPortMessage|. |message| will be sent 3430+ // to another end of web message channel. 3431+ /// 3432+ /*--cef()--*/ 3433+ virtual void OnMessage(CefRefPtr<CefValue> message) = 0; 3434+}; 3435 /* ---------- ohos webview add end --------- */ 3436 3437 #endif // CEF_INCLUDE_CEF_BROWSER_H_ 3438diff --git a/src/cef/include/cef_context_menu_handler.h b/src/cef/include/cef_context_menu_handler.h 3439index 6df23c193cef5..c9864ccd93baf 3440--- a/src/cef/include/cef_context_menu_handler.h 3441+++ b/src/cef/include/cef_context_menu_handler.h 3442@@ -219,6 +219,8 @@ class CefContextMenuParams : public virtual CefBaseRefCounted { 3443 typedef cef_context_menu_media_type_t MediaType; 3444 typedef cef_context_menu_media_state_flags_t MediaStateFlags; 3445 typedef cef_context_menu_edit_state_flags_t EditStateFlags; 3446+ typedef cef_context_menu_input_field_type_t InputFieldType; 3447+ typedef cef_context_menu_source_type_t SourceType; 3448 3449 /// 3450 // Returns the X coordinate of the mouse where the context menu was invoked. 3451@@ -356,6 +358,18 @@ class CefContextMenuParams : public virtual CefBaseRefCounted { 3452 /// 3453 /*--cef()--*/ 3454 virtual bool IsCustomMenu() = 0; 3455+ 3456+ /// 3457+ // Returns the input field type of context node that the context menu was invoked on. 3458+ /// 3459+ /*--cef(default_retval=CM_INPUTFIELDTYPE_NONE)--*/ 3460+ virtual InputFieldType GetInputFieldType() = 0; 3461+ 3462+ /// 3463+ // Returns the source type of context node that the context menu was invoked on. 3464+ /// 3465+ /*--cef(default_retval=CM_SOURCETYPE_NONE)--*/ 3466+ virtual SourceType GetSourceType() = 0; 3467 }; 3468 3469 #endif // CEF_INCLUDE_CEF_CONTEXT_MENU_HANDLER_H_ 3470diff --git a/src/cef/include/cef_data_base.h b/src/cef/include/cef_data_base.h 3471index 31aa67d68425c..a6a937ede1691 3472--- a/src/cef/include/cef_data_base.h 3473+++ b/src/cef/include/cef_data_base.h 3474@@ -81,7 +81,9 @@ class CefDataBase : public virtual CefBaseRefCounted { 3475 virtual void GetHttpAuthCredentials( 3476 const CefString& host, 3477 const CefString& realm, 3478- std::vector<CefString>& username_password) = 0; 3479+ CefString& username, 3480+ char* password, 3481+ uint32_t passwordSize) = 0; 3482 3483 /// 3484 // gets whether the instance holds the specified permissions for the specified 3485diff --git a/src/cef/include/cef_dialog_handler.h b/src/cef/include/cef_dialog_handler.h 3486index 5b77305af987d..88209153d9c72 3487--- a/src/cef/include/cef_dialog_handler.h 3488+++ b/src/cef/include/cef_dialog_handler.h 3489@@ -66,6 +66,27 @@ class CefFileDialogCallback : public virtual CefBaseRefCounted { 3490 virtual void Cancel() = 0; 3491 }; 3492 3493+/// 3494+// Callback interface for asynchronous continuation of <select> selection. 3495+/// 3496+/*--cef(source=library)--*/ 3497+class CefSelectPopupCallback : public virtual CefBaseRefCounted { 3498+ public: 3499+ /// 3500+ // Continue the <select> selection. |indices| should be the 0-based array 3501+ // index of the value selected from the <select> array passed to 3502+ // CefDialogHandler::ShowSelectPopup. 3503+ /// 3504+ /*--cef(capi_name=cont)--*/ 3505+ virtual void Continue(const std::vector<int>& indices) = 0; 3506+ 3507+ /// 3508+ // Cancel <select> selection. 3509+ /// 3510+ /*--cef()--*/ 3511+ virtual void Cancel() = 0; 3512+}; 3513+ 3514 /// 3515 // Implement this interface to handle dialog events. The methods of this class 3516 // will be called on the browser process UI thread. 3517@@ -102,6 +123,20 @@ class CefDialogHandler : public virtual CefBaseRefCounted { 3518 CefRefPtr<CefFileDialogCallback> callback) { 3519 return false; 3520 } 3521+ 3522+ /// 3523+ // Show <select> popup menu. 3524+ /// 3525+ /*--cef()--*/ 3526+ virtual void OnSelectPopupMenu(CefRefPtr<CefBrowser> browser, 3527+ const CefRect& bounds, 3528+ int item_height, 3529+ double item_font_size, 3530+ int selected_item, 3531+ const std::vector<CefSelectPopupItem>& menu_items, 3532+ bool right_aligned, 3533+ bool allow_multiple_selection, 3534+ CefRefPtr<CefSelectPopupCallback> callback) {} 3535 }; 3536 3537 #endif // CEF_INCLUDE_CEF_DIALOG_HANDLER_H_ 3538diff --git a/src/cef/include/cef_media_router.h b/src/cef/include/cef_media_router.h 3539deleted file mode 100644 3540index 378c3fc51530e..0000000000000 3541--- a/src/cef/include/cef_media_router.h 3542+++ /dev/null 3543@@ -1,323 +0,0 @@ 3544-// Copyright (c) 2020 Marshall A. Greenblatt. All rights reserved. 3545-// 3546-// Redistribution and use in source and binary forms, with or without 3547-// modification, are permitted provided that the following conditions are 3548-// met: 3549-// 3550-// * Redistributions of source code must retain the above copyright 3551-// notice, this list of conditions and the following disclaimer. 3552-// * Redistributions in binary form must reproduce the above 3553-// copyright notice, this list of conditions and the following disclaimer 3554-// in the documentation and/or other materials provided with the 3555-// distribution. 3556-// * Neither the name of Google Inc. nor the name Chromium Embedded 3557-// Framework nor the names of its contributors may be used to endorse 3558-// or promote products derived from this software without specific prior 3559-// written permission. 3560-// 3561-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3562-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3563-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3564-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3565-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3566-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3567-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3568-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3569-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3570-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3571-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3572-// 3573-// --------------------------------------------------------------------------- 3574-// 3575-// The contents of this file must follow a specific format in order to 3576-// support the CEF translator tool. See the translator.README.txt file in the 3577-// tools directory for more information. 3578-// 3579- 3580-#ifndef CEF_INCLUDE_CEF_MEDIA_ROUTER_H_ 3581-#define CEF_INCLUDE_CEF_MEDIA_ROUTER_H_ 3582-#pragma once 3583- 3584-#include <vector> 3585-#include "include/cef_base.h" 3586-#include "include/cef_callback.h" 3587-#include "include/cef_registration.h" 3588- 3589-class CefMediaObserver; 3590-class CefMediaRoute; 3591-class CefMediaRouteCreateCallback; 3592-class CefMediaSink; 3593-class CefMediaSinkDeviceInfoCallback; 3594-class CefMediaSource; 3595- 3596-/// 3597-// Supports discovery of and communication with media devices on the local 3598-// network via the Cast and DIAL protocols. The methods of this class may be 3599-// called on any browser process thread unless otherwise indicated. 3600-/// 3601-/*--cef(source=library)--*/ 3602-class CefMediaRouter : public virtual CefBaseRefCounted { 3603- public: 3604- /// 3605- // Returns the MediaRouter object associated with the global request context. 3606- // If |callback| is non-NULL it will be executed asnychronously on the UI 3607- // thread after the manager's storage has been initialized. Equivalent to 3608- // calling CefRequestContext::GetGlobalContext()->GetMediaRouter(). 3609- /// 3610- /*--cef(optional_param=callback)--*/ 3611- static CefRefPtr<CefMediaRouter> GetGlobalMediaRouter( 3612- CefRefPtr<CefCompletionCallback> callback); 3613- 3614- /// 3615- // Add an observer for MediaRouter events. The observer will remain registered 3616- // until the returned Registration object is destroyed. 3617- /// 3618- /*--cef()--*/ 3619- virtual CefRefPtr<CefRegistration> AddObserver( 3620- CefRefPtr<CefMediaObserver> observer) = 0; 3621- 3622- /// 3623- // Returns a MediaSource object for the specified media source URN. Supported 3624- // URN schemes include "cast:" and "dial:", and will be already known by the 3625- // client application (e.g. "cast:<appId>?clientId=<clientId>"). 3626- /// 3627- /*--cef()--*/ 3628- virtual CefRefPtr<CefMediaSource> GetSource(const CefString& urn) = 0; 3629- 3630- /// 3631- // Trigger an asynchronous call to CefMediaObserver::OnSinks on all 3632- // registered observers. 3633- /// 3634- /*--cef()--*/ 3635- virtual void NotifyCurrentSinks() = 0; 3636- 3637- /// 3638- // Create a new route between |source| and |sink|. Source and sink must be 3639- // valid, compatible (as reported by CefMediaSink::IsCompatibleWith), and a 3640- // route between them must not already exist. |callback| will be executed 3641- // on success or failure. If route creation succeeds it will also trigger an 3642- // asynchronous call to CefMediaObserver::OnRoutes on all registered 3643- // observers. 3644- /// 3645- /*--cef()--*/ 3646- virtual void CreateRoute(CefRefPtr<CefMediaSource> source, 3647- CefRefPtr<CefMediaSink> sink, 3648- CefRefPtr<CefMediaRouteCreateCallback> callback) = 0; 3649- 3650- /// 3651- // Trigger an asynchronous call to CefMediaObserver::OnRoutes on all 3652- // registered observers. 3653- /// 3654- /*--cef()--*/ 3655- virtual void NotifyCurrentRoutes() = 0; 3656-}; 3657- 3658-/// 3659-// Implemented by the client to observe MediaRouter events and registered via 3660-// CefMediaRouter::AddObserver. The methods of this class will be called on the 3661-// browser process UI thread. 3662-/// 3663-/*--cef(source=client)--*/ 3664-class CefMediaObserver : public virtual CefBaseRefCounted { 3665- public: 3666- typedef cef_media_route_connection_state_t ConnectionState; 3667- 3668- /// 3669- // The list of available media sinks has changed or 3670- // CefMediaRouter::NotifyCurrentSinks was called. 3671- /// 3672- /*--cef()--*/ 3673- virtual void OnSinks(const std::vector<CefRefPtr<CefMediaSink>>& sinks) = 0; 3674- 3675- /// 3676- // The list of available media routes has changed or 3677- // CefMediaRouter::NotifyCurrentRoutes was called. 3678- /// 3679- /*--cef()--*/ 3680- virtual void OnRoutes( 3681- const std::vector<CefRefPtr<CefMediaRoute>>& routes) = 0; 3682- 3683- /// 3684- // The connection state of |route| has changed. 3685- /// 3686- /*--cef()--*/ 3687- virtual void OnRouteStateChanged(CefRefPtr<CefMediaRoute> route, 3688- ConnectionState state) = 0; 3689- 3690- /// 3691- // A message was recieved over |route|. |message| is only valid for 3692- // the scope of this callback and should be copied if necessary. 3693- /// 3694- /*--cef()--*/ 3695- virtual void OnRouteMessageReceived(CefRefPtr<CefMediaRoute> route, 3696- const void* message, 3697- size_t message_size) = 0; 3698-}; 3699- 3700-/// 3701-// Represents the route between a media source and sink. Instances of this 3702-// object are created via CefMediaRouter::CreateRoute and retrieved via 3703-// CefMediaObserver::OnRoutes. Contains the status and metadata of a 3704-// routing operation. The methods of this class may be called on any browser 3705-// process thread unless otherwise indicated. 3706-/// 3707-/*--cef(source=library)--*/ 3708-class CefMediaRoute : public virtual CefBaseRefCounted { 3709- public: 3710- /// 3711- // Returns the ID for this route. 3712- /// 3713- /*--cef()--*/ 3714- virtual CefString GetId() = 0; 3715- 3716- /// 3717- // Returns the source associated with this route. 3718- /// 3719- /*--cef()--*/ 3720- virtual CefRefPtr<CefMediaSource> GetSource() = 0; 3721- 3722- /// 3723- // Returns the sink associated with this route. 3724- /// 3725- /*--cef()--*/ 3726- virtual CefRefPtr<CefMediaSink> GetSink() = 0; 3727- 3728- /// 3729- // Send a message over this route. |message| will be copied if necessary. 3730- /// 3731- /*--cef()--*/ 3732- virtual void SendRouteMessage(const void* message, size_t message_size) = 0; 3733- 3734- /// 3735- // Terminate this route. Will result in an asynchronous call to 3736- // CefMediaObserver::OnRoutes on all registered observers. 3737- /// 3738- /*--cef()--*/ 3739- virtual void Terminate() = 0; 3740-}; 3741- 3742-/// 3743-// Callback interface for CefMediaRouter::CreateRoute. The methods of this 3744-// class will be called on the browser process UI thread. 3745-/// 3746-/*--cef(source=client)--*/ 3747-class CefMediaRouteCreateCallback : public virtual CefBaseRefCounted { 3748- public: 3749- typedef cef_media_route_create_result_t RouteCreateResult; 3750- 3751- /// 3752- // Method that will be executed when the route creation has finished. |result| 3753- // will be CEF_MRCR_OK if the route creation succeeded. |error| will be a 3754- // description of the error if the route creation failed. |route| is the 3755- // resulting route, or empty if the route creation failed. 3756- /// 3757- /*--cef(optional_param=error,optional_param=route)--*/ 3758- virtual void OnMediaRouteCreateFinished(RouteCreateResult result, 3759- const CefString& error, 3760- CefRefPtr<CefMediaRoute> route) = 0; 3761-}; 3762- 3763-/// 3764-// Represents a sink to which media can be routed. Instances of this object are 3765-// retrieved via CefMediaObserver::OnSinks. The methods of this class may 3766-// be called on any browser process thread unless otherwise indicated. 3767-/// 3768-/*--cef(source=library)--*/ 3769-class CefMediaSink : public virtual CefBaseRefCounted { 3770- public: 3771- typedef cef_media_sink_icon_type_t IconType; 3772- 3773- /// 3774- // Returns the ID for this sink. 3775- /// 3776- /*--cef()--*/ 3777- virtual CefString GetId() = 0; 3778- 3779- /// 3780- // Returns the name of this sink. 3781- /// 3782- /*--cef()--*/ 3783- virtual CefString GetName() = 0; 3784- 3785- /// 3786- // Returns the description of this sink. 3787- /// 3788- /*--cef()--*/ 3789- virtual CefString GetDescription() = 0; 3790- 3791- /// 3792- // Returns the icon type for this sink. 3793- /// 3794- /*--cef(default_retval=CEF_MSIT_GENERIC)--*/ 3795- virtual IconType GetIconType() = 0; 3796- 3797- /// 3798- // Asynchronously retrieves device info. 3799- /// 3800- /*--cef()--*/ 3801- virtual void GetDeviceInfo( 3802- CefRefPtr<CefMediaSinkDeviceInfoCallback> callback) = 0; 3803- 3804- /// 3805- // Returns true if this sink accepts content via Cast. 3806- /// 3807- /*--cef()--*/ 3808- virtual bool IsCastSink() = 0; 3809- 3810- /// 3811- // Returns true if this sink accepts content via DIAL. 3812- /// 3813- /*--cef()--*/ 3814- virtual bool IsDialSink() = 0; 3815- 3816- /// 3817- // Returns true if this sink is compatible with |source|. 3818- /// 3819- /*--cef()--*/ 3820- virtual bool IsCompatibleWith(CefRefPtr<CefMediaSource> source) = 0; 3821-}; 3822- 3823-/// 3824-// Callback interface for CefMediaSink::GetDeviceInfo. The methods of this 3825-// class will be called on the browser process UI thread. 3826-/// 3827-/*--cef(source=client)--*/ 3828-class CefMediaSinkDeviceInfoCallback : public virtual CefBaseRefCounted { 3829- public: 3830- /// 3831- // Method that will be executed asyncronously once device information has been 3832- // retrieved. 3833- /// 3834- /*--cef()--*/ 3835- virtual void OnMediaSinkDeviceInfo( 3836- const CefMediaSinkDeviceInfo& device_info) = 0; 3837-}; 3838- 3839-/// 3840-// Represents a source from which media can be routed. Instances of this object 3841-// are retrieved via CefMediaRouter::GetSource. The methods of this class may be 3842-// called on any browser process thread unless otherwise indicated. 3843-/// 3844-/*--cef(source=library)--*/ 3845-class CefMediaSource : public virtual CefBaseRefCounted { 3846- public: 3847- /// 3848- // Returns the ID (media source URN or URL) for this source. 3849- /// 3850- /*--cef()--*/ 3851- virtual CefString GetId() = 0; 3852- 3853- /// 3854- // Returns true if this source outputs its content via Cast. 3855- /// 3856- /*--cef()--*/ 3857- virtual bool IsCastSource() = 0; 3858- 3859- /// 3860- // Returns true if this source outputs its content via DIAL. 3861- /// 3862- /*--cef()--*/ 3863- virtual bool IsDialSource() = 0; 3864-}; 3865- 3866-#endif // CEF_INCLUDE_CEF_MEDIA_ROUTER_H_ 3867diff --git a/src/cef/include/cef_request_context.h b/src/cef/include/cef_request_context.h 3868index 016362f4a3572..e95de9a65bc3f 3869--- a/src/cef/include/cef_request_context.h 3870+++ b/src/cef/include/cef_request_context.h 3871@@ -45,7 +45,6 @@ 3872 #include "include/cef_data_base.h" 3873 #include "include/cef_extension.h" 3874 #include "include/cef_extension_handler.h" 3875-#include "include/cef_media_router.h" 3876 #include "include/cef_values.h" 3877 #include "include/cef_web_storage.h" 3878 3879@@ -380,15 +379,6 @@ class CefRequestContext : public virtual CefBaseRefCounted { 3880 /*--cef()--*/ 3881 virtual CefRefPtr<CefExtension> GetExtension( 3882 const CefString& extension_id) = 0; 3883- 3884- /// 3885- // Returns the MediaRouter object associated with this context. If |callback| 3886- // is non-NULL it will be executed asnychronously on the UI thread after the 3887- // manager's context has been initialized. 3888- /// 3889- /*--cef(optional_param=callback)--*/ 3890- virtual CefRefPtr<CefMediaRouter> GetMediaRouter( 3891- CefRefPtr<CefCompletionCallback> callback) = 0; 3892 }; 3893 3894 #endif // CEF_INCLUDE_CEF_REQUEST_CONTEXT_H_ 3895diff --git a/src/cef/include/cef_request_context_handler.h b/src/cef/include/cef_request_context_handler.h 3896index 3bf495dda0f6c..162fd229fc87d 3897--- a/src/cef/include/cef_request_context_handler.h 3898+++ b/src/cef/include/cef_request_context_handler.h 3899@@ -43,7 +43,7 @@ 3900 #include "include/cef_frame.h" 3901 #include "include/cef_request.h" 3902 #include "include/cef_resource_request_handler.h" 3903-#include "include/cef_web_plugin.h" 3904+//#include "include/cef_web_plugin.h" // !enable_plugins 3905 3906 /// 3907 // Implement this interface to provide handler implementations. The handler 3908diff --git a/src/cef/include/cef_web_plugin.h b/src/cef/include/cef_web_plugin.h 3909deleted file mode 100644 3910index 2ffd572a506d2..0000000000000 3911--- a/src/cef/include/cef_web_plugin.h 3912+++ /dev/null 3913@@ -1,148 +0,0 @@ 3914-// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. 3915-// 3916-// Redistribution and use in source and binary forms, with or without 3917-// modification, are permitted provided that the following conditions are 3918-// met: 3919-// 3920-// * Redistributions of source code must retain the above copyright 3921-// notice, this list of conditions and the following disclaimer. 3922-// * Redistributions in binary form must reproduce the above 3923-// copyright notice, this list of conditions and the following disclaimer 3924-// in the documentation and/or other materials provided with the 3925-// distribution. 3926-// * Neither the name of Google Inc. nor the name Chromium Embedded 3927-// Framework nor the names of its contributors may be used to endorse 3928-// or promote products derived from this software without specific prior 3929-// written permission. 3930-// 3931-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 3932-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3933-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3934-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3935-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3936-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3937-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3938-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3939-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3940-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3941-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3942-// 3943-// --------------------------------------------------------------------------- 3944-// 3945-// The contents of this file must follow a specific format in order to 3946-// support the CEF translator tool. See the translator.README.txt file in the 3947-// tools directory for more information. 3948-// 3949- 3950-#ifndef CEF_INCLUDE_CEF_WEB_PLUGIN_H_ 3951-#define CEF_INCLUDE_CEF_WEB_PLUGIN_H_ 3952- 3953-#include "include/cef_base.h" 3954- 3955-class CefBrowser; 3956- 3957-/// 3958-// Information about a specific web plugin. 3959-/// 3960-/*--cef(source=library)--*/ 3961-class CefWebPluginInfo : public virtual CefBaseRefCounted { 3962- public: 3963- /// 3964- // Returns the plugin name. 3965- /// 3966- /*--cef()--*/ 3967- virtual CefString GetName() = 0; 3968- 3969- /// 3970- // Returns the plugin file path (DLL/bundle/library). 3971- /// 3972- /*--cef()--*/ 3973- virtual CefString GetPath() = 0; 3974- 3975- /// 3976- // Returns the version of the plugin (may be OS-specific). 3977- /// 3978- /*--cef()--*/ 3979- virtual CefString GetVersion() = 0; 3980- 3981- /// 3982- // Returns a description of the plugin from the version information. 3983- /// 3984- /*--cef()--*/ 3985- virtual CefString GetDescription() = 0; 3986-}; 3987- 3988-/// 3989-// Interface to implement for visiting web plugin information. The methods of 3990-// this class will be called on the browser process UI thread. 3991-/// 3992-/*--cef(source=client)--*/ 3993-class CefWebPluginInfoVisitor : public virtual CefBaseRefCounted { 3994- public: 3995- /// 3996- // Method that will be called once for each plugin. |count| is the 0-based 3997- // index for the current plugin. |total| is the total number of plugins. 3998- // Return false to stop visiting plugins. This method may never be called if 3999- // no plugins are found. 4000- /// 4001- /*--cef()--*/ 4002- virtual bool Visit(CefRefPtr<CefWebPluginInfo> info, 4003- int count, 4004- int total) = 0; 4005-}; 4006- 4007-/// 4008-// Visit web plugin information. Can be called on any thread in the browser 4009-// process. 4010-/// 4011-/*--cef()--*/ 4012-void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor); 4013- 4014-/// 4015-// Cause the plugin list to refresh the next time it is accessed regardless 4016-// of whether it has already been loaded. Can be called on any thread in the 4017-// browser process. 4018-/// 4019-/*--cef()--*/ 4020-void CefRefreshWebPlugins(); 4021- 4022-/// 4023-// Unregister an internal plugin. This may be undone the next time 4024-// CefRefreshWebPlugins() is called. Can be called on any thread in the browser 4025-// process. 4026-/// 4027-/*--cef()--*/ 4028-void CefUnregisterInternalWebPlugin(const CefString& path); 4029- 4030-/// 4031-// Register a plugin crash. Can be called on any thread in the browser process 4032-// but will be executed on the IO thread. 4033-/// 4034-/*--cef()--*/ 4035-void CefRegisterWebPluginCrash(const CefString& path); 4036- 4037-/// 4038-// Interface to implement for receiving unstable plugin information. The methods 4039-// of this class will be called on the browser process IO thread. 4040-/// 4041-/*--cef(source=client)--*/ 4042-class CefWebPluginUnstableCallback : public virtual CefBaseRefCounted { 4043- public: 4044- /// 4045- // Method that will be called for the requested plugin. |unstable| will be 4046- // true if the plugin has reached the crash count threshold of 3 times in 120 4047- // seconds. 4048- /// 4049- /*--cef()--*/ 4050- virtual void IsUnstable(const CefString& path, bool unstable) = 0; 4051-}; 4052- 4053-/// 4054-// Query if a plugin is unstable. Can be called on any thread in the browser 4055-// process. 4056-/// 4057-/*--cef()--*/ 4058-void CefIsWebPluginUnstable(const CefString& path, 4059- CefRefPtr<CefWebPluginUnstableCallback> callback); 4060- 4061-#endif // CEF_INCLUDE_CEF_WEB_PLUGIN_H_ 4062diff --git a/src/cef/include/internal/cef_string_wrappers.h b/src/cef/include/internal/cef_string_wrappers.h 4063index c53f5627e99ae..0909f90669e6c 4064--- a/src/cef/include/internal/cef_string_wrappers.h 4065+++ b/src/cef/include/internal/cef_string_wrappers.h 4066@@ -531,6 +531,16 @@ class CefStringBase { 4067 owner_ = false; 4068 } 4069 4070+ /// 4071+ // Memset the data to zero. 4072+ /// 4073+ void MemsetToZero() { 4074+ if (!string_) 4075+ return; 4076+ if (string_->str != NULL) 4077+ memset(string_->str, 0, string_->length); 4078+ } 4079+ 4080 /// 4081 // Attach to the specified string structure. If |owner| is true this class 4082 // will take ownership of the structure. 4083diff --git a/src/cef/include/internal/cef_types.h b/src/cef/include/internal/cef_types.h 4084index e24b376d19871..6ec7dd2e48e2c 4085--- a/src/cef/include/internal/cef_types.h 4086+++ b/src/cef/include/internal/cef_types.h 4087@@ -664,6 +664,7 @@ typedef struct _cef_browser_settings_t { 4088 // Force the background color to be dark 4089 /// 4090 cef_state_t force_dark_mode_enabled; 4091+ cef_state_t dark_prefer_color_scheme_enabled; 4092 cef_state_t loads_images_automatically; 4093 bool javascript_can_open_windows_automatically; 4094 int text_size_percent; 4095@@ -677,6 +678,10 @@ typedef struct _cef_browser_settings_t { 4096 bool viewport_meta_enabled; 4097 bool user_gesture_required; 4098 bool pinch_smooth_mode; 4099+#if BUILDFLAG(IS_OHOS) 4100+ cef_state_t hide_vertical_scrollbars; 4101+ cef_state_t hide_horizontal_scrollbars; 4102+#endif 4103 /* ohos webview end */ 4104 } cef_browser_settings_t; 4105 4106@@ -3308,6 +3313,197 @@ typedef struct _cef_touch_handle_state_t { 4107 float edge_height; 4108 } cef_touch_handle_state_t; 4109 4110+/// 4111+// Supported context menu input field types. These constants match their equivalents 4112+// in Chromium's ContextMenuDataInputFieldType and should not be renumbered. 4113+/// 4114+typedef enum { 4115+ /// 4116+ // Not an input field. 4117+ /// 4118+ CM_INPUTFIELDTYPE_NONE, 4119+ 4120+ /// 4121+ // type = text, search, email, url 4122+ /// 4123+ CM_INPUTFIELDTYPE_PLAINTEXT, 4124+ 4125+ /// 4126+ // type = password 4127+ /// 4128+ CM_INPUTFIELDTYPE_PASSWORD, 4129+ 4130+ /// 4131+ // type = number 4132+ /// 4133+ CM_INPUTFIELDTYPE_NUMBER, 4134+ 4135+ /// 4136+ // type = tel 4137+ /// 4138+ CM_INPUTFIELDTYPE_TELEPHONE, 4139+ 4140+ /// 4141+ // type = <etc.> 4142+ /// 4143+ CM_INPUTFIELDTYPE_OTHER, 4144+} cef_context_menu_input_field_type_t; 4145+ 4146+/// 4147+// Supported context menu source types. These constants match their equivalents 4148+// in Chromium's ui::MenuSourceType and should not be renumbered. 4149+/// 4150+typedef enum { 4151+ /// 4152+ // type = none 4153+ /// 4154+ CM_SOURCETYPE_NONE, 4155+ 4156+ /// 4157+ // type = mouse 4158+ /// 4159+ CM_SOURCETYPE_MOUSE, 4160+ 4161+ /// 4162+ // type = keyboard 4163+ /// 4164+ CM_SOURCETYPE_KEYBOARD, 4165+ 4166+ /// 4167+ // type = touch 4168+ /// 4169+ CM_SOURCETYPE_TOUCH, 4170+ 4171+ /// 4172+ // type = touch edit menu 4173+ /// 4174+ CM_SOURCETYPE_TOUCH_EDIT_MENU, 4175+ 4176+ /// 4177+ // type = long press 4178+ /// 4179+ CM_SOURCETYPE_LONG_PRESS, 4180+ 4181+ /// 4182+ // type = long tap 4183+ /// 4184+ CM_SOURCETYPE_LONG_TAP, 4185+ 4186+ /// 4187+ // type = number 4188+ /// 4189+ CM_SOURCETYPE_TOUCH_HANDLE, 4190+ 4191+ /// 4192+ // type = stylus 4193+ /// 4194+ CM_SOURCETYPE_STYLUS, 4195+ 4196+ /// 4197+ // type = adjust selection 4198+ /// 4199+ CM_SOURCETYPE_ADJUST_SELECTION, 4200+ 4201+ /// 4202+ // type = selection reset 4203+ /// 4204+ CM_SOURCETYPE_SELECTION_RESET, 4205+} cef_context_menu_source_type_t; 4206+ 4207+/// 4208+// Supported text direction. See text_direction.mojom. 4209+/// 4210+typedef enum { 4211+ /// 4212+ // type = unknown direction 4213+ /// 4214+ UNKNOWN, 4215+ 4216+ /// 4217+ // type = right to left 4218+ /// 4219+ RTL, 4220+ 4221+ /// 4222+ // type = left to right 4223+ /// 4224+ LTR, 4225+} cef_text_direction_t; 4226+ 4227+/// 4228+// Supported <select> item type. See popup_menu.mojom. 4229+/// 4230+typedef enum { 4231+ /// 4232+ // type = kOption 4233+ /// 4234+ OPTION, 4235+ 4236+ /// 4237+ // type = kCheckableOption 4238+ /// 4239+ CHECKABLE_OPTION, 4240+ 4241+ /// 4242+ // type = kGruop 4243+ /// 4244+ GROUP, 4245+ 4246+ /// 4247+ // type = kSeparator 4248+ /// 4249+ SEPARATOR, 4250+ 4251+ /// 4252+ // type = kSubMenu 4253+ /// 4254+ SubMenu, 4255+} cef_select_popup_item_type_t; 4256+ 4257+/// 4258+// Supported <select> item. 4259+/// 4260+typedef struct _cef_select_popup_item_t { 4261+ /// 4262+ // label name of item. 4263+ /// 4264+ cef_string_t label; 4265+ 4266+ /// 4267+ // tool tip of item. 4268+ /// 4269+ cef_string_t tool_tip; 4270+ 4271+ /// 4272+ // type of item. 4273+ /// 4274+ cef_select_popup_item_type_t type; 4275+ 4276+ /// 4277+ // action of item. 4278+ /// 4279+ uint32_t action; 4280+ 4281+ /// 4282+ // text direction of item. 4283+ /// 4284+ cef_text_direction_t text_direction; 4285+ 4286+ /// 4287+ // whether item is enabled. 4288+ /// 4289+ bool enabled; 4290+ 4291+ /// 4292+ // whether item has text direction overridel 4293+ /// 4294+ bool has_text_direction_override; 4295+ 4296+ /// 4297+ // whether item is checked. 4298+ /// 4299+ bool checked; 4300+} cef_select_popup_item_t; 4301 #ifdef __cplusplus 4302 } 4303 #endif 4304diff --git a/src/cef/include/internal/cef_types_wrappers.h b/src/cef/include/internal/cef_types_wrappers.h 4305index 9bfde0a89e3f9..d69abfcbf52b3 4306--- a/src/cef/include/internal/cef_types_wrappers.h 4307+++ b/src/cef/include/internal/cef_types_wrappers.h 4308@@ -730,6 +730,7 @@ struct CefBrowserSettingsTraits { 4309 4310 /* ohos webview begin */ 4311 target->force_dark_mode_enabled = src->force_dark_mode_enabled; 4312+ target->dark_prefer_color_scheme_enabled = src->dark_prefer_color_scheme_enabled; 4313 target->javascript_can_open_windows_automatically = 4314 src->javascript_can_open_windows_automatically; 4315 target->loads_images_automatically = src->loads_images_automatically; 4316@@ -746,6 +747,10 @@ struct CefBrowserSettingsTraits { 4317 target->viewport_meta_enabled = src->viewport_meta_enabled; 4318 target->user_gesture_required = src->user_gesture_required; 4319 target->pinch_smooth_mode = src->pinch_smooth_mode; 4320+#if BUILDFLAG(IS_OHOS) 4321+ target->hide_vertical_scrollbars = src->hide_vertical_scrollbars; 4322+ target->hide_horizontal_scrollbars = src->hide_horizontal_scrollbars; 4323+#endif 4324 /* ohos webview end */ 4325 } 4326 }; 4327@@ -1050,4 +1055,23 @@ struct CefMediaSinkDeviceInfoTraits { 4328 /// 4329 typedef CefStructBase<CefMediaSinkDeviceInfoTraits> CefMediaSinkDeviceInfo; 4330 4331+struct CefSelectPopupItemTraits { 4332+ typedef cef_select_popup_item_t struct_type; 4333+ 4334+ static inline void init(struct_type* s) {} 4335+ 4336+ static inline void clear(struct_type* s) {} 4337+ 4338+ static inline void set(const struct_type* src, 4339+ struct_type* target, 4340+ bool copy) { 4341+ *target = *src; 4342+ } 4343+}; 4344+ 4345+/// 4346+// Class representing select popup item. 4347+/// 4348+typedef CefStructBase<CefSelectPopupItemTraits> CefSelectPopupItem; 4349+ 4350 #endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_ 4351diff --git a/src/cef/libcef/browser/alloy/alloy_browser_context.cc b/src/cef/libcef/browser/alloy/alloy_browser_context.cc 4352index 6ede933824b83..2e09ea0d29090 4353--- a/src/cef/libcef/browser/alloy/alloy_browser_context.cc 4354+++ b/src/cef/libcef/browser/alloy/alloy_browser_context.cc 4355@@ -24,7 +24,6 @@ 4356 #include "base/strings/string_util.h" 4357 #include "chrome/browser/font_family_cache.h" 4358 #include "chrome/browser/media/media_device_id_salt.h" 4359-#include "chrome/browser/plugins/chrome_plugin_service_filter.h" 4360 #include "chrome/browser/profiles/profile_key.h" 4361 #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" 4362 #include "chrome/common/pref_names.h" 4363@@ -49,6 +48,10 @@ 4364 #include "net/proxy_resolution/proxy_config_service.h" 4365 #include "services/network/public/mojom/cors_origin_pattern.mojom.h" 4366 4367+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4368+#include "chrome/browser/plugins/chrome_plugin_service_filter.h" 4369+#endif 4370+ 4371 using content::BrowserThread; 4372 4373 // Creates and manages VisitedLinkEventListener objects for each 4374@@ -183,7 +186,9 @@ void AlloyBrowserContext::Initialize() { 4375 if (extensions_enabled) 4376 extension_system_->Init(); 4377 4378+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4379 ChromePluginServiceFilter::GetInstance()->RegisterProfile(this); 4380+#endif 4381 4382 media_device_id_salt_ = new MediaDeviceIDSalt(pref_service); 4383 } 4384@@ -194,7 +199,9 @@ void AlloyBrowserContext::Shutdown() { 4385 // Send notifications to clean up objects associated with this Profile. 4386 MaybeSendDestroyedNotification(); 4387 4388+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4389 ChromePluginServiceFilter::GetInstance()->UnregisterProfile(this); 4390+#endif 4391 4392 // Remove any BrowserContextKeyedServiceFactory associations. This must be 4393 // called before the ProxyService owned by AlloyBrowserContext is destroyed. 4394diff --git a/src/cef/libcef/browser/alloy/alloy_browser_host_impl.cc b/src/cef/libcef/browser/alloy/alloy_browser_host_impl.cc 4395index ee3704e8da89f..ec9cc632fb823 4396--- a/src/cef/libcef/browser/alloy/alloy_browser_host_impl.cc 4397+++ b/src/cef/libcef/browser/alloy/alloy_browser_host_impl.cc 4398@@ -331,6 +331,13 @@ void AlloyBrowserHostImpl::CloseBrowser(bool force_close) { 4399 // Will result in a call to BeforeUnloadFired() and, if the close isn't 4400 // canceled, CloseContents(). 4401 contents->DispatchBeforeUnload(false /* auto_cancel */); 4402+#if BUILDFLAG(IS_OHOS) 4403+ // In cef_life_span_handler.h file show DoClose step. 4404+ // Step 1 to Step 3 is over. 4405+ // This will replace Step 4 : User approves the close. Beause both in 4406+ // Android and OH close will not be blocked by beforeunload event. 4407+ CloseContents(contents); 4408+#endif 4409 } else { 4410 CloseContents(contents); 4411 } 4412@@ -1180,6 +1187,14 @@ void AlloyBrowserHostImpl::CloseContents(content::WebContents* source) { 4413 if (handler.get()) { 4414 close_browser = !handler->DoClose(this); 4415 } 4416+#if BUILDFLAG(IS_OHOS) 4417+ // |DoClose| will notify the UI to close, |DESTRUCTION_STATE_NONE| means 4418+ // |CloseBrowser| has not been triggered by UI. We should close browser 4419+ // when received |CloseBrowser| request from UI. 4420+ if (destruction_state_ == DESTRUCTION_STATE_NONE) { 4421+ close_browser = false; 4422+ } 4423+#endif 4424 } 4425 4426 if (close_browser) { 4427@@ -1254,7 +1269,6 @@ bool AlloyBrowserHostImpl::HandleContextMenu( 4428 auto rvh = web_contents()->GetRenderViewHost(); 4429 CefRenderWidgetHostViewOSR* view = 4430 static_cast<CefRenderWidgetHostViewOSR*>(rvh->GetWidget()->GetView()); 4431- touch_insert_handle_menu_show_ = true; 4432 if (view) { 4433 CefTouchSelectionControllerClientOSR* touch_client = 4434 static_cast<CefTouchSelectionControllerClientOSR*>( 4435@@ -1750,6 +1764,23 @@ void AlloyBrowserHostImpl::StartDragging( 4436 } 4437 } 4438 4439+void AlloyBrowserHostImpl::ShowPopupMenu( 4440+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 4441+ const gfx::Rect& bounds, 4442+ int item_height, 4443+ double item_font_size, 4444+ int selected_item, 4445+ std::vector<blink::mojom::MenuItemPtr> menu_items, 4446+ bool right_aligned, 4447+ bool allow_multiple_selection) { 4448+ if (platform_delegate_) { 4449+ platform_delegate_->ShowPopupMenu(std::move(popup_client), bounds, 4450+ item_height, item_font_size, selected_item, 4451+ std::move(menu_items), right_aligned, 4452+ allow_multiple_selection); 4453+ } 4454+} 4455+ 4456 void AlloyBrowserHostImpl::UpdateDragCursor( 4457 ui::mojom::DragOperation operation) { 4458 if (platform_delegate_) 4459diff --git a/src/cef/libcef/browser/alloy/alloy_browser_host_impl.h b/src/cef/libcef/browser/alloy/alloy_browser_host_impl.h 4460index a59dfe1562b11..f134101b58cf0 4461--- a/src/cef/libcef/browser/alloy/alloy_browser_host_impl.h 4462+++ b/src/cef/libcef/browser/alloy/alloy_browser_host_impl.h 4463@@ -28,6 +28,7 @@ 4464 #include "content/public/browser/web_contents_delegate.h" 4465 #include "content/public/browser/web_contents_observer.h" 4466 #include "extensions/common/mojom/view_type.mojom-forward.h" 4467+#include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h" 4468 4469 class CefAudioCapturer; 4470 class CefBrowserInfo; 4471@@ -207,9 +208,20 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, 4472 /* ohos webview begin */ 4473 void SetBackgroundColor(int color) override; 4474 void SetTouchInsertHandleMenuShow(bool show) { 4475- touch_insert_handle_menu_show_ = show; 4476+ web_contents()->SetTouchInsertHandleMenuShow(show); 4477 } 4478- bool GetTouchInsertHandleMenuShow() { return touch_insert_handle_menu_show_; } 4479+ bool GetTouchInsertHandleMenuShow() { 4480+ return web_contents()->GetTouchInsertHandleMenuShow(); 4481+ } 4482+ void ShowPopupMenu( 4483+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 4484+ const gfx::Rect& bounds, 4485+ int item_height, 4486+ double item_font_size, 4487+ int selected_item, 4488+ std::vector<blink::mojom::MenuItemPtr> menu_items, 4489+ bool right_aligned, 4490+ bool allow_multiple_selection); 4491 /* ohos webview end */ 4492 4493 // content::WebContentsDelegate methods. 4494diff --git a/src/cef/libcef/browser/alloy/alloy_browser_main.cc b/src/cef/libcef/browser/alloy/alloy_browser_main.cc 4495index c6136251089ae..63e13b778d4f7 4496--- a/src/cef/libcef/browser/alloy/alloy_browser_main.cc 4497+++ b/src/cef/libcef/browser/alloy/alloy_browser_main.cc 4498@@ -13,8 +13,6 @@ 4499 #include "libcef/browser/context.h" 4500 #include "libcef/browser/devtools/devtools_manager_delegate.h" 4501 #include "libcef/browser/extensions/extension_system_factory.h" 4502-#include "libcef/browser/net/chrome_scheme_handler.h" 4503-#include "libcef/browser/printing/constrained_window_views_client.h" 4504 #include "libcef/browser/thread_util.h" 4505 #include "libcef/common/app_manager.h" 4506 #include "libcef/common/extensions/extensions_util.h" 4507@@ -25,11 +23,8 @@ 4508 #include "base/task/post_task.h" 4509 #include "base/task/thread_pool.h" 4510 #include "chrome/browser/browser_process.h" 4511-#include "chrome/browser/media/router/chrome_media_router_factory.h" 4512 #include "chrome/browser/net/system_network_context_manager.h" 4513-#include "chrome/browser/plugins/plugin_finder.h" 4514 #include "chrome/common/chrome_switches.h" 4515-#include "components/constrained_window/constrained_window_views.h" 4516 #include "content/public/browser/gpu_data_manager.h" 4517 #include "content/public/browser/network_service_instance.h" 4518 #include "content/public/common/result_codes.h" 4519@@ -92,12 +87,31 @@ 4520 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" 4521 #endif 4522 4523+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 4524+#include "libcef/browser/net/chrome_scheme_handler.h" 4525+#endif 4526+ 4527+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4528+#include "components/constrained_window/constrained_window_views.h" 4529+#include "libcef/browser/printing/constrained_window_views_client.h" 4530+#endif 4531+ 4532+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4533+#include "chrome/browser/plugins/plugin_finder.h" 4534+#endif 4535+ 4536+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 4537+#include "chrome/browser/media/router/chrome_media_router_factory.h" 4538+#endif 4539+ 4540 AlloyBrowserMainParts::AlloyBrowserMainParts( 4541 content::MainFunctionParams parameters) 4542 : BrowserMainParts(), parameters_(std::move(parameters)) {} 4543 4544 AlloyBrowserMainParts::~AlloyBrowserMainParts() { 4545+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4546 constrained_window::SetConstrainedWindowViewsClient(nullptr); 4547+#endif 4548 } 4549 4550 int AlloyBrowserMainParts::PreEarlyInitialization() { 4551@@ -111,7 +125,9 @@ int AlloyBrowserMainParts::PreEarlyInitialization() { 4552 } 4553 4554 void AlloyBrowserMainParts::ToolkitInitialized() { 4555+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4556 SetConstrainedWindowViewsClient(CreateCefConstrainedWindowViewsClient()); 4557+#endif 4558 #if defined(USE_AURA) 4559 CHECK(aura::Env::GetInstance()); 4560 4561@@ -147,7 +163,9 @@ void AlloyBrowserMainParts::PreCreateMainMessageLoop() { 4562 ChromeBrowserMainPartsWin::SetupInstallerUtilStrings(); 4563 #endif // BUILDFLAG(IS_WIN) 4564 4565+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 4566 media_router::ChromeMediaRouterFactory::DoPlatformInit(); 4567+#endif 4568 } 4569 4570 void AlloyBrowserMainParts::PostCreateMainMessageLoop() { 4571@@ -237,10 +255,14 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() { 4572 InitializeWinParentalControls(); 4573 #endif 4574 4575+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4576 // Triggers initialization of the singleton instance on UI thread. 4577 PluginFinder::GetInstance()->Init(); 4578+#endif 4579 4580+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 4581 scheme::RegisterWebUIControllerFactory(); 4582+#endif 4583 4584 #if BUILDFLAG(ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM) || \ 4585 BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) 4586diff --git a/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc b/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc 4587index 1b8696bd6ece0..f472e1012109a 4588--- a/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc 4589+++ b/src/cef/libcef/browser/alloy/alloy_content_browser_client.cc 4590@@ -28,7 +28,6 @@ 4591 #include "libcef/browser/extensions/extension_system.h" 4592 #include "libcef/browser/extensions/extension_web_contents_observer.h" 4593 #include "libcef/browser/media_capture_devices_dispatcher.h" 4594-#include "libcef/browser/net/chrome_scheme_handler.h" 4595 #include "libcef/browser/net/throttle_handler.h" 4596 #include "libcef/browser/net_service/cookie_manager_impl.h" 4597 #include "libcef/browser/net_service/login_delegate.h" 4598@@ -36,7 +35,6 @@ 4599 #include "libcef/browser/net_service/resource_request_handler_wrapper.h" 4600 #include "libcef/browser/net_service/restrict_cookie_manager.h" 4601 #include "libcef/browser/prefs/renderer_prefs.h" 4602-#include "libcef/browser/printing/print_view_manager.h" 4603 #include "libcef/browser/speech_recognition_manager_delegate.h" 4604 #include "libcef/browser/ssl_info_impl.h" 4605 #include "libcef/browser/thread_util.h" 4606@@ -66,36 +64,24 @@ 4607 #include "chrome/browser/net/profile_network_context_service.h" 4608 #include "chrome/browser/net/profile_network_context_service_factory.h" 4609 #include "chrome/browser/net/system_network_context_manager.h" 4610-#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h" 4611-#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" 4612-#include "chrome/browser/plugins/plugin_info_host_impl.h" 4613-#include "chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h" 4614 #include "chrome/browser/plugins/plugin_utils.h" 4615 #include "chrome/browser/profiles/profile.h" 4616 #include "chrome/browser/profiles/renderer_updater.h" 4617 #include "chrome/browser/profiles/renderer_updater_factory.h" 4618-#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h" 4619 #include "chrome/browser/spellchecker/spell_check_host_chrome_impl.h" 4620 #include "chrome/common/chrome_content_client.h" 4621 #include "chrome/common/chrome_paths.h" 4622 #include "chrome/common/chrome_switches.h" 4623 #include "chrome/common/google_url_loader_throttle.h" 4624-#include "chrome/common/pdf_util.h" 4625 #include "chrome/common/pref_names.h" 4626 #include "chrome/common/webui_url_constants.h" 4627 #include "chrome/grit/browser_resources.h" 4628 #include "chrome/grit/generated_resources.h" 4629-#include "chrome/services/printing/printing_service.h" 4630 #include "components/content_settings/core/browser/cookie_settings.h" 4631 #include "components/embedder_support/switches.h" 4632 #include "components/embedder_support/user_agent_utils.h" 4633-#include "components/pdf/browser/pdf_navigation_throttle.h" 4634-#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" 4635-#include "components/pdf/browser/pdf_web_contents_helper.h" 4636-#include "components/pdf/common/internal_plugin_helpers.h" 4637 #include "components/spellcheck/common/spellcheck.mojom.h" 4638 #include "components/version_info/version_info.h" 4639-#include "content/browser/plugin_service_impl.h" 4640 #include "content/browser/renderer_host/render_frame_host_impl.h" 4641 #include "content/public/browser/browser_context.h" 4642 #include "content/public/browser/browser_ppapi_host.h" 4643@@ -180,6 +166,37 @@ 4644 #include "chrome/browser/spellchecker/spell_check_panel_host_impl.h" 4645 #endif 4646 4647+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 4648+#include "libcef/browser/net/chrome_scheme_handler.h" 4649+#endif 4650+ 4651+#if BUILDFLAG(IS_OHOS) 4652+#include "printing/buildflags/buildflags.h" 4653+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) 4654+#include "chrome/services/printing/printing_service.h" 4655+#include "libcef/browser/printing/print_view_manager.h" 4656+#endif 4657+#endif 4658+ 4659+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4660+#include "chrome/browser/plugins/plugin_info_host_impl.h" 4661+#include "chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h" 4662+#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h" 4663+#include "content/browser/plugin_service_impl.h" 4664+#endif 4665+ 4666+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4667+#include "chrome/browser/pdf/chrome_pdf_stream_delegate.h" 4668+#include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h" 4669+#include "chrome/common/pdf_util.h" 4670+#include "components/pdf/browser/pdf_navigation_throttle.h" 4671+#include "components/pdf/browser/pdf_url_loader_request_interceptor.h" 4672+#include "components/pdf/browser/pdf_web_contents_helper.h" 4673+#include "components/pdf/common/internal_plugin_helpers.h" 4674+#else 4675+#include "content/public/browser/url_loader_request_interceptor.h" 4676+#endif 4677+ 4678 namespace { 4679 void TransferVector(const std::vector<std::string>& source, 4680 std::vector<CefString>& target) { 4681@@ -644,6 +661,7 @@ int GetCrashSignalFD(const base::CommandLine& command_line) { 4682 } 4683 #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) 4684 4685+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4686 // From chrome/browser/plugins/chrome_content_browser_client_plugins_part.cc. 4687 void BindPluginInfoHost( 4688 int render_process_id, 4689@@ -659,6 +677,7 @@ void BindPluginInfoHost( 4690 std::make_unique<PluginInfoHostImpl>(render_process_id, profile), 4691 std::move(receiver)); 4692 } 4693+#endif 4694 4695 base::FilePath GetRootCachePath() { 4696 // The CefContext::ValidateCachePath method enforces the requirement that all 4697@@ -817,7 +836,11 @@ void AlloyContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( 4698 4699 bool AlloyContentBrowserClient::IsWebUIAllowedToMakeNetworkRequests( 4700 const url::Origin& origin) { 4701+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 4702 return scheme::IsWebUIAllowedToMakeNetworkRequests(origin); 4703+#else 4704+ return false; 4705+#endif 4706 } 4707 4708 bool AlloyContentBrowserClient::IsHandledURL(const GURL& url) { 4709@@ -1207,7 +1230,7 @@ bool AlloyContentBrowserClient::CanCreateWindow( 4710 if (!browser_host) { 4711 return false; 4712 } 4713- if (!browser_host->settings().javascript_can_open_windows_automatically) { 4714+ if (!browser_host->settings().javascript_can_open_windows_automatically && !user_gesture) { 4715 LOG(INFO) << "javascript_can_open_windows_automatically false"; 4716 return false; 4717 } 4718@@ -1238,7 +1261,7 @@ bool AlloyContentBrowserClient::CanCreateWindow( 4719 CefRefPtr<CefBrowserHostBase> browser_host = 4720 CefBrowserHostBase::GetBrowserForContents(web_contents); 4721 4722- if (!browser_host->settings().javascript_can_open_windows_automatically) { 4723+ if (!browser_host->settings().javascript_can_open_windows_automatically && !user_gesture) { 4724 LOG(INFO) << "javascript_can_open_windows_automatically false"; 4725 return false; 4726 } 4727@@ -1270,7 +1293,9 @@ bool AlloyContentBrowserClient::OverrideWebPreferencesAfterNavigation( 4728 4729 void AlloyContentBrowserClient::BrowserURLHandlerCreated( 4730 content::BrowserURLHandler* handler) { 4731+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 4732 scheme::BrowserURLHandlerCreated(handler); 4733+#endif 4734 } 4735 4736 std::string AlloyContentBrowserClient::GetDefaultDownloadName() { 4737@@ -1279,9 +1304,11 @@ std::string AlloyContentBrowserClient::GetDefaultDownloadName() { 4738 4739 void AlloyContentBrowserClient::DidCreatePpapiPlugin( 4740 content::BrowserPpapiHost* browser_host) { 4741+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4742 browser_host->GetPpapiHost()->AddHostFactoryFilter( 4743 std::unique_ptr<ppapi::host::HostFactory>( 4744 new ChromeBrowserPepperHostFactory(browser_host))); 4745+#endif 4746 } 4747 4748 std::unique_ptr<content::DevToolsManagerDelegate> 4749@@ -1302,6 +1329,7 @@ void AlloyContentBrowserClient:: 4750 }, 4751 &render_frame_host)); 4752 4753+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4754 associated_registry.AddInterface(base::BindRepeating( 4755 [](content::RenderFrameHost* render_frame_host, 4756 mojo::PendingAssociatedReceiver<printing::mojom::PrintManagerHost> 4757@@ -1310,7 +1338,9 @@ void AlloyContentBrowserClient:: 4758 render_frame_host); 4759 }, 4760 &render_frame_host)); 4761+#endif 4762 4763+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4764 associated_registry.AddInterface(base::BindRepeating( 4765 [](content::RenderFrameHost* render_frame_host, 4766 mojo::PendingAssociatedReceiver<pdf::mojom::PdfService> receiver) { 4767@@ -1318,6 +1348,7 @@ void AlloyContentBrowserClient:: 4768 render_frame_host); 4769 }, 4770 &render_frame_host)); 4771+#endif 4772 } 4773 4774 std::vector<std::unique_ptr<content::NavigationThrottle>> 4775@@ -1325,6 +1356,7 @@ AlloyContentBrowserClient::CreateThrottlesForNavigation( 4776 content::NavigationHandle* navigation_handle) { 4777 throttle::NavigationThrottleList throttles; 4778 4779+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4780 if (extensions::ExtensionsEnabled()) { 4781 auto pdf_iframe_throttle = 4782 PDFIFrameNavigationThrottle::MaybeCreateThrottleFor(navigation_handle); 4783@@ -1336,6 +1368,7 @@ AlloyContentBrowserClient::CreateThrottlesForNavigation( 4784 if (pdf_throttle) 4785 throttles.push_back(std::move(pdf_throttle)); 4786 } 4787+#endif 4788 4789 throttle::CreateThrottlesForNavigation(navigation_handle, throttles); 4790 4791@@ -1351,9 +1384,11 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles( 4792 int frame_tree_node_id) { 4793 std::vector<std::unique_ptr<blink::URLLoaderThrottle>> result; 4794 4795+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4796 // Used to substitute View ID for PDF contents when using the PDF plugin. 4797 result.push_back(std::make_unique<PluginResponseInterceptorURLLoaderThrottle>( 4798 request.destination, frame_tree_node_id)); 4799+#endif 4800 4801 Profile* profile = Profile::FromBrowserContext(browser_context); 4802 4803@@ -1376,6 +1411,7 @@ AlloyContentBrowserClient::WillCreateURLLoaderRequestInterceptors( 4804 std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> 4805 interceptors; 4806 4807+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4808 if (extensions::ExtensionsEnabled()) { 4809 auto pdf_interceptor = 4810 pdf::PdfURLLoaderRequestInterceptor::MaybeCreateInterceptor( 4811@@ -1383,6 +1419,7 @@ AlloyContentBrowserClient::WillCreateURLLoaderRequestInterceptors( 4812 if (pdf_interceptor) 4813 interceptors.push_back(std::move(pdf_interceptor)); 4814 } 4815+#endif 4816 4817 return interceptors; 4818 } 4819@@ -1403,8 +1440,10 @@ void AlloyContentBrowserClient::ExposeInterfacesToRenderer( 4820 service_manager::BinderRegistry* registry, 4821 blink::AssociatedInterfaceRegistry* associated_registry, 4822 content::RenderProcessHost* host) { 4823+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4824 associated_registry->AddInterface( 4825 base::BindRepeating(&BindPluginInfoHost, host->GetID())); 4826+#endif 4827 4828 if (extensions::ExtensionsEnabled()) { 4829 associated_registry->AddInterface(base::BindRepeating( 4830@@ -1490,6 +1529,10 @@ void AlloyContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories( 4831 content::CreateFileURLLoaderFactory( 4832 browser_context->GetPath(), 4833 browser_context->GetSharedCorsOriginAccessList())); 4834+ factories->emplace(url::kResourcesScheme, 4835+ content::CreateFileURLLoaderFactory( 4836+ browser_context->GetPath(), 4837+ browser_context->GetSharedCorsOriginAccessList())); 4838 #endif 4839 if (!extensions::ExtensionsEnabled()) 4840 return; 4841@@ -1621,6 +1664,11 @@ bool AlloyContentBrowserClient::ConfigureNetworkContextParams( 4842 // TODO(cef): Remove this and add required NetworkIsolationKeys, 4843 // this is currently not the case and this was not required pre M84. 4844 network_context_params->require_network_isolation_key = false; 4845+#if BUILDFLAG(IS_OHOS) 4846+ network_context_params->initial_ssl_config = network::mojom::SSLConfig::New(); 4847+ network_context_params->initial_ssl_config->version_min = 4848+ network::mojom::SSLVersion::kTLS1; 4849+#endif 4850 4851 return true; 4852 } 4853@@ -1789,11 +1837,15 @@ base::flat_set<std::string> 4854 AlloyContentBrowserClient::GetPluginMimeTypesWithExternalHandlers( 4855 content::BrowserContext* browser_context) { 4856 base::flat_set<std::string> mime_types; 4857+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4858 auto map = PluginUtils::GetMimeTypeToExtensionIdMap(browser_context); 4859 for (const auto& pair : map) 4860 mime_types.insert(pair.first); 4861+#endif 4862+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4863 if (pdf::IsInternalPluginExternallyHandled()) 4864 mime_types.insert(pdf::kInternalPluginMimeType); 4865+#endif 4866 return mime_types; 4867 } 4868 4869@@ -1808,6 +1860,7 @@ bool AlloyContentBrowserClient::ArePersistentMediaDeviceIDsAllowed( 4870 ->IsFullCookieAccessAllowed(url, site_for_cookies, top_frame_origin); 4871 } 4872 4873+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4874 bool AlloyContentBrowserClient::ShouldAllowPluginCreation( 4875 const url::Origin& embedder_origin, 4876 const content::PepperPluginInfo& plugin_info) { 4877@@ -1817,6 +1870,7 @@ bool AlloyContentBrowserClient::ShouldAllowPluginCreation( 4878 4879 return true; 4880 } 4881+#endif 4882 4883 #if BUILDFLAG(IS_OHOS) 4884 bool AlloyContentBrowserClient::ShouldTryToUseExistingProcessHost( 4885@@ -1895,10 +1949,14 @@ void AlloyContentBrowserClient::OnWebContentsCreated( 4886 4887 bool AlloyContentBrowserClient::IsFindInPageDisabledForOrigin( 4888 const url::Origin& origin) { 4889+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 4890 // For PDF viewing with the PPAPI-free PDF Viewer, find-in-page should only 4891 // display results from the PDF content, and not from the UI. 4892 return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned) && 4893 IsPdfExtensionOrigin(origin); 4894+#else 4895+ return false; 4896+#endif 4897 } 4898 4899 CefRefPtr<CefRequestContextImpl> AlloyContentBrowserClient::request_context() 4900diff --git a/src/cef/libcef/browser/alloy/alloy_content_browser_client.h b/src/cef/libcef/browser/alloy/alloy_content_browser_client.h 4901index eed665622b379..6bab20215fa3c 4902--- a/src/cef/libcef/browser/alloy/alloy_content_browser_client.h 4903+++ b/src/cef/libcef/browser/alloy/alloy_content_browser_client.h 4904@@ -244,9 +244,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { 4905 const GURL& scope, 4906 const net::SiteForCookies& site_for_cookies, 4907 const absl::optional<url::Origin>& top_frame_origin) override; 4908+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 4909 bool ShouldAllowPluginCreation( 4910 const url::Origin& embedder_origin, 4911 const content::PepperPluginInfo& plugin_info) override; 4912+#endif 4913 void OnWebContentsCreated(content::WebContents* web_contents) override; 4914 bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override; 4915 4916diff --git a/src/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/src/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc 4917index 082421f19893c..8c27ed9a7c81d 4918--- a/src/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc 4919+++ b/src/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc 4920@@ -10,14 +10,11 @@ 4921 #include "libcef/browser/extensions/extension_system.h" 4922 #include "libcef/browser/extensions/extension_view_host.h" 4923 #include "libcef/browser/extensions/extension_web_contents_observer.h" 4924-#include "libcef/browser/printing/print_view_manager.h" 4925 #include "libcef/common/extensions/extensions_util.h" 4926 #include "libcef/common/net/url_util.h" 4927 #include "libcef/features/runtime_checks.h" 4928 4929 #include "base/logging.h" 4930-#include "chrome/browser/printing/print_view_manager.h" 4931-#include "chrome/browser/printing/print_view_manager_common.h" 4932 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 4933 #include "components/find_in_page/find_tab_helper.h" 4934 #include "components/find_in_page/find_types.h" 4935@@ -31,12 +28,23 @@ 4936 #include "printing/mojom/print.mojom.h" 4937 #include "third_party/blink/public/mojom/frame/find_in_page.mojom.h" 4938 4939+#if BUILDFLAG(IS_OHOS) 4940+#include "printing/buildflags/buildflags.h" 4941+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) 4942+#include "libcef/browser/printing/print_view_manager.h" 4943+#include "chrome/browser/printing/print_view_manager.h" 4944+#include "chrome/browser/printing/print_view_manager_common.h" 4945+#endif 4946+#endif 4947+ 4948 namespace { 4949 4950+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4951 printing::CefPrintViewManager* GetPrintViewManager( 4952 content::WebContents* web_contents) { 4953 return printing::CefPrintViewManager::FromWebContents(web_contents); 4954 } 4955+#endif 4956 4957 } // namespace 4958 4959@@ -181,7 +189,9 @@ void CefBrowserPlatformDelegateAlloy::BrowserCreated( 4960 web_contents_->SetDelegate(static_cast<AlloyBrowserHostImpl*>(browser)); 4961 4962 PrefsTabHelper::CreateForWebContents(web_contents_); 4963+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4964 printing::CefPrintViewManager::CreateForWebContents(web_contents_); 4965+#endif 4966 4967 if (extensions::ExtensionsEnabled()) { 4968 // Used by the tabs extension API. 4969@@ -363,6 +373,7 @@ bool CefBrowserPlatformDelegateAlloy::IsPrintPreviewSupported() const { 4970 } 4971 4972 void CefBrowserPlatformDelegateAlloy::Print() { 4973+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4974 REQUIRE_ALLOY_RUNTIME(); 4975 4976 auto contents_to_use = printing::GetWebContentsToUse(web_contents_); 4977@@ -378,12 +389,14 @@ void CefBrowserPlatformDelegateAlloy::Print() { 4978 } else { 4979 GetPrintViewManager(contents_to_use)->PrintNow(rfh_to_use); 4980 } 4981+#endif 4982 } 4983 4984 void CefBrowserPlatformDelegateAlloy::PrintToPDF( 4985 const CefString& path, 4986 const CefPdfPrintSettings& settings, 4987 CefRefPtr<CefPdfPrintCallback> callback) { 4988+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 4989 REQUIRE_ALLOY_RUNTIME(); 4990 4991 auto contents_to_use = printing::GetWebContentsToUse(web_contents_); 4992@@ -402,6 +415,7 @@ void CefBrowserPlatformDelegateAlloy::PrintToPDF( 4993 GetPrintViewManager(contents_to_use) 4994 ->PrintToPDF(rfh_to_use, base::FilePath(path), settings, 4995 std::move(pdf_callback)); 4996+#endif 4997 } 4998 4999 void CefBrowserPlatformDelegateAlloy::Find(const CefString& searchText, 5000diff --git a/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.cc b/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.cc 5001index 0e636b44e566f..72e3e714a4a77 5002--- a/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.cc 5003+++ b/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.cc 5004@@ -19,9 +19,7 @@ 5005 #include "chrome/browser/component_updater/chrome_component_updater_configurator.h" 5006 #include "chrome/browser/net/system_network_context_manager.h" 5007 #include "chrome/browser/policy/chrome_browser_policy_connector.h" 5008-#include "chrome/browser/printing/background_printing_manager.h" 5009 #include "chrome/browser/printing/print_job_manager.h" 5010-#include "chrome/browser/printing/print_preview_dialog_controller.h" 5011 #include "chrome/browser/ui/prefs/pref_watcher.h" 5012 #include "components/component_updater/component_updater_service.h" 5013 #include "components/component_updater/timer_update_scheduler.h" 5014@@ -94,7 +92,9 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() { 5015 // tasks to run once teardown has started. 5016 print_job_manager_->Shutdown(); 5017 print_job_manager_.reset(nullptr); 5018+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5019 print_preview_dialog_controller_ = nullptr; 5020+#endif 5021 5022 profile_manager_.reset(); 5023 event_router_forwarder_ = nullptr; 5024@@ -112,16 +112,20 @@ void ChromeBrowserProcessAlloy::CleanupOnUIThread() { 5025 if (pref_watcher) 5026 pref_watcher->Shutdown(); 5027 5028+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5029 // Unregister observers for |background_printing_manager_|. 5030 if (background_printing_manager_) { 5031 background_printing_manager_->DeletePreviewContentsForBrowserContext( 5032 profile); 5033 } 5034+#endif 5035 } 5036 5037 local_state_.reset(); 5038 browser_policy_connector_.reset(); 5039+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5040 background_printing_manager_.reset(); 5041+#endif 5042 field_trial_list_.reset(); 5043 component_updater_.reset(); 5044 5045@@ -259,20 +263,28 @@ printing::PrintJobManager* ChromeBrowserProcessAlloy::print_job_manager() { 5046 5047 printing::PrintPreviewDialogController* 5048 ChromeBrowserProcessAlloy::print_preview_dialog_controller() { 5049+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5050 if (!print_preview_dialog_controller_.get()) { 5051 print_preview_dialog_controller_ = 5052 new printing::PrintPreviewDialogController(); 5053 } 5054 return print_preview_dialog_controller_.get(); 5055+#else 5056+ return nullptr; 5057+#endif 5058 } 5059 5060 printing::BackgroundPrintingManager* 5061 ChromeBrowserProcessAlloy::background_printing_manager() { 5062+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5063 if (!background_printing_manager_.get()) { 5064 background_printing_manager_.reset( 5065 new printing::BackgroundPrintingManager()); 5066 } 5067 return background_printing_manager_.get(); 5068+#else 5069+ return nullptr; 5070+#endif 5071 } 5072 5073 IntranetRedirectDetector* 5074diff --git a/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.h b/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.h 5075index 1a3fea0944156..b6a9253870c95 5076--- a/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.h 5077+++ b/src/cef/libcef/browser/alloy/chrome_browser_process_alloy.h 5078@@ -18,6 +18,14 @@ 5079 #include "chrome/browser/extensions/event_router_forwarder.h" 5080 #include "media/media_buildflags.h" 5081 5082+#if BUILDFLAG(IS_OHOS) 5083+#include "printing/buildflags/buildflags.h" 5084+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) 5085+#include "chrome/browser/printing/background_printing_manager.h" 5086+#include "chrome/browser/printing/print_preview_dialog_controller.h" 5087+#endif 5088+#endif 5089+ 5090 namespace extensions { 5091 class ExtensionsBrowserClient; 5092 class ExtensionsClient; 5093@@ -127,10 +135,12 @@ class ChromeBrowserProcessAlloy : public BrowserProcess { 5094 std::unique_ptr<printing::PrintJobManager> print_job_manager_; 5095 std::unique_ptr<ChromeProfileManagerAlloy> profile_manager_; 5096 scoped_refptr<extensions::EventRouterForwarder> event_router_forwarder_; 5097+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5098 scoped_refptr<printing::PrintPreviewDialogController> 5099 print_preview_dialog_controller_; 5100 std::unique_ptr<printing::BackgroundPrintingManager> 5101 background_printing_manager_; 5102+#endif 5103 std::unique_ptr<PrefService> local_state_; 5104 // Must be destroyed after |local_state_|. 5105 std::unique_ptr<policy::ChromeBrowserPolicyConnector> 5106diff --git a/src/cef/libcef/browser/browser_context.cc b/src/cef/libcef/browser/browser_context.cc 5107index 63793430388b0..0fdd5a18c9d67 5108--- a/src/cef/libcef/browser/browser_context.cc 5109+++ b/src/cef/libcef/browser/browser_context.cc 5110@@ -8,7 +8,6 @@ 5111 #include <utility> 5112 5113 #include "libcef/browser/context.h" 5114-#include "libcef/browser/media_router/media_router_manager.h" 5115 #include "libcef/browser/request_context_impl.h" 5116 #include "libcef/browser/thread_util.h" 5117 #include "libcef/common/cef_switches.h" 5118@@ -28,6 +27,10 @@ 5119 #include "content/public/browser/browser_thread.h" 5120 #include "content/public/browser/storage_partition.h" 5121 5122+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5123+#include "libcef/browser/media_router/media_router_manager.h" 5124+#endif 5125+ 5126 using content::BrowserThread; 5127 5128 namespace { 5129@@ -212,8 +215,10 @@ void CefBrowserContext::Shutdown() { 5130 // Unregister the context first to avoid re-entrancy during shutdown. 5131 g_manager.Get().RemoveImpl(this, cache_path_); 5132 5133+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5134 // Destroy objects that may hold references to the MediaRouter. 5135 media_router_manager_.reset(); 5136+#endif 5137 5138 // Invalidate any Getter references to this object. 5139 weak_ptr_factory_.InvalidateWeakPtrs(); 5140@@ -264,6 +269,7 @@ CefBrowserContext* CefBrowserContext::FromProfile(const Profile* profile) { 5141 if (cef_context) 5142 return cef_context; 5143 5144+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5145 if (cef::IsChromeRuntimeEnabled()) { 5146 auto* original_profile = profile->GetOriginalProfile(); 5147 if (original_profile != profile) { 5148@@ -273,6 +279,7 @@ CefBrowserContext* CefBrowserContext::FromProfile(const Profile* profile) { 5149 return FromBrowserContext(original_profile); 5150 } 5151 } 5152+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5153 5154 return nullptr; 5155 } 5156@@ -403,6 +410,7 @@ network::mojom::NetworkContext* CefBrowserContext::GetNetworkContext() { 5157 return browser_context->GetDefaultStoragePartition()->GetNetworkContext(); 5158 } 5159 5160+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5161 CefMediaRouterManager* CefBrowserContext::GetMediaRouterManager() { 5162 CEF_REQUIRE_UIT(); 5163 if (!media_router_manager_) { 5164@@ -410,6 +418,7 @@ CefMediaRouterManager* CefBrowserContext::GetMediaRouterManager() { 5165 } 5166 return media_router_manager_.get(); 5167 } 5168+#endif 5169 5170 CefBrowserContext::CookieableSchemes CefBrowserContext::GetCookieableSchemes() 5171 const { 5172diff --git a/src/cef/libcef/browser/browser_context.h b/src/cef/libcef/browser/browser_context.h 5173index 3bae0202a7521..f8d95ac12f29b 5174--- a/src/cef/libcef/browser/browser_context.h 5175+++ b/src/cef/libcef/browser/browser_context.h 5176@@ -22,6 +22,10 @@ 5177 #include "third_party/abseil-cpp/absl/types/optional.h" 5178 #include "url/origin.h" 5179 5180+#if BUILDFLAG(IS_OHOS) 5181+#include "media/media_buildflags.h" 5182+#endif 5183+ 5184 /* 5185 // Classes used in request processing (network, storage, service, etc.): 5186 // 5187@@ -220,7 +224,9 @@ class CefBrowserContext { 5188 5189 scoped_refptr<CefIOThreadState> iothread_state_; 5190 CookieableSchemes cookieable_schemes_; 5191+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5192 std::unique_ptr<CefMediaRouterManager> media_router_manager_; 5193+#endif 5194 5195 // CefRequestContextImpl objects referencing this object. 5196 std::set<CefRequestContextImpl*> request_context_set_; 5197diff --git a/src/cef/libcef/browser/browser_context_keyed_service_factories.cc b/src/cef/libcef/browser/browser_context_keyed_service_factories.cc 5198index 32a11de3e1280..a46ac3be4a3f6 5199--- a/src/cef/libcef/browser/browser_context_keyed_service_factories.cc 5200+++ b/src/cef/libcef/browser/browser_context_keyed_service_factories.cc 5201@@ -6,8 +6,6 @@ 5202 #include "libcef/common/extensions/extensions_util.h" 5203 5204 #include "chrome/browser/content_settings/cookie_settings_factory.h" 5205-#include "chrome/browser/media/router/chrome_media_router_factory.h" 5206-#include "chrome/browser/plugins/plugin_prefs_factory.h" 5207 #include "chrome/browser/profiles/renderer_updater_factory.h" 5208 #include "chrome/browser/spellchecker/spellcheck_factory.h" 5209 #include "chrome/browser/themes/theme_service_factory.h" 5210@@ -16,12 +14,30 @@ 5211 #include "extensions/browser/api/storage/storage_frontend.h" 5212 #include "extensions/browser/renderer_startup_helper.h" 5213 5214+#if BUILDFLAG(IS_OHOS) 5215+#include "ppapi/buildflags/buildflags.h" 5216+#if BUILDFLAG(ENABLE_PLUGINS) 5217+#include "chrome/browser/plugins/plugin_prefs_factory.h" 5218+#endif 5219+#endif 5220+ 5221+#if BUILDFLAG(IS_OHOS) 5222+#include "media/media_buildflags.h" 5223+#if BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5224+#include "chrome/browser/media/router/chrome_media_router_factory.h" 5225+#endif 5226+#endif 5227+ 5228 namespace cef { 5229 5230 void EnsureBrowserContextKeyedServiceFactoriesBuilt() { 5231 CookieSettingsFactory::GetInstance(); 5232+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 5233 media_router::ChromeMediaRouterFactory::GetInstance(); 5234+#endif 5235+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 5236 PluginPrefsFactory::GetInstance(); 5237+#endif 5238 PrefsTabHelper::GetServiceInstance(); 5239 RendererUpdaterFactory::GetInstance(); 5240 SpellcheckServiceFactory::GetInstance(); 5241diff --git a/src/cef/libcef/browser/browser_host_base.cc b/src/cef/libcef/browser/browser_host_base.cc 5242index 0a046454b0a54..6e2923b34552d 5243--- a/src/cef/libcef/browser/browser_host_base.cc 5244+++ b/src/cef/libcef/browser/browser_host_base.cc 5245@@ -50,6 +50,7 @@ 5246 #include "base/strings/string_number_conversions.h" 5247 #include "chrome/browser/browser_process.h" 5248 #include "content/public/common/mhtml_generation_params.h" 5249+#include "libcef/browser/navigation_state_serializer.h" 5250 #include "libcef/browser/javascript/oh_javascript_injector.h" 5251 #include "ui/base/resource/resource_bundle.h" 5252 #endif 5253@@ -498,6 +499,7 @@ void CefBrowserHostBase::UpdateBrowserSettings( 5254 // browser_settings.file_access_from_file_urls; 5255 /* ohos webview add*/ 5256 settings_.force_dark_mode_enabled = browser_settings.force_dark_mode_enabled; 5257+ settings_.dark_prefer_color_scheme_enabled = browser_settings.dark_prefer_color_scheme_enabled; 5258 settings_.javascript_can_open_windows_automatically = 5259 browser_settings.javascript_can_open_windows_automatically; 5260 settings_.loads_images_automatically = 5261@@ -519,6 +521,10 @@ void CefBrowserHostBase::UpdateBrowserSettings( 5262 settings_.viewport_meta_enabled = browser_settings.viewport_meta_enabled; 5263 settings_.user_gesture_required = browser_settings.user_gesture_required; 5264 settings_.pinch_smooth_mode = browser_settings.pinch_smooth_mode; 5265+#if BUILDFLAG(IS_OHOS) 5266+ settings_.hide_vertical_scrollbars = browser_settings.hide_vertical_scrollbars; 5267+ settings_.hide_horizontal_scrollbars = browser_settings.hide_horizontal_scrollbars; 5268+#endif 5269 } 5270 5271 void CefBrowserHostBase::SetWebPreferences( 5272@@ -721,8 +727,7 @@ CefString CefBrowserHostBase::GetOriginalUrl() { 5273 void CefBrowserHostBase::PutNetworkAvailable(bool available) { 5274 auto frame = GetMainFrame(); 5275 if (frame && frame->IsValid()) { 5276- static_cast<CefFrameHostImpl*>(frame.get()) 5277- ->SetJsOnlineProperty(available); 5278+ static_cast<CefFrameHostImpl*>(frame.get())->SetJsOnlineProperty(available); 5279 } 5280 } 5281 5282@@ -767,7 +772,8 @@ void CefBrowserHostBase::ExitFullScreen() { 5283 return; 5284 } 5285 wc->GetMainFrame()->AllowInjectingJavaScript(); 5286- std::string jscode("{if(document.fullscreenElement){document.exitFullscreen()}}"); 5287+ std::string jscode( 5288+ "{if(document.fullscreenElement){document.exitFullscreen()}}"); 5289 wc->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(jscode), 5290 base::NullCallback()); 5291 } 5292@@ -975,6 +981,59 @@ void CefBrowserHostBase::RemoveCache(bool include_disk_files) { 5293 return; 5294 } 5295 } 5296+void CefBrowserHostBase::ScrollPageUpDown(bool is_up, 5297+ bool is_half, 5298+ float view_height) { 5299+ auto frame = GetMainFrame(); 5300+ if (frame && frame->IsValid()) { 5301+ static_cast<CefFrameHostImpl*>(frame.get()) 5302+ ->ScrollPageUpDown(is_up, is_half, view_height); 5303+ } 5304+} 5305+ 5306+void CefBrowserHostBase::ScrollTo(float x, 5307+ float y) { 5308+ auto frame = GetMainFrame(); 5309+ if (frame && frame->IsValid()) { 5310+ static_cast<CefFrameHostImpl*>(frame.get()) 5311+ ->ScrollTo(x, y); 5312+ } 5313+} 5314+ 5315+void CefBrowserHostBase::ScrollBy(float delta_x, 5316+ float delta_y) { 5317+ auto frame = GetMainFrame(); 5318+ if (frame && frame->IsValid()) { 5319+ static_cast<CefFrameHostImpl*>(frame.get()) 5320+ ->ScrollBy(delta_x, delta_y); 5321+ } 5322+} 5323+ 5324+void CefBrowserHostBase::SlideScroll(float vx, 5325+ float vy) { 5326+ auto frame = GetMainFrame(); 5327+ if (frame && frame->IsValid()) { 5328+ static_cast<CefFrameHostImpl*>(frame.get()) 5329+ ->SlideScroll(vx, vy); 5330+ } 5331+} 5332+ 5333+CefRefPtr<CefBinaryValue> CefBrowserHostBase::GetWebState() { 5334+ auto web_contents = GetWebContents(); 5335+ if (!web_contents) { 5336+ return nullptr; 5337+ } 5338+ 5339+ return NavigationStateSerializer::WriteNavigationStatus(*web_contents); 5340+} 5341+ 5342+bool CefBrowserHostBase::RestoreWebState(const CefRefPtr<CefBinaryValue> state) { 5343+ auto web_contents = GetWebContents(); 5344+ if (!web_contents || !state) { 5345+ return false; 5346+ } 5347+ return NavigationStateSerializer::RestoreNavigationStatus(*web_contents, state); 5348+} 5349 #endif // IS_OHOS 5350 5351 void CefBrowserHostBase::StopLoad() { 5352@@ -1539,19 +1598,32 @@ void CefBrowserHostBase::ClosePort(CefString& portHandle) { 5353 } 5354 5355 void CefBrowserHostBase::PostPortMessage(CefString& portHandle, 5356- CefString& data) { 5357+ CefRefPtr<CefValue> data) { 5358 auto web_contents = GetWebContents(); 5359 if (!web_contents) { 5360 LOG(ERROR) << "GetWebContents null"; 5361 return; 5362 } 5363 5364- std::u16string message(base::UTF8ToUTF16(data.ToString())); 5365+ blink::WebMessagePort::Message message; 5366+ if (data->GetType() == VTYPE_STRING) { 5367+ message = blink::WebMessagePort::Message(base::UTF8ToUTF16(data->GetString().ToString())); 5368+ } else if (data->GetType() == VTYPE_BINARY) { 5369+ CefRefPtr<CefBinaryValue> binValue = data->GetBinary(); 5370+ size_t len = binValue->GetSize(); 5371+ std::vector<uint8_t> arr(len); 5372+ binValue->GetData(&arr[0], len, 0); 5373+ message = blink::WebMessagePort::Message(std::move(arr)); 5374+ } else { 5375+ LOG(ERROR) << "CefBrowserHostBase::PostPortMessage not support type"; 5376+ return; 5377+ } 5378+ 5379 // find the WebMessagePort in map 5380 for (auto iter = portMap_.begin(); iter != portMap_.end(); ++iter) { 5381 if (portHandle.ToString().compare(std::to_string(iter->first.first)) == 0) { 5382 if (iter->second.first.CanPostMessage()) { 5383- iter->second.first.PostMessage(blink::WebMessagePort::Message(message)); 5384+ iter->second.first.PostMessage(std::move(message)); 5385 } else { 5386 LOG(ERROR) << "port can not post messsage"; 5387 } 5388@@ -1559,8 +1631,7 @@ void CefBrowserHostBase::PostPortMessage(CefString& portHandle, 5389 } else if (portHandle.ToString().compare( 5390 std::to_string(iter->first.second)) == 0) { 5391 if (iter->second.second.CanPostMessage()) { 5392- iter->second.second.PostMessage( 5393- blink::WebMessagePort::Message(message)); 5394+ iter->second.second.PostMessage(std::move(message)); 5395 } else { 5396 LOG(ERROR) << "port can not post messsage"; 5397 } 5398@@ -1574,7 +1645,7 @@ void CefBrowserHostBase::PostPortMessage(CefString& portHandle, 5399 // WebMessagePort of the pipe. 5400 void CefBrowserHostBase::SetPortMessageCallback( 5401 CefString& portHandle, 5402- CefRefPtr<CefJavaScriptResultCallback> callback) { 5403+ CefRefPtr<CefWebMessageReceiver> callback) { 5404 auto web_contents = GetWebContents(); 5405 if (!web_contents) { 5406 LOG(ERROR) << "GetWebContents null"; 5407@@ -1640,7 +1711,7 @@ WebMessageReceiverImpl::~WebMessageReceiverImpl() { 5408 } 5409 5410 void WebMessageReceiverImpl::SetOnMessageCallback( 5411- CefRefPtr<CefJavaScriptResultCallback> callback) { 5412+ CefRefPtr<CefWebMessageReceiver> callback) { 5413 LOG(INFO) << "WebMessageReceiverImpl::SetOnMessageCallback "; 5414 callback_ = callback; 5415 } 5416@@ -1650,9 +1721,17 @@ bool WebMessageReceiverImpl::OnMessage(blink::WebMessagePort::Message message) { 5417 LOG(INFO) << "OnMessage start"; 5418 // Pass the message on to the receiver. 5419 if (callback_) { 5420- LOG(INFO) << "OnMessage:" << message.data; 5421- std::u16string data = message.data; 5422- callback_->OnJavaScriptExeResult(base::UTF16ToUTF8(data)); 5423+ CefRefPtr<CefValue> data = CefValue::Create(); 5424+ if (!message.data.empty()) { 5425+ data->SetString(base::UTF16ToUTF8(message.data)); 5426+ } else { 5427+ std::vector<uint8_t> vecBinary = message.array_buffer; 5428+ CefRefPtr<CefBinaryValue> value = 5429+ CefBinaryValue::Create(vecBinary.data(), vecBinary.size()); 5430+ data->SetBinary(value); 5431+ } 5432+ 5433+ callback_->OnMessage(data); 5434 } else { 5435 LOG(ERROR) << "u should set callback to receive message"; 5436 } 5437@@ -1717,8 +1796,10 @@ void CefBrowserHostBase::LoadWithDataAndBaseUrl(const CefString& baseUrl, 5438 const CefString& encoding, 5439 const CefString& historyUrl) { 5440 if (!CEF_CURRENTLY_ON_UIT()) { 5441- CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefBrowserHostBase::LoadWithDataAndBaseUrl, 5442- this, baseUrl, data, mimeType, encoding, historyUrl)); 5443+ CEF_POST_TASK( 5444+ CEF_UIT, 5445+ base::BindOnce(&CefBrowserHostBase::LoadWithDataAndBaseUrl, this, 5446+ baseUrl, data, mimeType, encoding, historyUrl)); 5447 return; 5448 } 5449 std::string dataBase = data.empty() ? "" : data; 5450@@ -1761,7 +1842,7 @@ void CefBrowserHostBase::LoadWithData(const CefString& data, 5451 const CefString& encoding) { 5452 if (!CEF_CURRENTLY_ON_UIT()) { 5453 CEF_POST_TASK(CEF_UIT, base::BindOnce(&CefBrowserHostBase::LoadWithData, 5454- this, data, mimeType, encoding)); 5455+ this, data, mimeType, encoding)); 5456 return; 5457 } 5458 std::string dataBase = data.empty() ? "" : data; 5459@@ -1835,6 +1916,48 @@ bool CefBrowserHostBase::GetWebDebuggingAccess() { 5460 return is_web_debugging_access_; 5461 } 5462 5463+#if BUILDFLAG(IS_OHOS) 5464+void CefBrowserHostBase::SetFileAccess(bool flag) { 5465+ base::AutoLock lock_scope(state_lock_); 5466+ if (file_access_ == flag) { 5467+ return; 5468+ } 5469+ file_access_ = flag; 5470+} 5471+ 5472+void CefBrowserHostBase::SetBlockNetwork(bool flag) { 5473+ base::AutoLock lock_scope(state_lock_); 5474+ if (network_blocked_ == flag) { 5475+ return; 5476+ } 5477+ network_blocked_ = flag; 5478+} 5479+ 5480+void CefBrowserHostBase::SetCacheMode(int flag) { 5481+ base::AutoLock lock_scope(state_lock_); 5482+ if (cache_mode_ == flag) { 5483+ return; 5484+ } 5485+ cache_mode_ = flag; 5486+} 5487+ 5488+ 5489+bool CefBrowserHostBase::GetFileAccess() { 5490+ base::AutoLock lock_scope(state_lock_); 5491+ return file_access_; 5492+} 5493+ 5494+bool CefBrowserHostBase::GetBlockNetwork() { 5495+ base::AutoLock lock_scope(state_lock_); 5496+ return network_blocked_; 5497+} 5498+ 5499+int CefBrowserHostBase::GetCacheMode() { 5500+ base::AutoLock lock_scope(state_lock_); 5501+ return cache_mode_; 5502+} 5503+#endif 5504+ 5505 void CefBrowserHostBase::GetImageForContextNode() { 5506 auto frame = GetMainFrame(); 5507 if (frame && frame->IsValid()) { 5508diff --git a/src/cef/libcef/browser/browser_host_base.h b/src/cef/libcef/browser/browser_host_base.h 5509index a098827de9f05..a752ef2c3a23d 5510--- a/src/cef/libcef/browser/browser_host_base.h 5511+++ b/src/cef/libcef/browser/browser_host_base.h 5512@@ -108,10 +108,10 @@ class WebMessageReceiverImpl : public blink::WebMessagePort::MessageReceiver { 5513 // WebMessagePort::MessageReceiver implementation: 5514 bool OnMessage(blink::WebMessagePort::Message message) override; 5515 5516- void SetOnMessageCallback(CefRefPtr<CefJavaScriptResultCallback> callback); 5517+ void SetOnMessageCallback(CefRefPtr<CefWebMessageReceiver> callback); 5518 5519 private: 5520- CefRefPtr<CefJavaScriptResultCallback> callback_; 5521+ CefRefPtr<CefWebMessageReceiver> callback_; 5522 }; 5523 5524 struct CefHitData { 5525@@ -239,6 +239,12 @@ class CefBrowserHostBase : public CefBrowserHost, 5526 CefString GetOriginalUrl() override; 5527 void PutNetworkAvailable(bool available) override; 5528 void RemoveCache(bool include_disk_files) override; 5529+ CefRefPtr<CefBinaryValue> GetWebState() override; 5530+ bool RestoreWebState(const CefRefPtr<CefBinaryValue> state) override; 5531+ void ScrollPageUpDown(bool is_up, bool is_half, float view_height) override; 5532+ void ScrollTo(float x, float y) override; 5533+ void ScrollBy(float delta_x, float delta_y) override; 5534+ void SlideScroll(float vx, float vy) override; 5535 /* ohos webview end */ 5536 #endif 5537 5538@@ -276,10 +282,10 @@ class CefBrowserHostBase : public CefBrowserHost, 5539 std::vector<CefString>& ports, 5540 CefString& targetUri) override; 5541 void ClosePort(CefString& port_handle) override; 5542- void PostPortMessage(CefString& port_handle, CefString& data) override; 5543+ void PostPortMessage(CefString& port_handle, CefRefPtr<CefValue> message) override; 5544 void SetPortMessageCallback( 5545 CefString& port_handle, 5546- CefRefPtr<CefJavaScriptResultCallback> callback) override; 5547+ CefRefPtr<CefWebMessageReceiver> callback) override; 5548 void DestroyAllWebMessagePorts() override; 5549 #endif 5550 CefString Title() override; 5551@@ -409,6 +415,18 @@ class CefBrowserHostBase : public CefBrowserHost, 5552 void SetWebDebuggingAccess(bool isEnableDebug) override; 5553 bool GetWebDebuggingAccess() override; 5554 5555+#if BUILDFLAG(IS_OHOS) 5556+ void SetFileAccess(bool flag) override; 5557+ void SetBlockNetwork(bool flag) override; 5558+ void SetCacheMode(int flag) override; 5559+ bool GetFileAccess(); 5560+ bool GetBlockNetwork(); 5561+ int GetCacheMode(); 5562+ bool file_access_ = false; 5563+ bool network_blocked_ = false; 5564+ int cache_mode_ = 0; 5565+#endif 5566+ 5567 #if BUILDFLAG(IS_OHOS) 5568 bool ShouldShowLoadingUI() override; 5569 #endif 5570diff --git a/src/cef/libcef/browser/browser_host_create.cc b/src/cef/libcef/browser/browser_host_create.cc 5571index 21742d9599e16..60d14a5d4b9ae 5572--- a/src/cef/libcef/browser/browser_host_create.cc 5573+++ b/src/cef/libcef/browser/browser_host_create.cc 5574@@ -5,11 +5,14 @@ 5575 5576 #include "include/cef_browser.h" 5577 #include "libcef/browser/alloy/alloy_browser_host_impl.h" 5578-#include "libcef/browser/chrome/chrome_browser_host_impl.h" 5579 #include "libcef/browser/context.h" 5580 #include "libcef/browser/thread_util.h" 5581 #include "libcef/features/runtime.h" 5582 5583+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5584+#include "libcef/browser/chrome/chrome_browser_host_impl.h" 5585+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5586+ 5587 namespace { 5588 5589 class CreateBrowserHelper { 5590@@ -138,10 +141,12 @@ CefRefPtr<CefBrowser> CefBrowserHost::CreateBrowserSync( 5591 // static 5592 CefRefPtr<CefBrowserHostBase> CefBrowserHostBase::Create( 5593 CefBrowserCreateParams& create_params) { 5594+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5595 if (cef::IsChromeRuntimeEnabled()) { 5596 auto browser = ChromeBrowserHostImpl::Create(create_params); 5597 return browser.get(); 5598 } 5599+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5600 5601 auto browser = AlloyBrowserHostImpl::Create(create_params); 5602 return browser.get(); 5603diff --git a/src/cef/libcef/browser/browser_platform_delegate.cc b/src/cef/libcef/browser/browser_platform_delegate.cc 5604index d5ef0e763cfe8..d3f93c844f946 5605--- a/src/cef/libcef/browser/browser_platform_delegate.cc 5606+++ b/src/cef/libcef/browser/browser_platform_delegate.cc 5607@@ -393,6 +393,18 @@ void CefBrowserPlatformDelegate::StopFinding(bool clearSelection) { 5608 NOTIMPLEMENTED(); 5609 } 5610 5611+void CefBrowserPlatformDelegate::ShowPopupMenu( 5612+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 5613+ const gfx::Rect& bounds, 5614+ int item_height, 5615+ double item_font_size, 5616+ int selected_item, 5617+ std::vector<blink::mojom::MenuItemPtr> menu_items, 5618+ bool right_aligned, 5619+ bool allow_multiple_selection) { 5620+ NOTIMPLEMENTED(); 5621+} 5622+ 5623 // static 5624 int CefBrowserPlatformDelegate::TranslateWebEventModifiers( 5625 uint32 cef_modifiers) { 5626diff --git a/src/cef/libcef/browser/browser_platform_delegate.h b/src/cef/libcef/browser/browser_platform_delegate.h 5627index fbcb7521503ec..f69fa5b0c42e1 5628--- a/src/cef/libcef/browser/browser_platform_delegate.h 5629+++ b/src/cef/libcef/browser/browser_platform_delegate.h 5630@@ -17,6 +17,7 @@ 5631 #include "base/callback_forward.h" 5632 #include "extensions/common/mojom/view_type.mojom-forward.h" 5633 #include "third_party/blink/public/common/page/drag_operation.h" 5634+#include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h" 5635 #include "third_party/blink/public/mojom/drag/drag.mojom-forward.h" 5636 #include "third_party/skia/include/core/SkColor.h" 5637 #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h" 5638@@ -359,6 +360,15 @@ class CefBrowserPlatformDelegate { 5639 bool findNext, 5640 bool newSession); 5641 virtual void StopFinding(bool clearSelection); 5642+ virtual void ShowPopupMenu( 5643+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 5644+ const gfx::Rect& bounds, 5645+ int item_height, 5646+ double item_font_size, 5647+ int selected_item, 5648+ std::vector<blink::mojom::MenuItemPtr> menu_items, 5649+ bool right_aligned, 5650+ bool allow_multiple_selection); 5651 5652 protected: 5653 // Allow deletion via std::unique_ptr only. 5654diff --git a/src/cef/libcef/browser/browser_platform_delegate_create.cc b/src/cef/libcef/browser/browser_platform_delegate_create.cc 5655index da158b2a3a659..8c2723bb11048 5656--- a/src/cef/libcef/browser/browser_platform_delegate_create.cc 5657+++ b/src/cef/libcef/browser/browser_platform_delegate_create.cc 5658@@ -12,7 +12,6 @@ 5659 #include "build/build_config.h" 5660 5661 #include "libcef/browser/browser_host_base.h" 5662-#include "libcef/browser/chrome/browser_platform_delegate_chrome.h" 5663 #include "libcef/browser/extensions/browser_platform_delegate_background.h" 5664 #include "libcef/features/runtime_checks.h" 5665 5666@@ -30,10 +29,16 @@ 5667 #endif 5668 5669 #if defined(TOOLKIT_VIEWS) 5670+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5671 #include "libcef/browser/chrome/views/browser_platform_delegate_chrome_views.h" 5672+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5673 #include "libcef/browser/views/browser_platform_delegate_views.h" 5674 #endif 5675 5676+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5677+#include "libcef/browser/chrome/browser_platform_delegate_chrome.h" 5678+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5679+ 5680 namespace { 5681 5682 std::unique_ptr<CefBrowserPlatformDelegateNative> CreateNativeDelegate( 5683@@ -79,6 +84,7 @@ std::unique_ptr<CefBrowserPlatformDelegate> CefBrowserPlatformDelegate::Create( 5684 const SkColor background_color = CefContext::Get()->GetBackgroundColor( 5685 &create_params.settings, is_windowless ? STATE_ENABLED : STATE_DISABLED); 5686 5687+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5688 if (cef::IsChromeRuntimeEnabled()) { 5689 // CefWindowInfo is not used in this case. 5690 std::unique_ptr<CefBrowserPlatformDelegateNative> native_delegate = 5691@@ -94,6 +100,7 @@ std::unique_ptr<CefBrowserPlatformDelegate> CefBrowserPlatformDelegate::Create( 5692 return std::make_unique<CefBrowserPlatformDelegateChrome>( 5693 std::move(native_delegate)); 5694 } 5695+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 5696 5697 if (create_params.window_info) { 5698 std::unique_ptr<CefBrowserPlatformDelegateNative> native_delegate = 5699diff --git a/src/cef/libcef/browser/context_menu_params_impl.cc b/src/cef/libcef/browser/context_menu_params_impl.cc 5700index c8d817852b2a3..3cff40a84c1d0 5701--- a/src/cef/libcef/browser/context_menu_params_impl.cc 5702+++ b/src/cef/libcef/browser/context_menu_params_impl.cc 5703@@ -147,3 +147,14 @@ bool CefContextMenuParamsImpl::IsCustomMenu() { 5704 CEF_VALUE_VERIFY_RETURN(false, false); 5705 return !const_value().custom_items.empty(); 5706 } 5707+ 5708+CefContextMenuParamsImpl::InputFieldType CefContextMenuParamsImpl::GetInputFieldType() { 5709+ CEF_VALUE_VERIFY_RETURN(false, CM_INPUTFIELDTYPE_NONE); 5710+ return static_cast<InputFieldType>(const_value().input_field_type); 5711+} 5712+ 5713+CefContextMenuParamsImpl::SourceType CefContextMenuParamsImpl::GetSourceType() { 5714+ CEF_VALUE_VERIFY_RETURN(false, CM_SOURCETYPE_NONE); 5715+ return static_cast<SourceType>(const_value().source_type); 5716+} 5717+ 5718diff --git a/src/cef/libcef/browser/context_menu_params_impl.h b/src/cef/libcef/browser/context_menu_params_impl.h 5719index 782848a03b7dd..eedb81e10f9ba 5720--- a/src/cef/libcef/browser/context_menu_params_impl.h 5721+++ b/src/cef/libcef/browser/context_menu_params_impl.h 5722@@ -41,6 +41,8 @@ class CefContextMenuParamsImpl 5723 bool IsSpellCheckEnabled() override; 5724 EditStateFlags GetEditStateFlags() override; 5725 bool IsCustomMenu() override; 5726+ InputFieldType GetInputFieldType() override; 5727+ SourceType GetSourceType() override; 5728 }; 5729 5730 #endif // CEF_LIBCEF_BROWSER_CONTEXT_MENU_PARAMS_IMPL_H_ 5731diff --git a/src/cef/libcef/browser/extensions/browser_extensions_util.cc b/src/cef/libcef/browser/extensions/browser_extensions_util.cc 5732index 74e94b9e26fc7..aff6b30e85345 5733--- a/src/cef/libcef/browser/extensions/browser_extensions_util.cc 5734+++ b/src/cef/libcef/browser/extensions/browser_extensions_util.cc 5735@@ -23,6 +23,10 @@ 5736 #include "content/public/browser/render_view_host.h" 5737 #include "extensions/browser/extension_registry.h" 5738 5739+#if BUILDFLAG(IS_OHOS) 5740+#include "printing/buildflags/buildflags.h" 5741+#endif 5742+ 5743 namespace extensions { 5744 5745 namespace { 5746@@ -52,10 +56,14 @@ content::WebContents* GetOwnerForGuestContents(content::WebContents* guest) { 5747 return plugin_guest->owner_web_contents(); 5748 } 5749 5750+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5751 // Maybe it's a print preview dialog. 5752 auto print_preview_controller = 5753 g_browser_process->print_preview_dialog_controller(); 5754 return print_preview_controller->GetInitiator(guest); 5755+#else 5756+ return nullptr; 5757+#endif 5758 } 5759 5760 CefRefPtr<CefBrowserHostBase> GetOwnerBrowserForGlobalId( 5761diff --git a/src/cef/libcef/browser/extensions/component_extension_resource_manager.cc b/src/cef/libcef/browser/extensions/component_extension_resource_manager.cc 5762index 4c8f5666fb962..b9d1f2e716fda 5763--- a/src/cef/libcef/browser/extensions/component_extension_resource_manager.cc 5764+++ b/src/cef/libcef/browser/extensions/component_extension_resource_manager.cc 5765@@ -8,23 +8,33 @@ 5766 #include "base/logging.h" 5767 #include "base/path_service.h" 5768 #include "base/values.h" 5769-#include "chrome/browser/pdf/pdf_extension_util.h" 5770 #include "chrome/common/chrome_paths.h" 5771 #include "chrome/grit/component_extension_resources_map.h" 5772-#include "chrome/grit/pdf_resources_map.h" 5773 #include "extensions/common/constants.h" 5774 5775+#if BUILDFLAG(IS_OHOS) 5776+#include "pdf/buildflags.h" 5777+#if BUILDFLAG(ENABLE_PDF) 5778+#include "chrome/browser/pdf/pdf_extension_util.h" 5779+#include "chrome/grit/pdf_resources_map.h" 5780+#endif 5781+#endif 5782+ 5783 namespace extensions { 5784 5785 CefComponentExtensionResourceManager::CefComponentExtensionResourceManager() { 5786 AddComponentResourceEntries(kComponentExtensionResources, 5787 kComponentExtensionResourcesSize); 5788+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 5789 AddComponentResourceEntries(kPdfResources, kPdfResourcesSize); 5790+#endif 5791 5792 base::Value dict(base::Value::Type::DICTIONARY); 5793+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 5794 pdf_extension_util::AddStrings( 5795 pdf_extension_util::PdfViewerContext::kPdfViewer, &dict); 5796 pdf_extension_util::AddAdditionalData(/*enable_annotations=*/true, &dict); 5797+#endif 5798 5799 ui::TemplateReplacements pdf_viewer_replacements; 5800 ui::TemplateReplacementsFromDictionaryValue( 5801diff --git a/src/cef/libcef/browser/extensions/extension_system.cc b/src/cef/libcef/browser/extensions/extension_system.cc 5802index 21cfc861c382f..3f54b1fe7d5f5 5803--- a/src/cef/libcef/browser/extensions/extension_system.cc 5804+++ b/src/cef/libcef/browser/extensions/extension_system.cc 5805@@ -21,7 +21,6 @@ 5806 #include "base/strings/string_tokenizer.h" 5807 #include "base/strings/utf_string_conversions.h" 5808 #include "base/threading/thread_restrictions.h" 5809-#include "chrome/browser/pdf/pdf_extension_util.h" 5810 #include "chrome/browser/profiles/profile.h" 5811 #include "chrome/common/chrome_paths.h" 5812 #include "components/crx_file/id_util.h" 5813@@ -31,7 +30,6 @@ 5814 #include "content/public/browser/notification_details.h" 5815 #include "content/public/browser/notification_service.h" 5816 #include "content/public/browser/notification_source.h" 5817-#include "content/public/browser/plugin_service.h" 5818 #include "content/public/browser/render_process_host.h" 5819 #include "extensions/browser/api/app_runtime/app_runtime_api.h" 5820 #include "extensions/browser/extension_prefs.h" 5821@@ -52,6 +50,20 @@ 5822 #include "extensions/common/switches.h" 5823 #include "net/base/mime_util.h" 5824 5825+#if BUILDFLAG(IS_OHOS) 5826+#include "ppapi/buildflags/buildflags.h" 5827+#if BUILDFLAG(ENABLE_PLUGINS) 5828+#include "content/public/browser/plugin_service.h" 5829+#endif 5830+#endif 5831+ 5832+#if BUILDFLAG(IS_OHOS) 5833+#include "pdf/buildflags.h" 5834+#if BUILDFLAG(ENABLE_PDF) 5835+#include "chrome/browser/pdf/pdf_extension_util.h" 5836+#endif 5837+#endif 5838+ 5839 using content::BrowserContext; 5840 5841 namespace extensions { 5842@@ -263,11 +275,13 @@ void CefExtensionSystem::Init() { 5843 // the guest WebContents will be destroyed. This triggers a call to 5844 // CefMimeHandlerViewGuestDelegate::OnGuestDetached which removes the 5845 // routing ID association with the owner CefBrowser. 5846+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 5847 if (PdfExtensionEnabled()) { 5848 LoadExtension(ParseManifest(pdf_extension_util::GetManifest()), 5849 base::FilePath(FILE_PATH_LITERAL("pdf")), true /* internal */, 5850 nullptr, nullptr); 5851 } 5852+#endif 5853 5854 initialized_ = true; 5855 } 5856@@ -683,10 +697,12 @@ void CefExtensionSystem::NotifyExtensionLoaded(const Extension* extension) { 5857 } 5858 info.mime_types.push_back(mime_type_info); 5859 } 5860+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 5861 content::PluginService* plugin_service = 5862 content::PluginService::GetInstance(); 5863 plugin_service->RefreshPlugins(); 5864 plugin_service->RegisterInternalPlugin(info, true); 5865+#endif 5866 } 5867 } 5868 5869@@ -707,10 +723,12 @@ void CefExtensionSystem::NotifyExtensionUnloaded( 5870 if (handler && !handler->handler_url().empty()) { 5871 base::FilePath path = 5872 base::FilePath::FromUTF8Unsafe(extension->url().spec()); 5873+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 5874 content::PluginService* plugin_service = 5875 content::PluginService::GetInstance(); 5876 plugin_service->UnregisterInternalPlugin(path); 5877 plugin_service->RefreshPlugins(); 5878+#endif 5879 } 5880 5881 registry_->TriggerOnUnloaded(extension, reason); 5882diff --git a/src/cef/libcef/browser/extensions/extensions_api_client.cc b/src/cef/libcef/browser/extensions/extensions_api_client.cc 5883index 97976cdebb1a1..9dd257baa66b6 5884--- a/src/cef/libcef/browser/extensions/extensions_api_client.cc 5885+++ b/src/cef/libcef/browser/extensions/extensions_api_client.cc 5886@@ -11,16 +11,29 @@ 5887 #include "libcef/browser/extensions/api/storage/sync_value_store_cache.h" 5888 #include "libcef/browser/extensions/extension_web_contents_observer.h" 5889 #include "libcef/browser/extensions/mime_handler_view_guest_delegate.h" 5890-#include "libcef/browser/printing/print_view_manager.h" 5891 5892 #include "base/memory/ptr_util.h" 5893-#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 5894 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 5895-#include "components/pdf/browser/pdf_web_contents_helper.h" 5896 #include "components/zoom/zoom_controller.h" 5897 #include "extensions/browser/guest_view/extensions_guest_view_manager_delegate.h" 5898 #include "printing/mojom/print.mojom.h" 5899 5900+#if BUILDFLAG(IS_OHOS) 5901+#include "printing/buildflags/buildflags.h" 5902+#if BUILDFLAG(ENABLE_PRINT_PREVIEW) 5903+#include "libcef/browser/printing/print_view_manager.h" 5904+#endif 5905+#endif 5906+ 5907+#if BUILDFLAG(IS_OHOS) 5908+#include "pdf/buildflags.h" 5909+#endif 5910+ 5911+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 5912+#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" 5913+#include "components/pdf/browser/pdf_web_contents_helper.h" 5914+#endif 5915+ 5916 namespace extensions { 5917 5918 CefExtensionsAPIClient::CefExtensionsAPIClient() {} 5919@@ -51,12 +64,16 @@ CefExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( 5920 void CefExtensionsAPIClient::AttachWebContentsHelpers( 5921 content::WebContents* web_contents) const { 5922 PrefsTabHelper::CreateForWebContents(web_contents); 5923+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 5924 printing::CefPrintViewManager::CreateForWebContents(web_contents); 5925+#endif 5926 5927+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 5928 // Used by the PDF extension. 5929 pdf::PDFWebContentsHelper::CreateForWebContentsWithClient( 5930 web_contents, std::unique_ptr<pdf::PDFWebContentsHelperClient>( 5931 new ChromePDFWebContentsHelperClient())); 5932+#endif 5933 5934 // Used by the tabs extension API. 5935 zoom::ZoomController::CreateForWebContents(web_contents); 5936diff --git a/src/cef/libcef/browser/frame_host_impl.cc b/src/cef/libcef/browser/frame_host_impl.cc 5937index ade8f9f6996c8..b79a4ee9f5857 5938--- a/src/cef/libcef/browser/frame_host_impl.cc 5939+++ b/src/cef/libcef/browser/frame_host_impl.cc 5940@@ -294,11 +294,12 @@ void CefFrameHostImpl::RefreshAttributes() { 5941 } 5942 5943 void CefFrameHostImpl::UpdateLocale(const CefString& locale) { 5944- SendToRenderFrame(__FUNCTION__, 5945- base::BindOnce([](const std::string& locale, 5946- const RenderFrameType& render_frame) { 5947- render_frame->UpdateLocale(locale); 5948- }, locale.ToString())); 5949+ SendToRenderFrame(__FUNCTION__, base::BindOnce( 5950+ [](const std::string& locale, 5951+ const RenderFrameType& render_frame) { 5952+ render_frame->UpdateLocale(locale); 5953+ }, 5954+ locale.ToString())); 5955 } 5956 5957 void CefFrameHostImpl::NotifyMoveOrResizeStarted() { 5958@@ -779,12 +780,13 @@ void CefFrameHostImpl::SetInitialScale(float scale) { 5959 } 5960 5961 void CefFrameHostImpl::SetJsOnlineProperty(bool network_up) { 5962- SendToRenderFrame(__FUNCTION__, 5963- base::BindOnce( 5964- [](bool network_up, const RenderFrameType& render_frame) { 5965- render_frame->SetJsOnlineProperty(network_up); 5966- }, 5967- network_up)); 5968+ SendToRenderFrame( 5969+ __FUNCTION__, 5970+ base::BindOnce( 5971+ [](bool network_up, const RenderFrameType& render_frame) { 5972+ render_frame->SetJsOnlineProperty(network_up); 5973+ }, 5974+ network_up)); 5975 } 5976 5977 void CefFrameHostImpl::GetImageForContextNode() { 5978@@ -804,16 +806,17 @@ void CefFrameHostImpl::PutZoomingForTextFactor(float factor) { 5979 factor)); 5980 } 5981 5982-void CefFrameHostImpl::GetImagesCallback(CefRefPtr<CefFrameHostImpl> frame, 5983- CefRefPtr<CefGetImagesCallback> callback, bool response) { 5984+void CefFrameHostImpl::GetImagesCallback( 5985+ CefRefPtr<CefFrameHostImpl> frame, 5986+ CefRefPtr<CefGetImagesCallback> callback, 5987+ bool response) { 5988 if (auto browser = frame->GetBrowser()) { 5989 callback->GetImages(response); 5990 } 5991 } 5992 5993 void CefFrameHostImpl::GetImagesWithResponse( 5994- cef::mojom::RenderFrame::GetImagesWithResponseCallback 5995- response_callback) { 5996+ cef::mojom::RenderFrame::GetImagesWithResponseCallback response_callback) { 5997 SendToRenderFrame( 5998 __FUNCTION__, 5999 base::BindOnce( 6000@@ -826,17 +829,16 @@ void CefFrameHostImpl::GetImagesWithResponse( 6001 } 6002 6003 void CefFrameHostImpl::GetImages(CefRefPtr<CefGetImagesCallback> callback) { 6004- GetImagesWithResponse( 6005- base::BindOnce(&CefFrameHostImpl::GetImagesCallback, base::Unretained(this), 6006- CefRefPtr<CefFrameHostImpl>(this), callback)); 6007+ GetImagesWithResponse(base::BindOnce( 6008+ &CefFrameHostImpl::GetImagesCallback, base::Unretained(this), 6009+ CefRefPtr<CefFrameHostImpl>(this), callback)); 6010 } 6011 6012 void CefFrameHostImpl::RemoveCache(bool include_disk_files) { 6013 SendToRenderFrame(__FUNCTION__, 6014- base::BindOnce( 6015- [](const RenderFrameType& render_frame) { 6016- render_frame->RemoveCache(); 6017- })); 6018+ base::BindOnce([](const RenderFrameType& render_frame) { 6019+ render_frame->RemoveCache(); 6020+ })); 6021 6022 if (include_disk_files) { 6023 auto browser = GetBrowserHostBase(); 6024@@ -857,9 +859,55 @@ void CefFrameHostImpl::RemoveCache(bool include_disk_files) { 6025 base::Time(), base::Time::Max(), 6026 content::BrowsingDataRemover::DATA_TYPE_CACHE, 6027 content::BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB | 6028- content::BrowsingDataRemover::ORIGIN_TYPE_PROTECTED_WEB); 6029+ content::BrowsingDataRemover::ORIGIN_TYPE_PROTECTED_WEB); 6030 } 6031 } 6032+ 6033+void CefFrameHostImpl::ScrollPageUpDown(bool is_up, 6034+ bool is_half, 6035+ float view_height) { 6036+ SendToRenderFrame(__FUNCTION__, 6037+ base::BindOnce( 6038+ [](bool is_up, bool is_half, float view_height, 6039+ const RenderFrameType& render_frame) { 6040+ render_frame->ScrollPageUpDown(is_up, is_half, 6041+ view_height); 6042+ }, 6043+ is_up, is_half, view_height)); 6044+} 6045+ 6046+void CefFrameHostImpl::ScrollTo(float x, 6047+ float y) { 6048+ SendToRenderFrame(__FUNCTION__, 6049+ base::BindOnce( 6050+ [](float x, float y, 6051+ const RenderFrameType& render_frame) { 6052+ render_frame->ScrollTo(x, y); 6053+ }, 6054+ x, y)); 6055+} 6056+ 6057+void CefFrameHostImpl::ScrollBy(float delta_x, 6058+ float delta_y) { 6059+ SendToRenderFrame(__FUNCTION__, 6060+ base::BindOnce( 6061+ [](float delta_x, float delta_y, 6062+ const RenderFrameType& render_frame) { 6063+ render_frame->ScrollBy(delta_x, delta_y); 6064+ }, 6065+ delta_x, delta_y)); 6066+} 6067+ 6068+void CefFrameHostImpl::SlideScroll(float vx, 6069+ float vy) { 6070+ SendToRenderFrame(__FUNCTION__, 6071+ base::BindOnce( 6072+ [](float vx, float vy, 6073+ const RenderFrameType& render_frame) { 6074+ render_frame->SlideScroll(vx, vy); 6075+ }, 6076+ vx, vy)); 6077+} 6078 #endif // BUILDFLAG(IS_OHOS) 6079 6080 void CefExecuteJavaScriptWithUserGestureForTests(CefRefPtr<CefFrame> frame, 6081diff --git a/src/cef/libcef/browser/frame_host_impl.h b/src/cef/libcef/browser/frame_host_impl.h 6082index 00f0918d783d5..5a43da2de74a0 6083--- a/src/cef/libcef/browser/frame_host_impl.h 6084+++ b/src/cef/libcef/browser/frame_host_impl.h 6085@@ -169,7 +169,10 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame { 6086 response_callback); 6087 void GetImages(CefRefPtr<CefGetImagesCallback> callback) override; 6088 void RemoveCache(bool include_disk_files); 6089- 6090+ void ScrollPageUpDown(bool is_up, bool is_half, float view_height); 6091+ void ScrollTo(float x, float y); 6092+ void ScrollBy(float delta_x, float delta_y); 6093+ void SlideScroll(float vx, float vy); 6094 #endif // BUILDFLAG(IS_OHOS) 6095 6096 static const int64_t kMainFrameId; 6097diff --git a/src/cef/libcef/browser/main_runner.cc b/src/cef/libcef/browser/main_runner.cc 6098index d4284ee6c27e8..4de525d6b94ce 6099--- a/src/cef/libcef/browser/main_runner.cc 6100+++ b/src/cef/libcef/browser/main_runner.cc 6101@@ -9,7 +9,6 @@ 6102 #include "libcef/browser/thread_util.h" 6103 #include "libcef/common/alloy/alloy_main_runner_delegate.h" 6104 #include "libcef/common/cef_switches.h" 6105-#include "libcef/common/chrome/chrome_main_runner_delegate.h" 6106 #include "libcef/features/runtime.h" 6107 6108 #include "base/at_exit.h" 6109@@ -40,12 +39,18 @@ 6110 #include "third_party/crashpad/crashpad/handler/handler_main.h" 6111 #endif 6112 6113+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6114+#include "libcef/common/chrome/chrome_main_runner_delegate.h" 6115+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6116+ 6117 namespace { 6118 6119 enum class RuntimeType { 6120 UNINITIALIZED, 6121 ALLOY, 6122+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6123 CHROME, 6124+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6125 }; 6126 RuntimeType g_runtime_type = RuntimeType::UNINITIALIZED; 6127 6128@@ -54,6 +59,7 @@ std::unique_ptr<CefMainRunnerDelegate> MakeDelegate( 6129 CefMainRunnerHandler* runner, 6130 CefSettings* settings, 6131 CefRefPtr<CefApp> application) { 6132+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6133 if (type == RuntimeType::ALLOY) { 6134 g_runtime_type = RuntimeType::ALLOY; 6135 return std::make_unique<AlloyMainRunnerDelegate>(runner, settings, 6136@@ -63,6 +69,11 @@ std::unique_ptr<CefMainRunnerDelegate> MakeDelegate( 6137 return std::make_unique<ChromeMainRunnerDelegate>(runner, settings, 6138 application); 6139 } 6140+#else 6141+ g_runtime_type = RuntimeType::ALLOY; 6142+ return std::make_unique<AlloyMainRunnerDelegate>(runner, settings, 6143+ application); 6144+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6145 } 6146 6147 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) 6148@@ -229,9 +240,13 @@ bool CefMainRunner::Initialize(CefSettings* settings, 6149 bool* initialized, 6150 base::OnceClosure context_initialized) { 6151 DCHECK(!main_delegate_); 6152+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6153 main_delegate_ = MakeDelegate( 6154 settings->chrome_runtime ? RuntimeType::CHROME : RuntimeType::ALLOY, this, 6155 settings, application); 6156+#else 6157+ main_delegate_ = MakeDelegate(RuntimeType::ALLOY, this, settings, application); 6158+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6159 6160 const int exit_code = 6161 ContentMainInitialize(args, windows_sandbox_info, &settings->no_sandbox); 6162@@ -318,9 +333,13 @@ int CefMainRunner::RunAsHelperProcess(const CefMainArgs& args, 6163 if (process_type.empty()) 6164 return -1; 6165 6166+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6167 auto runtime_type = command_line.HasSwitch(switches::kEnableChromeRuntime) 6168 ? RuntimeType::CHROME 6169 : RuntimeType::ALLOY; 6170+#else 6171+ auto runtime_type = RuntimeType::ALLOY; 6172+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6173 auto main_delegate = MakeDelegate(runtime_type, /*runner=*/nullptr, 6174 /*settings=*/nullptr, application); 6175 main_delegate->BeforeExecuteProcess(args); 6176@@ -536,7 +555,11 @@ bool IsAlloyRuntimeEnabled() { 6177 } 6178 6179 bool IsChromeRuntimeEnabled() { 6180+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6181 return g_runtime_type == RuntimeType::CHROME; 6182+#else 6183+ return false; 6184+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6185 } 6186 6187 } // namespace cef 6188diff --git a/src/cef/libcef/browser/menu_manager.cc b/src/cef/libcef/browser/menu_manager.cc 6189index 2ad53d395c385..879b0f449f186 6190--- a/src/cef/libcef/browser/menu_manager.cc 6191+++ b/src/cef/libcef/browser/menu_manager.cc 6192@@ -21,9 +21,15 @@ 6193 #include "content/public/browser/render_process_host.h" 6194 #include "content/public/browser/render_widget_host_view.h" 6195 #include "third_party/blink/public/mojom/context_menu/context_menu.mojom.h" 6196+#include "ui/base/clipboard/clipboard.h" 6197+#include "ui/base/data_transfer_policy/data_transfer_endpoint.h" 6198 6199 namespace { 6200 6201+constexpr cef_context_menu_edit_state_flags_t kMenuCommands[] = { 6202+ CM_EDITFLAG_CAN_CUT, CM_EDITFLAG_CAN_COPY, CM_EDITFLAG_CAN_PASTE, 6203+ CM_EDITFLAG_CAN_DELETE, CM_EDITFLAG_CAN_SELECT_ALL}; 6204+ 6205 CefString GetLabel(int message_id) { 6206 std::u16string label = 6207 CefAppManager::Get()->GetContentClient()->GetLocalizedString(message_id); 6208@@ -120,6 +126,53 @@ bool CefMenuManager::IsShowingContextMenu() { 6209 return web_contents()->IsShowingContextMenu(); 6210 } 6211 6212+bool CefMenuManager::IsCommandIdEnabled(int command_id, 6213+ content::ContextMenuParams& params) const { 6214+ bool editable = params.is_editable; 6215+ bool readable = params.input_field_type != blink::mojom::ContextMenuDataInputFieldType::kPassword; 6216+ bool has_selection = !params.selection_text.empty(); 6217+ bool has_image_contents = params.has_image_contents; 6218+ 6219+ switch (command_id) { 6220+ case CM_EDITFLAG_CAN_CUT: 6221+ case CM_EDITFLAG_CAN_DELETE: 6222+ return editable && readable && has_selection; 6223+ case CM_EDITFLAG_CAN_COPY: 6224+ return readable && (has_selection || has_image_contents); 6225+ case CM_EDITFLAG_CAN_PASTE: { 6226+ std::u16string result; 6227+ bool can_paste = false; 6228+ ui::DataTransferEndpoint data_dst = ui::DataTransferEndpoint( 6229+ ui::EndpointType::kDefault, false); 6230+ ui::Clipboard::GetForCurrentThread()->ReadText( 6231+ ui::ClipboardBuffer::kCopyPaste, &data_dst, &result); 6232+ 6233+ if (result.empty()) { 6234+ can_paste = ui::Clipboard::GetForCurrentThread()->IsFormatAvailable( 6235+ ui::ClipboardFormatType::BitmapType(), 6236+ ui::ClipboardBuffer::kCopyPaste, &data_dst); 6237+ } 6238+ can_paste = can_paste ? can_paste : !result.empty(); 6239+ return editable && can_paste; 6240+ } 6241+ case CM_EDITFLAG_CAN_SELECT_ALL: 6242+ return editable || readable; 6243+ default: 6244+ return false; 6245+ } 6246+} 6247+ 6248+void CefMenuManager::UpdateMenuEditStateFlags(content::ContextMenuParams& params) { 6249+ int menu_flags = 0; 6250+ for (const auto& command : kMenuCommands) { 6251+ if (IsCommandIdEnabled(command, params)) { 6252+ menu_flags |= command; 6253+ } 6254+ } 6255+ 6256+ params.edit_flags = menu_flags; 6257+} 6258+ 6259 bool CefMenuManager::CreateContextMenu( 6260 const content::ContextMenuParams& params) { 6261 // The renderer may send the "show context menu" message multiple times, one 6262@@ -134,6 +187,7 @@ bool CefMenuManager::CreateContextMenu( 6263 6264 params_ = params; 6265 model_->Clear(); 6266+ UpdateMenuEditStateFlags(params_); 6267 6268 // Create the default menu model. 6269 CreateDefaultModel(); 6270diff --git a/src/cef/libcef/browser/menu_manager.h b/src/cef/libcef/browser/menu_manager.h 6271index 239e3b7c3fab7..14da5e4ce6ee6 6272--- a/src/cef/libcef/browser/menu_manager.h 6273+++ b/src/cef/libcef/browser/menu_manager.h 6274@@ -63,6 +63,11 @@ class CefMenuManager : public CefMenuModelImpl::Delegate, 6275 // Returns true if the specified id is a custom context menu command. 6276 bool IsCustomContextMenuCommand(int command_id); 6277 6278+ bool IsCommandIdEnabled(int command_id, 6279+ content::ContextMenuParams& params) const; 6280+ 6281+ void UpdateMenuEditStateFlags(content::ContextMenuParams& params); 6282+ 6283 // AlloyBrowserHostImpl pointer is guaranteed to outlive this object. 6284 AlloyBrowserHostImpl* browser_; 6285 6286diff --git a/src/cef/libcef/browser/navigation_state_serializer.cc b/src/cef/libcef/browser/navigation_state_serializer.cc 6287new file mode 100755 6288index 0000000000000..7da18ce018344 6289--- /dev/null 6290+++ b/src/cef/libcef/browser/navigation_state_serializer.cc 6291@@ -0,0 +1,161 @@ 6292+/* 6293+ * Copyright (c) 2022 Huawei Device Co., Ltd. 6294+ * Licensed under the Apache License, Version 2.0 (the "License"); 6295+ * you may not use this file except in compliance with the License. 6296+ * You may obtain a copy of the License at 6297+ * 6298+ * http://www.apache.org/licenses/LICENSE-2.0 6299+ * 6300+ * Unless required by applicable law or agreed to in writing, software 6301+ * distributed under the License is distributed on an "AS IS" BASIS, 6302+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6303+ * See the License for the specific language governing permissions and 6304+ * limitations under the License. 6305+ */ 6306+ 6307+#include "libcef/browser/navigation_state_serializer.h" 6308+ 6309+#include "base/logging.h" 6310+#include "third_party/blink/public/common/page_state/page_state.h" 6311+ 6312+CefRefPtr<CefBinaryValue> 6313+NavigationStateSerializer::WriteNavigationStatus( 6314+ content::WebContents& web_contents) { 6315+ content::NavigationController& controller = web_contents.GetController(); 6316+ if (!web_contents.GetController().GetLastCommittedEntry() || 6317+ web_contents.GetController().GetLastCommittedEntry()->IsInitialEntry()) { 6318+ LOG(ERROR) << "navigation controller invalid"; 6319+ return nullptr; 6320+ } 6321+ base::Pickle pickle; 6322+ int entry_count = controller.GetEntryCount(); 6323+ int entry_index = controller.GetLastCommittedEntryIndex(); 6324+ pickle.WriteInt(entry_count); 6325+ pickle.WriteInt(entry_index); 6326+ for (int index = 0; index < entry_count; ++index) { 6327+ WriteNavigationEntry(*controller.GetEntryAtIndex(index), &pickle); 6328+ } 6329+ return CefBinaryValue::Create(pickle.data(), pickle.size()); 6330+} 6331+ 6332+void NavigationStateSerializer::WriteNavigationEntry( 6333+ content::NavigationEntry& entry, 6334+ base::Pickle* pickle) { 6335+ if (!pickle) 6336+ return; 6337+ pickle->WriteString(entry.GetURL().spec()); 6338+ pickle->WriteString(entry.GetVirtualURL().spec()); 6339+ 6340+ const content::Referrer& referrer = entry.GetReferrer(); 6341+ pickle->WriteString(referrer.url.spec()); 6342+ pickle->WriteInt(static_cast<int>(referrer.policy)); 6343+ pickle->WriteString16(entry.GetTitle()); 6344+ pickle->WriteString(entry.GetPageState().ToEncodedData()); 6345+ pickle->WriteBool(static_cast<int>(entry.GetHasPostData())); 6346+ pickle->WriteString(entry.GetOriginalRequestURL().spec()); 6347+ pickle->WriteString(entry.GetBaseURLForDataURL().spec()); 6348+ pickle->WriteBool(static_cast<int>(entry.GetIsOverridingUserAgent())); 6349+ pickle->WriteInt64(entry.GetTimestamp().ToInternalValue()); 6350+ pickle->WriteInt(entry.GetHttpStatusCode()); 6351+} 6352+ 6353+bool NavigationStateSerializer::RestoreNavigationStatus( 6354+ content::WebContents& web_contents, 6355+ const CefRefPtr<CefBinaryValue>& state) { 6356+ if (!state) { 6357+ LOG(ERROR) << "web state is nullptr."; 6358+ return false; 6359+ } 6360+ size_t state_size = state->GetSize(); 6361+ if (state_size <= 0) { 6362+ LOG(ERROR) << "web state size invalid."; 6363+ return false; 6364+ } 6365+ uint8_t temp_buffer[state_size]; 6366+ state->GetData(temp_buffer, state_size, 0); 6367+ base::Pickle pickle(reinterpret_cast<const char*>(temp_buffer), 6368+ state->GetSize()); 6369+ base::PickleIterator iterator(pickle); 6370+ int entry_count = -1; 6371+ int entry_index = -2; 6372+ if (!iterator.ReadInt(&entry_count) || !iterator.ReadInt(&entry_index) || 6373+ entry_index >= entry_count) { 6374+ LOG(ERROR) << "web state size invalid."; 6375+ return false; 6376+ } 6377+ 6378+ std::unique_ptr<content::NavigationEntryRestoreContext> context = 6379+ content::NavigationEntryRestoreContext::Create(); 6380+ std::vector<std::unique_ptr<content::NavigationEntry>> entries; 6381+ entries.reserve(entry_count); 6382+ for (int i = 0; i < entry_count; ++i) { 6383+ std::unique_ptr<content::NavigationEntry> entry = 6384+ content::NavigationEntry::Create(); 6385+ if (!RestoreNavigationEntry(&iterator, entry, context.get())) 6386+ return false; 6387+ entries.push_back(std::move(entry)); 6388+ } 6389+ 6390+ content::NavigationController& controller = web_contents.GetController(); 6391+ controller.Restore(entry_index, content::RestoreType::kRestored, &entries); 6392+ controller.LoadIfNecessary(); 6393+ return true; 6394+} 6395+ 6396+bool NavigationStateSerializer::RestoreNavigationEntry( 6397+ base::PickleIterator* iterator, 6398+ std::unique_ptr<content::NavigationEntry>& entry, 6399+ content::NavigationEntryRestoreContext* context) { 6400+ if (!iterator || !entry || !context) { 6401+ return false; 6402+ } 6403+ std::string url; 6404+ std::string virtual_url; 6405+ std::string original_request_url; 6406+ std::string base_url_for_data_url; 6407+ std::string referrer_url; 6408+ int policy; 6409+ std::u16string title; 6410+ std::string content_state; 6411+ bool has_post_data; 6412+ bool is_overriding_user_agent; 6413+ int64_t timestamp; 6414+ int http_status_code; 6415+ 6416+ if (!iterator->ReadString(&url) || !iterator->ReadString(&virtual_url) || 6417+ !iterator->ReadString(&referrer_url) || !iterator->ReadInt(&policy) || 6418+ !iterator->ReadString16(&title) || 6419+ !iterator->ReadString(&content_state) || 6420+ !iterator->ReadBool(&has_post_data) || 6421+ !iterator->ReadString(&original_request_url) || 6422+ !iterator->ReadString(&base_url_for_data_url) || 6423+ !iterator->ReadBool(&is_overriding_user_agent) || 6424+ !iterator->ReadInt64(×tamp) || 6425+ !iterator->ReadInt(&http_status_code)) { 6426+ LOG(ERROR) << "restore navigation entry failed."; 6427+ return false; 6428+ } 6429+ 6430+ GURL deserialized_url; 6431+ entry->SetURL(deserialized_url); 6432+ entry->SetVirtualURL(GURL(virtual_url)); 6433+ entry->SetTitle(title); 6434+ content::Referrer deserialized_referrer; 6435+ deserialized_referrer.url = GURL(referrer_url); 6436+ deserialized_referrer.policy = content::Referrer::ConvertToPolicy(policy); 6437+ if (content_state.empty()) { 6438+ entry->SetPageState(blink::PageState::CreateFromURL(deserialized_url), 6439+ context); 6440+ entry->SetReferrer(deserialized_referrer); 6441+ } else { 6442+ entry->SetPageState(blink::PageState::CreateFromEncodedData(content_state), 6443+ context); 6444+ } 6445+ entry->SetHasPostData(has_post_data); 6446+ entry->SetOriginalRequestURL(GURL(original_request_url)); 6447+ entry->SetBaseURLForDataURL(GURL(base_url_for_data_url)); 6448+ entry->SetIsOverridingUserAgent(is_overriding_user_agent); 6449+ entry->SetTimestamp(base::Time::FromInternalValue(timestamp)); 6450+ entry->SetHttpStatusCode(http_status_code); 6451+ return true; 6452+} 6453\ No newline at end of file 6454diff --git a/src/cef/libcef/browser/navigation_state_serializer.h b/src/cef/libcef/browser/navigation_state_serializer.h 6455new file mode 100755 6456index 0000000000000..73d0bbefe5d2e 6457--- /dev/null 6458+++ b/src/cef/libcef/browser/navigation_state_serializer.h 6459@@ -0,0 +1,45 @@ 6460+/* 6461+ * Copyright (c) 2022 Huawei Device Co., Ltd. 6462+ * Licensed under the Apache License, Version 2.0 (the "License"); 6463+ * you may not use this file except in compliance with the License. 6464+ * You may obtain a copy of the License at 6465+ * 6466+ * http://www.apache.org/licenses/LICENSE-2.0 6467+ * 6468+ * Unless required by applicable law or agreed to in writing, software 6469+ * distributed under the License is distributed on an "AS IS" BASIS, 6470+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 6471+ * See the License for the specific language governing permissions and 6472+ * limitations under the License. 6473+ */ 6474+ 6475+#ifndef NAVIGATION_STATE_SERIALIZER_H 6476+#define NAVIGATION_STATE_SERIALIZER_H 6477+#pragma once 6478+ 6479+#include <memory> 6480+#include <vector> 6481+ 6482+#include "base/pickle.h" 6483+#include "content/public/browser/navigation_entry.h" 6484+#include "content/public/browser/navigation_entry_restore_context.h" 6485+#include "content/public/browser/web_contents.h" 6486+#include "include/cef_values.h" 6487+ 6488+class NavigationStateSerializer { 6489+ public: 6490+ static CefRefPtr<CefBinaryValue> WriteNavigationStatus( 6491+ content::WebContents& web_contents); 6492+ static bool RestoreNavigationStatus(content::WebContents& web_contents, 6493+ const CefRefPtr<CefBinaryValue>& state); 6494+ 6495+ private: 6496+ static void WriteNavigationEntry(content::NavigationEntry& entry, 6497+ base::Pickle* pickle); 6498+ static bool RestoreNavigationEntry( 6499+ base::PickleIterator* iterator, 6500+ std::unique_ptr<content::NavigationEntry>& entry, 6501+ content::NavigationEntryRestoreContext* context); 6502+}; 6503+ 6504+#endif 6505\ No newline at end of file 6506diff --git a/src/cef/libcef/browser/net/chrome_scheme_handler.cc b/src/cef/libcef/browser/net/chrome_scheme_handler.cc 6507index 533483340a79b..98aaa94a2b703 6508--- a/src/cef/libcef/browser/net/chrome_scheme_handler.cc 6509+++ b/src/cef/libcef/browser/net/chrome_scheme_handler.cc 6510@@ -166,9 +166,11 @@ bool IsUnlistedHost(const std::string& host) { 6511 6512 // Returns true if a host is WebUI and should be allowed to load. 6513 bool IsAllowedWebUIHost(const std::string& host) { 6514+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6515 // Chrome runtime allows all WebUI hosts. 6516 if (cef::IsChromeRuntimeEnabled()) 6517 return true; 6518+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6519 6520 // Explicitly whitelisted WebUI hosts. 6521 for (size_t i = 0; 6522@@ -293,6 +295,7 @@ class TemplateParser { 6523 bool OnExtensionsSupportUI(std::string* mime_type, std::string* output) { 6524 *mime_type = "text/html"; 6525 6526+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6527 if (cef::IsChromeRuntimeEnabled()) { 6528 // Redirect to the Chrome documentation. 6529 *output = 6530@@ -302,6 +305,7 @@ bool OnExtensionsSupportUI(std::string* mime_type, std::string* output) { 6531 "</head></html>\n"; 6532 return true; 6533 } 6534+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6535 6536 static const char kDevURL[] = "https://developer.chrome.com/extensions/"; 6537 6538diff --git a/src/cef/libcef/browser/net/scheme_handler.cc b/src/cef/libcef/browser/net/scheme_handler.cc 6539index 9686e53fa94a5..701ff98e6a964 6540--- a/src/cef/libcef/browser/net/scheme_handler.cc 6541+++ b/src/cef/libcef/browser/net/scheme_handler.cc 6542@@ -6,13 +6,16 @@ 6543 6544 #include <string> 6545 6546-#include "libcef/browser/net/chrome_scheme_handler.h" 6547 #include "libcef/browser/net/devtools_scheme_handler.h" 6548 #include "libcef/common/net/scheme_registration.h" 6549 #include "libcef/features/runtime.h" 6550 6551 #include "content/public/common/url_constants.h" 6552 6553+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 6554+#include "libcef/browser/net/chrome_scheme_handler.h" 6555+#endif 6556+ 6557 namespace scheme { 6558 6559 void RegisterInternalHandlers(CefIOThreadState* iothread_state) { 6560diff --git a/src/cef/libcef/browser/net_database/cef_data_base_impl.cc b/src/cef/libcef/browser/net_database/cef_data_base_impl.cc 6561index ceb653c27b0f4..f91e981433c06 6562--- a/src/cef/libcef/browser/net_database/cef_data_base_impl.cc 6563+++ b/src/cef/libcef/browser/net_database/cef_data_base_impl.cc 6564@@ -57,17 +57,19 @@ void CefDataBaseImpl::SaveHttpAuthCredentials(const CefString& host, 6565 void CefDataBaseImpl::GetHttpAuthCredentials( 6566 const CefString& host, 6567 const CefString& realm, 6568- std::vector<CefString>& username_password) { 6569+ CefString& username, 6570+ char* password, 6571+ uint32_t passwordSize) { 6572 if (host.empty() || realm.empty()) { 6573 return; 6574 } 6575 6576- std::vector<std::string> result; 6577+ std::string usernameStr; 6578 OHOS::NWeb::OhosWebDataBaseAdapter& databaseAdapter = 6579 OHOS::NWeb::OhosAdapterHelper::GetInstance() 6580 .GetOhosWebDataBaseAdapterInstance(); 6581- databaseAdapter.GetHttpAuthCredentials(host, realm, result); 6582- TransferVector(result, username_password); 6583+ databaseAdapter.GetHttpAuthCredentials(host, realm, usernameStr, password, passwordSize); 6584+ username = usernameStr; 6585 return; 6586 } 6587 6588diff --git a/src/cef/libcef/browser/net_database/cef_data_base_impl.h b/src/cef/libcef/browser/net_database/cef_data_base_impl.h 6589index 439385953b998..b990d0ceae2a4 6590--- a/src/cef/libcef/browser/net_database/cef_data_base_impl.h 6591+++ b/src/cef/libcef/browser/net_database/cef_data_base_impl.h 6592@@ -28,7 +28,9 @@ class CefDataBaseImpl : public CefDataBase { 6593 void GetHttpAuthCredentials( 6594 const CefString& host, 6595 const CefString& realm, 6596- std::vector<CefString>& username_password) override; 6597+ CefString& username, 6598+ char* password, 6599+ uint32_t passwordSize) override; 6600 6601 bool ExistPermissionByOrigin(const CefString& origin, int type) override; 6602 6603diff --git a/src/cef/libcef/browser/net_database/cef_dns_data_base.cc b/src/cef/libcef/browser/net_database/cef_dns_data_base.cc 6604index a6ebf9267945b..0a55885825ae7 6605--- a/src/cef/libcef/browser/net_database/cef_dns_data_base.cc 6606+++ b/src/cef/libcef/browser/net_database/cef_dns_data_base.cc 6607@@ -4,49 +4,48 @@ 6608 6609 #include "cef_dns_data_base.h" 6610 6611+#include <set> 6612 #include "base/logging.h" 6613 #include "net/base/ip_endpoint.h" 6614 #include "nweb_pre_dns_adapter.h" 6615 #include "ohos_adapter_helper.h" 6616 #include "third_party/abseil-cpp/absl/types/optional.h" 6617 6618+namespace { 6619+std::set<const std::string> g_hostname; 6620+} 6621 void CacheHostName(const std::string& hostname) { 6622- OHOS::NWeb::OhosWebDnsDataBaseAdapter& dnsDatabaseAdapter = 6623- OHOS::NWeb::OhosAdapterHelper::GetInstance().GetWebDnsDataBaseInstance(); 6624- if (dnsDatabaseAdapter.ExistHostname(hostname)) { 6625- return; 6626+ if (g_hostname.count(hostname) == 0) { 6627+ g_hostname.insert(hostname); 6628+ auto& dnsDatabaseAdapter = OHOS::NWeb::OhosAdapterHelper::GetInstance().GetWebDnsDataBaseInstance(); 6629+ dnsDatabaseAdapter.InsertHostname(hostname); 6630 } 6631- 6632- dnsDatabaseAdapter.InsertHostname(hostname); 6633 } 6634 6635 net::AddressList GetAddrList(const std::string& hostname) { 6636 using OHOS::NWeb::g_AddrInfoMap; 6637- net::AddressList addr_list; 6638- if (g_AddrInfoMap.empty()) { 6639- return addr_list; 6640- } 6641- 6642- addrinfo* addrInfo; 6643 auto it = g_AddrInfoMap.find(hostname); 6644 if (it == g_AddrInfoMap.end()) { 6645- return addr_list; 6646+ return net::AddressList(); 6647 } 6648- addrInfo = it->second; 6649- auto canonical_name = (addrInfo->ai_canonname != nullptr) 6650- ? absl::optional<std::string>(std::string(addrInfo->ai_canonname)) 6651- : absl::optional<std::string>(); 6652+ 6653+ net::AddressList addr_list; 6654+ addrinfo* addrInfo = it->second; 6655+ auto canonical_name = 6656+ addrInfo->ai_canonname 6657+ ? absl::make_optional(std::string(addrInfo->ai_canonname)) 6658+ : absl::nullopt; 6659 if (canonical_name) { 6660- std::vector<std::string> aliases({*canonical_name}); 6661- addr_list.SetDnsAliases(std::move(aliases)); 6662+ addr_list.SetDnsAliases({*canonical_name}); 6663 } 6664- for (auto ai = addrInfo; ai != NULL; ai = ai->ai_next) { 6665+ for (auto ai = addrInfo; ai != nullptr; ai = ai->ai_next) { 6666 net::IPEndPoint ipe; 6667 // NOTE: Ignoring non-INET* families. 6668- if (ipe.FromSockAddr(ai->ai_addr, ai->ai_addrlen)) 6669+ if (ipe.FromSockAddr(ai->ai_addr, ai->ai_addrlen)) { 6670 addr_list.push_back(ipe); 6671- else 6672+ } else { 6673 LOG(INFO) << "Unknown family found in addrinfo: " << ai->ai_family; 6674+ } 6675 } 6676 return addr_list; 6677 } 6678\ No newline at end of file 6679diff --git a/src/cef/libcef/browser/net_service/login_delegate.cc b/src/cef/libcef/browser/net_service/login_delegate.cc 6680index dc05f1f1a6945..326b285c0878c 6681--- a/src/cef/libcef/browser/net_service/login_delegate.cc 6682+++ b/src/cef/libcef/browser/net_service/login_delegate.cc 6683@@ -4,6 +4,8 @@ 6684 6685 #include "libcef/browser/net_service/login_delegate.h" 6686 6687+#include <securec.h> 6688+ 6689 #include "libcef/browser/browser_host_base.h" 6690 #include "libcef/browser/net_database/cef_data_base_impl.h" 6691 #include "libcef/browser/net_service/browser_urlrequest_impl.h" 6692@@ -17,8 +19,6 @@ 6693 namespace net_service { 6694 6695 namespace { 6696-const int USERNAME_PASSWORD_VECTOR_NUM = 2; 6697- 6698 class AuthCallbackImpl : public CefAuthCallback { 6699 public: 6700 explicit AuthCallbackImpl(base::WeakPtr<LoginDelegate> delegate, 6701@@ -68,6 +68,7 @@ class AuthCallbackImpl : public CefAuthCallback { 6702 } 6703 6704 bool IsHttpAuthInfoSaved() override { 6705+ constexpr int32_t MAX_PWD_LENGTH = 256; 6706 auto dataBase = CefDataBase::GetGlobalDataBase(); 6707 if (dataBase == nullptr) { 6708 return false; 6709@@ -75,25 +76,29 @@ class AuthCallbackImpl : public CefAuthCallback { 6710 if (!dataBase->ExistHttpAuthCredentials()) { 6711 return false; 6712 } 6713- std::vector<CefString> usernamePassword; 6714- usernamePassword.clear(); 6715- dataBase->GetHttpAuthCredentials(host_, realm_, usernamePassword); 6716- if (usernamePassword.size() < USERNAME_PASSWORD_VECTOR_NUM) { 6717+ CefString username; 6718+ char password[MAX_PWD_LENGTH + 1] = {0}; 6719+ dataBase->GetHttpAuthCredentials(host_, realm_, username, password, MAX_PWD_LENGTH + 1); 6720+ if (username.empty() || strlen(password) == 0) { 6721+ (void)memset_s(password, MAX_PWD_LENGTH + 1, 0, MAX_PWD_LENGTH + 1); 6722 return false; 6723 } 6724- CefString username = usernamePassword[0]; 6725- CefString password = usernamePassword[1]; 6726+ CefString passwordCef(password, strlen(password)); 6727+ (void)memset_s(password, MAX_PWD_LENGTH + 1, 0, MAX_PWD_LENGTH + 1); 6728 if (!task_runner_->RunsTasksInCurrentSequence()) { 6729 task_runner_->PostTask( 6730 FROM_HERE, base::BindOnce(&AuthCallbackImpl::Continue, this, username, 6731- password)); 6732+ passwordCef)); 6733+ passwordCef.MemsetToZero(); 6734 return true; 6735 } 6736 if (delegate_) { 6737- delegate_->Continue(username, password); 6738+ delegate_->Continue(username, passwordCef); 6739 delegate_ = nullptr; 6740+ passwordCef.MemsetToZero(); 6741 return true; 6742 } 6743+ passwordCef.MemsetToZero(); 6744 return false; 6745 } 6746 6747diff --git a/src/cef/libcef/browser/net_service/net_helpers.cc b/src/cef/libcef/browser/net_service/net_helpers.cc 6748index 9bca0ec6a4c36..c8c630566b91a 6749--- a/src/cef/libcef/browser/net_service/net_helpers.cc 6750+++ b/src/cef/libcef/browser/net_service/net_helpers.cc 6751@@ -38,8 +38,8 @@ bool NetHelpers::ShouldBlockContentUrls() { 6752 return !allow_content_access; 6753 } 6754 6755-bool NetHelpers::ShouldBlockFileUrls() { 6756- return !allow_file_access; 6757+bool NetHelpers::ShouldBlockFileUrls(struct NetHelperSetting setting) { 6758+ return !setting.file_access; 6759 } 6760 6761 bool NetHelpers::IsAllowAcceptCookies() { 6762@@ -77,33 +77,33 @@ bool IsSpecialFileUrl(const GURL& url) { 6763 return false; 6764 } 6765 6766-bool IsURLBlocked(const GURL& url) { 6767+bool IsURLBlocked(const GURL& url, struct NetHelperSetting setting) { 6768 // Part of implementation of NWebPreference.allowContentAccess. 6769 if (url.SchemeIs(url::kContentScheme) && NetHelpers::ShouldBlockContentUrls()) 6770 return true; 6771 6772 // Part of implementation of NWebPreference.allowFileAccess. 6773- if (url.SchemeIsFile() && NetHelpers::ShouldBlockFileUrls()) { 6774+ if (url.SchemeIsFile() && NetHelpers::ShouldBlockFileUrls(setting)) { 6775 // Appdatas are always available. 6776 return !IsSpecialFileUrl(url); 6777 } 6778 6779- return NetHelpers::is_network_blocked && url.SchemeIs(url::kFtpScheme); 6780+ return setting.block_network && url.SchemeIs(url::kFtpScheme); 6781 } 6782 6783-int UpdateLoadFlags(int load_flags) { 6784- if (NetHelpers::is_network_blocked) { 6785+int UpdateLoadFlags(int load_flags, NetHelperSetting setting) { 6786+ if (setting.block_network) { 6787 LOG(INFO) << "Update cache control flag to block network."; 6788 return UpdateCacheLoadFlags( 6789 load_flags, 6790 net::LOAD_ONLY_FROM_CACHE | net::LOAD_SKIP_CACHE_VALIDATION); 6791 } 6792 6793- if (!NetHelpers::cache_mode) { 6794+ if (!setting.cache_mode) { 6795 return load_flags; 6796 } 6797 6798- return UpdateCacheLoadFlags(load_flags, NetHelpers::cache_mode); 6799+ return UpdateCacheLoadFlags(load_flags, setting.cache_mode); 6800 } 6801 6802 } // namespace net_service 6803diff --git a/src/cef/libcef/browser/net_service/net_helpers.h b/src/cef/libcef/browser/net_service/net_helpers.h 6804index f2283769ec839..6c8fa83c33a74 6805--- a/src/cef/libcef/browser/net_service/net_helpers.h 6806+++ b/src/cef/libcef/browser/net_service/net_helpers.h 6807@@ -11,10 +11,16 @@ namespace net_service { 6808 6809 #define NETHELPERS_EXPORT __attribute__((visibility("default"))) 6810 6811+struct NetHelperSetting { 6812+ bool file_access; 6813+ bool block_network; 6814+ int cache_mode; 6815+}; 6816+ 6817 class NETHELPERS_EXPORT NetHelpers { 6818 public: 6819 static bool ShouldBlockContentUrls(); 6820- static bool ShouldBlockFileUrls(); 6821+ static bool ShouldBlockFileUrls(struct NetHelperSetting setting); 6822 static bool IsAllowAcceptCookies(); 6823 static bool IsThirdPartyCookieAllowed(); 6824 6825@@ -29,11 +35,11 @@ class NETHELPERS_EXPORT NetHelpers { 6826 bool IsSpecialFileUrl(const GURL& url); 6827 6828 // Update request's |load_flags| based on the settings. 6829-int UpdateLoadFlags(int load_flags); 6830+int UpdateLoadFlags(int load_flags, struct NetHelperSetting setting); 6831 6832 // Returns true if the given URL should be aborted with 6833 // net::ERR_ACCESS_DENIED. 6834-bool IsURLBlocked(const GURL& url); 6835+bool IsURLBlocked(const GURL& url, struct NetHelperSetting setting); 6836 6837 } // namespace net_service 6838 6839diff --git a/src/cef/libcef/browser/net_service/proxy_url_loader_factory.cc b/src/cef/libcef/browser/net_service/proxy_url_loader_factory.cc 6840index 93d08697df16e..a016633fb5382 6841--- a/src/cef/libcef/browser/net_service/proxy_url_loader_factory.cc 6842+++ b/src/cef/libcef/browser/net_service/proxy_url_loader_factory.cc 6843@@ -500,13 +500,15 @@ void InterceptedRequest::Restart() { 6844 } 6845 } 6846 6847- if (IsURLBlocked(request_.url)) { 6848+ struct NetHelperSetting setting; 6849+ factory_->request_handler_->GetSettingOfNetHelper(setting); 6850+ if (IsURLBlocked(request_.url, setting)) { 6851 SendErrorAndCompleteImmediately(net::ERR_ACCESS_DENIED); 6852 LOG(INFO) << "File url access denied! url=" << request_.url.spec(); 6853 return; 6854 } 6855 6856- request_.load_flags = UpdateLoadFlags(request_.load_flags); 6857+ request_.load_flags = UpdateLoadFlags(request_.load_flags, setting); 6858 6859 const GURL original_url = request_.url; 6860 6861@@ -612,11 +614,7 @@ void InterceptedRequest::OnReceiveResponse( 6862 request->SetURL(CefString(request_.url.spec())); 6863 request->SetMethod(CefString(request_.method)); 6864 request->Set(request_.headers); 6865- content::GetUIThreadTaskRunner({})->PostTask( 6866- FROM_HERE, base::BindOnce(&InterceptedRequest::OnHttpErrorForUIThread, 6867- base::Unretained(this), id_, request, 6868- request_.is_main_frame, 6869- request_.has_user_gesture, error_reponse)); 6870+ OnHttpErrorForUIThread(id_, request, request_.is_main_frame, request_.has_user_gesture, error_reponse); 6871 } 6872 6873 if (current_request_uses_header_client_) { 6874diff --git a/src/cef/libcef/browser/net_service/proxy_url_loader_factory.h b/src/cef/libcef/browser/net_service/proxy_url_loader_factory.h 6875index 53011b62b2981..c94b8eba97720 6876--- a/src/cef/libcef/browser/net_service/proxy_url_loader_factory.h 6877+++ b/src/cef/libcef/browser/net_service/proxy_url_loader_factory.h 6878@@ -140,6 +140,9 @@ class InterceptedRequestHandler { 6879 bool is_main_frame, 6880 bool has_user_gesture, 6881 CefRefPtr<CefResponse> error_response) {} 6882+ 6883+ // To get setting of net helper. 6884+ virtual void GetSettingOfNetHelper(struct NetHelperSetting& setting) {} 6885 }; 6886 6887 // URL Loader Factory that supports request/response interception, processing 6888diff --git a/src/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc b/src/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc 6889index 15b602200100b..dd61f9586dfcc 6890--- a/src/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc 6891+++ b/src/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc 6892@@ -1200,6 +1200,27 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { 6893 error_response); 6894 } 6895 6896+ void GetSettingOfNetHelper(struct NetHelperSetting& setting) override { 6897+ CEF_REQUIRE_UIT(); 6898+ if (!init_state_) { 6899+ // set the default value 6900+ setting.file_access = false; 6901+ setting.block_network = false; 6902+ setting.cache_mode = 0; 6903+ return; 6904+ } 6905+ if (!init_state_->browser_) { 6906+ // set the default value 6907+ setting.file_access = false; 6908+ setting.block_network = false; 6909+ setting.cache_mode = 0; 6910+ return; 6911+ } 6912+ setting.file_access = init_state_->browser_->GetFileAccess(); 6913+ setting.block_network = init_state_->browser_->GetBlockNetwork(); 6914+ setting.cache_mode = init_state_->browser_->GetCacheMode(); 6915+ } 6916+ 6917 private: 6918 void CallHandlerOnComplete(RequestState* state, 6919 const network::URLLoaderCompletionStatus& status) { 6920diff --git a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc b/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc 6921index 69a0423ceb774..bdef16ae39192 6922--- a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc 6923+++ b/src/cef/libcef/browser/osr/browser_platform_delegate_osr.cc 6924@@ -18,6 +18,48 @@ 6925 #include "content/public/browser/render_view_host.h" 6926 #include "ui/events/base_event_utils.h" 6927 6928+namespace { 6929+void ConvertSelectPopupItem(const blink::mojom::MenuItemPtr& menu_ptr, 6930+ CefSelectPopupItem& menu_item) { 6931+ CefString label = CefString(menu_ptr->label.value_or("")); 6932+ CefString tool_tip = CefString(menu_ptr->tool_tip.value_or("")); 6933+ cef_string_set(label.c_str(), label.length(), &(menu_item.label), true); 6934+ cef_string_set(tool_tip.c_str(), tool_tip.length(), &(menu_item.tool_tip), 6935+ true); 6936+ menu_item.action = menu_ptr->action; 6937+ menu_item.enabled = menu_ptr->enabled; 6938+ menu_item.checked = menu_ptr->checked; 6939+ menu_item.type = static_cast<cef_select_popup_item_type_t>(menu_ptr->type); 6940+ menu_item.text_direction = 6941+ static_cast<cef_text_direction_t>(menu_ptr->text_direction); 6942+ menu_item.has_text_direction_override = menu_ptr->has_text_direction_override; 6943+} 6944+} // namespace 6945+ 6946+class CefSelectPopupCallbackImpl : public CefSelectPopupCallback { 6947+ public: 6948+ explicit CefSelectPopupCallbackImpl( 6949+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client) { 6950+ popup_client_.Bind(std::move(popup_client)); 6951+ } 6952+ 6953+ void Continue(const std::vector<int>& indices) override { 6954+ if (popup_client_) { 6955+ popup_client_->DidAcceptIndices(indices); 6956+ } 6957+ } 6958+ 6959+ void Cancel() override { 6960+ if (popup_client_) { 6961+ popup_client_->DidCancel(); 6962+ } 6963+ } 6964+ 6965+ private: 6966+ mojo::Remote<blink::mojom::PopupMenuClient> popup_client_; 6967+ IMPLEMENT_REFCOUNTING(CefSelectPopupCallbackImpl); 6968+}; 6969+ 6970 CefBrowserPlatformDelegateOsr::CefBrowserPlatformDelegateOsr( 6971 std::unique_ptr<CefBrowserPlatformDelegateNative> native_delegate, 6972 bool use_shared_texture, 6973@@ -495,6 +537,34 @@ void CefBrowserPlatformDelegateOsr::StartDragging( 6974 DragSourceSystemDragEnded(); 6975 } 6976 6977+void CefBrowserPlatformDelegateOsr::ShowPopupMenu( 6978+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 6979+ const gfx::Rect& bounds, 6980+ int item_height, 6981+ double item_font_size, 6982+ int selected_item, 6983+ std::vector<blink::mojom::MenuItemPtr> menu_items, 6984+ bool right_aligned, 6985+ bool allow_multiple_selection) { 6986+ CefRefPtr<CefDialogHandler> handler = 6987+ browser_->GetClient()->GetDialogHandler(); 6988+ if (handler.get()) { 6989+ std::vector<CefSelectPopupItem> item_list; 6990+ for (int i = 0; i < menu_items.size(); i++) { 6991+ CefSelectPopupItem menu_item; 6992+ ConvertSelectPopupItem(menu_items[i], menu_item); 6993+ item_list.push_back(menu_item); 6994+ } 6995+ CefRefPtr<CefSelectPopupCallback> callback = 6996+ new CefSelectPopupCallbackImpl(std::move(popup_client)); 6997+ handler->OnSelectPopupMenu( 6998+ browser_, 6999+ CefRect(bounds.x(), bounds.y(), bounds.width(), bounds.height()), 7000+ item_height, item_font_size, selected_item, item_list, right_aligned, 7001+ allow_multiple_selection, callback); 7002+ } 7003+} 7004+ 7005 void CefBrowserPlatformDelegateOsr::UpdateDragCursor( 7006 ui::mojom::DragOperation operation) { 7007 CefRefPtr<CefRenderHandler> handler = 7008@@ -609,4 +679,4 @@ CefRenderWidgetHostViewOSR* CefBrowserPlatformDelegateOsr::GetOSRHostView() 7009 } 7010 7011 return nullptr; 7012-} 7013+} 7014\ No newline at end of file 7015diff --git a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.h b/src/cef/libcef/browser/osr/browser_platform_delegate_osr.h 7016index 5efb3ee968db5..7074ae9d77398 7017--- a/src/cef/libcef/browser/osr/browser_platform_delegate_osr.h 7018+++ b/src/cef/libcef/browser/osr/browser_platform_delegate_osr.h 7019@@ -89,6 +89,15 @@ class CefBrowserPlatformDelegateOsr 7020 void AccessibilityLocationChangesReceived( 7021 const std::vector<content::AXLocationChangeNotificationDetails>& locData) 7022 override; 7023+ void ShowPopupMenu( 7024+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 7025+ const gfx::Rect& bounds, 7026+ int item_height, 7027+ double item_font_size, 7028+ int selected_item, 7029+ std::vector<blink::mojom::MenuItemPtr> menu_items, 7030+ bool right_aligned, 7031+ bool allow_multiple_selection) override; 7032 7033 // CefBrowserPlatformDelegateNative::WindowlessHandler methods: 7034 CefWindowHandle GetParentWindowHandle() const override; 7035diff --git a/src/cef/libcef/browser/osr/render_widget_host_view_osr.cc b/src/cef/libcef/browser/osr/render_widget_host_view_osr.cc 7036index 86b0da5a7d138..b5e9a81f243c4 7037--- a/src/cef/libcef/browser/osr/render_widget_host_view_osr.cc 7038+++ b/src/cef/libcef/browser/osr/render_widget_host_view_osr.cc 7039@@ -1173,10 +1173,9 @@ void CefRenderWidgetHostViewOSR::OnScaleChanged(float old_page_scale_factor, 7040 CefRefPtr<CefDisplayHandler> handler = 7041 browser_impl_->client()->GetDisplayHandler(); 7042 CHECK(handler); 7043- float ratio = browser_impl_->GetVirtualPixelRatio(); 7044 handler->OnScaleChanged(browser_impl_.get(), 7045- std::round(old_page_scale_factor * (100 / ratio)), 7046- std::round(nwe_page_scale_factor * (100 / ratio))); 7047+ std::round(old_page_scale_factor * 100), 7048+ std::round(nwe_page_scale_factor * 100)); 7049 } 7050 } 7051 7052@@ -1599,6 +1598,9 @@ void CefRenderWidgetHostViewOSR::SetFocus(bool focus) { 7053 if (focus) { 7054 widget->GotFocus(); 7055 widget->SetActive(true); 7056+ if (selection_controller_client_) { 7057+ selection_controller_client_->SetTemporarilyHidden(false); 7058+ } 7059 } else { 7060 #if !BUILDFLAG(IS_OHOS) 7061 if (browser_impl_.get()) 7062@@ -1619,7 +1621,7 @@ void CefRenderWidgetHostViewOSR::OnUpdateTextInputStateCalled( 7063 bool did_update_state) { 7064 const auto state = text_input_manager->GetTextInputState(); 7065 if (state && !state->show_ime_if_needed) { 7066- LOG(INFO) << "OnUpdateTextInputStateCalled no need to show ime"; 7067+ return; 7068 } 7069 7070 CefRenderHandler::TextInputMode mode = CEF_TEXT_INPUT_MODE_NONE; 7071@@ -1641,6 +1643,21 @@ void CefRenderWidgetHostViewOSR::OnUpdateTextInputStateCalled( 7072 show_keyboard); 7073 } 7074 7075+void CefRenderWidgetHostViewOSR::FocusedNodeChanged(bool is_editable_node, 7076+ const gfx::Rect& node_bounds_in_screen) 7077+{ 7078+ CefRefPtr<CefRenderHandler> handler = 7079+ browser_impl_->GetClient()->GetRenderHandler(); 7080+ CHECK(handler); 7081+ if (is_editable_node) { 7082+ handler->OnVirtualKeyboardRequested(browser_impl_->GetBrowser(), 7083+ CEF_TEXT_INPUT_MODE_DEFAULT, false); 7084+ } else { 7085+ handler->OnVirtualKeyboardRequested(browser_impl_->GetBrowser(), 7086+ CEF_TEXT_INPUT_MODE_NONE, false); 7087+ } 7088+} 7089+ 7090 void CefRenderWidgetHostViewOSR::ProcessAckedTouchEvent( 7091 const content::TouchEventWithLatencyInfo& touch, 7092 blink::mojom::InputEventResultState ack_result) { 7093@@ -1967,8 +1984,13 @@ void CefRenderWidgetHostViewOSR::OnScrollOffsetChanged() { 7094 CefRefPtr<CefRenderHandler> handler = 7095 browser_impl_->client()->GetRenderHandler(); 7096 CHECK(handler); 7097+ #if BUILDFLAG(IS_OHOS) 7098+ handler->OnScrollOffsetChanged(browser_impl_.get(), std::round(last_scroll_offset_.x()), 7099+ std::round(last_scroll_offset_.y())); 7100+ #else 7101 handler->OnScrollOffsetChanged(browser_impl_.get(), last_scroll_offset_.x(), 7102 last_scroll_offset_.y()); 7103+ #endif 7104 } 7105 is_scroll_offset_changed_pending_ = false; 7106 } 7107diff --git a/src/cef/libcef/browser/osr/render_widget_host_view_osr.h b/src/cef/libcef/browser/osr/render_widget_host_view_osr.h 7108index bf5e49c14b13d..96cc2faf567a7 7109--- a/src/cef/libcef/browser/osr/render_widget_host_view_osr.h 7110+++ b/src/cef/libcef/browser/osr/render_widget_host_view_osr.h 7111@@ -225,6 +225,9 @@ class CefRenderWidgetHostViewOSR 7112 RenderWidgetHostViewBase* updated_view, 7113 bool did_update_state) override; 7114 7115+ void FocusedNodeChanged(bool is_editable_node, 7116+ const gfx::Rect& node_bounds_in_screen) override; 7117+ 7118 // ui::GestureProviderClient implementation. 7119 void ProcessAckedTouchEvent( 7120 const content::TouchEventWithLatencyInfo& touch, 7121diff --git a/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.cc b/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.cc 7122index a4566a8dbba89..f2751a7a4c027 7123--- a/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.cc 7124+++ b/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.cc 7125@@ -21,6 +21,7 @@ 7126 #include "ui/base/pointer/touch_editing_controller.h" 7127 #include "ui/gfx/geometry/point_conversions.h" 7128 #include "ui/gfx/geometry/size_conversions.h" 7129+#include "base/logging.h" 7130 7131 namespace { 7132 7133@@ -125,7 +126,22 @@ CefTouchSelectionControllerClientOSR::~CefTouchSelectionControllerClientOSR() { 7134 7135 void CefTouchSelectionControllerClientOSR::CloseQuickMenuAndHideHandles() { 7136 CloseQuickMenu(); 7137- rwhv_->selection_controller()->HideAndDisallowShowingAutomatically(); 7138+ auto controller = rwhv_->selection_controller(); 7139+ if (controller) { 7140+ if (!controller->GetInsertHandle() || !controller->GetInsertHandle()->GetEnabled()) { 7141+ rwhv_->selection_controller()->HideAndDisallowShowingAutomatically(); 7142+ } else if (controller->GetInsertHandle()->GetEnabled()) { 7143+ rwhv_->selection_controller()->SetTemporarilyHidden(true); 7144+ NotifyTouchSelectionChanged(true); 7145+ } 7146+ } 7147+} 7148+ 7149+void CefTouchSelectionControllerClientOSR::SetTemporarilyHidden(bool hidden) { 7150+ if (rwhv_ && rwhv_->selection_controller()) { 7151+ rwhv_->selection_controller()->SetTemporarilyHidden(hidden); 7152+ NotifyTouchSelectionChanged(false); 7153+ } 7154 } 7155 7156 void CefTouchSelectionControllerClientOSR::OnWindowMoved() { 7157@@ -290,7 +306,6 @@ void CefTouchSelectionControllerClientOSR::ShowQuickMenu() { 7158 new CefRunQuickMenuCallbackImpl(base::BindOnce( 7159 &CefTouchSelectionControllerClientOSR::ExecuteCommand, 7160 weak_ptr_factory_.GetWeakPtr()))); 7161- 7162 quick_menu_running_ = true; 7163 if (!handler->RunQuickMenu( 7164 browser, browser->GetFocusedFrame(), 7165@@ -307,6 +322,7 @@ void CefTouchSelectionControllerClientOSR::ShowQuickMenu() { 7166 if (browser->web_contents()) { 7167 browser->web_contents()->SetShowingContextMenu(true); 7168 } 7169+ browser->SetTouchInsertHandleMenuShow(false); 7170 } 7171 } 7172 } 7173@@ -404,6 +420,7 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent( 7174 ui::SelectionEventType event) { 7175 // This function (implicitly) uses active_menu_client_, so we don't go to the 7176 // active view for this. 7177+ auto browser = rwhv_->browser_impl(); 7178 switch (event) { 7179 case ui::SELECTION_HANDLES_SHOWN: 7180 quick_menu_requested_ = true; 7181@@ -416,7 +433,9 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent( 7182 rwhv_->browser_impl()->GetTouchInsertHandleMenuShow(); 7183 } 7184 NotifyTouchSelectionChanged(true); 7185- UpdateQuickMenu(); 7186+ if (quick_menu_requested_) { 7187+ ShowQuickMenu(); 7188+ } 7189 break; 7190 case ui::SELECTION_HANDLES_CLEARED: 7191 case ui::INSERTION_HANDLE_CLEARED: 7192@@ -433,11 +452,10 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent( 7193 handle_drag_in_progress_ = false; 7194 break; 7195 case ui::SELECTION_HANDLES_MOVED: 7196+ case ui::INSERTION_HANDLE_MOVED: 7197 if (!handle_drag_in_progress_) { 7198 UpdateQuickMenu(); 7199 } 7200- [[fallthrough]]; 7201- case ui::INSERTION_HANDLE_MOVED: 7202 NotifyTouchSelectionChanged(true); 7203 break; 7204 case ui::INSERTION_HANDLE_TAPPED: 7205@@ -450,9 +468,6 @@ void CefTouchSelectionControllerClientOSR::OnSelectionEvent( 7206 } 7207 break; 7208 } 7209- if (rwhv_ && rwhv_->browser_impl()) { 7210- rwhv_->browser_impl()->SetTouchInsertHandleMenuShow(false); 7211- } 7212 } 7213 7214 void CefTouchSelectionControllerClientOSR::InternalClient::OnSelectionEvent( 7215@@ -616,4 +631,4 @@ bool CefTouchSelectionControllerClientOSR:: 7216 return true; 7217 } 7218 return false; 7219-} 7220+} 7221\ No newline at end of file 7222diff --git a/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.h b/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.h 7223index 9794cf9fc8ea0..b7de80ae61a1b 7224--- a/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.h 7225+++ b/src/cef/libcef/browser/osr/touch_selection_controller_client_osr.h 7226@@ -41,6 +41,7 @@ class CefTouchSelectionControllerClientOSR 7227 ~CefTouchSelectionControllerClientOSR() override; 7228 7229 void CloseQuickMenuAndHideHandles(); 7230+ void SetTemporarilyHidden(bool hidden); 7231 7232 void OnWindowMoved(); 7233 7234diff --git a/src/cef/libcef/browser/osr/web_contents_view_osr.cc b/src/cef/libcef/browser/osr/web_contents_view_osr.cc 7235index e81a41ae714c1..3469cfdf25aa8 7236--- a/src/cef/libcef/browser/osr/web_contents_view_osr.cc 7237+++ b/src/cef/libcef/browser/osr/web_contents_view_osr.cc 7238@@ -148,6 +148,8 @@ bool CefWebContentsViewOSR::CloseTabAfterEventTrackingIfNeeded() { 7239 } 7240 #endif // BUILDFLAG(IS_MAC) 7241 7242+void CefWebContentsViewOSR::FullscreenStateChanged(bool is_fullscreen) {} 7243+ 7244 void CefWebContentsViewOSR::StartDragging( 7245 const content::DropData& drop_data, 7246 blink::DragOperationsMask allowed_ops, 7247@@ -172,6 +174,27 @@ void CefWebContentsViewOSR::UpdateDragCursor( 7248 browser->UpdateDragCursor(operation); 7249 } 7250 7251+#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 7252+void CefWebContentsViewOSR::ShowPopupMenu( 7253+ content::RenderFrameHost* render_frame_host, 7254+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 7255+ const gfx::Rect& bounds, 7256+ int item_height, 7257+ double item_font_size, 7258+ int selected_item, 7259+ std::vector<blink::mojom::MenuItemPtr> menu_items, 7260+ bool right_aligned, 7261+ bool allow_multiple_selection) { 7262+ CefRefPtr<AlloyBrowserHostImpl> browser = GetBrowser(); 7263+ if (browser.get()) { 7264+ browser->ShowPopupMenu(std::move(popup_client), bounds, 7265+ item_height, item_font_size, selected_item, 7266+ std::move(menu_items), right_aligned, 7267+ allow_multiple_selection); 7268+ } 7269+} 7270+#endif 7271+ 7272 CefRenderWidgetHostViewOSR* CefWebContentsViewOSR::GetView() const { 7273 if (web_contents_) { 7274 return static_cast<CefRenderWidgetHostViewOSR*>( 7275diff --git a/src/cef/libcef/browser/osr/web_contents_view_osr.h b/src/cef/libcef/browser/osr/web_contents_view_osr.h 7276index 81b5689dcb6f7..e5dd7ae1c817b 7277--- a/src/cef/libcef/browser/osr/web_contents_view_osr.h 7278+++ b/src/cef/libcef/browser/osr/web_contents_view_osr.h 7279@@ -65,6 +65,8 @@ class CefWebContentsViewOSR : public content::WebContentsView, 7280 bool CloseTabAfterEventTrackingIfNeeded() override; 7281 #endif 7282 7283+ void FullscreenStateChanged(bool is_fullscreen) override; 7284+ 7285 // RenderViewHostDelegateView methods. 7286 void StartDragging(const content::DropData& drop_data, 7287 blink::DragOperationsMask allowed_ops, 7288@@ -78,6 +80,18 @@ class CefWebContentsViewOSR : public content::WebContentsView, 7289 virtual void LostFocus( 7290 content::RenderWidgetHostImpl* render_widget_host) override; 7291 virtual void TakeFocus(bool reverse) override; 7292+#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 7293+ void ShowPopupMenu( 7294+ content::RenderFrameHost* render_frame_host, 7295+ mojo::PendingRemote<blink::mojom::PopupMenuClient> popup_client, 7296+ const gfx::Rect& bounds, 7297+ int item_height, 7298+ double item_font_size, 7299+ int selected_item, 7300+ std::vector<blink::mojom::MenuItemPtr> menu_items, 7301+ bool right_aligned, 7302+ bool allow_multiple_selection) override; 7303+#endif 7304 7305 private: 7306 CefRenderWidgetHostViewOSR* GetView() const; 7307diff --git a/src/cef/libcef/browser/permission/alloy_access_request.cc b/src/cef/libcef/browser/permission/alloy_access_request.cc 7308index c15d3bd73dae4..416b37379cde8 7309--- a/src/cef/libcef/browser/permission/alloy_access_request.cc 7310+++ b/src/cef/libcef/browser/permission/alloy_access_request.cc 7311@@ -10,7 +10,9 @@ AlloyAccessRequest::AlloyAccessRequest(const CefString& origin, 7312 : origin_(origin), resources_(resources), callback_(std::move(callback)) {} 7313 7314 AlloyAccessRequest::~AlloyAccessRequest() { 7315- std::move(callback_).Run(false); 7316+ if (!callback_.is_null()) { 7317+ std::move(callback_).Run(false); 7318+ } 7319 } 7320 7321 CefString AlloyAccessRequest::Origin() { 7322@@ -22,5 +24,7 @@ int AlloyAccessRequest::ResourceAcessId() { 7323 } 7324 7325 void AlloyAccessRequest::ReportRequestResult(bool allowed) { 7326- std::move(callback_).Run(allowed); 7327+ if (!callback_.is_null()) { 7328+ std::move(callback_).Run(allowed); 7329+ } 7330 } 7331\ No newline at end of file 7332diff --git a/src/cef/libcef/browser/prefs/browser_prefs.cc b/src/cef/libcef/browser/prefs/browser_prefs.cc 7333index e34ca3e4edd42..0a964b7fe42c1 7334--- a/src/cef/libcef/browser/prefs/browser_prefs.cc 7335+++ b/src/cef/libcef/browser/prefs/browser_prefs.cc 7336@@ -22,10 +22,8 @@ 7337 #include "chrome/browser/accessibility/accessibility_ui.h" 7338 #include "chrome/browser/download/download_prefs.h" 7339 #include "chrome/browser/media/media_device_id_salt.h" 7340-#include "chrome/browser/media/router/media_router_feature.h" 7341 #include "chrome/browser/net/profile_network_context_service.h" 7342 #include "chrome/browser/net/system_network_context_manager.h" 7343-#include "chrome/browser/plugins/plugin_info_host_impl.h" 7344 #include "chrome/browser/prefetch/prefetch_prefs.h" 7345 #include "chrome/browser/prefs/chrome_command_line_pref_store.h" 7346 #include "chrome/browser/printing/print_preview_sticky_settings.h" 7347@@ -75,6 +73,14 @@ 7348 #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" 7349 #endif 7350 7351+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7352+#include "chrome/browser/plugins/plugin_info_host_impl.h" 7353+#endif 7354+ 7355+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7356+#include "chrome/browser/media/router/media_router_feature.h" 7357+#endif 7358+ 7359 namespace browser_prefs { 7360 7361 namespace { 7362@@ -223,8 +229,12 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile, 7363 CefMediaCaptureDevicesDispatcher::RegisterPrefs(registry.get()); 7364 certificate_transparency::prefs::RegisterPrefs(registry.get()); 7365 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry.get()); 7366+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7367 media_router::RegisterLocalStatePrefs(registry.get()); 7368+#endif 7369+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7370 PluginInfoHostImpl::RegisterUserPrefs(registry.get()); 7371+#endif 7372 PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); 7373 ProfileNetworkContextService::RegisterLocalStatePrefs(registry.get()); 7374 SSLConfigServiceManager::RegisterPrefs(registry.get()); 7375@@ -266,7 +276,9 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile, 7376 extensions::ExtensionPrefs::RegisterProfilePrefs(registry.get()); 7377 HostContentSettingsMap::RegisterProfilePrefs(registry.get()); 7378 language::LanguagePrefs::RegisterProfilePrefs(registry.get()); 7379+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7380 media_router::RegisterProfilePrefs(registry.get()); 7381+#endif 7382 MediaDeviceIDSalt::RegisterProfilePrefs(registry.get()); 7383 prefetch::RegisterPredictionOptionsProfilePrefs(registry.get()); 7384 ProfileNetworkContextService::RegisterProfilePrefs(registry.get()); 7385@@ -291,8 +303,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile, 7386 prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string()); 7387 registry->RegisterBooleanPref(prefs::kCloudPrintSubmitEnabled, false); 7388 registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true); 7389+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 7390 printing::PolicySettings::RegisterProfilePrefs(registry.get()); 7391 printing::PrintPreviewStickySettings::RegisterProfilePrefs(registry.get()); 7392+#endif 7393 DownloadPrefs::RegisterProfilePrefs(registry.get()); 7394 7395 // Cache preferences. 7396diff --git a/src/cef/libcef/browser/prefs/renderer_prefs.cc b/src/cef/libcef/browser/prefs/renderer_prefs.cc 7397index 4fd9397b037f3..fdd2157dcdb89 7398--- a/src/cef/libcef/browser/prefs/renderer_prefs.cc 7399+++ b/src/cef/libcef/browser/prefs/renderer_prefs.cc 7400@@ -184,6 +184,7 @@ void SetBool(CommandLinePrefStore* prefs, const std::string& key, bool value) { 7401 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 7402 } 7403 7404+#if !BUILDFLAG(IS_OHOS) 7405 blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme( 7406 ui::NativeTheme::PreferredColorScheme native_theme_scheme) { 7407 switch (native_theme_scheme) { 7408@@ -195,6 +196,7 @@ blink::mojom::PreferredColorScheme ToBlinkPreferredColorScheme( 7409 7410 NOTREACHED(); 7411 } 7412+#endif 7413 7414 // From chrome/browser/chrome_content_browser_client.cc 7415 // Returns true if preferred color scheme is modified based on at least one of 7416@@ -207,8 +209,10 @@ bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs, 7417 auto old_preferred_color_scheme = web_prefs->preferred_color_scheme; 7418 7419 // Update based on native theme scheme. 7420+#if !BUILDFLAG(IS_OHOS) 7421 web_prefs->preferred_color_scheme = 7422 ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme()); 7423+#endif 7424 7425 // Force a light preferred color scheme on certain URLs if kWebUIDarkMode is 7426 // disabled; some of the UI is not yet correctly themed. 7427@@ -359,6 +363,11 @@ void SetCefPrefs(const CefBrowserSettings& cef, 7428 7429 /* ohos webview begin*/ 7430 SET_STATE(cef.force_dark_mode_enabled, web.force_dark_mode_enabled); 7431+ if (cef.dark_prefer_color_scheme_enabled == STATE_ENABLED) { 7432+ web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kDark; 7433+ } else { 7434+ web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kLight; 7435+ } 7436 SET_STATE(cef.loads_images_automatically, web.loads_images_automatically); 7437 SET_STATE(cef.allow_running_insecure_content, 7438 web.allow_running_insecure_content); 7439@@ -367,6 +376,10 @@ void SetCefPrefs(const CefBrowserSettings& cef, 7440 SET_STATE(cef.allow_mixed_content_upgrades, web.allow_mixed_content_upgrades); 7441 SET_STATE(cef.initialize_at_minimum_page_scale, 7442 web.initialize_at_minimum_page_scale); 7443+#if BUILDFLAG(IS_OHOS) 7444+ SET_STATE(cef.hide_vertical_scrollbars, web.hide_vertical_scrollbars); 7445+ SET_STATE(cef.hide_horizontal_scrollbars, web.hide_horizontal_scrollbars); 7446+#endif 7447 web.viewport_meta_enabled = cef.viewport_meta_enabled; 7448 web.autoplay_policy = 7449 cef.user_gesture_required 7450@@ -421,6 +434,7 @@ void PopulateWebPreferences(content::RenderViewHost* rvh, 7451 } 7452 7453 auto* native_theme = ui::NativeTheme::GetInstanceForWeb(); 7454+#if !BUILDFLAG(IS_OHOS) 7455 switch (native_theme->GetPreferredColorScheme()) { 7456 case ui::NativeTheme::PreferredColorScheme::kDark: 7457 web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kDark; 7458@@ -429,6 +443,7 @@ void PopulateWebPreferences(content::RenderViewHost* rvh, 7459 web.preferred_color_scheme = blink::mojom::PreferredColorScheme::kLight; 7460 break; 7461 } 7462+#endif 7463 7464 switch (native_theme->GetPreferredContrast()) { 7465 case ui::NativeTheme::PreferredContrast::kNoPreference: 7466diff --git a/src/cef/libcef/browser/request_context_impl.cc b/src/cef/libcef/browser/request_context_impl.cc 7467index bb4de98dbaca4..77543ac833990 7468--- a/src/cef/libcef/browser/request_context_impl.cc 7469+++ b/src/cef/libcef/browser/request_context_impl.cc 7470@@ -579,12 +579,14 @@ CefRefPtr<CefExtension> CefRequestContextImpl::GetExtension( 7471 return browser_context()->GetExtension(extension_id); 7472 } 7473 7474+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7475 CefRefPtr<CefMediaRouter> CefRequestContextImpl::GetMediaRouter( 7476 CefRefPtr<CefCompletionCallback> callback) { 7477 CefRefPtr<CefMediaRouterImpl> media_router = new CefMediaRouterImpl(); 7478 InitializeMediaRouterInternal(media_router, callback); 7479 return media_router.get(); 7480 } 7481+#endif 7482 7483 void CefRequestContextImpl::OnRenderFrameCreated( 7484 const content::GlobalRenderFrameHostId& global_id, 7485@@ -805,6 +807,7 @@ void CefRequestContextImpl::InitializeWebStorageInternal( 7486 web_storage, callback)); 7487 } 7488 7489+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7490 void CefRequestContextImpl::InitializeMediaRouterInternal( 7491 CefRefPtr<CefMediaRouterImpl> media_router, 7492 CefRefPtr<CefCompletionCallback> callback) { 7493@@ -818,6 +821,7 @@ void CefRequestContextImpl::InitializeMediaRouterInternal( 7494 }, 7495 media_router, callback)); 7496 } 7497+#endif 7498 7499 CefBrowserContext* CefRequestContextImpl::browser_context() const { 7500 return browser_context_; 7501diff --git a/src/cef/libcef/browser/request_context_impl.h b/src/cef/libcef/browser/request_context_impl.h 7502index e495dd1f3a619..6b145ef17e4df 7503--- a/src/cef/libcef/browser/request_context_impl.h 7504+++ b/src/cef/libcef/browser/request_context_impl.h 7505@@ -8,12 +8,15 @@ 7506 7507 #include "include/cef_request_context.h" 7508 #include "libcef/browser/browser_context.h" 7509-#include "libcef/browser/media_router/media_router_impl.h" 7510 #include "libcef/browser/net_database/cef_data_base_impl.h" 7511 #include "libcef/browser/net_service/cookie_manager_impl.h" 7512 #include "libcef/browser/storage/web_storage_impl.h" 7513 #include "libcef/browser/thread_util.h" 7514 7515+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7516+#include "libcef/browser/media_router/media_router_impl.h" 7517+#endif 7518+ 7519 namespace content { 7520 struct GlobalRenderFrameHostId; 7521 } 7522@@ -100,8 +103,10 @@ class CefRequestContextImpl : public CefRequestContext { 7523 bool HasExtension(const CefString& extension_id) override; 7524 bool GetExtensions(std::vector<CefString>& extension_ids) override; 7525 CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) override; 7526+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7527 CefRefPtr<CefMediaRouter> GetMediaRouter( 7528 CefRefPtr<CefCompletionCallback> callback) override; 7529+#endif 7530 7531 const CefRequestContextSettings& settings() const { return config_.settings; } 7532 7533@@ -174,8 +179,10 @@ class CefRequestContextImpl : public CefRequestContext { 7534 CefRefPtr<CefCompletionCallback> callback); 7535 void InitializeWebStorageInternal(CefRefPtr<CefWebStorageImpl> web_storage, 7536 CefRefPtr<CefCompletionCallback> callback); 7537+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 7538 void InitializeMediaRouterInternal(CefRefPtr<CefMediaRouterImpl> media_router, 7539 CefRefPtr<CefCompletionCallback> callback); 7540+#endif 7541 7542 CefBrowserContext* browser_context() const; 7543 7544diff --git a/src/cef/libcef/browser/storage/web_storage_impl.cc b/src/cef/libcef/browser/storage/web_storage_impl.cc 7545index 7d246b423648e..1bc79467760e9 7546--- a/src/cef/libcef/browser/storage/web_storage_impl.cc 7547+++ b/src/cef/libcef/browser/storage/web_storage_impl.cc 7548@@ -71,6 +71,7 @@ void GetStorageKeysTask::OnStorageKeysObtained( 7549 blink::mojom::StorageType type, 7550 const std::set<blink::StorageKey>& storage_keys) { 7551 DCHECK(CEF_CURRENTLY_ON_IOT()); 7552+ LOG(INFO) << "OnStorageKeysObtained storage_keys size: " << storage_keys.size(); 7553 num_callbacks_to_wait_ = storage_keys.size(); 7554 num_callbacks_received_ = 0u; 7555 for (const blink::StorageKey& storage_key : storage_keys) { 7556diff --git a/src/cef/libcef/browser/views/browser_view_impl.cc b/src/cef/libcef/browser/views/browser_view_impl.cc 7557index 139dff2ad6053..045e9d17fb75e 7558--- a/src/cef/libcef/browser/views/browser_view_impl.cc 7559+++ b/src/cef/libcef/browser/views/browser_view_impl.cc 7560@@ -6,7 +6,6 @@ 7561 7562 #include "libcef/browser/browser_host_base.h" 7563 #include "libcef/browser/browser_util.h" 7564-#include "libcef/browser/chrome/views/chrome_browser_view.h" 7565 #include "libcef/browser/context.h" 7566 #include "libcef/browser/request_context_impl.h" 7567 #include "libcef/browser/thread_util.h" 7568@@ -15,6 +14,10 @@ 7569 #include "content/public/browser/native_web_keyboard_event.h" 7570 #include "ui/content_accelerators/accelerator_util.h" 7571 7572+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7573+#include "libcef/browser/chrome/views/chrome_browser_view.h" 7574+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7575+ 7576 // static 7577 CefRefPtr<CefBrowserView> CefBrowserView::CreateBrowserView( 7578 CefRefPtr<CefClient> client, 7579@@ -138,9 +141,11 @@ CefRefPtr<CefBrowser> CefBrowserViewImpl::GetBrowser() { 7580 7581 CefRefPtr<CefView> CefBrowserViewImpl::GetChromeToolbar() { 7582 CEF_REQUIRE_VALID_RETURN(nullptr); 7583+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7584 if (cef::IsChromeRuntimeEnabled()) { 7585 return static_cast<ChromeBrowserView*>(root_view())->cef_toolbar(); 7586 } 7587+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7588 7589 return nullptr; 7590 } 7591@@ -232,25 +237,33 @@ void CefBrowserViewImpl::SetDefaults(const CefBrowserSettings& settings) { 7592 } 7593 7594 views::View* CefBrowserViewImpl::CreateRootView() { 7595+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7596 if (cef::IsChromeRuntimeEnabled()) { 7597 return new ChromeBrowserView(delegate(), this); 7598 } 7599+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7600 7601 return new CefBrowserViewView(delegate(), this); 7602 } 7603 7604 void CefBrowserViewImpl::InitializeRootView() { 7605+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7606 if (cef::IsChromeRuntimeEnabled()) { 7607 static_cast<ChromeBrowserView*>(root_view())->Initialize(); 7608 } else { 7609 static_cast<CefBrowserViewView*>(root_view())->Initialize(); 7610 } 7611+#else 7612+ static_cast<CefBrowserViewView*>(root_view())->Initialize(); 7613+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7614 } 7615 7616 views::WebView* CefBrowserViewImpl::web_view() const { 7617+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7618 if (cef::IsChromeRuntimeEnabled()) { 7619 return static_cast<ChromeBrowserView*>(root_view())->contents_web_view(); 7620 } 7621+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7622 7623 return static_cast<CefBrowserViewView*>(root_view()); 7624 } 7625diff --git a/src/cef/libcef/browser/views/window_view.cc b/src/cef/libcef/browser/views/window_view.cc 7626index f1784a5a8735f..ab43771ebc8e3 7627--- a/src/cef/libcef/browser/views/window_view.cc 7628+++ b/src/cef/libcef/browser/views/window_view.cc 7629@@ -4,7 +4,6 @@ 7630 7631 #include "libcef/browser/views/window_view.h" 7632 7633-#include "libcef/browser/chrome/views/chrome_browser_frame.h" 7634 #include "libcef/browser/image_impl.h" 7635 #include "libcef/browser/views/window_impl.h" 7636 #include "libcef/features/runtime.h" 7637@@ -29,6 +28,10 @@ 7638 #include "ui/aura/window.h" 7639 #endif 7640 7641+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7642+#include "libcef/browser/chrome/views/chrome_browser_frame.h" 7643+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7644+ 7645 namespace { 7646 7647 // Specialize ClientView to handle Widget-related events. 7648@@ -259,8 +262,12 @@ void CefWindowView::CreateWidget() { 7649 7650 // |widget| is owned by the NativeWidget and will be destroyed in response to 7651 // a native destruction message. 7652+#if defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7653 views::Widget* widget = cef::IsChromeRuntimeEnabled() ? new ChromeBrowserFrame 7654 : new views::Widget; 7655+#else 7656+ views::Widget* widget = new views::Widget; 7657+#endif // defined(OHOS_ENABLE_CEF_CHROME_RUNTIME) 7658 7659 views::Widget::InitParams params; 7660 params.delegate = this; 7661diff --git a/src/cef/libcef/common/alloy/alloy_content_client.cc b/src/cef/libcef/common/alloy/alloy_content_client.cc 7662index fe1f5fa84f268..a6f52055f18db 7663--- a/src/cef/libcef/common/alloy/alloy_content_client.cc 7664+++ b/src/cef/libcef/common/alloy/alloy_content_client.cc 7665@@ -32,7 +32,6 @@ 7666 #include "content/public/common/cdm_info.h" 7667 #include "content/public/common/content_constants.h" 7668 #include "content/public/common/content_switches.h" 7669-#include "content/public/common/pepper_plugin_info.h" 7670 #include "ppapi/shared_impl/ppapi_permissions.h" 7671 #include "third_party/widevine/cdm/buildflags.h" 7672 #include "ui/base/l10n/l10n_util.h" 7673@@ -42,8 +41,13 @@ 7674 #include "chrome/common/media/cdm_host_file_path.h" 7675 #endif 7676 7677+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7678+#include "content/public/common/pepper_plugin_info.h" 7679+#endif 7680+ 7681 namespace { 7682 7683+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7684 // The following plugin-related methods are from 7685 // chrome/common/chrome_content_client.cc 7686 7687@@ -80,16 +84,19 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { 7688 plugins->push_back(pdf_info); 7689 } 7690 } 7691+#endif 7692 7693 } // namespace 7694 7695 AlloyContentClient::AlloyContentClient() = default; 7696 AlloyContentClient::~AlloyContentClient() = default; 7697 7698+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7699 void AlloyContentClient::AddPepperPlugins( 7700 std::vector<content::PepperPluginInfo>* plugins) { 7701 ComputeBuiltInPlugins(plugins); 7702 } 7703+#endif 7704 7705 void AlloyContentClient::AddContentDecryptionModules( 7706 std::vector<content::CdmInfo>* cdms, 7707@@ -158,6 +165,7 @@ gfx::Image& AlloyContentClient::GetNativeImageNamed(int resource_id) { 7708 return value; 7709 } 7710 7711+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7712 // static 7713 void AlloyContentClient::SetPDFEntryFunctions( 7714 content::PepperPluginInfo::GetInterfaceFunc get_interface, 7715@@ -167,3 +175,4 @@ void AlloyContentClient::SetPDFEntryFunctions( 7716 g_pdf_initialize_module = initialize_module; 7717 g_pdf_shutdown_module = shutdown_module; 7718 } 7719+#endif 7720diff --git a/src/cef/libcef/common/alloy/alloy_content_client.h b/src/cef/libcef/common/alloy/alloy_content_client.h 7721index 160bfe855c2b0..03200dbe45b6c 7722--- a/src/cef/libcef/common/alloy/alloy_content_client.h 7723+++ b/src/cef/libcef/common/alloy/alloy_content_client.h 7724@@ -9,7 +9,13 @@ 7725 7726 #include "base/compiler_specific.h" 7727 #include "content/public/common/content_client.h" 7728+ 7729+#if BUILDFLAG(IS_OHOS) 7730+#include "ppapi/buildflags/buildflags.h" 7731+#if BUILDFLAG(ENABLE_PLUGINS) 7732 #include "content/public/common/pepper_plugin_info.h" 7733+#endif 7734+#endif 7735 7736 class AlloyContentClient : public content::ContentClient { 7737 public: 7738@@ -17,8 +23,10 @@ class AlloyContentClient : public content::ContentClient { 7739 ~AlloyContentClient() override; 7740 7741 // content::ContentClient overrides. 7742+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7743 void AddPepperPlugins( 7744 std::vector<content::PepperPluginInfo>* plugins) override; 7745+#endif 7746 void AddContentDecryptionModules( 7747 std::vector<content::CdmInfo>* cdms, 7748 std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override; 7749@@ -32,10 +40,12 @@ class AlloyContentClient : public content::ContentClient { 7750 base::RefCountedMemory* GetDataResourceBytes(int resource_id) override; 7751 gfx::Image& GetNativeImageNamed(int resource_id) override; 7752 7753+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7754 static void SetPDFEntryFunctions( 7755 content::PepperPluginInfo::GetInterfaceFunc get_interface, 7756 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, 7757 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); 7758+#endif 7759 }; 7760 7761 #endif // CEF_LIBCEF_COMMON_ALLOY_ALLOY_CONTENT_CLIENT_H_ 7762diff --git a/src/cef/libcef/common/alloy/alloy_main_delegate.cc b/src/cef/libcef/common/alloy/alloy_main_delegate.cc 7763index 5022baa38ce1b..af0eeffcf2a28 7764--- a/src/cef/libcef/common/alloy/alloy_main_delegate.cc 7765+++ b/src/cef/libcef/common/alloy/alloy_main_delegate.cc 7766@@ -25,7 +25,6 @@ 7767 #include "base/strings/string_util.h" 7768 #include "base/synchronization/waitable_event.h" 7769 #include "chrome/browser/browser_process.h" 7770-#include "chrome/child/pdf_child_init.h" 7771 #include "chrome/common/chrome_constants.h" 7772 #include "chrome/common/chrome_paths.h" 7773 #include "chrome/common/chrome_switches.h" 7774@@ -41,7 +40,6 @@ 7775 #include "content/public/common/url_constants.h" 7776 #include "extensions/common/constants.h" 7777 #include "net/base/features.h" 7778-#include "pdf/pdf_ppapi.h" 7779 #include "sandbox/policy/switches.h" 7780 #include "services/network/public/cpp/features.h" 7781 #include "third_party/blink/public/common/switches.h" 7782@@ -58,6 +56,14 @@ 7783 #include "ui/base/resource/resource_bundle_win.h" 7784 #endif 7785 7786+#if BUILDFLAG(IS_OHOS) 7787+#include "pdf/buildflags.h" 7788+#if BUILDFLAG(ENABLE_PDF) 7789+#include "chrome/child/pdf_child_init.h" 7790+#include "pdf/pdf_ppapi.h" 7791+#endif 7792+#endif 7793+ 7794 namespace { 7795 7796 const char* const kNonWildcardDomainNonPortSchemes[] = { 7797@@ -379,13 +385,17 @@ void AlloyMainDelegate::PreSandboxStartup() { 7798 chrome::DIR_USER_DATA); 7799 7800 InitializeResourceBundle(); 7801+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 7802 MaybePatchGdiGetFontData(); 7803+#endif 7804 } 7805 7806 void AlloyMainDelegate::SandboxInitialized(const std::string& process_type) { 7807+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 7808 AlloyContentClient::SetPDFEntryFunctions(chrome_pdf::PPP_GetInterface, 7809 chrome_pdf::PPP_InitializeModule, 7810 chrome_pdf::PPP_ShutdownModule); 7811+#endif 7812 } 7813 7814 absl::variant<int, content::MainFunctionParams> AlloyMainDelegate::RunProcess( 7815@@ -548,7 +558,6 @@ void AlloyMainDelegate::InitializeResourceBundle() { 7816 7817 std::string locale = command_line->GetSwitchValueASCII(switches::kLang); 7818 DCHECK(!locale.empty()); 7819- 7820 const std::string loaded_locale = 7821 ui::ResourceBundle::InitSharedInstanceWithLocale( 7822 locale, &resource_bundle_delegate_, 7823@@ -562,33 +571,47 @@ void AlloyMainDelegate::InitializeResourceBundle() { 7824 LOG(ERROR) << "Could not load locale pak for " << locale; 7825 7826 resource_bundle_delegate_.set_allow_pack_file_load(true); 7827- 7828+#if BUILDFLAG(IS_OHOS) 7829+ resource_bundle.AddDataPackFromPath(resources_pak_file, 7830+ ui::kScaleFactorNone); 7831+#else 7832 if (base::PathExists(resources_pak_file)) { 7833 resource_bundle.AddDataPackFromPath(resources_pak_file, 7834 ui::kScaleFactorNone); 7835 } else { 7836 LOG(ERROR) << "Could not load resources.pak"; 7837 } 7838+#endif 7839 7840 // Always load the 1x data pack first as the 2x data pack contains both 1x 7841 // and 2x images. The 1x data pack only has 1x images, thus passes in an 7842 // accurate scale factor to gfx::ImageSkia::AddRepresentation. 7843 if (resource_util::IsScaleFactorSupported(ui::k100Percent)) { 7844+#if BUILDFLAG(IS_OHOS) 7845+ resource_bundle.AddDataPackFromPath(chrome_100_percent_pak_file, 7846+ ui::k100Percent); 7847+#else 7848 if (base::PathExists(chrome_100_percent_pak_file)) { 7849 resource_bundle.AddDataPackFromPath(chrome_100_percent_pak_file, 7850 ui::k100Percent); 7851 } else { 7852 LOG(ERROR) << "Could not load chrome_100_percent.pak"; 7853 } 7854+#endif 7855 } 7856 7857 if (resource_util::IsScaleFactorSupported(ui::k200Percent)) { 7858+#if BUILDFLAG(IS_OHOS) 7859+ resource_bundle.AddDataPackFromPath(chrome_200_percent_pak_file, 7860+ ui::k200Percent); 7861+#else 7862 if (base::PathExists(chrome_200_percent_pak_file)) { 7863 resource_bundle.AddDataPackFromPath(chrome_200_percent_pak_file, 7864 ui::k200Percent); 7865 } else { 7866 LOG(ERROR) << "Could not load chrome_200_percent.pak"; 7867 } 7868+#endif 7869 } 7870 7871 // Skip the default pak file loading that would otherwise occur in 7872diff --git a/src/cef/libcef/common/mojom/cef.mojom b/src/cef/libcef/common/mojom/cef.mojom 7873index 1f8a41de20c2b..5fc111634eee8 7874--- a/src/cef/libcef/common/mojom/cef.mojom 7875+++ b/src/cef/libcef/common/mojom/cef.mojom 7876@@ -12,6 +12,7 @@ import "services/network/public/mojom/url_request.mojom"; 7877 import "third_party/blink/public/mojom/loader/referrer.mojom"; 7878 import "ui/gfx/geometry/mojom/geometry.mojom"; 7879 import "url/mojom/url.mojom"; 7880+import "mojo/public/mojom/base/time.mojom"; 7881 7882 [EnableIf=is_ohos] 7883 import "skia/public/mojom/bitmap.mojom"; 7884@@ -130,6 +131,18 @@ interface RenderFrame { 7885 7886 [EnableIf=is_ohos] 7887 RemoveCache(); 7888+ 7889+ [EnableIf=is_ohos] 7890+ ScrollPageUpDown(bool is_up, bool move_half, float view_height); 7891+ 7892+ [EnableIf=is_ohos] 7893+ ScrollTo(float x, float y); 7894+ 7895+ [EnableIf=is_ohos] 7896+ ScrollBy(float delta_x, float delta_y); 7897+ 7898+ [EnableIf=is_ohos] 7899+ SlideScroll(float vx, float vy); 7900 }; 7901 7902 // Interface for communicating with a frame in the browser process. 7903diff --git a/src/cef/libcef/common/net/scheme_registration.cc b/src/cef/libcef/common/net/scheme_registration.cc 7904index b377b1a580f03..74a02b838c60a 7905--- a/src/cef/libcef/common/net/scheme_registration.cc 7906+++ b/src/cef/libcef/common/net/scheme_registration.cc 7907@@ -69,6 +69,7 @@ bool IsInternalHandledScheme(const std::string& scheme) { 7908 url::kJavaScriptScheme, 7909 url::kWsScheme, 7910 url::kWssScheme, 7911+ url::kResourcesScheme, 7912 }; 7913 7914 for (size_t i = 0; i < sizeof(schemes) / sizeof(schemes[0]); ++i) { 7915diff --git a/src/cef/libcef/common/soc_perf_util.cc b/src/cef/libcef/common/soc_perf_util.cc 7916index 1864b77cad2b1..6d7ca453ab84e 7917--- a/src/cef/libcef/common/soc_perf_util.cc 7918+++ b/src/cef/libcef/common/soc_perf_util.cc 7919@@ -20,22 +20,48 @@ base::Time SocPerUtil::last_time_boost_timestamp; 7920 7921 namespace { 7922 const int SOC_PERF_CONFIG_ID = 10020; 7923+const int SOC_PERF_SLIDE_NORMAL_CONFIG_ID = 10025; 7924+const int SOC_PERF_WEB_GUSTURE_ID = 10012; 7925 const int MIN_LAYER_NUM = 50; 7926 const int MIN_VIDEO_LAYOUT_NUM = 1; 7927 const int MAX_BOOST_RUN_TIME_IN_SECOND = 10; 7928 const int REST_TIME_IN_SECOND = 2; 7929 } // namespace 7930 7931-void SocPerUtil::ApplySocConfig() { 7932- TRACE_EVENT2("soc_perf", "SocPerUtil::ApplySocConfig", "layout_num", 7933+void SocPerUtil::EnableFlingBoost() { 7934+ TRACE_EVENT2("soc_perf", "SocPerUtil::EnableFlingBoost2", "layout_num", 7935 video_layout_num, "layer_num", layer_num); 7936+ OHOS::NWeb::OhosAdapterHelper::GetInstance() 7937+ .CreateSocPerfClientAdapter() 7938+ ->ApplySocPerfConfigByIdEx(SOC_PERF_WEB_GUSTURE_ID, false); 7939+ 7940+ OHOS::NWeb::OhosAdapterHelper::GetInstance() 7941+ .CreateSocPerfClientAdapter() 7942+ ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, true); 7943+ 7944 if (video_layout_num >= MIN_VIDEO_LAYOUT_NUM || layer_num >= MIN_LAYER_NUM) { 7945 OHOS::NWeb::OhosAdapterHelper::GetInstance() 7946 .CreateSocPerfClientAdapter() 7947- ->ApplySocPerfConfigById(SOC_PERF_CONFIG_ID); 7948+ ->ApplySocPerfConfigByIdEx(SOC_PERF_CONFIG_ID, true); 7949 } 7950 } 7951 7952+void SocPerUtil::DisableFlingBoost() { 7953+ TRACE_EVENT0("soc_perf", "SocPerUtil::DisableFlingBoost"); 7954+ 7955+ OHOS::NWeb::OhosAdapterHelper::GetInstance() 7956+ .CreateSocPerfClientAdapter() 7957+ ->ApplySocPerfConfigByIdEx(SOC_PERF_SLIDE_NORMAL_CONFIG_ID, false); 7958+ 7959+ OHOS::NWeb::OhosAdapterHelper::GetInstance() 7960+ .CreateSocPerfClientAdapter() 7961+ ->ApplySocPerfConfigByIdEx(SOC_PERF_CONFIG_ID, false); 7962+ 7963+ OHOS::NWeb::OhosAdapterHelper::GetInstance() 7964+ .CreateSocPerfClientAdapter() 7965+ ->ApplySocPerfConfigByIdEx(SOC_PERF_WEB_GUSTURE_ID, false); 7966+} 7967+ 7968 void SocPerUtil::TryRunSocPerf() { 7969 if ((base::Time().Now() - first_time_boost_timestamp).InSeconds() >= 7970 MAX_BOOST_RUN_TIME_IN_SECOND) { 7971diff --git a/src/cef/libcef/common/soc_perf_util.h b/src/cef/libcef/common/soc_perf_util.h 7972index 87afb17332a97..cdfc6147b68c2 7973--- a/src/cef/libcef/common/soc_perf_util.h 7974+++ b/src/cef/libcef/common/soc_perf_util.h 7975@@ -14,7 +14,8 @@ extern int layer_num; 7976 7977 class SocPerUtil { 7978 public: 7979- static void ApplySocConfig(); 7980+ static void EnableFlingBoost(); 7981+ static void DisableFlingBoost(); 7982 static void StartBoost(); 7983 7984 private: 7985diff --git a/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc b/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc 7986index c43d739441ea6..c388996b30e4a 7987--- a/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc 7988+++ b/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc 7989@@ -33,7 +33,6 @@ 7990 #include "libcef/renderer/alloy/url_loader_throttle_provider_impl.h" 7991 #include "libcef/renderer/browser_impl.h" 7992 #include "libcef/renderer/extensions/extensions_renderer_client.h" 7993-#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h" 7994 #include "libcef/renderer/render_frame_observer.h" 7995 #include "libcef/renderer/render_manager.h" 7996 #include "libcef/renderer/thread_util.h" 7997@@ -53,14 +52,9 @@ 7998 #include "chrome/renderer/chrome_content_renderer_client.h" 7999 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h" 8000 #include "chrome/renderer/loadtimes_extension_bindings.h" 8001-#include "chrome/renderer/pepper/chrome_pdf_print_client.h" 8002-#include "chrome/renderer/pepper/pepper_helper.h" 8003 #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" 8004 #include "components/content_settings/core/common/content_settings_types.h" 8005 #include "components/nacl/common/nacl_constants.h" 8006-#include "components/pdf/common/internal_plugin_helpers.h" 8007-#include "components/pdf/renderer/internal_plugin_renderer_helpers.h" 8008-#include "components/pdf/renderer/pdf_find_in_page.h" 8009 #include "components/printing/renderer/print_render_frame_helper.h" 8010 #include "components/spellcheck/renderer/spellcheck.h" 8011 #include "components/spellcheck/renderer/spellcheck_provider.h" 8012@@ -109,6 +103,21 @@ 8013 #include "base/strings/sys_string_conversions.h" 8014 #endif 8015 8016+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 8017+#include "libcef/renderer/extensions/print_render_frame_helper_delegate.h" 8018+#endif 8019+ 8020+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 8021+#include "chrome/renderer/pepper/pepper_helper.h" 8022+#endif 8023+ 8024+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 8025+#include "chrome/renderer/pepper/chrome_pdf_print_client.h" 8026+#include "components/pdf/common/internal_plugin_helpers.h" 8027+#include "components/pdf/renderer/internal_plugin_renderer_helpers.h" 8028+#include "components/pdf/renderer/pdf_find_in_page.h" 8029+#endif 8030+ 8031 AlloyContentRendererClient::AlloyContentRendererClient() 8032 : main_entry_time_(base::TimeTicks::Now()), 8033 render_manager_(new CefRenderManager) { 8034@@ -232,10 +241,12 @@ void AlloyContentRendererClient::RenderThreadStarted() { 8035 } 8036 #endif // BUILDFLAG(IS_MAC) 8037 8038+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 8039 if (extensions::PdfExtensionEnabled()) { 8040 pdf_print_client_.reset(new ChromePDFPrintClient()); 8041 pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); 8042 } 8043+#endif 8044 8045 if (extensions::ExtensionsEnabled()) 8046 extensions_renderer_client_->RenderThreadStarted(); 8047@@ -276,7 +287,9 @@ void AlloyContentRendererClient::RenderFrameCreated( 8048 content::RenderFrame* render_frame) { 8049 auto render_frame_observer = new CefRenderFrameObserver(render_frame); 8050 8051+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 8052 new PepperHelper(render_frame); 8053+#endif 8054 8055 if (extensions::ExtensionsEnabled()) { 8056 extensions_renderer_client_->RenderFrameCreated( 8057@@ -302,18 +315,22 @@ void AlloyContentRendererClient::RenderFrameCreated( 8058 OnBrowserCreated(render_frame->GetRenderView(), is_windowless); 8059 } 8060 8061+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PRINT_PREVIEW) 8062 if (is_windowless.has_value()) { 8063 new printing::PrintRenderFrameHelper( 8064 render_frame, 8065 base::WrapUnique( 8066 new extensions::CefPrintRenderFrameHelperDelegate(*is_windowless))); 8067 } 8068+#endif 8069 8070+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 8071 if (base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned)) { 8072 render_frame_observer->associated_interfaces()->AddInterface( 8073 base::BindRepeating(&pdf::PdfFindInPageFactory::BindReceiver, 8074 render_frame->GetRoutingID())); 8075 } 8076+#endif 8077 } 8078 8079 void AlloyContentRendererClient::WebViewCreated(blink::WebView* web_view) { 8080@@ -332,6 +349,7 @@ bool AlloyContentRendererClient::IsPluginHandledExternally( 8081 const blink::WebElement& plugin_element, 8082 const GURL& original_url, 8083 const std::string& mime_type) { 8084+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 8085 if (!extensions::ExtensionsEnabled()) 8086 return false; 8087 8088@@ -373,12 +391,16 @@ bool AlloyContentRendererClient::IsPluginHandledExternally( 8089 return ChromeExtensionsRendererClient::MaybeCreateMimeHandlerView( 8090 plugin_element, original_url, plugin_info->actual_mime_type, 8091 plugin_info->plugin); 8092+#else 8093+ return false; 8094+#endif 8095 } 8096 8097 bool AlloyContentRendererClient::OverrideCreatePlugin( 8098 content::RenderFrame* render_frame, 8099 const blink::WebPluginParams& params, 8100 blink::WebPlugin** plugin) { 8101+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 8102 std::string orig_mime_type = params.mime_type.Utf8(); 8103 if (extensions::ExtensionsEnabled() && 8104 !extensions_renderer_client_->OverrideCreatePlugin(render_frame, 8105@@ -394,6 +416,7 @@ bool AlloyContentRendererClient::OverrideCreatePlugin( 8106 &plugin_info); 8107 *plugin = ChromeContentRendererClient::CreatePlugin(render_frame, params, 8108 *plugin_info); 8109+#endif 8110 return true; 8111 } 8112 8113diff --git a/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.h b/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.h 8114index 150978262a3ba..59680bb4b815c 8115--- a/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.h 8116+++ b/src/cef/libcef/renderer/alloy/alloy_content_renderer_client.h 8117@@ -25,6 +25,10 @@ 8118 #include "mojo/public/cpp/bindings/generic_pending_receiver.h" 8119 #include "services/service_manager/public/cpp/local_interface_provider.h" 8120 8121+#if BUILDFLAG(IS_OHOS) 8122+#include "pdf/buildflags.h" 8123+#endif 8124+ 8125 namespace extensions { 8126 class CefExtensionsRendererClient; 8127 class Dispatcher; 8128@@ -152,7 +156,9 @@ class AlloyContentRendererClient 8129 std::unique_ptr<SpellCheck> spellcheck_; 8130 std::unique_ptr<visitedlink::VisitedLinkReader> visited_link_slave_; 8131 8132+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PDF) 8133 std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; 8134+#endif 8135 8136 std::unique_ptr<extensions::ExtensionsClient> extensions_client_; 8137 std::unique_ptr<extensions::CefExtensionsRendererClient> 8138diff --git a/src/cef/libcef/renderer/frame_impl.cc b/src/cef/libcef/renderer/frame_impl.cc 8139index 5010d4a9cad73..e74978a2fa7a4 8140--- a/src/cef/libcef/renderer/frame_impl.cc 8141+++ b/src/cef/libcef/renderer/frame_impl.cc 8142@@ -71,6 +71,17 @@ const std::string kAddressPrefix = "geo:0,0?q="; 8143 const std::string kEmailPrefix = "mailto:"; 8144 const std::string kPhoneNumberPrefix = "tel:"; 8145 8146+// The amount of content to overlap between two screens when using 8147+// pageUp/pageDown methiods. static int PAGE_SCROLL_OVERLAP = 24; Standard 8148+// animated scroll speed. 8149+static int STD_SCROLL_ANIMATION_SPEED_PIX_PER_SEC = 480; 8150+// Time for the longest scroll animation. 8151+static int MAX_SCROLL_ANIMATION_DURATION_MILLISEC = 750; 8152+ 8153+static int DEFAULT_SCROLL_ANIMATION_DURATION_MILLISEC = 600; 8154+ 8155+static double POSITION_RATIO = 138.9; 8156+ 8157 enum HitTestDataType { 8158 kUnknown = 0, 8159 kPhone = 2, 8160@@ -81,6 +92,17 @@ enum HitTestDataType { 8161 kSrcImageLink = 8, 8162 kEditText = 9, 8163 }; 8164+ 8165+int computeDurationInMilliSec(int dx, int dy) { 8166+ int distance = std::max(std::abs(dx), std::abs(dy)); 8167+ int duration = distance * 1000 / STD_SCROLL_ANIMATION_SPEED_PIX_PER_SEC; 8168+ return std::min(duration, MAX_SCROLL_ANIMATION_DURATION_MILLISEC); 8169+} 8170+ 8171+float computeSlidePosition(float v) { 8172+ return (v * POSITION_RATIO / 1000); 8173+} 8174+ 8175 #endif // BUILDFLAG(IS_OHOS) 8176 8177 } // namespace 8178@@ -808,39 +830,38 @@ void CefFrameImpl::PutZoomingForTextFactor(float factor) { 8179 auto render_frame = content::RenderFrame::FromWebFrame(frame_); 8180 DCHECK(render_frame->IsMainFrame()); 8181 blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); 8182- 8183+ 8184 if (!webview) 8185 return; 8186 // Hide selection and autofill popups. 8187 webview->CancelPagePopup(); 8188- 8189+ 8190 render_frame->GetWebFrame()->FrameWidget()->SetTextZoomFactor(factor); 8191 } 8192- 8193+ 8194 void CefFrameImpl::GetImageForContextNode() { 8195 if (!frame_) { 8196 LOG(ERROR) << "GetImageForContextNode frame is nullptr"; 8197 return; 8198 } 8199 cef::mojom::GetImageForContextNodeParamsPtr params = 8200- cef::mojom::GetImageForContextNodeParams::New(); 8201+ cef::mojom::GetImageForContextNodeParams::New(); 8202 blink::WebNode context_node = frame_->ContextMenuImageNode(); 8203 std::vector<uint8_t> image_data; 8204 gfx::Size original_size; 8205 std::string image_extension; 8206 8207 if (context_node.IsNull() || !context_node.IsElementNode()) { 8208- SendToBrowserFrame( 8209- __FUNCTION__, 8210- base::BindOnce( 8211- [](cef::mojom::GetImageForContextNodeParamsPtr data, 8212- const BrowserFrameType& browser_frame) { 8213- browser_frame->OnGetImageForContextNodeNull(); 8214- }, 8215- std::move(params))); 8216+ SendToBrowserFrame(__FUNCTION__, 8217+ base::BindOnce( 8218+ [](cef::mojom::GetImageForContextNodeParamsPtr data, 8219+ const BrowserFrameType& browser_frame) { 8220+ browser_frame->OnGetImageForContextNodeNull(); 8221+ }, 8222+ std::move(params))); 8223 return; 8224 } 8225- 8226+ 8227 blink::WebElement web_element = context_node.To<blink::WebElement>(); 8228 original_size = web_element.GetImageSize(); 8229 8230@@ -963,8 +984,7 @@ void CefFrameImpl::UpdateLocale(const std::string& locale) { 8231 return; 8232 } 8233 std::string result = 8234- ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources( 8235- locale); 8236+ ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale); 8237 if (result.empty()) { 8238 LOG(ERROR) << "CefFrameImpl update locale failed"; 8239 } 8240@@ -977,13 +997,83 @@ void CefFrameImpl::GetImagesWithResponse( 8241 base::BindOnce( 8242 [](cef::mojom::RenderFrame::GetImagesWithResponseCallback callback, 8243 blink::WebLocalFrame* frame) { 8244- blink::WebElementCollection collection = frame->GetDocument().GetElementsByHTMLTagName("img"); 8245+ blink::WebElementCollection collection = 8246+ frame->GetDocument().GetElementsByHTMLTagName("img"); 8247 DCHECK(!collection.IsNull()); 8248 bool response = !(collection.FirstItem()).IsNull(); 8249 std::move(callback).Run(response); 8250 }, 8251 std::move(callback))); 8252 } 8253+ 8254+void CefFrameImpl::ScrollPageUpDown(bool is_up, 8255+ bool is_half, 8256+ float view_height) { 8257+ auto render_frame = content::RenderFrame::FromWebFrame(frame_); 8258+ DCHECK(render_frame->IsMainFrame()); 8259+ blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); 8260+ if (!webview) { 8261+ LOG(ERROR) << "scorll page up down get webview failed"; 8262+ return; 8263+ } 8264+ auto scroll_offset = webview->GetScrollOffset(); 8265+ float dy; 8266+ if (is_up) { 8267+ dy = is_half ? -view_height : -scroll_offset.y(); 8268+ } else { 8269+ if (!is_half) { 8270+ float bottom_y = webview->GetScrollBottom(); 8271+ if (bottom_y <= 0) { 8272+ LOG(ERROR) << "get scroll bottom offset failed."; 8273+ return; 8274+ } 8275+ dy = bottom_y - scroll_offset.y(); 8276+ } else { 8277+ dy = view_height; 8278+ } 8279+ } 8280+ webview->SmoothScroll(scroll_offset.x(), scroll_offset.y() + dy, 8281+ base::Milliseconds(computeDurationInMilliSec(0, dy))); 8282+} 8283+ 8284+void CefFrameImpl::ScrollTo(float x, float y) { 8285+ auto render_frame = content::RenderFrame::FromWebFrame(frame_); 8286+ DCHECK(render_frame->IsMainFrame()); 8287+ blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); 8288+ if (!webview) { 8289+ LOG(ERROR) << "scrollto get webview failed"; 8290+ return; 8291+ } 8292+ webview->SetScrollOffset(gfx::PointF(x, y)); 8293+} 8294+ 8295+void CefFrameImpl::ScrollBy(float delta_x, float delta_y) { 8296+ auto render_frame = content::RenderFrame::FromWebFrame(frame_); 8297+ DCHECK(render_frame->IsMainFrame()); 8298+ blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); 8299+ if (!webview) { 8300+ LOG(ERROR) << "scrollby get webview failed"; 8301+ return; 8302+ } 8303+ auto scroll_offset = webview->GetScrollOffset(); 8304+ webview->SetScrollOffset(gfx::PointF(delta_x + scroll_offset.x(), 8305+ delta_y + scroll_offset.y())); 8306+} 8307+ 8308+void CefFrameImpl::SlideScroll(float vx, float vy) { 8309+ auto render_frame = content::RenderFrame::FromWebFrame(frame_); 8310+ DCHECK(render_frame->IsMainFrame()); 8311+ blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); 8312+ if (!webview) { 8313+ LOG(ERROR) << "scrollby get webview failed"; 8314+ return; 8315+ } 8316+ float dx = vx == 0 ? 0 : computeSlidePosition(vx); 8317+ float dy = vy == 0 ? 0 : computeSlidePosition(vy); 8318+ auto scroll_offset = webview->GetScrollOffset(); 8319+ webview->SmoothScroll(dx + scroll_offset.x(), dy + scroll_offset.y(), 8320+ base::Milliseconds(DEFAULT_SCROLL_ANIMATION_DURATION_MILLISEC)); 8321+} 8322 #endif // BUILDFLAG(IS_OHOS) 8323 8324 // Enable deprecation warnings on Windows. See http://crbug.com/585142. 8325diff --git a/src/cef/libcef/renderer/frame_impl.h b/src/cef/libcef/renderer/frame_impl.h 8326index ab9a91db2c403..d5d4f727493f4 8327--- a/src/cef/libcef/renderer/frame_impl.h 8328+++ b/src/cef/libcef/renderer/frame_impl.h 8329@@ -159,7 +159,10 @@ class CefFrameImpl : public CefFrame, public cef::mojom::RenderFrame { 8330 void GetImagesWithResponse( 8331 cef::mojom::RenderFrame::GetImagesWithResponseCallback callback) override; 8332 void RemoveCache() override; 8333- 8334+ void ScrollPageUpDown(bool is_up, bool is_half, float view_height) override; 8335+ void ScrollTo(float x, float y) override; 8336+ void ScrollBy(float delta_x, float delta_y) override; 8337+ void SlideScroll(float vx, float vy) override; 8338 GURL GetAbsoluteUrl(const blink::WebNode& node, 8339 const std::u16string& url_fragment); 8340 GURL GetAbsoluteSrcUrl(const blink::WebElement& element); 8341diff --git a/src/cef/libcef_dll/cpptoc/access_request_cpptoc.cc b/src/cef/libcef_dll/cpptoc/access_request_cpptoc.cc 8342index d97849ec3b453..f01822fdc08ec 8343--- a/src/cef/libcef_dll/cpptoc/access_request_cpptoc.cc 8344+++ b/src/cef/libcef_dll/cpptoc/access_request_cpptoc.cc 8345@@ -1,4 +1,4 @@ 8346-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8347+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8348 // reserved. Use of this source code is governed by a BSD-style license that 8349 // can be found in the LICENSE file. 8350 // 8351@@ -9,7 +9,7 @@ 8352 // implementations. See the translator.README.txt file in the tools directory 8353 // for more information. 8354 // 8355-// $hash=6b186aa2b1640034df797d439745503309071680$ 8356+// $hash=43f719c6388e6fb2ee41d8502b7f47983313cfc9$ 8357 // 8358 8359 #include "libcef_dll/cpptoc/access_request_cpptoc.h" 8360diff --git a/src/cef/libcef_dll/cpptoc/access_request_cpptoc.h b/src/cef/libcef_dll/cpptoc/access_request_cpptoc.h 8361index c5262807d7ce3..8ce9c60ae05ed 8362--- a/src/cef/libcef_dll/cpptoc/access_request_cpptoc.h 8363+++ b/src/cef/libcef_dll/cpptoc/access_request_cpptoc.h 8364@@ -1,4 +1,4 @@ 8365-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8366+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8367 // reserved. Use of this source code is governed by a BSD-style license that 8368 // can be found in the LICENSE file. 8369 // 8370@@ -9,7 +9,7 @@ 8371 // implementations. See the translator.README.txt file in the tools directory 8372 // for more information. 8373 // 8374-// $hash=7f780d77c50f8f64713a51f886c76adc70e44357$ 8375+// $hash=44c32953a5dc70e64d35222732817d6b065f0e33$ 8376 // 8377 8378 #ifndef CEF_LIBCEF_DLL_CPPTOC_ACCESS_REQUEST_CPPTOC_H_ 8379diff --git a/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc 8380index 992a81d60965e..daa3ab86b14ba 8381--- a/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc 8382+++ b/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc 8383@@ -1,4 +1,4 @@ 8384-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8385+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8386 // reserved. Use of this source code is governed by a BSD-style license that 8387 // can be found in the LICENSE file. 8388 // 8389@@ -9,7 +9,7 @@ 8390 // implementations. See the translator.README.txt file in the tools directory 8391 // for more information. 8392 // 8393-// $hash=f20a2530c9b5ad72cccd301ee4234a16132c487d$ 8394+// $hash=63799a16d1ff311eb185eb57bae7d682d150d376$ 8395 // 8396 8397 #include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h" 8398diff --git a/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h 8399index b6dce7abc847c..faf271035e848 8400--- a/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h 8401+++ b/src/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h 8402@@ -1,4 +1,4 @@ 8403-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8404+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8405 // reserved. Use of this source code is governed by a BSD-style license that 8406 // can be found in the LICENSE file. 8407 // 8408@@ -9,7 +9,7 @@ 8409 // implementations. See the translator.README.txt file in the tools directory 8410 // for more information. 8411 // 8412-// $hash=0605de17534cba62d36fc1160997660c4a38e40b$ 8413+// $hash=0d1469b1473cbef38092a2b0624ac33faa6e1d89$ 8414 // 8415 8416 #ifndef CEF_LIBCEF_DLL_CPPTOC_ACCESSIBILITY_HANDLER_CPPTOC_H_ 8417diff --git a/src/cef/libcef_dll/cpptoc/app_cpptoc.cc b/src/cef/libcef_dll/cpptoc/app_cpptoc.cc 8418index bc6f55efe8a81..58572b24012c9 8419--- a/src/cef/libcef_dll/cpptoc/app_cpptoc.cc 8420+++ b/src/cef/libcef_dll/cpptoc/app_cpptoc.cc 8421@@ -1,4 +1,4 @@ 8422-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8423+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8424 // reserved. Use of this source code is governed by a BSD-style license that 8425 // can be found in the LICENSE file. 8426 // 8427@@ -9,7 +9,7 @@ 8428 // implementations. See the translator.README.txt file in the tools directory 8429 // for more information. 8430 // 8431-// $hash=ee267b6567062246b9f82b4b50b68d82d2cc939f$ 8432+// $hash=04b98a2d9c374132d2149fd8e3cf8b110acba86f$ 8433 // 8434 8435 #include "libcef_dll/cpptoc/app_cpptoc.h" 8436diff --git a/src/cef/libcef_dll/cpptoc/app_cpptoc.h b/src/cef/libcef_dll/cpptoc/app_cpptoc.h 8437index c705f806df64a..fe94e85891294 8438--- a/src/cef/libcef_dll/cpptoc/app_cpptoc.h 8439+++ b/src/cef/libcef_dll/cpptoc/app_cpptoc.h 8440@@ -1,4 +1,4 @@ 8441-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8442+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8443 // reserved. Use of this source code is governed by a BSD-style license that 8444 // can be found in the LICENSE file. 8445 // 8446@@ -9,7 +9,7 @@ 8447 // implementations. See the translator.README.txt file in the tools directory 8448 // for more information. 8449 // 8450-// $hash=601455da6a16a7212debdb8184b8f731be4e2f8d$ 8451+// $hash=a4d3edb584e87581659ded4e0bb20739b2b0efea$ 8452 // 8453 8454 #ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ 8455diff --git a/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc 8456index 0317067179b0d..36aec0d286c7d 8457--- a/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc 8458+++ b/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc 8459@@ -1,4 +1,4 @@ 8460-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8461+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8462 // reserved. Use of this source code is governed by a BSD-style license that 8463 // can be found in the LICENSE file. 8464 // 8465@@ -9,7 +9,7 @@ 8466 // implementations. See the translator.README.txt file in the tools directory 8467 // for more information. 8468 // 8469-// $hash=519a82bbea84ea39cadc72c55291e15cb2a74072$ 8470+// $hash=56d4812b8f81cbda67550a8b03e8b7af911e5e28$ 8471 // 8472 8473 #include "libcef_dll/cpptoc/audio_handler_cpptoc.h" 8474diff --git a/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h 8475index d2574a797abb7..1d574545486ef 8476--- a/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h 8477+++ b/src/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h 8478@@ -1,4 +1,4 @@ 8479-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8480+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8481 // reserved. Use of this source code is governed by a BSD-style license that 8482 // can be found in the LICENSE file. 8483 // 8484@@ -9,7 +9,7 @@ 8485 // implementations. See the translator.README.txt file in the tools directory 8486 // for more information. 8487 // 8488-// $hash=352ed71e6c70ef8e5f38e635ed8fc17b2fcc2b4e$ 8489+// $hash=6d31cfb9774514e0a15c999903fa4eb9ce76634d$ 8490 // 8491 8492 #ifndef CEF_LIBCEF_DLL_CPPTOC_AUDIO_HANDLER_CPPTOC_H_ 8493diff --git a/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc 8494index 146cf8370d04b..caedf03194a5c 8495--- a/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc 8496+++ b/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc 8497@@ -1,4 +1,4 @@ 8498-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8499+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8500 // reserved. Use of this source code is governed by a BSD-style license that 8501 // can be found in the LICENSE file. 8502 // 8503@@ -9,7 +9,7 @@ 8504 // implementations. See the translator.README.txt file in the tools directory 8505 // for more information. 8506 // 8507-// $hash=1c155d75ccb34c91336d15446c10b7e476f23c44$ 8508+// $hash=b71adaa7f64de4164420e0f28f1c1064813c2beb$ 8509 // 8510 8511 #include "libcef_dll/cpptoc/auth_callback_cpptoc.h" 8512diff --git a/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h 8513index b9aae72ade919..6a1dd700efad2 8514--- a/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h 8515+++ b/src/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h 8516@@ -1,4 +1,4 @@ 8517-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8518+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8519 // reserved. Use of this source code is governed by a BSD-style license that 8520 // can be found in the LICENSE file. 8521 // 8522@@ -9,7 +9,7 @@ 8523 // implementations. See the translator.README.txt file in the tools directory 8524 // for more information. 8525 // 8526-// $hash=036ebbbaaa86b497dda11ef6371e5bc6c9171b04$ 8527+// $hash=be94cb2e319c4a42e8bc9ee41b78935834e8a59c$ 8528 // 8529 8530 #ifndef CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_ 8531diff --git a/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc 8532index 6187dfa3f368c..97825a59f8046 8533--- a/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc 8534+++ b/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc 8535@@ -1,4 +1,4 @@ 8536-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8537+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8538 // reserved. Use of this source code is governed by a BSD-style license that 8539 // can be found in the LICENSE file. 8540 // 8541@@ -9,7 +9,7 @@ 8542 // implementations. See the translator.README.txt file in the tools directory 8543 // for more information. 8544 // 8545-// $hash=0f0475ffcd9ea6ca7f91616c52c21b3e51b075f3$ 8546+// $hash=5b940bd6e4a7e6a9cabd42b87ae9ff89eb1a0c5d$ 8547 // 8548 8549 #include "libcef_dll/cpptoc/before_download_callback_cpptoc.h" 8550diff --git a/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h 8551index fc31cf841792f..9f2944cd96091 8552--- a/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h 8553+++ b/src/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h 8554@@ -1,4 +1,4 @@ 8555-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8556+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8557 // reserved. Use of this source code is governed by a BSD-style license that 8558 // can be found in the LICENSE file. 8559 // 8560@@ -9,7 +9,7 @@ 8561 // implementations. See the translator.README.txt file in the tools directory 8562 // for more information. 8563 // 8564-// $hash=53a024e4e503f7e107c19ed638684c5708efd6e6$ 8565+// $hash=76dfadaa2d0f5ef6cdb8621cad3136e89b33ae25$ 8566 // 8567 8568 #ifndef CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_ 8569diff --git a/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc b/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc 8570index 51659b1677737..9ad3bd943056c 8571--- a/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc 8572+++ b/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc 8573@@ -1,4 +1,4 @@ 8574-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8575+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8576 // reserved. Use of this source code is governed by a BSD-style license that 8577 // can be found in the LICENSE file. 8578 // 8579@@ -9,7 +9,7 @@ 8580 // implementations. See the translator.README.txt file in the tools directory 8581 // for more information. 8582 // 8583-// $hash=fd59a248f99060800fc3bab5c381784eb3309a57$ 8584+// $hash=b1f1f6a65560c0607e7eb3c4a57dbc40cab0b811$ 8585 // 8586 8587 #include "libcef_dll/cpptoc/binary_value_cpptoc.h" 8588diff --git a/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.h b/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.h 8589index 994621aa25378..3f6a9e362ddc9 8590--- a/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.h 8591+++ b/src/cef/libcef_dll/cpptoc/binary_value_cpptoc.h 8592@@ -1,4 +1,4 @@ 8593-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8594+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8595 // reserved. Use of this source code is governed by a BSD-style license that 8596 // can be found in the LICENSE file. 8597 // 8598@@ -9,7 +9,7 @@ 8599 // implementations. See the translator.README.txt file in the tools directory 8600 // for more information. 8601 // 8602-// $hash=83361bb9395a566ef5bfcd9d87eade8df222d075$ 8603+// $hash=bdc631b2bd2c0a68146e823e0ff23e1b3a455023$ 8604 // 8605 8606 #ifndef CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_ 8607diff --git a/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc 8608index 1cdfa28447136..d713abd8f25ec 8609--- a/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc 8610+++ b/src/cef/libcef_dll/cpptoc/browser_cpptoc.cc 8611@@ -1,4 +1,4 @@ 8612-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8613+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8614 // reserved. Use of this source code is governed by a BSD-style license that 8615 // can be found in the LICENSE file. 8616 // 8617@@ -9,7 +9,7 @@ 8618 // implementations. See the translator.README.txt file in the tools directory 8619 // for more information. 8620 // 8621-// $hash=c1509a4a06a744e423e92c8d75b17128fd0601e1$ 8622+// $hash=de6d56ff06c32a54e999d9309218c6a546eaa146$ 8623 // 8624 8625 #include "libcef_dll/cpptoc/browser_cpptoc.h" 8626diff --git a/src/cef/libcef_dll/cpptoc/browser_cpptoc.h b/src/cef/libcef_dll/cpptoc/browser_cpptoc.h 8627index 08c927b4983fc..1a10254e25c87 8628--- a/src/cef/libcef_dll/cpptoc/browser_cpptoc.h 8629+++ b/src/cef/libcef_dll/cpptoc/browser_cpptoc.h 8630@@ -1,4 +1,4 @@ 8631-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8632+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8633 // reserved. Use of this source code is governed by a BSD-style license that 8634 // can be found in the LICENSE file. 8635 // 8636@@ -9,7 +9,7 @@ 8637 // implementations. See the translator.README.txt file in the tools directory 8638 // for more information. 8639 // 8640-// $hash=68e6a8ff4e47ec0c3c767d80746091550b9d11dc$ 8641+// $hash=01e044c521a174528e137e4b131d9df95875eb65$ 8642 // 8643 8644 #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ 8645diff --git a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc 8646index 131f0d1a8d2c4..b7b75e6dd316f 8647--- a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc 8648+++ b/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc 8649@@ -1,4 +1,4 @@ 8650-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8651+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8652 // reserved. Use of this source code is governed by a BSD-style license that 8653 // can be found in the LICENSE file. 8654 // 8655@@ -9,10 +9,11 @@ 8656 // implementations. See the translator.README.txt file in the tools directory 8657 // for more information. 8658 // 8659-// $hash=1d35c0dce6fb6b92779d45000924a5c0992e5ce7$ 8660+// $hash=fbbfbf396665393a59e2487e84880bafe3568174$ 8661 // 8662 8663 #include "libcef_dll/cpptoc/browser_host_cpptoc.h" 8664+#include "libcef_dll/cpptoc/binary_value_cpptoc.h" 8665 #include "libcef_dll/cpptoc/browser_cpptoc.h" 8666 #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" 8667 #include "libcef_dll/cpptoc/drag_data_cpptoc.h" 8668@@ -20,6 +21,7 @@ 8669 #include "libcef_dll/cpptoc/navigation_entry_cpptoc.h" 8670 #include "libcef_dll/cpptoc/registration_cpptoc.h" 8671 #include "libcef_dll/cpptoc/request_context_cpptoc.h" 8672+#include "libcef_dll/cpptoc/value_cpptoc.h" 8673 #include "libcef_dll/ctocpp/client_ctocpp.h" 8674 #include "libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h" 8675 #include "libcef_dll/ctocpp/download_image_callback_ctocpp.h" 8676@@ -29,6 +31,7 @@ 8677 #include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h" 8678 #include "libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h" 8679 #include "libcef_dll/ctocpp/task_ctocpp.h" 8680+#include "libcef_dll/ctocpp/web_message_receiver_ctocpp.h" 8681 #include "libcef_dll/shutdown_checker.h" 8682 #include "libcef_dll/transfer_util.h" 8683 8684@@ -1251,7 +1254,7 @@ browser_host_destroy_all_web_message_ports(struct _cef_browser_host_t* self) { 8685 void CEF_CALLBACK 8686 browser_host_post_port_message(struct _cef_browser_host_t* self, 8687 cef_string_t* port_handle, 8688- cef_string_t* data) { 8689+ struct _cef_value_t* message) { 8690 shutdown_checker::AssertNotShutdown(); 8691 8692 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8693@@ -1263,24 +1266,23 @@ browser_host_post_port_message(struct _cef_browser_host_t* self, 8694 DCHECK(port_handle); 8695 if (!port_handle) 8696 return; 8697- // Verify param: data; type: string_byref 8698- DCHECK(data); 8699- if (!data) 8700+ // Verify param: message; type: refptr_same 8701+ DCHECK(message); 8702+ if (!message) 8703 return; 8704 8705 // Translate param: port_handle; type: string_byref 8706 CefString port_handleStr(port_handle); 8707- // Translate param: data; type: string_byref 8708- CefString dataStr(data); 8709 8710 // Execute 8711- CefBrowserHostCppToC::Get(self)->PostPortMessage(port_handleStr, dataStr); 8712+ CefBrowserHostCppToC::Get(self)->PostPortMessage( 8713+ port_handleStr, CefValueCppToC::Unwrap(message)); 8714 } 8715 8716 void CEF_CALLBACK browser_host_set_port_message_callback( 8717 struct _cef_browser_host_t* self, 8718 cef_string_t* port_handle, 8719- struct _cef_java_script_result_callback_t* callback) { 8720+ struct _cef_web_message_receiver_t* callback) { 8721 shutdown_checker::AssertNotShutdown(); 8722 8723 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8724@@ -1302,7 +1304,7 @@ void CEF_CALLBACK browser_host_set_port_message_callback( 8725 8726 // Execute 8727 CefBrowserHostCppToC::Get(self)->SetPortMessageCallback( 8728- port_handleStr, CefJavaScriptResultCallbackCToCpp::Wrap(callback)); 8729+ port_handleStr, CefWebMessageReceiverCToCpp::Wrap(callback)); 8730 } 8731 8732 void CEF_CALLBACK browser_host_get_hit_data(struct _cef_browser_host_t* self, 8733@@ -1985,6 +1987,152 @@ void CEF_CALLBACK browser_host_remove_cache(struct _cef_browser_host_t* self, 8734 : false); 8735 } 8736 8737+void CEF_CALLBACK 8738+browser_host_scroll_page_up_down(struct _cef_browser_host_t* self, 8739+ int is_up, 8740+ int is_half, 8741+ float view_height) { 8742+ shutdown_checker::AssertNotShutdown(); 8743+ 8744+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8745+ 8746+ DCHECK(self); 8747+ if (!self) 8748+ return; 8749+ 8750+ // Execute 8751+ CefBrowserHostCppToC::Get(self)->ScrollPageUpDown( 8752+ is_up ? true : false, is_half ? true : false, view_height); 8753+} 8754+ 8755+struct _cef_binary_value_t* CEF_CALLBACK 8756+browser_host_get_web_state(struct _cef_browser_host_t* self) { 8757+ shutdown_checker::AssertNotShutdown(); 8758+ 8759+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8760+ 8761+ DCHECK(self); 8762+ if (!self) 8763+ return NULL; 8764+ 8765+ // Execute 8766+ CefRefPtr<CefBinaryValue> _retval = 8767+ CefBrowserHostCppToC::Get(self)->GetWebState(); 8768+ 8769+ // Return type: refptr_same 8770+ return CefBinaryValueCppToC::Wrap(_retval); 8771+} 8772+ 8773+int CEF_CALLBACK 8774+browser_host_restore_web_state(struct _cef_browser_host_t* self, 8775+ struct _cef_binary_value_t* state) { 8776+ shutdown_checker::AssertNotShutdown(); 8777+ 8778+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8779+ 8780+ DCHECK(self); 8781+ if (!self) 8782+ return 0; 8783+ // Verify param: state; type: refptr_same 8784+ DCHECK(state); 8785+ if (!state) 8786+ return 0; 8787+ 8788+ // Execute 8789+ bool _retval = CefBrowserHostCppToC::Get(self)->RestoreWebState( 8790+ CefBinaryValueCppToC::Unwrap(state)); 8791+ 8792+ // Return type: bool 8793+ return _retval; 8794+} 8795+ 8796+void CEF_CALLBACK browser_host_scroll_to(struct _cef_browser_host_t* self, 8797+ float x, 8798+ float y) { 8799+ shutdown_checker::AssertNotShutdown(); 8800+ 8801+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8802+ 8803+ DCHECK(self); 8804+ if (!self) 8805+ return; 8806+ 8807+ // Execute 8808+ CefBrowserHostCppToC::Get(self)->ScrollTo(x, y); 8809+} 8810+ 8811+void CEF_CALLBACK browser_host_scroll_by(struct _cef_browser_host_t* self, 8812+ float delta_x, 8813+ float delta_y) { 8814+ shutdown_checker::AssertNotShutdown(); 8815+ 8816+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8817+ 8818+ DCHECK(self); 8819+ if (!self) 8820+ return; 8821+ 8822+ // Execute 8823+ CefBrowserHostCppToC::Get(self)->ScrollBy(delta_x, delta_y); 8824+} 8825+ 8826+void CEF_CALLBACK browser_host_slide_scroll(struct _cef_browser_host_t* self, 8827+ float vx, 8828+ float vy) { 8829+ shutdown_checker::AssertNotShutdown(); 8830+ 8831+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8832+ 8833+ DCHECK(self); 8834+ if (!self) 8835+ return; 8836+ 8837+ // Execute 8838+ CefBrowserHostCppToC::Get(self)->SlideScroll(vx, vy); 8839+} 8840+ 8841+void CEF_CALLBACK browser_host_set_file_access(struct _cef_browser_host_t* self, 8842+ int falg) { 8843+ shutdown_checker::AssertNotShutdown(); 8844+ 8845+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8846+ 8847+ DCHECK(self); 8848+ if (!self) 8849+ return; 8850+ 8851+ // Execute 8852+ CefBrowserHostCppToC::Get(self)->SetFileAccess(falg ? true : false); 8853+} 8854+ 8855+void CEF_CALLBACK 8856+browser_host_set_block_network(struct _cef_browser_host_t* self, int falg) { 8857+ shutdown_checker::AssertNotShutdown(); 8858+ 8859+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8860+ 8861+ DCHECK(self); 8862+ if (!self) 8863+ return; 8864+ 8865+ // Execute 8866+ CefBrowserHostCppToC::Get(self)->SetBlockNetwork(falg ? true : false); 8867+} 8868+ 8869+void CEF_CALLBACK browser_host_set_cache_mode(struct _cef_browser_host_t* self, 8870+ int falg) { 8871+ shutdown_checker::AssertNotShutdown(); 8872+ 8873+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8874+ 8875+ DCHECK(self); 8876+ if (!self) 8877+ return; 8878+ 8879+ // Execute 8880+ CefBrowserHostCppToC::Get(self)->SetCacheMode(falg); 8881+} 8882+ 8883 } // namespace 8884 8885 // CONSTRUCTOR - Do not edit by hand. 8886@@ -2098,6 +2246,15 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() { 8887 GetStruct()->get_original_url = browser_host_get_original_url; 8888 GetStruct()->put_network_available = browser_host_put_network_available; 8889 GetStruct()->remove_cache = browser_host_remove_cache; 8890+ GetStruct()->scroll_page_up_down = browser_host_scroll_page_up_down; 8891+ GetStruct()->get_web_state = browser_host_get_web_state; 8892+ GetStruct()->restore_web_state = browser_host_restore_web_state; 8893+ GetStruct()->scroll_to = browser_host_scroll_to; 8894+ GetStruct()->scroll_by = browser_host_scroll_by; 8895+ GetStruct()->slide_scroll = browser_host_slide_scroll; 8896+ GetStruct()->set_file_access = browser_host_set_file_access; 8897+ GetStruct()->set_block_network = browser_host_set_block_network; 8898+ GetStruct()->set_cache_mode = browser_host_set_cache_mode; 8899 } 8900 8901 // DESTRUCTOR - Do not edit by hand. 8902diff --git a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.h b/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.h 8903index 3a7c59332962d..2f88bb3380b13 8904--- a/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.h 8905+++ b/src/cef/libcef_dll/cpptoc/browser_host_cpptoc.h 8906@@ -1,4 +1,4 @@ 8907-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8908+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8909 // reserved. Use of this source code is governed by a BSD-style license that 8910 // can be found in the LICENSE file. 8911 // 8912@@ -9,7 +9,7 @@ 8913 // implementations. See the translator.README.txt file in the tools directory 8914 // for more information. 8915 // 8916-// $hash=244bcb519cd21d6febf70c4ce40fbc1cbb18176c$ 8917+// $hash=e51f496e40bd2b3b9573d2ca084e578bb1df1407$ 8918 // 8919 8920 #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_ 8921diff --git a/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc 8922index 821d80ab8fd34..49e9e4134c765 8923--- a/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc 8924+++ b/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc 8925@@ -1,4 +1,4 @@ 8926-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 8927+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 8928 // reserved. Use of this source code is governed by a BSD-style license that 8929 // can be found in the LICENSE file. 8930 // 8931@@ -9,7 +9,7 @@ 8932 // implementations. See the translator.README.txt file in the tools directory 8933 // for more information. 8934 // 8935-// $hash=2f9f0ebd4c8a44fb9c2d2136e0791770fc72dfe0$ 8936+// $hash=4200c2184c268c8a81967053abedbff5fcbc7582$ 8937 // 8938 8939 #include "libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h" 8940@@ -21,8 +21,9 @@ namespace { 8941 8942 void CEF_CALLBACK 8943 browser_permission_request_delegate_ask_geolocation_permission( 8944- struct _cef_browser_permission_request_delegate_t *self, 8945- const cef_string_t *origin, cef_permission_callback_t callback) { 8946+ struct _cef_browser_permission_request_delegate_t* self, 8947+ const cef_string_t* origin, 8948+ cef_permission_callback_t callback) { 8949 shutdown_checker::AssertNotShutdown(); 8950 8951 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8952@@ -42,8 +43,8 @@ browser_permission_request_delegate_ask_geolocation_permission( 8953 8954 void CEF_CALLBACK 8955 browser_permission_request_delegate_abort_ask_geolocation_permission( 8956- struct _cef_browser_permission_request_delegate_t *self, 8957- const cef_string_t *origin) { 8958+ struct _cef_browser_permission_request_delegate_t* self, 8959+ const cef_string_t* origin) { 8960 shutdown_checker::AssertNotShutdown(); 8961 8962 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8963@@ -63,8 +64,9 @@ browser_permission_request_delegate_abort_ask_geolocation_permission( 8964 8965 void CEF_CALLBACK 8966 browser_permission_request_delegate_ask_protected_media_identifier_permission( 8967- struct _cef_browser_permission_request_delegate_t *self, 8968- const cef_string_t *origin, cef_permission_callback_t callback) { 8969+ struct _cef_browser_permission_request_delegate_t* self, 8970+ const cef_string_t* origin, 8971+ cef_permission_callback_t callback) { 8972 shutdown_checker::AssertNotShutdown(); 8973 8974 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8975@@ -84,8 +86,8 @@ browser_permission_request_delegate_ask_protected_media_identifier_permission( 8976 8977 void CEF_CALLBACK 8978 browser_permission_request_delegate_abort_ask_protected_media_identifier_permission( 8979- struct _cef_browser_permission_request_delegate_t *self, 8980- const cef_string_t *origin) { 8981+ struct _cef_browser_permission_request_delegate_t* self, 8982+ const cef_string_t* origin) { 8983 shutdown_checker::AssertNotShutdown(); 8984 8985 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8986@@ -104,8 +106,9 @@ browser_permission_request_delegate_abort_ask_protected_media_identifier_permiss 8987 } 8988 8989 void CEF_CALLBACK browser_permission_request_delegate_ask_midisysex_permission( 8990- struct _cef_browser_permission_request_delegate_t *self, 8991- const cef_string_t *origin, cef_permission_callback_t callback) { 8992+ struct _cef_browser_permission_request_delegate_t* self, 8993+ const cef_string_t* origin, 8994+ cef_permission_callback_t callback) { 8995 shutdown_checker::AssertNotShutdown(); 8996 8997 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 8998@@ -125,8 +128,8 @@ void CEF_CALLBACK browser_permission_request_delegate_ask_midisysex_permission( 8999 9000 void CEF_CALLBACK 9001 browser_permission_request_delegate_abort_ask_midisysex_permission( 9002- struct _cef_browser_permission_request_delegate_t *self, 9003- const cef_string_t *origin) { 9004+ struct _cef_browser_permission_request_delegate_t* self, 9005+ const cef_string_t* origin) { 9006 shutdown_checker::AssertNotShutdown(); 9007 9008 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9009@@ -146,8 +149,9 @@ browser_permission_request_delegate_abort_ask_midisysex_permission( 9010 9011 void CEF_CALLBACK 9012 browser_permission_request_delegate_notify_geolocation_permission( 9013- struct _cef_browser_permission_request_delegate_t *self, int value, 9014- const cef_string_t *origin) { 9015+ struct _cef_browser_permission_request_delegate_t* self, 9016+ int value, 9017+ const cef_string_t* origin) { 9018 shutdown_checker::AssertNotShutdown(); 9019 9020 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9021@@ -165,7 +169,7 @@ browser_permission_request_delegate_notify_geolocation_permission( 9022 ->NotifyGeolocationPermission(value ? true : false, CefString(origin)); 9023 } 9024 9025-} // namespace 9026+} // namespace 9027 9028 // CONSTRUCTOR - Do not edit by hand. 9029 9030@@ -200,7 +204,7 @@ CefCppToCRefCounted<CefBrowserPermissionRequestDelegateCppToC, 9031 CefBrowserPermissionRequestDelegate, 9032 cef_browser_permission_request_delegate_t>:: 9033 UnwrapDerived(CefWrapperType type, 9034- cef_browser_permission_request_delegate_t *s) { 9035+ cef_browser_permission_request_delegate_t* s) { 9036 NOTREACHED() << "Unexpected class type: " << type; 9037 return nullptr; 9038 } 9039diff --git a/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h 9040index 34e1571c8b229..e7e22ba877c49 9041--- a/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h 9042+++ b/src/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h 9043@@ -1,4 +1,4 @@ 9044-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9045+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9046 // reserved. Use of this source code is governed by a BSD-style license that 9047 // can be found in the LICENSE file. 9048 // 9049@@ -9,7 +9,7 @@ 9050 // implementations. See the translator.README.txt file in the tools directory 9051 // for more information. 9052 // 9053-// $hash=56d5e14a811fca57a762921bdef1270c44af6b4c$ 9054+// $hash=add424cc39b4f5c546f8333e3c25dc8090880a81$ 9055 // 9056 9057 #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PERMISSION_REQUEST_DELEGATE_CPPTOC_H_ 9058diff --git a/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc 9059index 0a3e0b0e0a668..c8c86a5ee47ba 9060--- a/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc 9061+++ b/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc 9062@@ -1,4 +1,4 @@ 9063-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9064+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9065 // reserved. Use of this source code is governed by a BSD-style license that 9066 // can be found in the LICENSE file. 9067 // 9068@@ -9,7 +9,7 @@ 9069 // implementations. See the translator.README.txt file in the tools directory 9070 // for more information. 9071 // 9072-// $hash=452f119327aff2ec0aaed162adf85bbd239b9033$ 9073+// $hash=a872b0755d60861a2ccf93526ba6b05a74274e7d$ 9074 // 9075 9076 #include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" 9077diff --git a/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h 9078index 5ee18f0f521f1..19b902d512c28 9079--- a/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h 9080+++ b/src/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h 9081@@ -1,4 +1,4 @@ 9082-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9083+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9084 // reserved. Use of this source code is governed by a BSD-style license that 9085 // can be found in the LICENSE file. 9086 // 9087@@ -9,7 +9,7 @@ 9088 // implementations. See the translator.README.txt file in the tools directory 9089 // for more information. 9090 // 9091-// $hash=ebbabaa3d73f0266003818a764f8ca677a9ec6b2$ 9092+// $hash=508373dbbfcb411f218ad9688d56b49380d8ca75$ 9093 // 9094 9095 #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ 9096diff --git a/src/cef/libcef_dll/cpptoc/callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/callback_cpptoc.cc 9097index 5deff72b31bc4..fc1a46e0b4fd7 9098--- a/src/cef/libcef_dll/cpptoc/callback_cpptoc.cc 9099+++ b/src/cef/libcef_dll/cpptoc/callback_cpptoc.cc 9100@@ -1,4 +1,4 @@ 9101-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9102+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9103 // reserved. Use of this source code is governed by a BSD-style license that 9104 // can be found in the LICENSE file. 9105 // 9106@@ -9,7 +9,7 @@ 9107 // implementations. See the translator.README.txt file in the tools directory 9108 // for more information. 9109 // 9110-// $hash=01b8f661ca054d4a48ee00f1163011688b32e9f1$ 9111+// $hash=c692df579a3b5f6d780c1e26013c91e2eb2098c8$ 9112 // 9113 9114 #include "libcef_dll/cpptoc/callback_cpptoc.h" 9115diff --git a/src/cef/libcef_dll/cpptoc/callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/callback_cpptoc.h 9116index 8850a48171bc3..611c202b5be0f 9117--- a/src/cef/libcef_dll/cpptoc/callback_cpptoc.h 9118+++ b/src/cef/libcef_dll/cpptoc/callback_cpptoc.h 9119@@ -1,4 +1,4 @@ 9120-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9121+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9122 // reserved. Use of this source code is governed by a BSD-style license that 9123 // can be found in the LICENSE file. 9124 // 9125@@ -9,7 +9,7 @@ 9126 // implementations. See the translator.README.txt file in the tools directory 9127 // for more information. 9128 // 9129-// $hash=5b2fa7fef3cde7efde7df615769b6361ea81ce46$ 9130+// $hash=f0c92901c6462ad03d3c95c0ba92129784c808e1$ 9131 // 9132 9133 #ifndef CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_ 9134diff --git a/src/cef/libcef_dll/cpptoc/client_cpptoc.cc b/src/cef/libcef_dll/cpptoc/client_cpptoc.cc 9135index b2144570d57e5..84bae5411537c 9136--- a/src/cef/libcef_dll/cpptoc/client_cpptoc.cc 9137+++ b/src/cef/libcef_dll/cpptoc/client_cpptoc.cc 9138@@ -1,4 +1,4 @@ 9139-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9140+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9141 // reserved. Use of this source code is governed by a BSD-style license that 9142 // can be found in the LICENSE file. 9143 // 9144@@ -9,7 +9,7 @@ 9145 // implementations. See the translator.README.txt file in the tools directory 9146 // for more information. 9147 // 9148-// $hash=be6ffc497bb625fc087fa38352b8f173f1de3d6d$ 9149+// $hash=9d36943180a6382a12e74a92d9d9967039f14ad3$ 9150 // 9151 9152 #include "libcef_dll/cpptoc/client_cpptoc.h" 9153@@ -39,8 +39,8 @@ namespace { 9154 9155 // MEMBER FUNCTIONS - Body may be edited by hand. 9156 9157-cef_audio_handler_t *CEF_CALLBACK 9158-client_get_audio_handler(struct _cef_client_t *self) { 9159+cef_audio_handler_t* CEF_CALLBACK 9160+client_get_audio_handler(struct _cef_client_t* self) { 9161 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9162 9163 DCHECK(self); 9164@@ -55,8 +55,8 @@ client_get_audio_handler(struct _cef_client_t *self) { 9165 return CefAudioHandlerCppToC::Wrap(_retval); 9166 } 9167 9168-struct _cef_context_menu_handler_t *CEF_CALLBACK 9169-client_get_context_menu_handler(struct _cef_client_t *self) { 9170+struct _cef_context_menu_handler_t* CEF_CALLBACK 9171+client_get_context_menu_handler(struct _cef_client_t* self) { 9172 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9173 9174 DCHECK(self); 9175@@ -71,8 +71,8 @@ client_get_context_menu_handler(struct _cef_client_t *self) { 9176 return CefContextMenuHandlerCppToC::Wrap(_retval); 9177 } 9178 9179-struct _cef_dialog_handler_t *CEF_CALLBACK 9180-client_get_dialog_handler(struct _cef_client_t *self) { 9181+struct _cef_dialog_handler_t* CEF_CALLBACK 9182+client_get_dialog_handler(struct _cef_client_t* self) { 9183 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9184 9185 DCHECK(self); 9186@@ -87,8 +87,8 @@ client_get_dialog_handler(struct _cef_client_t *self) { 9187 return CefDialogHandlerCppToC::Wrap(_retval); 9188 } 9189 9190-struct _cef_display_handler_t *CEF_CALLBACK 9191-client_get_display_handler(struct _cef_client_t *self) { 9192+struct _cef_display_handler_t* CEF_CALLBACK 9193+client_get_display_handler(struct _cef_client_t* self) { 9194 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9195 9196 DCHECK(self); 9197@@ -103,8 +103,8 @@ client_get_display_handler(struct _cef_client_t *self) { 9198 return CefDisplayHandlerCppToC::Wrap(_retval); 9199 } 9200 9201-struct _cef_download_handler_t *CEF_CALLBACK 9202-client_get_download_handler(struct _cef_client_t *self) { 9203+struct _cef_download_handler_t* CEF_CALLBACK 9204+client_get_download_handler(struct _cef_client_t* self) { 9205 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9206 9207 DCHECK(self); 9208@@ -119,8 +119,8 @@ client_get_download_handler(struct _cef_client_t *self) { 9209 return CefDownloadHandlerCppToC::Wrap(_retval); 9210 } 9211 9212-struct _cef_drag_handler_t *CEF_CALLBACK 9213-client_get_drag_handler(struct _cef_client_t *self) { 9214+struct _cef_drag_handler_t* CEF_CALLBACK 9215+client_get_drag_handler(struct _cef_client_t* self) { 9216 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9217 9218 DCHECK(self); 9219@@ -135,8 +135,8 @@ client_get_drag_handler(struct _cef_client_t *self) { 9220 return CefDragHandlerCppToC::Wrap(_retval); 9221 } 9222 9223-struct _cef_find_handler_t *CEF_CALLBACK 9224-client_get_find_handler(struct _cef_client_t *self) { 9225+struct _cef_find_handler_t* CEF_CALLBACK 9226+client_get_find_handler(struct _cef_client_t* self) { 9227 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9228 9229 DCHECK(self); 9230@@ -151,8 +151,8 @@ client_get_find_handler(struct _cef_client_t *self) { 9231 return CefFindHandlerCppToC::Wrap(_retval); 9232 } 9233 9234-struct _cef_focus_handler_t *CEF_CALLBACK 9235-client_get_focus_handler(struct _cef_client_t *self) { 9236+struct _cef_focus_handler_t* CEF_CALLBACK 9237+client_get_focus_handler(struct _cef_client_t* self) { 9238 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9239 9240 DCHECK(self); 9241@@ -167,8 +167,8 @@ client_get_focus_handler(struct _cef_client_t *self) { 9242 return CefFocusHandlerCppToC::Wrap(_retval); 9243 } 9244 9245-struct _cef_frame_handler_t *CEF_CALLBACK 9246-client_get_frame_handler(struct _cef_client_t *self) { 9247+struct _cef_frame_handler_t* CEF_CALLBACK 9248+client_get_frame_handler(struct _cef_client_t* self) { 9249 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9250 9251 DCHECK(self); 9252@@ -183,8 +183,8 @@ client_get_frame_handler(struct _cef_client_t *self) { 9253 return CefFrameHandlerCppToC::Wrap(_retval); 9254 } 9255 9256-struct _cef_jsdialog_handler_t *CEF_CALLBACK 9257-client_get_jsdialog_handler(struct _cef_client_t *self) { 9258+struct _cef_jsdialog_handler_t* CEF_CALLBACK 9259+client_get_jsdialog_handler(struct _cef_client_t* self) { 9260 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9261 9262 DCHECK(self); 9263@@ -199,8 +199,8 @@ client_get_jsdialog_handler(struct _cef_client_t *self) { 9264 return CefJSDialogHandlerCppToC::Wrap(_retval); 9265 } 9266 9267-struct _cef_keyboard_handler_t *CEF_CALLBACK 9268-client_get_keyboard_handler(struct _cef_client_t *self) { 9269+struct _cef_keyboard_handler_t* CEF_CALLBACK 9270+client_get_keyboard_handler(struct _cef_client_t* self) { 9271 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9272 9273 DCHECK(self); 9274@@ -215,8 +215,8 @@ client_get_keyboard_handler(struct _cef_client_t *self) { 9275 return CefKeyboardHandlerCppToC::Wrap(_retval); 9276 } 9277 9278-struct _cef_life_span_handler_t *CEF_CALLBACK 9279-client_get_life_span_handler(struct _cef_client_t *self) { 9280+struct _cef_life_span_handler_t* CEF_CALLBACK 9281+client_get_life_span_handler(struct _cef_client_t* self) { 9282 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9283 9284 DCHECK(self); 9285@@ -231,8 +231,8 @@ client_get_life_span_handler(struct _cef_client_t *self) { 9286 return CefLifeSpanHandlerCppToC::Wrap(_retval); 9287 } 9288 9289-struct _cef_load_handler_t *CEF_CALLBACK 9290-client_get_load_handler(struct _cef_client_t *self) { 9291+struct _cef_load_handler_t* CEF_CALLBACK 9292+client_get_load_handler(struct _cef_client_t* self) { 9293 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9294 9295 DCHECK(self); 9296@@ -247,8 +247,8 @@ client_get_load_handler(struct _cef_client_t *self) { 9297 return CefLoadHandlerCppToC::Wrap(_retval); 9298 } 9299 9300-struct _cef_print_handler_t *CEF_CALLBACK 9301-client_get_print_handler(struct _cef_client_t *self) { 9302+struct _cef_print_handler_t* CEF_CALLBACK 9303+client_get_print_handler(struct _cef_client_t* self) { 9304 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9305 9306 DCHECK(self); 9307@@ -263,8 +263,8 @@ client_get_print_handler(struct _cef_client_t *self) { 9308 return CefPrintHandlerCppToC::Wrap(_retval); 9309 } 9310 9311-struct _cef_render_handler_t *CEF_CALLBACK 9312-client_get_render_handler(struct _cef_client_t *self) { 9313+struct _cef_render_handler_t* CEF_CALLBACK 9314+client_get_render_handler(struct _cef_client_t* self) { 9315 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9316 9317 DCHECK(self); 9318@@ -279,8 +279,8 @@ client_get_render_handler(struct _cef_client_t *self) { 9319 return CefRenderHandlerCppToC::Wrap(_retval); 9320 } 9321 9322-struct _cef_request_handler_t *CEF_CALLBACK 9323-client_get_request_handler(struct _cef_client_t *self) { 9324+struct _cef_request_handler_t* CEF_CALLBACK 9325+client_get_request_handler(struct _cef_client_t* self) { 9326 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9327 9328 DCHECK(self); 9329@@ -295,8 +295,8 @@ client_get_request_handler(struct _cef_client_t *self) { 9330 return CefRequestHandlerCppToC::Wrap(_retval); 9331 } 9332 9333-struct _cef_permission_request_t *CEF_CALLBACK 9334-client_get_permission_request(struct _cef_client_t *self) { 9335+struct _cef_permission_request_t* CEF_CALLBACK 9336+client_get_permission_request(struct _cef_client_t* self) { 9337 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9338 9339 DCHECK(self); 9340@@ -311,10 +311,12 @@ client_get_permission_request(struct _cef_client_t *self) { 9341 return CefPermissionRequestCppToC::Wrap(_retval); 9342 } 9343 9344-int CEF_CALLBACK client_on_process_message_received( 9345- struct _cef_client_t *self, cef_browser_t *browser, 9346- struct _cef_frame_t *frame, cef_process_id_t source_process, 9347- struct _cef_process_message_t *message) { 9348+int CEF_CALLBACK 9349+client_on_process_message_received(struct _cef_client_t* self, 9350+ cef_browser_t* browser, 9351+ struct _cef_frame_t* frame, 9352+ cef_process_id_t source_process, 9353+ struct _cef_process_message_t* message) { 9354 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9355 9356 DCHECK(self); 9357@@ -342,10 +344,12 @@ int CEF_CALLBACK client_on_process_message_received( 9358 return _retval; 9359 } 9360 9361-int CEF_CALLBACK client_notify_java_script_result( 9362- struct _cef_client_t *self, struct _cef_list_value_t *args, 9363- const cef_string_t *method, const cef_string_t *object_name, 9364- struct _cef_list_value_t *result) { 9365+int CEF_CALLBACK 9366+client_notify_java_script_result(struct _cef_client_t* self, 9367+ struct _cef_list_value_t* args, 9368+ const cef_string_t* method, 9369+ const cef_string_t* object_name, 9370+ struct _cef_list_value_t* result) { 9371 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9372 9373 DCHECK(self); 9374@@ -377,7 +381,7 @@ int CEF_CALLBACK client_notify_java_script_result( 9375 return _retval; 9376 } 9377 9378-} // namespace 9379+} // namespace 9380 9381 // CONSTRUCTOR - Do not edit by hand. 9382 9383@@ -410,11 +414,12 @@ CefClientCppToC::~CefClientCppToC() {} 9384 template <> 9385 CefRefPtr<CefClient> 9386 CefCppToCRefCounted<CefClientCppToC, CefClient, cef_client_t>::UnwrapDerived( 9387- CefWrapperType type, cef_client_t *s) { 9388+ CefWrapperType type, 9389+ cef_client_t* s) { 9390 NOTREACHED() << "Unexpected class type: " << type; 9391 return nullptr; 9392 } 9393 9394 template <> 9395-CefWrapperType CefCppToCRefCounted<CefClientCppToC, CefClient, 9396- cef_client_t>::kWrapperType = WT_CLIENT; 9397+CefWrapperType CefCppToCRefCounted<CefClientCppToC, CefClient, cef_client_t>:: 9398+ kWrapperType = WT_CLIENT; 9399diff --git a/src/cef/libcef_dll/cpptoc/client_cpptoc.h b/src/cef/libcef_dll/cpptoc/client_cpptoc.h 9400index e33730c9b5600..3898b87ee470e 9401--- a/src/cef/libcef_dll/cpptoc/client_cpptoc.h 9402+++ b/src/cef/libcef_dll/cpptoc/client_cpptoc.h 9403@@ -1,4 +1,4 @@ 9404-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9405+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9406 // reserved. Use of this source code is governed by a BSD-style license that 9407 // can be found in the LICENSE file. 9408 // 9409@@ -9,7 +9,7 @@ 9410 // implementations. See the translator.README.txt file in the tools directory 9411 // for more information. 9412 // 9413-// $hash=30d4264433606a5e29f5ec2a325f630b278d4be9$ 9414+// $hash=6dd8a3977d8a7d75da7399a9c15a160afbfcf744$ 9415 // 9416 9417 #ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ 9418diff --git a/src/cef/libcef_dll/cpptoc/command_line_cpptoc.cc b/src/cef/libcef_dll/cpptoc/command_line_cpptoc.cc 9419index 97e1a5ef50fbf..5eeb22109684e 9420--- a/src/cef/libcef_dll/cpptoc/command_line_cpptoc.cc 9421+++ b/src/cef/libcef_dll/cpptoc/command_line_cpptoc.cc 9422@@ -1,4 +1,4 @@ 9423-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9424+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9425 // reserved. Use of this source code is governed by a BSD-style license that 9426 // can be found in the LICENSE file. 9427 // 9428@@ -9,7 +9,7 @@ 9429 // implementations. See the translator.README.txt file in the tools directory 9430 // for more information. 9431 // 9432-// $hash=fec108946a9d826210e4fa3746839b56a123316c$ 9433+// $hash=69cdcccdd0b005cb929d250a0ccfe287d1df37ed$ 9434 // 9435 9436 #include "libcef_dll/cpptoc/command_line_cpptoc.h" 9437diff --git a/src/cef/libcef_dll/cpptoc/command_line_cpptoc.h b/src/cef/libcef_dll/cpptoc/command_line_cpptoc.h 9438index a466cc76fd052..45eb004c92d23 9439--- a/src/cef/libcef_dll/cpptoc/command_line_cpptoc.h 9440+++ b/src/cef/libcef_dll/cpptoc/command_line_cpptoc.h 9441@@ -1,4 +1,4 @@ 9442-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9443+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9444 // reserved. Use of this source code is governed by a BSD-style license that 9445 // can be found in the LICENSE file. 9446 // 9447@@ -9,7 +9,7 @@ 9448 // implementations. See the translator.README.txt file in the tools directory 9449 // for more information. 9450 // 9451-// $hash=395fccd246892782a1c4a26a87baa43f75436bd8$ 9452+// $hash=f8af58d9e62d25a46593ccebc487734730f6a1a3$ 9453 // 9454 9455 #ifndef CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ 9456diff --git a/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc 9457index dbfc0cab561e1..158c9b5df8783 9458--- a/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc 9459+++ b/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc 9460@@ -1,4 +1,4 @@ 9461-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9462+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9463 // reserved. Use of this source code is governed by a BSD-style license that 9464 // can be found in the LICENSE file. 9465 // 9466@@ -9,7 +9,7 @@ 9467 // implementations. See the translator.README.txt file in the tools directory 9468 // for more information. 9469 // 9470-// $hash=c16d5dc361785c620c9066fc473a443651afa7ab$ 9471+// $hash=0d30202496e04b3b51a914a480dca377de198807$ 9472 // 9473 9474 #include "libcef_dll/cpptoc/completion_callback_cpptoc.h" 9475diff --git a/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h 9476index 96b2bb1c78f0d..f57a9e4fae4f1 9477--- a/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h 9478+++ b/src/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h 9479@@ -1,4 +1,4 @@ 9480-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9481+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9482 // reserved. Use of this source code is governed by a BSD-style license that 9483 // can be found in the LICENSE file. 9484 // 9485@@ -9,7 +9,7 @@ 9486 // implementations. See the translator.README.txt file in the tools directory 9487 // for more information. 9488 // 9489-// $hash=7ac48d4ac56f3e31947f8f3b9d9bf54a3bc3383c$ 9490+// $hash=407df18b90244b245e73c4f69a199663df079f0d$ 9491 // 9492 9493 #ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ 9494diff --git a/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc 9495index 84eb030acc8b9..72ffa966fc5d1 9496--- a/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc 9497+++ b/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc 9498@@ -1,4 +1,4 @@ 9499-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9500+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9501 // reserved. Use of this source code is governed by a BSD-style license that 9502 // can be found in the LICENSE file. 9503 // 9504@@ -9,7 +9,7 @@ 9505 // implementations. See the translator.README.txt file in the tools directory 9506 // for more information. 9507 // 9508-// $hash=9652f02b935b2e77b689283cbc0b61e2efc95c17$ 9509+// $hash=2a6026a4c3f2190e968af0d43bf5a96ce3335c32$ 9510 // 9511 9512 #include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" 9513diff --git a/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h 9514index f429b4b8593c1..fe010bf8565ba 9515--- a/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h 9516+++ b/src/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h 9517@@ -1,4 +1,4 @@ 9518-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9519+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9520 // reserved. Use of this source code is governed by a BSD-style license that 9521 // can be found in the LICENSE file. 9522 // 9523@@ -9,7 +9,7 @@ 9524 // implementations. See the translator.README.txt file in the tools directory 9525 // for more information. 9526 // 9527-// $hash=51d213cb8d40ba1f608944422e0522749e433a6f$ 9528+// $hash=68dd3aa1b0a216bdc63aa9ed3008b0b5815f8040$ 9529 // 9530 9531 #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ 9532diff --git a/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc b/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc 9533index 6c26eac30765f..0f79a6583d0cb 9534--- a/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc 9535+++ b/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc 9536@@ -1,4 +1,4 @@ 9537-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9538+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9539 // reserved. Use of this source code is governed by a BSD-style license that 9540 // can be found in the LICENSE file. 9541 // 9542@@ -9,7 +9,7 @@ 9543 // implementations. See the translator.README.txt file in the tools directory 9544 // for more information. 9545 // 9546-// $hash=e2f6dee4f74c0eb0979d7a557b007fb8e495bcbb$ 9547+// $hash=b086ddccc396ae8b81f8847a2942325ea7b68faf$ 9548 // 9549 9550 #include "libcef_dll/cpptoc/context_menu_params_cpptoc.h" 9551@@ -383,6 +383,43 @@ context_menu_params_is_custom_menu(struct _cef_context_menu_params_t* self) { 9552 return _retval; 9553 } 9554 9555+cef_context_menu_input_field_type_t CEF_CALLBACK 9556+context_menu_params_get_input_field_type( 9557+ struct _cef_context_menu_params_t* self) { 9558+ shutdown_checker::AssertNotShutdown(); 9559+ 9560+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9561+ 9562+ DCHECK(self); 9563+ if (!self) 9564+ return CM_INPUTFIELDTYPE_NONE; 9565+ 9566+ // Execute 9567+ cef_context_menu_input_field_type_t _retval = 9568+ CefContextMenuParamsCppToC::Get(self)->GetInputFieldType(); 9569+ 9570+ // Return type: simple 9571+ return _retval; 9572+} 9573+ 9574+cef_context_menu_source_type_t CEF_CALLBACK 9575+context_menu_params_get_source_type(struct _cef_context_menu_params_t* self) { 9576+ shutdown_checker::AssertNotShutdown(); 9577+ 9578+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9579+ 9580+ DCHECK(self); 9581+ if (!self) 9582+ return CM_SOURCETYPE_NONE; 9583+ 9584+ // Execute 9585+ cef_context_menu_source_type_t _retval = 9586+ CefContextMenuParamsCppToC::Get(self)->GetSourceType(); 9587+ 9588+ // Return type: simple 9589+ return _retval; 9590+} 9591+ 9592 } // namespace 9593 9594 // CONSTRUCTOR - Do not edit by hand. 9595@@ -412,6 +449,8 @@ CefContextMenuParamsCppToC::CefContextMenuParamsCppToC() { 9596 context_menu_params_is_spell_check_enabled; 9597 GetStruct()->get_edit_state_flags = context_menu_params_get_edit_state_flags; 9598 GetStruct()->is_custom_menu = context_menu_params_is_custom_menu; 9599+ GetStruct()->get_input_field_type = context_menu_params_get_input_field_type; 9600+ GetStruct()->get_source_type = context_menu_params_get_source_type; 9601 } 9602 9603 // DESTRUCTOR - Do not edit by hand. 9604diff --git a/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h b/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h 9605index e4cc567718318..ccae20acf3f51 9606--- a/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h 9607+++ b/src/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h 9608@@ -1,4 +1,4 @@ 9609-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9610+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9611 // reserved. Use of this source code is governed by a BSD-style license that 9612 // can be found in the LICENSE file. 9613 // 9614@@ -9,7 +9,7 @@ 9615 // implementations. See the translator.README.txt file in the tools directory 9616 // for more information. 9617 // 9618-// $hash=9612bbf58cbf1ee4c41d9cec79267e473d130172$ 9619+// $hash=289e9100aeb329f9ec7d1696354e31f2eb7d8ce9$ 9620 // 9621 9622 #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_ 9623diff --git a/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc b/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc 9624index eb095602c203c..300574a4085c8 9625--- a/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc 9626+++ b/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc 9627@@ -1,4 +1,4 @@ 9628-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9629+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9630 // reserved. Use of this source code is governed by a BSD-style license that 9631 // can be found in the LICENSE file. 9632 // 9633@@ -9,7 +9,7 @@ 9634 // implementations. See the translator.README.txt file in the tools directory 9635 // for more information. 9636 // 9637-// $hash=8a64cdcb148bd7c9cad278d57c353ebf48386a16$ 9638+// $hash=714da2b623c625391a0ca8415f5dcc3a434e212e$ 9639 // 9640 9641 #include "libcef_dll/cpptoc/cookie_access_filter_cpptoc.h" 9642diff --git a/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h b/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h 9643index 32c7864d66dc1..d3e150457aaba 9644--- a/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h 9645+++ b/src/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h 9646@@ -1,4 +1,4 @@ 9647-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9648+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9649 // reserved. Use of this source code is governed by a BSD-style license that 9650 // can be found in the LICENSE file. 9651 // 9652@@ -9,7 +9,7 @@ 9653 // implementations. See the translator.README.txt file in the tools directory 9654 // for more information. 9655 // 9656-// $hash=16e58fb5b73a0c13602b01a14afb4f6a882c094d$ 9657+// $hash=e0b8da1120abbbb306c6cc789ec94e38dc07ceb0$ 9658 // 9659 9660 #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_ACCESS_FILTER_CPPTOC_H_ 9661diff --git a/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc b/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc 9662index c78c8f33be0c4..bb862918e0a8f 9663--- a/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc 9664+++ b/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc 9665@@ -1,4 +1,4 @@ 9666-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9667+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9668 // reserved. Use of this source code is governed by a BSD-style license that 9669 // can be found in the LICENSE file. 9670 // 9671@@ -9,7 +9,7 @@ 9672 // implementations. See the translator.README.txt file in the tools directory 9673 // for more information. 9674 // 9675-// $hash=e2ce6d109390673bbfa660a9a43b8f7ce2e3adf7$ 9676+// $hash=2efc0918bc483be69599cf2cd08c0f3894b560d0$ 9677 // 9678 9679 #include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" 9680@@ -20,8 +20,8 @@ 9681 9682 // GLOBAL FUNCTIONS - Body may be edited by hand. 9683 9684-CEF_EXPORT cef_cookie_manager_t * 9685-cef_cookie_manager_get_global_manager(cef_completion_callback_t *callback) { 9686+CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager( 9687+ cef_completion_callback_t* callback) { 9688 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9689 9690 // Unverified params: callback 9691@@ -34,10 +34,10 @@ cef_cookie_manager_get_global_manager(cef_completion_callback_t *callback) { 9692 return CefCookieManagerCppToC::Wrap(_retval); 9693 } 9694 9695-CEF_EXPORT int 9696-cef_cookie_manager_create_cef_cookie(const cef_string_t *url, 9697- const cef_string_t *value, 9698- struct _cef_cookie_t *cef_cookie) { 9699+CEF_EXPORT int cef_cookie_manager_create_cef_cookie( 9700+ const cef_string_t* url, 9701+ const cef_string_t* value, 9702+ struct _cef_cookie_t* cef_cookie) { 9703 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9704 9705 // Verify param: url; type: string_byref_const 9706@@ -75,7 +75,7 @@ namespace { 9707 // MEMBER FUNCTIONS - Body may be edited by hand. 9708 9709 int CEF_CALLBACK 9710-cookie_manager_is_accept_cookie_allowed(struct _cef_cookie_manager_t *self) { 9711+cookie_manager_is_accept_cookie_allowed(struct _cef_cookie_manager_t* self) { 9712 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9713 9714 DCHECK(self); 9715@@ -89,8 +89,9 @@ cookie_manager_is_accept_cookie_allowed(struct _cef_cookie_manager_t *self) { 9716 return _retval; 9717 } 9718 9719-void CEF_CALLBACK cookie_manager_put_accept_cookie_enabled( 9720- struct _cef_cookie_manager_t *self, int accept) { 9721+void CEF_CALLBACK 9722+cookie_manager_put_accept_cookie_enabled(struct _cef_cookie_manager_t* self, 9723+ int accept) { 9724 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9725 9726 DCHECK(self); 9727@@ -103,7 +104,7 @@ void CEF_CALLBACK cookie_manager_put_accept_cookie_enabled( 9728 } 9729 9730 int CEF_CALLBACK cookie_manager_is_third_party_cookie_allowed( 9731- struct _cef_cookie_manager_t *self) { 9732+ struct _cef_cookie_manager_t* self) { 9733 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9734 9735 DCHECK(self); 9736@@ -118,7 +119,8 @@ int CEF_CALLBACK cookie_manager_is_third_party_cookie_allowed( 9737 } 9738 9739 void CEF_CALLBACK cookie_manager_put_accept_third_party_cookie_enabled( 9740- struct _cef_cookie_manager_t *self, int accept) { 9741+ struct _cef_cookie_manager_t* self, 9742+ int accept) { 9743 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9744 9745 DCHECK(self); 9746@@ -131,7 +133,7 @@ void CEF_CALLBACK cookie_manager_put_accept_third_party_cookie_enabled( 9747 } 9748 9749 int CEF_CALLBACK cookie_manager_is_file_urlscheme_cookies_allowed( 9750- struct _cef_cookie_manager_t *self) { 9751+ struct _cef_cookie_manager_t* self) { 9752 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9753 9754 DCHECK(self); 9755@@ -147,7 +149,8 @@ int CEF_CALLBACK cookie_manager_is_file_urlscheme_cookies_allowed( 9756 } 9757 9758 void CEF_CALLBACK cookie_manager_put_accept_file_urlscheme_cookies_enabled( 9759- struct _cef_cookie_manager_t *self, int allow) { 9760+ struct _cef_cookie_manager_t* self, 9761+ int allow) { 9762 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9763 9764 DCHECK(self); 9765@@ -159,8 +162,9 @@ void CEF_CALLBACK cookie_manager_put_accept_file_urlscheme_cookies_enabled( 9766 allow ? true : false); 9767 } 9768 9769-int CEF_CALLBACK cookie_manager_visit_all_cookies( 9770- struct _cef_cookie_manager_t *self, struct _cef_cookie_visitor_t *visitor) { 9771+int CEF_CALLBACK 9772+cookie_manager_visit_all_cookies(struct _cef_cookie_manager_t* self, 9773+ struct _cef_cookie_visitor_t* visitor) { 9774 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9775 9776 DCHECK(self); 9777@@ -179,9 +183,11 @@ int CEF_CALLBACK cookie_manager_visit_all_cookies( 9778 return _retval; 9779 } 9780 9781-int CEF_CALLBACK cookie_manager_visit_url_cookies( 9782- struct _cef_cookie_manager_t *self, const cef_string_t *url, 9783- int includeHttpOnly, struct _cef_cookie_visitor_t *visitor) { 9784+int CEF_CALLBACK 9785+cookie_manager_visit_url_cookies(struct _cef_cookie_manager_t* self, 9786+ const cef_string_t* url, 9787+ int includeHttpOnly, 9788+ struct _cef_cookie_visitor_t* visitor) { 9789 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9790 9791 DCHECK(self); 9792@@ -205,10 +211,11 @@ int CEF_CALLBACK cookie_manager_visit_url_cookies( 9793 return _retval; 9794 } 9795 9796-int CEF_CALLBACK cookie_manager_set_cookie( 9797- struct _cef_cookie_manager_t *self, const cef_string_t *url, 9798- const struct _cef_cookie_t *cookie, 9799- struct _cef_set_cookie_callback_t *callback) { 9800+int CEF_CALLBACK 9801+cookie_manager_set_cookie(struct _cef_cookie_manager_t* self, 9802+ const cef_string_t* url, 9803+ const struct _cef_cookie_t* cookie, 9804+ struct _cef_set_cookie_callback_t* callback) { 9805 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9806 9807 DCHECK(self); 9808@@ -237,10 +244,12 @@ int CEF_CALLBACK cookie_manager_set_cookie( 9809 return _retval; 9810 } 9811 9812-int CEF_CALLBACK cookie_manager_delete_cookies( 9813- struct _cef_cookie_manager_t *self, const cef_string_t *url, 9814- const cef_string_t *cookie_name, int is_session, 9815- struct _cef_delete_cookies_callback_t *callback) { 9816+int CEF_CALLBACK 9817+cookie_manager_delete_cookies(struct _cef_cookie_manager_t* self, 9818+ const cef_string_t* url, 9819+ const cef_string_t* cookie_name, 9820+ int is_session, 9821+ struct _cef_delete_cookies_callback_t* callback) { 9822 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9823 9824 DCHECK(self); 9825@@ -257,8 +266,9 @@ int CEF_CALLBACK cookie_manager_delete_cookies( 9826 return _retval; 9827 } 9828 9829-int CEF_CALLBACK cookie_manager_flush_store( 9830- struct _cef_cookie_manager_t *self, cef_completion_callback_t *callback) { 9831+int CEF_CALLBACK 9832+cookie_manager_flush_store(struct _cef_cookie_manager_t* self, 9833+ cef_completion_callback_t* callback) { 9834 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9835 9836 DCHECK(self); 9837@@ -274,7 +284,7 @@ int CEF_CALLBACK cookie_manager_flush_store( 9838 return _retval; 9839 } 9840 9841-} // namespace 9842+} // namespace 9843 9844 // CONSTRUCTOR - Do not edit by hand. 9845 9846@@ -303,16 +313,17 @@ CefCookieManagerCppToC::CefCookieManagerCppToC() { 9847 CefCookieManagerCppToC::~CefCookieManagerCppToC() {} 9848 9849 template <> 9850-CefRefPtr<CefCookieManager> 9851-CefCppToCRefCounted<CefCookieManagerCppToC, CefCookieManager, 9852- cef_cookie_manager_t>::UnwrapDerived(CefWrapperType type, 9853- cef_cookie_manager_t 9854- *s) { 9855+CefRefPtr<CefCookieManager> CefCppToCRefCounted< 9856+ CefCookieManagerCppToC, 9857+ CefCookieManager, 9858+ cef_cookie_manager_t>::UnwrapDerived(CefWrapperType type, 9859+ cef_cookie_manager_t* s) { 9860 NOTREACHED() << "Unexpected class type: " << type; 9861 return nullptr; 9862 } 9863 9864 template <> 9865-CefWrapperType CefCppToCRefCounted<CefCookieManagerCppToC, CefCookieManager, 9866+CefWrapperType CefCppToCRefCounted<CefCookieManagerCppToC, 9867+ CefCookieManager, 9868 cef_cookie_manager_t>::kWrapperType = 9869 WT_COOKIE_MANAGER; 9870diff --git a/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h b/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h 9871index b1088b73409db..9f4094feb8497 9872--- a/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h 9873+++ b/src/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h 9874@@ -1,4 +1,4 @@ 9875-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9876+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9877 // reserved. Use of this source code is governed by a BSD-style license that 9878 // can be found in the LICENSE file. 9879 // 9880@@ -9,7 +9,7 @@ 9881 // implementations. See the translator.README.txt file in the tools directory 9882 // for more information. 9883 // 9884-// $hash=75170ff033e8e382ba463d350493fab6e12e4192$ 9885+// $hash=3c70ed00438c00d85c27407d1c0947d2b310f401$ 9886 // 9887 9888 #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ 9889diff --git a/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc 9890index d3d5ef089562e..82b09a1fc8348 9891--- a/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc 9892+++ b/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc 9893@@ -1,4 +1,4 @@ 9894-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9895+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9896 // reserved. Use of this source code is governed by a BSD-style license that 9897 // can be found in the LICENSE file. 9898 // 9899@@ -9,7 +9,7 @@ 9900 // implementations. See the translator.README.txt file in the tools directory 9901 // for more information. 9902 // 9903-// $hash=07483aea0b811fedba3da36f7a598f06edd22faf$ 9904+// $hash=399d62b7dd532222ab5e208d95acbd46985cc1aa$ 9905 // 9906 9907 #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" 9908diff --git a/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h 9909index 130318cd07a66..f0dd94f0541eb 9910--- a/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h 9911+++ b/src/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h 9912@@ -1,4 +1,4 @@ 9913-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9914+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9915 // reserved. Use of this source code is governed by a BSD-style license that 9916 // can be found in the LICENSE file. 9917 // 9918@@ -9,7 +9,7 @@ 9919 // implementations. See the translator.README.txt file in the tools directory 9920 // for more information. 9921 // 9922-// $hash=2c087a5613a69038aa9bba45c46a56d96c6a60ba$ 9923+// $hash=45985eb9f0544a0c90fea396ec66c921e44f55a5$ 9924 // 9925 9926 #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ 9927diff --git a/src/cef/libcef_dll/cpptoc/data_base_cpptoc.cc b/src/cef/libcef_dll/cpptoc/data_base_cpptoc.cc 9928index 5493176c301e2..fb65d762c7cd5 9929--- a/src/cef/libcef_dll/cpptoc/data_base_cpptoc.cc 9930+++ b/src/cef/libcef_dll/cpptoc/data_base_cpptoc.cc 9931@@ -1,4 +1,4 @@ 9932-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 9933+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 9934 // reserved. Use of this source code is governed by a BSD-style license that 9935 // can be found in the LICENSE file. 9936 // 9937@@ -9,7 +9,7 @@ 9938 // implementations. See the translator.README.txt file in the tools directory 9939 // for more information. 9940 // 9941-// $hash=5cc7dfcfeb969f00a01d13456464b2811bda3a85$ 9942+// $hash=8781ffbbab1b14d126dd8e91270e04628354940e$ 9943 // 9944 9945 #include "libcef_dll/cpptoc/data_base_cpptoc.h" 9946@@ -95,7 +95,9 @@ void CEF_CALLBACK 9947 data_base_get_http_auth_credentials(struct _cef_data_base_t* self, 9948 const cef_string_t* host, 9949 const cef_string_t* realm, 9950- cef_string_list_t username_password) { 9951+ cef_string_t* username, 9952+ char* password, 9953+ uint32_t passwordSize) { 9954 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9955 9956 DCHECK(self); 9957@@ -109,26 +111,27 @@ data_base_get_http_auth_credentials(struct _cef_data_base_t* self, 9958 DCHECK(realm); 9959 if (!realm) 9960 return; 9961- // Verify param: username_password; type: string_vec_byref 9962- DCHECK(username_password); 9963- if (!username_password) 9964+ // Verify param: username; type: string_byref 9965+ DCHECK(username); 9966+ if (!username) 9967+ return; 9968+ // Verify param: password; type: simple_byaddr 9969+ DCHECK(password); 9970+ if (!password) 9971 return; 9972 9973- // Translate param: username_password; type: string_vec_byref 9974- std::vector<CefString> username_passwordList; 9975- transfer_string_list_contents(username_password, username_passwordList); 9976+ // Translate param: username; type: string_byref 9977+ CefString usernameStr(username); 9978 9979 // Execute 9980 CefDataBaseCppToC::Get(self)->GetHttpAuthCredentials( 9981- CefString(host), CefString(realm), username_passwordList); 9982- 9983- // Restore param: username_password; type: string_vec_byref 9984- cef_string_list_clear(username_password); 9985- transfer_string_list_contents(username_passwordList, username_password); 9986+ CefString(host), CefString(realm), usernameStr, password, passwordSize); 9987 } 9988 9989-int CEF_CALLBACK data_base_exist_permission_by_origin( 9990- struct _cef_data_base_t *self, const cef_string_t *origin, int type) { 9991+int CEF_CALLBACK 9992+data_base_exist_permission_by_origin(struct _cef_data_base_t* self, 9993+ const cef_string_t* origin, 9994+ int type) { 9995 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 9996 9997 DCHECK(self); 9998@@ -147,9 +150,11 @@ int CEF_CALLBACK data_base_exist_permission_by_origin( 9999 return _retval; 10000 } 10001 10002-int CEF_CALLBACK data_base_get_permission_result_by_origin( 10003- struct _cef_data_base_t *self, const cef_string_t *origin, int type, 10004- int *result) { 10005+int CEF_CALLBACK 10006+data_base_get_permission_result_by_origin(struct _cef_data_base_t* self, 10007+ const cef_string_t* origin, 10008+ int type, 10009+ int* result) { 10010 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10011 10012 DCHECK(self); 10013@@ -179,9 +184,11 @@ int CEF_CALLBACK data_base_get_permission_result_by_origin( 10014 return _retval; 10015 } 10016 10017-void CEF_CALLBACK data_base_set_permission_by_origin( 10018- struct _cef_data_base_t *self, const cef_string_t *origin, int type, 10019- int result) { 10020+void CEF_CALLBACK 10021+data_base_set_permission_by_origin(struct _cef_data_base_t* self, 10022+ const cef_string_t* origin, 10023+ int type, 10024+ int result) { 10025 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10026 10027 DCHECK(self); 10028@@ -197,8 +204,10 @@ void CEF_CALLBACK data_base_set_permission_by_origin( 10029 result ? true : false); 10030 } 10031 10032-void CEF_CALLBACK data_base_clear_permission_by_origin( 10033- struct _cef_data_base_t *self, const cef_string_t *origin, int type) { 10034+void CEF_CALLBACK 10035+data_base_clear_permission_by_origin(struct _cef_data_base_t* self, 10036+ const cef_string_t* origin, 10037+ int type) { 10038 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10039 10040 DCHECK(self); 10041@@ -214,7 +223,7 @@ void CEF_CALLBACK data_base_clear_permission_by_origin( 10042 type); 10043 } 10044 10045-void CEF_CALLBACK data_base_clear_all_permission(struct _cef_data_base_t *self, 10046+void CEF_CALLBACK data_base_clear_all_permission(struct _cef_data_base_t* self, 10047 int type) { 10048 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10049 10050@@ -226,8 +235,10 @@ void CEF_CALLBACK data_base_clear_all_permission(struct _cef_data_base_t *self, 10051 CefDataBaseCppToC::Get(self)->ClearAllPermission(type); 10052 } 10053 10054-void CEF_CALLBACK data_base_get_origins_by_permission( 10055- struct _cef_data_base_t *self, int type, cef_string_list_t origins) { 10056+void CEF_CALLBACK 10057+data_base_get_origins_by_permission(struct _cef_data_base_t* self, 10058+ int type, 10059+ cef_string_list_t origins) { 10060 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10061 10062 DCHECK(self); 10063diff --git a/src/cef/libcef_dll/cpptoc/data_base_cpptoc.h b/src/cef/libcef_dll/cpptoc/data_base_cpptoc.h 10064index 345a8e2d6428e..5c3dfb18857bf 10065--- a/src/cef/libcef_dll/cpptoc/data_base_cpptoc.h 10066+++ b/src/cef/libcef_dll/cpptoc/data_base_cpptoc.h 10067@@ -1,4 +1,4 @@ 10068-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10069+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10070 // reserved. Use of this source code is governed by a BSD-style license that 10071 // can be found in the LICENSE file. 10072 // 10073@@ -9,7 +9,7 @@ 10074 // implementations. See the translator.README.txt file in the tools directory 10075 // for more information. 10076 // 10077-// $hash=556a51c2b0295892b98e2c6f62b27b99eba39286$ 10078+// $hash=bcd06269b419de539f58d0d17f5e568d370641ac$ 10079 // 10080 10081 #ifndef CEF_LIBCEF_DLL_CPPTOC_DATA_BASE_CPPTOC_H_ 10082diff --git a/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc 10083index 8c5b758b23feb..529faf2314ef9 10084--- a/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc 10085+++ b/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc 10086@@ -1,4 +1,4 @@ 10087-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10088+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10089 // reserved. Use of this source code is governed by a BSD-style license that 10090 // can be found in the LICENSE file. 10091 // 10092@@ -9,7 +9,7 @@ 10093 // implementations. See the translator.README.txt file in the tools directory 10094 // for more information. 10095 // 10096-// $hash=0d2b19ca10e7a4ad389d3ce8de83addc1cad4b63$ 10097+// $hash=67304c5e02c51d987d2a4b4f0a03e019f44018ea$ 10098 // 10099 10100 #include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h" 10101diff --git a/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h 10102index 5f8c4f6db10d4..bc1ebd9531521 10103--- a/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h 10104+++ b/src/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h 10105@@ -1,4 +1,4 @@ 10106-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10107+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10108 // reserved. Use of this source code is governed by a BSD-style license that 10109 // can be found in the LICENSE file. 10110 // 10111@@ -9,7 +9,7 @@ 10112 // implementations. See the translator.README.txt file in the tools directory 10113 // for more information. 10114 // 10115-// $hash=424b81efdcb5b86629d8388df5df13b1229155bb$ 10116+// $hash=9ef76b4e16c9ee12b2c5956a3e4789fe2e40d9f0$ 10117 // 10118 10119 #ifndef CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_ 10120diff --git a/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc b/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc 10121index 534d94072ac98..cb0e417f9ba56 10122--- a/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc 10123+++ b/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc 10124@@ -1,4 +1,4 @@ 10125-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10126+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10127 // reserved. Use of this source code is governed by a BSD-style license that 10128 // can be found in the LICENSE file. 10129 // 10130@@ -9,7 +9,7 @@ 10131 // implementations. See the translator.README.txt file in the tools directory 10132 // for more information. 10133 // 10134-// $hash=a8a10af1258edd37dbb8d079a10943070c1e9c4c$ 10135+// $hash=c39b7ad0cee7f051f5b2f374917910aae6e9a96a$ 10136 // 10137 10138 #include "libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h" 10139diff --git a/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h b/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h 10140index cd0396a86b71e..6ab9e5c987ad9 10141--- a/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h 10142+++ b/src/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h 10143@@ -1,4 +1,4 @@ 10144-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10145+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10146 // reserved. Use of this source code is governed by a BSD-style license that 10147 // can be found in the LICENSE file. 10148 // 10149@@ -9,7 +9,7 @@ 10150 // implementations. See the translator.README.txt file in the tools directory 10151 // for more information. 10152 // 10153-// $hash=309236e96bdbd2d39e63f94872d2de18552bec80$ 10154+// $hash=4f034b01b5709e8012ff089e000216008f6232b6$ 10155 // 10156 10157 #ifndef CEF_LIBCEF_DLL_CPPTOC_DEV_TOOLS_MESSAGE_OBSERVER_CPPTOC_H_ 10158diff --git a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc 10159index e66a9617d455f..4e607b88d785b 10160--- a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc 10161+++ b/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc 10162@@ -1,4 +1,4 @@ 10163-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10164+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10165 // reserved. Use of this source code is governed by a BSD-style license that 10166 // can be found in the LICENSE file. 10167 // 10168@@ -9,12 +9,13 @@ 10169 // implementations. See the translator.README.txt file in the tools directory 10170 // for more information. 10171 // 10172-// $hash=2f925fbe5bb419b6adf14c4b508c7330ec8dd84a$ 10173+// $hash=3c71c8ae9b8f6ae947bfccd7e018137d7f30737c$ 10174 // 10175 10176 #include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" 10177 #include "libcef_dll/ctocpp/browser_ctocpp.h" 10178 #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" 10179+#include "libcef_dll/ctocpp/select_popup_callback_ctocpp.h" 10180 #include "libcef_dll/shutdown_checker.h" 10181 #include "libcef_dll/transfer_util.h" 10182 10183@@ -67,12 +68,68 @@ dialog_handler_on_file_dialog(struct _cef_dialog_handler_t* self, 10184 return _retval; 10185 } 10186 10187+void CEF_CALLBACK 10188+dialog_handler_on_select_popup_menu(struct _cef_dialog_handler_t* self, 10189+ cef_browser_t* browser, 10190+ const cef_rect_t* bounds, 10191+ int item_height, 10192+ double item_font_size, 10193+ int selected_item, 10194+ size_t menu_itemsCount, 10195+ cef_select_popup_item_t const* menu_items, 10196+ int right_aligned, 10197+ int allow_multiple_selection, 10198+ cef_select_popup_callback_t* callback) { 10199+ shutdown_checker::AssertNotShutdown(); 10200+ 10201+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 10202+ 10203+ DCHECK(self); 10204+ if (!self) 10205+ return; 10206+ // Verify param: browser; type: refptr_diff 10207+ DCHECK(browser); 10208+ if (!browser) 10209+ return; 10210+ // Verify param: bounds; type: simple_byref_const 10211+ DCHECK(bounds); 10212+ if (!bounds) 10213+ return; 10214+ // Verify param: menu_items; type: simple_vec_byref_const 10215+ DCHECK(menu_itemsCount == 0 || menu_items); 10216+ if (menu_itemsCount > 0 && !menu_items) 10217+ return; 10218+ // Verify param: callback; type: refptr_diff 10219+ DCHECK(callback); 10220+ if (!callback) 10221+ return; 10222+ 10223+ // Translate param: bounds; type: simple_byref_const 10224+ CefRect boundsVal = bounds ? *bounds : CefRect(); 10225+ // Translate param: menu_items; type: simple_vec_byref_const 10226+ std::vector<CefSelectPopupItem> menu_itemsList; 10227+ if (menu_itemsCount > 0) { 10228+ for (size_t i = 0; i < menu_itemsCount; ++i) { 10229+ CefSelectPopupItem menu_itemsVal = menu_items[i]; 10230+ menu_itemsList.push_back(menu_itemsVal); 10231+ } 10232+ } 10233+ 10234+ // Execute 10235+ CefDialogHandlerCppToC::Get(self)->OnSelectPopupMenu( 10236+ CefBrowserCToCpp::Wrap(browser), boundsVal, item_height, item_font_size, 10237+ selected_item, menu_itemsList, right_aligned ? true : false, 10238+ allow_multiple_selection ? true : false, 10239+ CefSelectPopupCallbackCToCpp::Wrap(callback)); 10240+} 10241+ 10242 } // namespace 10243 10244 // CONSTRUCTOR - Do not edit by hand. 10245 10246 CefDialogHandlerCppToC::CefDialogHandlerCppToC() { 10247 GetStruct()->on_file_dialog = dialog_handler_on_file_dialog; 10248+ GetStruct()->on_select_popup_menu = dialog_handler_on_select_popup_menu; 10249 } 10250 10251 // DESTRUCTOR - Do not edit by hand. 10252diff --git a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h 10253index d1dbb38f3a85f..dcd88050832be 10254--- a/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h 10255+++ b/src/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h 10256@@ -1,4 +1,4 @@ 10257-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10258+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10259 // reserved. Use of this source code is governed by a BSD-style license that 10260 // can be found in the LICENSE file. 10261 // 10262@@ -9,7 +9,7 @@ 10263 // implementations. See the translator.README.txt file in the tools directory 10264 // for more information. 10265 // 10266-// $hash=52c108ee7b518b733b331b7d172f16bf3126fe3d$ 10267+// $hash=fca3fb90b8a74c5cdf3dc16e1489668ce80c7c07$ 10268 // 10269 10270 #ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ 10271diff --git a/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc b/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc 10272index 450903a13bad7..aaaae4474a299 10273--- a/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc 10274+++ b/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc 10275@@ -1,4 +1,4 @@ 10276-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10277+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10278 // reserved. Use of this source code is governed by a BSD-style license that 10279 // can be found in the LICENSE file. 10280 // 10281@@ -9,7 +9,7 @@ 10282 // implementations. See the translator.README.txt file in the tools directory 10283 // for more information. 10284 // 10285-// $hash=c55e53ae76eba8e90a364cd6768764a4c56967ff$ 10286+// $hash=a3293282e7d3c476dc68b315b9d698d8c62768b6$ 10287 // 10288 10289 #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" 10290diff --git a/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h b/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h 10291index 4b2aeae7ebad4..038b5738ddb84 10292--- a/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h 10293+++ b/src/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h 10294@@ -1,4 +1,4 @@ 10295-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10296+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10297 // reserved. Use of this source code is governed by a BSD-style license that 10298 // can be found in the LICENSE file. 10299 // 10300@@ -9,7 +9,7 @@ 10301 // implementations. See the translator.README.txt file in the tools directory 10302 // for more information. 10303 // 10304-// $hash=ddb7429c3059bb7af3a285adde53aab78a99d39d$ 10305+// $hash=dd73e5b97103c4ad27620af89886e49bfbdc8d21$ 10306 // 10307 10308 #ifndef CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_ 10309diff --git a/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc 10310index 283d83b8c0186..c3f6c08414798 10311--- a/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc 10312+++ b/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc 10313@@ -1,4 +1,4 @@ 10314-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10315+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10316 // reserved. Use of this source code is governed by a BSD-style license that 10317 // can be found in the LICENSE file. 10318 // 10319@@ -9,7 +9,7 @@ 10320 // implementations. See the translator.README.txt file in the tools directory 10321 // for more information. 10322 // 10323-// $hash=dcec0d8e6a9a0d393173112aa81e0f9dc70f73db$ 10324+// $hash=a6d58b8140f21ae5130189a75c283510d7e712fd$ 10325 // 10326 10327 #include "libcef_dll/cpptoc/display_handler_cpptoc.h" 10328diff --git a/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.h 10329index 9d5121a244837..ccc1e439a3c05 10330--- a/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.h 10331+++ b/src/cef/libcef_dll/cpptoc/display_handler_cpptoc.h 10332@@ -1,4 +1,4 @@ 10333-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10334+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10335 // reserved. Use of this source code is governed by a BSD-style license that 10336 // can be found in the LICENSE file. 10337 // 10338@@ -9,7 +9,7 @@ 10339 // implementations. See the translator.README.txt file in the tools directory 10340 // for more information. 10341 // 10342-// $hash=db9ca0d224aa971d8912fc577c53cc9abe52fe58$ 10343+// $hash=8ba6fb9ce96e92ba80a05258060e530ddf822264$ 10344 // 10345 10346 #ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ 10347diff --git a/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc b/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc 10348index 4850dcd185b13..77469f6ad3f5e 10349--- a/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc 10350+++ b/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc 10351@@ -1,4 +1,4 @@ 10352-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10353+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10354 // reserved. Use of this source code is governed by a BSD-style license that 10355 // can be found in the LICENSE file. 10356 // 10357@@ -9,7 +9,7 @@ 10358 // implementations. See the translator.README.txt file in the tools directory 10359 // for more information. 10360 // 10361-// $hash=c4cad301694f35ea716d7c4376252140fcb0d78f$ 10362+// $hash=66706283cc184aece537eb9df570f7bd8a3281a5$ 10363 // 10364 10365 #include "libcef_dll/cpptoc/domdocument_cpptoc.h" 10366diff --git a/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.h b/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.h 10367index 919eb2a288105..bdf946cb6aabd 10368--- a/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.h 10369+++ b/src/cef/libcef_dll/cpptoc/domdocument_cpptoc.h 10370@@ -1,4 +1,4 @@ 10371-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10372+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10373 // reserved. Use of this source code is governed by a BSD-style license that 10374 // can be found in the LICENSE file. 10375 // 10376@@ -9,7 +9,7 @@ 10377 // implementations. See the translator.README.txt file in the tools directory 10378 // for more information. 10379 // 10380-// $hash=8aea7ead4b6cbdefba65a1234213fee4eb4a1952$ 10381+// $hash=6a5b9bb0155acb8c5e6f796e68463825e00a8e53$ 10382 // 10383 10384 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ 10385diff --git a/src/cef/libcef_dll/cpptoc/domnode_cpptoc.cc b/src/cef/libcef_dll/cpptoc/domnode_cpptoc.cc 10386index 6496648c827d4..f965040ed3396 10387--- a/src/cef/libcef_dll/cpptoc/domnode_cpptoc.cc 10388+++ b/src/cef/libcef_dll/cpptoc/domnode_cpptoc.cc 10389@@ -1,4 +1,4 @@ 10390-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10391+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10392 // reserved. Use of this source code is governed by a BSD-style license that 10393 // can be found in the LICENSE file. 10394 // 10395@@ -9,7 +9,7 @@ 10396 // implementations. See the translator.README.txt file in the tools directory 10397 // for more information. 10398 // 10399-// $hash=d352693e8728b1ed586dc62d69a91dd92667760a$ 10400+// $hash=a83ee414291415564391c48a351d4ea2691d8358$ 10401 // 10402 10403 #include "libcef_dll/cpptoc/domnode_cpptoc.h" 10404diff --git a/src/cef/libcef_dll/cpptoc/domnode_cpptoc.h b/src/cef/libcef_dll/cpptoc/domnode_cpptoc.h 10405index a9325b62b0e04..c11783f8f7cb8 10406--- a/src/cef/libcef_dll/cpptoc/domnode_cpptoc.h 10407+++ b/src/cef/libcef_dll/cpptoc/domnode_cpptoc.h 10408@@ -1,4 +1,4 @@ 10409-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10410+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10411 // reserved. Use of this source code is governed by a BSD-style license that 10412 // can be found in the LICENSE file. 10413 // 10414@@ -9,7 +9,7 @@ 10415 // implementations. See the translator.README.txt file in the tools directory 10416 // for more information. 10417 // 10418-// $hash=e5c97231e7d369e8fb4bd73611ec49d7289af076$ 10419+// $hash=18f223a2671334b8bd8d463a94b5a3c0191141e8$ 10420 // 10421 10422 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ 10423diff --git a/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc 10424index fd1cff62815f1..8838f93c16549 10425--- a/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc 10426+++ b/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc 10427@@ -1,4 +1,4 @@ 10428-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10429+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10430 // reserved. Use of this source code is governed by a BSD-style license that 10431 // can be found in the LICENSE file. 10432 // 10433@@ -9,7 +9,7 @@ 10434 // implementations. See the translator.README.txt file in the tools directory 10435 // for more information. 10436 // 10437-// $hash=f809bcb5a3f1246b3a94aebe14ad36bbb7e185c7$ 10438+// $hash=7426be91c0a1a5d650b24d18f23cc5f559c9971e$ 10439 // 10440 10441 #include "libcef_dll/cpptoc/domvisitor_cpptoc.h" 10442diff --git a/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h b/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h 10443index 84a2b75baaa8a..3cd81a5e27ee6 10444--- a/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h 10445+++ b/src/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h 10446@@ -1,4 +1,4 @@ 10447-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10448+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10449 // reserved. Use of this source code is governed by a BSD-style license that 10450 // can be found in the LICENSE file. 10451 // 10452@@ -9,7 +9,7 @@ 10453 // implementations. See the translator.README.txt file in the tools directory 10454 // for more information. 10455 // 10456-// $hash=974358c3bab311f8a19af125f5ccf2dfd13ad8e7$ 10457+// $hash=2a64ff6edd81d5158997158c91e75b85dbd8da39$ 10458 // 10459 10460 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ 10461diff --git a/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc 10462index 8c2aa1f202ce9..5354bf29bd782 10463--- a/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc 10464+++ b/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc 10465@@ -1,4 +1,4 @@ 10466-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10467+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10468 // reserved. Use of this source code is governed by a BSD-style license that 10469 // can be found in the LICENSE file. 10470 // 10471@@ -9,7 +9,7 @@ 10472 // implementations. See the translator.README.txt file in the tools directory 10473 // for more information. 10474 // 10475-// $hash=496b226297ba7d5fa5e7e7bd4117c417e26fae59$ 10476+// $hash=ed4452d7a096e5dfbd091bbcaeac61f3851d943a$ 10477 // 10478 10479 #include "libcef_dll/cpptoc/download_handler_cpptoc.h" 10480diff --git a/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.h 10481index cd7580f8ab4c0..1c1c6ddb9d6e8 10482--- a/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.h 10483+++ b/src/cef/libcef_dll/cpptoc/download_handler_cpptoc.h 10484@@ -1,4 +1,4 @@ 10485-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10486+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10487 // reserved. Use of this source code is governed by a BSD-style license that 10488 // can be found in the LICENSE file. 10489 // 10490@@ -9,7 +9,7 @@ 10491 // implementations. See the translator.README.txt file in the tools directory 10492 // for more information. 10493 // 10494-// $hash=d8c8f94bad7ee32841d16658b106158880edb5e0$ 10495+// $hash=1b301493e2f905a2761858e2d6623765a540f918$ 10496 // 10497 10498 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ 10499diff --git a/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc 10500index 9b31d1e29604d..528e44fa60bda 10501--- a/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc 10502+++ b/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc 10503@@ -1,4 +1,4 @@ 10504-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10505+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10506 // reserved. Use of this source code is governed by a BSD-style license that 10507 // can be found in the LICENSE file. 10508 // 10509@@ -9,7 +9,7 @@ 10510 // implementations. See the translator.README.txt file in the tools directory 10511 // for more information. 10512 // 10513-// $hash=9313088260606d8b5a57b7e75c1d37e724924a40$ 10514+// $hash=83a570d6d3a6b45d9d7502bbeba9e2e8fa726d0e$ 10515 // 10516 10517 #include "libcef_dll/cpptoc/download_image_callback_cpptoc.h" 10518diff --git a/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h 10519index c7d6125bbb902..8e517c7cfaf23 10520--- a/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h 10521+++ b/src/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h 10522@@ -1,4 +1,4 @@ 10523-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10524+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10525 // reserved. Use of this source code is governed by a BSD-style license that 10526 // can be found in the LICENSE file. 10527 // 10528@@ -9,7 +9,7 @@ 10529 // implementations. See the translator.README.txt file in the tools directory 10530 // for more information. 10531 // 10532-// $hash=c5f83abc0a8e18b3f0c87d39f83df687dfff22e1$ 10533+// $hash=9a9250d7e4f3d2018c4b441e6616930627625b59$ 10534 // 10535 10536 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_IMAGE_CALLBACK_CPPTOC_H_ 10537diff --git a/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc 10538index 7ef2878221aa1..11a34dabbdc4d 10539--- a/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc 10540+++ b/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc 10541@@ -1,4 +1,4 @@ 10542-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10543+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10544 // reserved. Use of this source code is governed by a BSD-style license that 10545 // can be found in the LICENSE file. 10546 // 10547@@ -9,7 +9,7 @@ 10548 // implementations. See the translator.README.txt file in the tools directory 10549 // for more information. 10550 // 10551-// $hash=7cb000dca30be501541fc16036c585a3cd6618cb$ 10552+// $hash=dad2dfff457e4c1ad5b2a8722f79b5dd74bc5448$ 10553 // 10554 10555 #include "libcef_dll/cpptoc/download_item_callback_cpptoc.h" 10556diff --git a/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h 10557index bd9dec4ef2e23..858baa2fc70f2 10558--- a/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h 10559+++ b/src/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h 10560@@ -1,4 +1,4 @@ 10561-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10562+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10563 // reserved. Use of this source code is governed by a BSD-style license that 10564 // can be found in the LICENSE file. 10565 // 10566@@ -9,7 +9,7 @@ 10567 // implementations. See the translator.README.txt file in the tools directory 10568 // for more information. 10569 // 10570-// $hash=d0baa6c264292da99e5c909d18450486435c9a8e$ 10571+// $hash=1c85860b0d21f2efc1610ed47af70ed570f63926$ 10572 // 10573 10574 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_ 10575diff --git a/src/cef/libcef_dll/cpptoc/download_item_cpptoc.cc b/src/cef/libcef_dll/cpptoc/download_item_cpptoc.cc 10576index 357d285c90744..c41dd1e51959c 10577--- a/src/cef/libcef_dll/cpptoc/download_item_cpptoc.cc 10578+++ b/src/cef/libcef_dll/cpptoc/download_item_cpptoc.cc 10579@@ -1,4 +1,4 @@ 10580-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10581+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10582 // reserved. Use of this source code is governed by a BSD-style license that 10583 // can be found in the LICENSE file. 10584 // 10585@@ -9,7 +9,7 @@ 10586 // implementations. See the translator.README.txt file in the tools directory 10587 // for more information. 10588 // 10589-// $hash=64b3cee6b2de98140a1dc6f6aabff6b2c4ac7d78$ 10590+// $hash=86d4cf7d9ddcc2e20f09a6a7270b376e7de4fef8$ 10591 // 10592 10593 #include "libcef_dll/cpptoc/download_item_cpptoc.h" 10594diff --git a/src/cef/libcef_dll/cpptoc/download_item_cpptoc.h b/src/cef/libcef_dll/cpptoc/download_item_cpptoc.h 10595index 559b6c8f2d77d..dcf26cfd75389 10596--- a/src/cef/libcef_dll/cpptoc/download_item_cpptoc.h 10597+++ b/src/cef/libcef_dll/cpptoc/download_item_cpptoc.h 10598@@ -1,4 +1,4 @@ 10599-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10600+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10601 // reserved. Use of this source code is governed by a BSD-style license that 10602 // can be found in the LICENSE file. 10603 // 10604@@ -9,7 +9,7 @@ 10605 // implementations. See the translator.README.txt file in the tools directory 10606 // for more information. 10607 // 10608-// $hash=72609007d48530320ae4a0f210c4604108d896d9$ 10609+// $hash=3817a67cd4da8a318fe118f775a86a3daa22af67$ 10610 // 10611 10612 #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_ 10613diff --git a/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc b/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc 10614index 6e682e5d89603..7bf1d73f280c4 10615--- a/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc 10616+++ b/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc 10617@@ -1,4 +1,4 @@ 10618-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10619+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10620 // reserved. Use of this source code is governed by a BSD-style license that 10621 // can be found in the LICENSE file. 10622 // 10623@@ -9,7 +9,7 @@ 10624 // implementations. See the translator.README.txt file in the tools directory 10625 // for more information. 10626 // 10627-// $hash=2a39ab30ca26c5c63ce557b31f86a5557cd96ebc$ 10628+// $hash=6fbfc46d229413699c26e2e8d669e04c5ce776b1$ 10629 // 10630 10631 #include "libcef_dll/cpptoc/drag_data_cpptoc.h" 10632diff --git a/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.h b/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.h 10633index fbeafd07458a8..1628e094b1bad 10634--- a/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.h 10635+++ b/src/cef/libcef_dll/cpptoc/drag_data_cpptoc.h 10636@@ -1,4 +1,4 @@ 10637-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10638+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10639 // reserved. Use of this source code is governed by a BSD-style license that 10640 // can be found in the LICENSE file. 10641 // 10642@@ -9,7 +9,7 @@ 10643 // implementations. See the translator.README.txt file in the tools directory 10644 // for more information. 10645 // 10646-// $hash=c267ab21bb2e49ecade7ba3c7545003d7e072373$ 10647+// $hash=4ce3b8cfc691f8cb7aa224a00d7835283c5039ab$ 10648 // 10649 10650 #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_DATA_CPPTOC_H_ 10651diff --git a/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc 10652index 833c0cbeef279..88fe5e93d4c3d 10653--- a/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc 10654+++ b/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc 10655@@ -1,4 +1,4 @@ 10656-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10657+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10658 // reserved. Use of this source code is governed by a BSD-style license that 10659 // can be found in the LICENSE file. 10660 // 10661@@ -9,7 +9,7 @@ 10662 // implementations. See the translator.README.txt file in the tools directory 10663 // for more information. 10664 // 10665-// $hash=53febc1355422739c9de942f67f52fb4de462571$ 10666+// $hash=7569af91eb9b0d7bc5af403a6733d06ada294955$ 10667 // 10668 10669 #include "libcef_dll/cpptoc/drag_handler_cpptoc.h" 10670diff --git a/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h 10671index 865b8c94a9f99..e8f136b923d6a 10672--- a/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h 10673+++ b/src/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h 10674@@ -1,4 +1,4 @@ 10675-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10676+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10677 // reserved. Use of this source code is governed by a BSD-style license that 10678 // can be found in the LICENSE file. 10679 // 10680@@ -9,7 +9,7 @@ 10681 // implementations. See the translator.README.txt file in the tools directory 10682 // for more information. 10683 // 10684-// $hash=39ab6f4e1f88efb2d726995d7075c904e11091e6$ 10685+// $hash=9d82217b402aa41686392b0ba81169f4b41035e7$ 10686 // 10687 10688 #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ 10689diff --git a/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc 10690index efc5b12922865..3627ce4c13e77 10691--- a/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc 10692+++ b/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc 10693@@ -1,4 +1,4 @@ 10694-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10695+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10696 // reserved. Use of this source code is governed by a BSD-style license that 10697 // can be found in the LICENSE file. 10698 // 10699@@ -9,7 +9,7 @@ 10700 // implementations. See the translator.README.txt file in the tools directory 10701 // for more information. 10702 // 10703-// $hash=67836a9b2dfec98cab93231cb7e07ca2b9696123$ 10704+// $hash=d1cdc1747a3caa4b8aa4cc385c1164bc066bbefb$ 10705 // 10706 10707 #include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" 10708diff --git a/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h 10709index 89668d4d525a5..c6291697f7ea8 10710--- a/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h 10711+++ b/src/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h 10712@@ -1,4 +1,4 @@ 10713-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10714+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10715 // reserved. Use of this source code is governed by a BSD-style license that 10716 // can be found in the LICENSE file. 10717 // 10718@@ -9,7 +9,7 @@ 10719 // implementations. See the translator.README.txt file in the tools directory 10720 // for more information. 10721 // 10722-// $hash=0769e0fec9a6f3c0e33d35b23ebf1bec4a205844$ 10723+// $hash=81dc12ded9752671497f775c397ca120632c4ddb$ 10724 // 10725 10726 #ifndef CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ 10727diff --git a/src/cef/libcef_dll/cpptoc/extension_cpptoc.cc b/src/cef/libcef_dll/cpptoc/extension_cpptoc.cc 10728index f601bb51c6c3a..7edf7b9111be8 10729--- a/src/cef/libcef_dll/cpptoc/extension_cpptoc.cc 10730+++ b/src/cef/libcef_dll/cpptoc/extension_cpptoc.cc 10731@@ -1,4 +1,4 @@ 10732-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10733+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10734 // reserved. Use of this source code is governed by a BSD-style license that 10735 // can be found in the LICENSE file. 10736 // 10737@@ -9,7 +9,7 @@ 10738 // implementations. See the translator.README.txt file in the tools directory 10739 // for more information. 10740 // 10741-// $hash=5ae76b861609dc9f1b0d033dcebf514d8ef68a57$ 10742+// $hash=e62a7361febcdb3a9608051a0e4902a571e94ebc$ 10743 // 10744 10745 #include "libcef_dll/cpptoc/extension_cpptoc.h" 10746diff --git a/src/cef/libcef_dll/cpptoc/extension_cpptoc.h b/src/cef/libcef_dll/cpptoc/extension_cpptoc.h 10747index f2c06267c08f1..32eca73369ccd 10748--- a/src/cef/libcef_dll/cpptoc/extension_cpptoc.h 10749+++ b/src/cef/libcef_dll/cpptoc/extension_cpptoc.h 10750@@ -1,4 +1,4 @@ 10751-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10752+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10753 // reserved. Use of this source code is governed by a BSD-style license that 10754 // can be found in the LICENSE file. 10755 // 10756@@ -9,7 +9,7 @@ 10757 // implementations. See the translator.README.txt file in the tools directory 10758 // for more information. 10759 // 10760-// $hash=46725937bd7ba35ca8ea8fb2d1bbdeac0c53dc80$ 10761+// $hash=924265d65cc81f721d9757d8b4a325260e1848d1$ 10762 // 10763 10764 #ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_CPPTOC_H_ 10765diff --git a/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc 10766index 2aaccfbc5a858..93241efc0f1dd 10767--- a/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc 10768+++ b/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc 10769@@ -1,4 +1,4 @@ 10770-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10771+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10772 // reserved. Use of this source code is governed by a BSD-style license that 10773 // can be found in the LICENSE file. 10774 // 10775@@ -9,7 +9,7 @@ 10776 // implementations. See the translator.README.txt file in the tools directory 10777 // for more information. 10778 // 10779-// $hash=7cdd0564d9b129bf9f068764d4d1588645445d5b$ 10780+// $hash=d75d766c210dd2b55be991f962651b25047a14cf$ 10781 // 10782 10783 #include "libcef_dll/cpptoc/extension_handler_cpptoc.h" 10784diff --git a/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h 10785index fc3ff5d6a6603..13b489be281be 10786--- a/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h 10787+++ b/src/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h 10788@@ -1,4 +1,4 @@ 10789-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10790+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10791 // reserved. Use of this source code is governed by a BSD-style license that 10792 // can be found in the LICENSE file. 10793 // 10794@@ -9,7 +9,7 @@ 10795 // implementations. See the translator.README.txt file in the tools directory 10796 // for more information. 10797 // 10798-// $hash=b695266a9c10c4fc0b68f96b64a77cc5c0235827$ 10799+// $hash=db012b196983395c9684bf1275b638e9ccc57949$ 10800 // 10801 10802 #ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_HANDLER_CPPTOC_H_ 10803diff --git a/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc 10804index 7a4bdbcf8d67f..8b5d6fb273cac 10805--- a/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc 10806+++ b/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc 10807@@ -1,4 +1,4 @@ 10808-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10809+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10810 // reserved. Use of this source code is governed by a BSD-style license that 10811 // can be found in the LICENSE file. 10812 // 10813@@ -9,7 +9,7 @@ 10814 // implementations. See the translator.README.txt file in the tools directory 10815 // for more information. 10816 // 10817-// $hash=d334e579f498ad7727721dfe4e10ad810b81035a$ 10818+// $hash=d226e92e69207d76675dc52b7ab5f4e68262ee7d$ 10819 // 10820 10821 #include "libcef_dll/cpptoc/file_dialog_callback_cpptoc.h" 10822diff --git a/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h 10823index 046c02aa5f1a6..f0a754b929746 10824--- a/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h 10825+++ b/src/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h 10826@@ -1,4 +1,4 @@ 10827-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10828+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10829 // reserved. Use of this source code is governed by a BSD-style license that 10830 // can be found in the LICENSE file. 10831 // 10832@@ -9,7 +9,7 @@ 10833 // implementations. See the translator.README.txt file in the tools directory 10834 // for more information. 10835 // 10836-// $hash=2b6c5e5bd0bb44f1c916b317bccb0e0794c28f91$ 10837+// $hash=2db275ca5be351037a0e19531fb2ed4c3af4498d$ 10838 // 10839 10840 #ifndef CEF_LIBCEF_DLL_CPPTOC_FILE_DIALOG_CALLBACK_CPPTOC_H_ 10841diff --git a/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc 10842index 7130f8058dc2e..2d71f4f000420 10843--- a/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc 10844+++ b/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc 10845@@ -1,4 +1,4 @@ 10846-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10847+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10848 // reserved. Use of this source code is governed by a BSD-style license that 10849 // can be found in the LICENSE file. 10850 // 10851@@ -9,7 +9,7 @@ 10852 // implementations. See the translator.README.txt file in the tools directory 10853 // for more information. 10854 // 10855-// $hash=022bd3d1f8fd0eb3de156647dd4f50d688747534$ 10856+// $hash=dec97de981cccf1e47dae36336011071a1a8e80b$ 10857 // 10858 10859 #include "libcef_dll/cpptoc/find_handler_cpptoc.h" 10860diff --git a/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.h 10861index 0d2193718edb4..cf30c541ef2fa 10862--- a/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.h 10863+++ b/src/cef/libcef_dll/cpptoc/find_handler_cpptoc.h 10864@@ -1,4 +1,4 @@ 10865-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10866+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10867 // reserved. Use of this source code is governed by a BSD-style license that 10868 // can be found in the LICENSE file. 10869 // 10870@@ -9,7 +9,7 @@ 10871 // implementations. See the translator.README.txt file in the tools directory 10872 // for more information. 10873 // 10874-// $hash=c6408d6714984291379f0113e7806cac21aee934$ 10875+// $hash=fd8c0866622e63f6564c0b00107ebcb0c82d60fe$ 10876 // 10877 10878 #ifndef CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ 10879diff --git a/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc 10880index 2549edd6d6df0..43151b580fce6 10881--- a/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc 10882+++ b/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc 10883@@ -1,4 +1,4 @@ 10884-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10885+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10886 // reserved. Use of this source code is governed by a BSD-style license that 10887 // can be found in the LICENSE file. 10888 // 10889@@ -9,7 +9,7 @@ 10890 // implementations. See the translator.README.txt file in the tools directory 10891 // for more information. 10892 // 10893-// $hash=6d554e767e9e5eea0d9caefba61e35fbe4fff231$ 10894+// $hash=baed9b712645a466ab9c52ae814f31eb10c0ef3b$ 10895 // 10896 10897 #include "libcef_dll/cpptoc/focus_handler_cpptoc.h" 10898diff --git a/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h 10899index d384176fe8eea..1dc59c421bfde 10900--- a/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h 10901+++ b/src/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h 10902@@ -1,4 +1,4 @@ 10903-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10904+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10905 // reserved. Use of this source code is governed by a BSD-style license that 10906 // can be found in the LICENSE file. 10907 // 10908@@ -9,7 +9,7 @@ 10909 // implementations. See the translator.README.txt file in the tools directory 10910 // for more information. 10911 // 10912-// $hash=def50c909d368ef1d03f1932f2b0283c3cbf8165$ 10913+// $hash=b4e1894b64083f0045302da4840abf664c5a2429$ 10914 // 10915 10916 #ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ 10917diff --git a/src/cef/libcef_dll/cpptoc/frame_cpptoc.cc b/src/cef/libcef_dll/cpptoc/frame_cpptoc.cc 10918index 293e5b740b4b4..3661e43c0fb85 10919--- a/src/cef/libcef_dll/cpptoc/frame_cpptoc.cc 10920+++ b/src/cef/libcef_dll/cpptoc/frame_cpptoc.cc 10921@@ -1,4 +1,4 @@ 10922-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10923+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10924 // reserved. Use of this source code is governed by a BSD-style license that 10925 // can be found in the LICENSE file. 10926 // 10927@@ -9,7 +9,7 @@ 10928 // implementations. See the translator.README.txt file in the tools directory 10929 // for more information. 10930 // 10931-// $hash=d9d33c576ca1d7bef983c275e8b115767237f69c$ 10932+// $hash=ebf943663fb2988ca0b2a0cd40d4dea389678604$ 10933 // 10934 10935 #include "libcef_dll/cpptoc/frame_cpptoc.h" 10936diff --git a/src/cef/libcef_dll/cpptoc/frame_cpptoc.h b/src/cef/libcef_dll/cpptoc/frame_cpptoc.h 10937index 3e1e27fe923f4..dab946904c7aa 10938--- a/src/cef/libcef_dll/cpptoc/frame_cpptoc.h 10939+++ b/src/cef/libcef_dll/cpptoc/frame_cpptoc.h 10940@@ -1,4 +1,4 @@ 10941-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10942+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10943 // reserved. Use of this source code is governed by a BSD-style license that 10944 // can be found in the LICENSE file. 10945 // 10946@@ -9,7 +9,7 @@ 10947 // implementations. See the translator.README.txt file in the tools directory 10948 // for more information. 10949 // 10950-// $hash=5154f627049509d38f098549ea08fb26a0712963$ 10951+// $hash=e2af583c7a4b0b6b071e9e96ce8645375902673d$ 10952 // 10953 10954 #ifndef CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ 10955diff --git a/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.cc 10956index 4fabd048f513c..40f490cb84be1 10957--- a/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.cc 10958+++ b/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.cc 10959@@ -1,4 +1,4 @@ 10960-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10961+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10962 // reserved. Use of this source code is governed by a BSD-style license that 10963 // can be found in the LICENSE file. 10964 // 10965@@ -9,7 +9,7 @@ 10966 // implementations. See the translator.README.txt file in the tools directory 10967 // for more information. 10968 // 10969-// $hash=276f4b15ecef989b38c2a6dd9cac5be7df5cb844$ 10970+// $hash=92d9c5512725c0532baa33ab9f324f18af40a641$ 10971 // 10972 10973 #include "libcef_dll/cpptoc/frame_handler_cpptoc.h" 10974diff --git a/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.h 10975index 4310ea47b3d93..c553a2dd73ab1 10976--- a/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.h 10977+++ b/src/cef/libcef_dll/cpptoc/frame_handler_cpptoc.h 10978@@ -1,4 +1,4 @@ 10979-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10980+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 10981 // reserved. Use of this source code is governed by a BSD-style license that 10982 // can be found in the LICENSE file. 10983 // 10984@@ -9,7 +9,7 @@ 10985 // implementations. See the translator.README.txt file in the tools directory 10986 // for more information. 10987 // 10988-// $hash=d0f6aac72a7795b0221831ffe475fa8b5062ab1a$ 10989+// $hash=72b035624f1edff425da000635d111f72186fffc$ 10990 // 10991 10992 #ifndef CEF_LIBCEF_DLL_CPPTOC_FRAME_HANDLER_CPPTOC_H_ 10993diff --git a/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc b/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc 10994index da6eb4aac594a..00a9414934b6f 10995--- a/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc 10996+++ b/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc 10997@@ -1,4 +1,4 @@ 10998-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 10999+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11000 // reserved. Use of this source code is governed by a BSD-style license that 11001 // can be found in the LICENSE file. 11002 // 11003@@ -9,7 +9,7 @@ 11004 // implementations. See the translator.README.txt file in the tools directory 11005 // for more information. 11006 // 11007-// $hash=a21b3afd08841726e90bdc044e0dd0d22b277264$ 11008+// $hash=901fb04c00bd650e2e0bdff347fdd3ad460f5a21$ 11009 // 11010 11011 #include "libcef_dll/cpptoc/geolocation_acess_cpptoc.h" 11012diff --git a/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h b/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h 11013index 97b335d034aec..f2ab7de54a655 11014--- a/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h 11015+++ b/src/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h 11016@@ -1,4 +1,4 @@ 11017-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11018+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11019 // reserved. Use of this source code is governed by a BSD-style license that 11020 // can be found in the LICENSE file. 11021 // 11022@@ -9,7 +9,7 @@ 11023 // implementations. See the translator.README.txt file in the tools directory 11024 // for more information. 11025 // 11026-// $hash=42966754a9927c84debb6edfd37f8c41873ee268$ 11027+// $hash=66a1438642f8ff3dd315b9535336be8d6b2c3e99$ 11028 // 11029 11030 #ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_ACESS_CPPTOC_H_ 11031diff --git a/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc 11032index 4aeb4e9714070..3984352b69d80 11033--- a/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc 11034+++ b/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc 11035@@ -1,4 +1,4 @@ 11036-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11037+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11038 // reserved. Use of this source code is governed by a BSD-style license that 11039 // can be found in the LICENSE file. 11040 // 11041@@ -9,7 +9,7 @@ 11042 // implementations. See the translator.README.txt file in the tools directory 11043 // for more information. 11044 // 11045-// $hash=3f24789c79862889b5a0454c743bf70f71a98faf$ 11046+// $hash=b129eeac4e3e5ce621b58018d7516127f7a85aed$ 11047 // 11048 11049 #include "libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h" 11050diff --git a/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h 11051index 3ed16a181a54f..0056536b211aa 11052--- a/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h 11053+++ b/src/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h 11054@@ -1,4 +1,4 @@ 11055-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11056+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11057 // reserved. Use of this source code is governed by a BSD-style license that 11058 // can be found in the LICENSE file. 11059 // 11060@@ -9,7 +9,7 @@ 11061 // implementations. See the translator.README.txt file in the tools directory 11062 // for more information. 11063 // 11064-// $hash=8e0f89043319ecad378af6125bd4fcdbd8bdd34e$ 11065+// $hash=76b58a0d3f719bb4899c87ec701d89a96a45ae31$ 11066 // 11067 11068 #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_EXTENSION_RESOURCE_CALLBACK_CPPTOC_H_ 11069diff --git a/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.cc 11070index fc55c1c5638b0..c0efd5b4bdbb4 11071--- a/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.cc 11072+++ b/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.cc 11073@@ -1,4 +1,4 @@ 11074-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11075+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11076 // reserved. Use of this source code is governed by a BSD-style license that 11077 // can be found in the LICENSE file. 11078 // 11079@@ -9,7 +9,7 @@ 11080 // implementations. See the translator.README.txt file in the tools directory 11081 // for more information. 11082 // 11083-// $hash=aa8ce20cabfc1a45e42b70040c2de7fa540d9466$ 11084+// $hash=c8fcd18ac761a259a3dc23799f2b7ca3863b2ff2$ 11085 // 11086 11087 #include "libcef_dll/cpptoc/get_images_callback_cpptoc.h" 11088diff --git a/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.h 11089index 491bd5b82c5fb..27cc93f4eaeef 11090--- a/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.h 11091+++ b/src/cef/libcef_dll/cpptoc/get_images_callback_cpptoc.h 11092@@ -1,4 +1,4 @@ 11093-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11094+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11095 // reserved. Use of this source code is governed by a BSD-style license that 11096 // can be found in the LICENSE file. 11097 // 11098@@ -9,7 +9,7 @@ 11099 // implementations. See the translator.README.txt file in the tools directory 11100 // for more information. 11101 // 11102-// $hash=6902a0c4f13668d55f729924580a7bd25c7c3718$ 11103+// $hash=d5b18c7be26bf71b47bb68718126ef89fad457d3$ 11104 // 11105 11106 #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_IMAGES_CALLBACK_CPPTOC_H_ 11107diff --git a/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.cc 11108index 3876dba9e89e8..5ebe55e7b640b 11109--- a/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.cc 11110+++ b/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.cc 11111@@ -1,4 +1,4 @@ 11112-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11113+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11114 // reserved. Use of this source code is governed by a BSD-style license that 11115 // can be found in the LICENSE file. 11116 // 11117@@ -9,7 +9,7 @@ 11118 // implementations. See the translator.README.txt file in the tools directory 11119 // for more information. 11120 // 11121-// $hash=8c21d39cfec72fe99c8317906941d00cd3cbf0d0$ 11122+// $hash=4bf000010f6c757be8d561c82ebc8c6142f31a3d$ 11123 // 11124 11125 #include "libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.h" 11126diff --git a/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.h 11127index 4d219961ba523..97fdb9f9ec701 11128--- a/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.h 11129+++ b/src/cef/libcef_dll/cpptoc/get_origin_usage_or_quota_callback_cpptoc.h 11130@@ -1,4 +1,4 @@ 11131-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11132+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11133 // reserved. Use of this source code is governed by a BSD-style license that 11134 // can be found in the LICENSE file. 11135 // 11136@@ -9,7 +9,7 @@ 11137 // implementations. See the translator.README.txt file in the tools directory 11138 // for more information. 11139 // 11140-// $hash=6ba873fdbcca40051dd14bd26bc4a4c7a8999b5f$ 11141+// $hash=79d42142140e6b820264a3d723ee0f1ffa1747f2$ 11142 // 11143 11144 #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_ORIGIN_USAGE_OR_QUOTA_CALLBACK_CPPTOC_H_ 11145diff --git a/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.cc 11146index 66d66ad674fe3..f1c6c5bb7d12c 11147--- a/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.cc 11148+++ b/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.cc 11149@@ -1,4 +1,4 @@ 11150-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11151+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11152 // reserved. Use of this source code is governed by a BSD-style license that 11153 // can be found in the LICENSE file. 11154 // 11155@@ -9,7 +9,7 @@ 11156 // implementations. See the translator.README.txt file in the tools directory 11157 // for more information. 11158 // 11159-// $hash=aff05076c3fad1702ba17a27a4e4713ae1593596$ 11160+// $hash=c2fd30c49290abe08881da439bab727b9504b3da$ 11161 // 11162 11163 #include "libcef_dll/cpptoc/get_origins_callback_cpptoc.h" 11164diff --git a/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.h 11165index d5318c9e17e80..5f09c5b4ad923 11166--- a/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.h 11167+++ b/src/cef/libcef_dll/cpptoc/get_origins_callback_cpptoc.h 11168@@ -1,4 +1,4 @@ 11169-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11170+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11171 // reserved. Use of this source code is governed by a BSD-style license that 11172 // can be found in the LICENSE file. 11173 // 11174@@ -9,7 +9,7 @@ 11175 // implementations. See the translator.README.txt file in the tools directory 11176 // for more information. 11177 // 11178-// $hash=86239d3281ad43ad93dcbe67a82a713044ab885d$ 11179+// $hash=a0d4dd8ca32ce2f249a5f36f798be8dfa594d25a$ 11180 // 11181 11182 #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_ORIGINS_CALLBACK_CPPTOC_H_ 11183diff --git a/src/cef/libcef_dll/cpptoc/image_cpptoc.cc b/src/cef/libcef_dll/cpptoc/image_cpptoc.cc 11184index 81dc865b265bf..ca857bef796d0 11185--- a/src/cef/libcef_dll/cpptoc/image_cpptoc.cc 11186+++ b/src/cef/libcef_dll/cpptoc/image_cpptoc.cc 11187@@ -1,4 +1,4 @@ 11188-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11189+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11190 // reserved. Use of this source code is governed by a BSD-style license that 11191 // can be found in the LICENSE file. 11192 // 11193@@ -9,7 +9,7 @@ 11194 // implementations. See the translator.README.txt file in the tools directory 11195 // for more information. 11196 // 11197-// $hash=e9ee6df7e0e77e54dea7e2c1e4b24cdc88b79344$ 11198+// $hash=fce97ac2600da10ad5349abe49c2cf80aaa6b55d$ 11199 // 11200 11201 #include "libcef_dll/cpptoc/image_cpptoc.h" 11202diff --git a/src/cef/libcef_dll/cpptoc/image_cpptoc.h b/src/cef/libcef_dll/cpptoc/image_cpptoc.h 11203index acd84570c2669..3f63462f19aaf 11204--- a/src/cef/libcef_dll/cpptoc/image_cpptoc.h 11205+++ b/src/cef/libcef_dll/cpptoc/image_cpptoc.h 11206@@ -1,4 +1,4 @@ 11207-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11208+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11209 // reserved. Use of this source code is governed by a BSD-style license that 11210 // can be found in the LICENSE file. 11211 // 11212@@ -9,7 +9,7 @@ 11213 // implementations. See the translator.README.txt file in the tools directory 11214 // for more information. 11215 // 11216-// $hash=e82ca8d18a0367d4061f67afd33a8a486f338238$ 11217+// $hash=4ce026e90daa0a4d5d4be0baf1e8dbd3ede5974f$ 11218 // 11219 11220 #ifndef CEF_LIBCEF_DLL_CPPTOC_IMAGE_CPPTOC_H_ 11221diff --git a/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc 11222index 1a0adf8512e6e..3ea3c17b15129 11223--- a/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc 11224+++ b/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc 11225@@ -1,4 +1,4 @@ 11226-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11227+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11228 // reserved. Use of this source code is governed by a BSD-style license that 11229 // can be found in the LICENSE file. 11230 // 11231@@ -9,7 +9,7 @@ 11232 // implementations. See the translator.README.txt file in the tools directory 11233 // for more information. 11234 // 11235-// $hash=b98959cda67200ef6a434297c5e9de53a2e948fb$ 11236+// $hash=98a8f58c5379ac345b36c7cde9ba25d31837447b$ 11237 // 11238 11239 #include "libcef_dll/cpptoc/java_script_result_callback_cpptoc.h" 11240diff --git a/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h 11241index 0f6e4290d339c..f029712a922ec 11242--- a/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h 11243+++ b/src/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h 11244@@ -1,4 +1,4 @@ 11245-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11246+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11247 // reserved. Use of this source code is governed by a BSD-style license that 11248 // can be found in the LICENSE file. 11249 // 11250@@ -9,7 +9,7 @@ 11251 // implementations. See the translator.README.txt file in the tools directory 11252 // for more information. 11253 // 11254-// $hash=fe951e9554ef1ba97fc78a2caac2f154497bde3f$ 11255+// $hash=d2e376ccc88d8547a4b4aca415a638f8b5fe6eab$ 11256 // 11257 11258 #ifndef CEF_LIBCEF_DLL_CPPTOC_JAVA_SCRIPT_RESULT_CALLBACK_CPPTOC_H_ 11259diff --git a/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc 11260index 7b6b2d8d60db5..81a399101a90a 11261--- a/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc 11262+++ b/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc 11263@@ -1,4 +1,4 @@ 11264-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11265+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11266 // reserved. Use of this source code is governed by a BSD-style license that 11267 // can be found in the LICENSE file. 11268 // 11269@@ -9,7 +9,7 @@ 11270 // implementations. See the translator.README.txt file in the tools directory 11271 // for more information. 11272 // 11273-// $hash=8a66dc7024a4d368e8368b1be42deff60f4966dc$ 11274+// $hash=9486b9a33142d7af6d5635bef96621238ceadd5d$ 11275 // 11276 11277 #include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h" 11278diff --git a/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h 11279index 1c6e3b5147fed..772ae287b6127 11280--- a/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h 11281+++ b/src/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h 11282@@ -1,4 +1,4 @@ 11283-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11284+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11285 // reserved. Use of this source code is governed by a BSD-style license that 11286 // can be found in the LICENSE file. 11287 // 11288@@ -9,7 +9,7 @@ 11289 // implementations. See the translator.README.txt file in the tools directory 11290 // for more information. 11291 // 11292-// $hash=5bc7b389cab53db3487532fbcae4ad156c814710$ 11293+// $hash=37aac75252a6f35a8abe927ca603849ce98ac1e1$ 11294 // 11295 11296 #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_ 11297diff --git a/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc 11298index 432323d8c3ab2..7148a942d24f4 11299--- a/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc 11300+++ b/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc 11301@@ -1,4 +1,4 @@ 11302-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11303+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11304 // reserved. Use of this source code is governed by a BSD-style license that 11305 // can be found in the LICENSE file. 11306 // 11307@@ -9,7 +9,7 @@ 11308 // implementations. See the translator.README.txt file in the tools directory 11309 // for more information. 11310 // 11311-// $hash=41c06df7feb0288f02c644bd633cce3f1754beba$ 11312+// $hash=93d039a400e46cc0b87bbab7a9b68b61e6dd6a66$ 11313 // 11314 11315 #include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" 11316diff --git a/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h 11317index d855c3a20e3b8..93f193d1db3de 11318--- a/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h 11319+++ b/src/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h 11320@@ -1,4 +1,4 @@ 11321-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11322+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11323 // reserved. Use of this source code is governed by a BSD-style license that 11324 // can be found in the LICENSE file. 11325 // 11326@@ -9,7 +9,7 @@ 11327 // implementations. See the translator.README.txt file in the tools directory 11328 // for more information. 11329 // 11330-// $hash=507a9b3192b98d0fad632714a8a4a4f97e5c19a3$ 11331+// $hash=c6a25a7ceb346f562302df398305f3d09a7c587d$ 11332 // 11333 11334 #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ 11335diff --git a/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc 11336index c9b7a0fa965ae..dd50c47adb2a7 11337--- a/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc 11338+++ b/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc 11339@@ -1,4 +1,4 @@ 11340-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11341+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11342 // reserved. Use of this source code is governed by a BSD-style license that 11343 // can be found in the LICENSE file. 11344 // 11345@@ -9,7 +9,7 @@ 11346 // implementations. See the translator.README.txt file in the tools directory 11347 // for more information. 11348 // 11349-// $hash=9f55775c0fcff5993efe9d8c9db75001d4335743$ 11350+// $hash=c1ff97a2d1992f704d02e1afc689a7d0b5426b6f$ 11351 // 11352 11353 #include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" 11354diff --git a/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h 11355index 2d01998aa31aa..9ce294a166104 11356--- a/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h 11357+++ b/src/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h 11358@@ -1,4 +1,4 @@ 11359-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11360+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11361 // reserved. Use of this source code is governed by a BSD-style license that 11362 // can be found in the LICENSE file. 11363 // 11364@@ -9,7 +9,7 @@ 11365 // implementations. See the translator.README.txt file in the tools directory 11366 // for more information. 11367 // 11368-// $hash=5d3509b80dac95b50b7d3c7053562169055ad361$ 11369+// $hash=0798f508afacf2ed239982052247da9cd7f366e9$ 11370 // 11371 11372 #ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ 11373diff --git a/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc 11374index d6f447c746260..ed436d9124b65 11375--- a/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc 11376+++ b/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc 11377@@ -1,4 +1,4 @@ 11378-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11379+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11380 // reserved. Use of this source code is governed by a BSD-style license that 11381 // can be found in the LICENSE file. 11382 // 11383@@ -9,7 +9,7 @@ 11384 // implementations. See the translator.README.txt file in the tools directory 11385 // for more information. 11386 // 11387-// $hash=46fab68760ab49b9a282aafb0e55d81de9cca943$ 11388+// $hash=402f069391e367a81c76fc24b1081e713acabcae$ 11389 // 11390 11391 #include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" 11392diff --git a/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h 11393index 94eca4fb27d2c..531314a0f60b3 11394--- a/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h 11395+++ b/src/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h 11396@@ -1,4 +1,4 @@ 11397-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11398+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11399 // reserved. Use of this source code is governed by a BSD-style license that 11400 // can be found in the LICENSE file. 11401 // 11402@@ -9,7 +9,7 @@ 11403 // implementations. See the translator.README.txt file in the tools directory 11404 // for more information. 11405 // 11406-// $hash=85c8f684b4799cf1410174b0e29a41b192eaf7a4$ 11407+// $hash=74c66feec24c563e6f3f32230dcb0dbf45ed9350$ 11408 // 11409 11410 #ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ 11411diff --git a/src/cef/libcef_dll/cpptoc/list_value_cpptoc.cc b/src/cef/libcef_dll/cpptoc/list_value_cpptoc.cc 11412index db4fc4e9f1bdc..e3d7b6bab8392 11413--- a/src/cef/libcef_dll/cpptoc/list_value_cpptoc.cc 11414+++ b/src/cef/libcef_dll/cpptoc/list_value_cpptoc.cc 11415@@ -1,4 +1,4 @@ 11416-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11417+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11418 // reserved. Use of this source code is governed by a BSD-style license that 11419 // can be found in the LICENSE file. 11420 // 11421@@ -9,7 +9,7 @@ 11422 // implementations. See the translator.README.txt file in the tools directory 11423 // for more information. 11424 // 11425-// $hash=2d2041c7571bd613f92c2d80c100e92e7439df6e$ 11426+// $hash=b62e31a8e177869cf33c37c48d158802700a0080$ 11427 // 11428 11429 #include "libcef_dll/cpptoc/list_value_cpptoc.h" 11430diff --git a/src/cef/libcef_dll/cpptoc/list_value_cpptoc.h b/src/cef/libcef_dll/cpptoc/list_value_cpptoc.h 11431index 4385aa5c0cab8..3e7b9c5138a3a 11432--- a/src/cef/libcef_dll/cpptoc/list_value_cpptoc.h 11433+++ b/src/cef/libcef_dll/cpptoc/list_value_cpptoc.h 11434@@ -1,4 +1,4 @@ 11435-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11436+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11437 // reserved. Use of this source code is governed by a BSD-style license that 11438 // can be found in the LICENSE file. 11439 // 11440@@ -9,7 +9,7 @@ 11441 // implementations. See the translator.README.txt file in the tools directory 11442 // for more information. 11443 // 11444-// $hash=85db2149d4c843eae2145e9015c2062d8ad45695$ 11445+// $hash=bb4f6bacea8366b11d1526059c5ad4c3df495630$ 11446 // 11447 11448 #ifndef CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_ 11449diff --git a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc 11450index e6a7312c38884..d27985a6a2c90 11451--- a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc 11452+++ b/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc 11453@@ -1,4 +1,4 @@ 11454-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11455+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11456 // reserved. Use of this source code is governed by a BSD-style license that 11457 // can be found in the LICENSE file. 11458 // 11459@@ -9,7 +9,7 @@ 11460 // implementations. See the translator.README.txt file in the tools directory 11461 // for more information. 11462 // 11463-// $hash=1c8a4ef9964effea5d8f02abc6890794c7a22df7$ 11464+// $hash=c0c0bf119990d7ce088a2c9c7fc0fc4a0a378460$ 11465 // 11466 11467 #include "libcef_dll/cpptoc/load_handler_cpptoc.h" 11468diff --git a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.h 11469index 31ed258d8bdd8..b17e7746a1cd1 11470--- a/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.h 11471+++ b/src/cef/libcef_dll/cpptoc/load_handler_cpptoc.h 11472@@ -1,4 +1,4 @@ 11473-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11474+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11475 // reserved. Use of this source code is governed by a BSD-style license that 11476 // can be found in the LICENSE file. 11477 // 11478@@ -9,7 +9,7 @@ 11479 // implementations. See the translator.README.txt file in the tools directory 11480 // for more information. 11481 // 11482-// $hash=67a49693f79a526ebb12c8352c13de8bf7c64784$ 11483+// $hash=60feef3855499ffd313c9e10fe4e8a6304acc871$ 11484 // 11485 11486 #ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ 11487diff --git a/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc b/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc 11488index 809b2184731f5..4e39df4d40934 11489--- a/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc 11490+++ b/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc 11491@@ -1,4 +1,4 @@ 11492-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11493+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11494 // reserved. Use of this source code is governed by a BSD-style license that 11495 // can be found in the LICENSE file. 11496 // 11497@@ -9,7 +9,7 @@ 11498 // implementations. See the translator.README.txt file in the tools directory 11499 // for more information. 11500 // 11501-// $hash=587be50ef3aefc00fadcf6fec431ebecc305b3eb$ 11502+// $hash=d5b8daec5b6d6a6632d664143e27361425c00212$ 11503 // 11504 11505 #include "libcef_dll/cpptoc/menu_model_cpptoc.h" 11506diff --git a/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.h b/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.h 11507index f8882f06df3bc..9344a7269361c 11508--- a/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.h 11509+++ b/src/cef/libcef_dll/cpptoc/menu_model_cpptoc.h 11510@@ -1,4 +1,4 @@ 11511-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11512+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11513 // reserved. Use of this source code is governed by a BSD-style license that 11514 // can be found in the LICENSE file. 11515 // 11516@@ -9,7 +9,7 @@ 11517 // implementations. See the translator.README.txt file in the tools directory 11518 // for more information. 11519 // 11520-// $hash=8c46e7f774742f9834a61bc7657fdc03a0ed580c$ 11521+// $hash=5f39f05bb39da5ede094d0e9789c5ef1dee1cf7f$ 11522 // 11523 11524 #ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_ 11525diff --git a/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc 11526index ecc7682476239..3da06a32c64e8 11527--- a/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc 11528+++ b/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc 11529@@ -1,4 +1,4 @@ 11530-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11531+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11532 // reserved. Use of this source code is governed by a BSD-style license that 11533 // can be found in the LICENSE file. 11534 // 11535@@ -9,7 +9,7 @@ 11536 // implementations. See the translator.README.txt file in the tools directory 11537 // for more information. 11538 // 11539-// $hash=d46082f24a6ad01677700ac68ad424cc4951efed$ 11540+// $hash=57f03a43b0143d9f4f52cd110400c2fbe06d72e9$ 11541 // 11542 11543 #include "libcef_dll/cpptoc/menu_model_delegate_cpptoc.h" 11544diff --git a/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h 11545index 4f4a4e749fdf5..50a03ba4db0a6 11546--- a/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h 11547+++ b/src/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h 11548@@ -1,4 +1,4 @@ 11549-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11550+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11551 // reserved. Use of this source code is governed by a BSD-style license that 11552 // can be found in the LICENSE file. 11553 // 11554@@ -9,7 +9,7 @@ 11555 // implementations. See the translator.README.txt file in the tools directory 11556 // for more information. 11557 // 11558-// $hash=c48cb7ff4b3e506b4e1ca8b1442bfe91d260ec67$ 11559+// $hash=2277b8692532f706316bb97ffe611394a00e1023$ 11560 // 11561 11562 #ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_DELEGATE_CPPTOC_H_ 11563diff --git a/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc b/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc 11564index b7788325b1146..4b068202620b5 11565--- a/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc 11566+++ b/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc 11567@@ -1,4 +1,4 @@ 11568-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11569+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11570 // reserved. Use of this source code is governed by a BSD-style license that 11571 // can be found in the LICENSE file. 11572 // 11573@@ -9,7 +9,7 @@ 11574 // implementations. See the translator.README.txt file in the tools directory 11575 // for more information. 11576 // 11577-// $hash=1e8f06cdecbf10a9b95fd1be4e6d4a0154f4aff0$ 11578+// $hash=a55e8468667740e9e121e0d553a416d2337c15f6$ 11579 // 11580 11581 #include "libcef_dll/cpptoc/navigation_entry_cpptoc.h" 11582diff --git a/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h b/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h 11583index f4857ed61ebcb..38285d8148aa6 11584--- a/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h 11585+++ b/src/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h 11586@@ -1,4 +1,4 @@ 11587-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11588+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11589 // reserved. Use of this source code is governed by a BSD-style license that 11590 // can be found in the LICENSE file. 11591 // 11592@@ -9,7 +9,7 @@ 11593 // implementations. See the translator.README.txt file in the tools directory 11594 // for more information. 11595 // 11596-// $hash=888591dac662cceb022bc320c159fcba58fc6e24$ 11597+// $hash=213e6404f2260e81c41b20a42ae7788af80710dc$ 11598 // 11599 11600 #ifndef CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_CPPTOC_H_ 11601diff --git a/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc 11602index 3fe2dba37c603..2f28f1ee089f3 11603--- a/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc 11604+++ b/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc 11605@@ -1,4 +1,4 @@ 11606-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11607+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11608 // reserved. Use of this source code is governed by a BSD-style license that 11609 // can be found in the LICENSE file. 11610 // 11611@@ -9,7 +9,7 @@ 11612 // implementations. See the translator.README.txt file in the tools directory 11613 // for more information. 11614 // 11615-// $hash=dc5e1a5dece19a5168915d1a6816ac4a52c1078f$ 11616+// $hash=bb3302d31f5fe2e81cde418da8c25d16138ce3b7$ 11617 // 11618 11619 #include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" 11620diff --git a/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h b/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h 11621index 30c02d6f876af..77bb1a6807fba 11622--- a/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h 11623+++ b/src/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h 11624@@ -1,4 +1,4 @@ 11625-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11626+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11627 // reserved. Use of this source code is governed by a BSD-style license that 11628 // can be found in the LICENSE file. 11629 // 11630@@ -9,7 +9,7 @@ 11631 // implementations. See the translator.README.txt file in the tools directory 11632 // for more information. 11633 // 11634-// $hash=112f7c12c88d09e4d300cd3d8bf1f72b1be54596$ 11635+// $hash=e2fe9b1846135732e7596c2ff7ab6efadbb5a519$ 11636 // 11637 11638 #ifndef CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ 11639diff --git a/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc 11640index 5a5d810c4fb72..11bc0594c5bc5 11641--- a/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc 11642+++ b/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc 11643@@ -1,4 +1,4 @@ 11644-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11645+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11646 // reserved. Use of this source code is governed by a BSD-style license that 11647 // can be found in the LICENSE file. 11648 // 11649@@ -9,7 +9,7 @@ 11650 // implementations. See the translator.README.txt file in the tools directory 11651 // for more information. 11652 // 11653-// $hash=388a87f728a292dc4e2101724656ac09b8fdaa1d$ 11654+// $hash=7f58256b38894ba0a8bf514cbdd2719e75bca5c3$ 11655 // 11656 11657 #include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" 11658diff --git a/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h 11659index df0c88723c98d..79130c8db5211 11660--- a/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h 11661+++ b/src/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h 11662@@ -1,4 +1,4 @@ 11663-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11664+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11665 // reserved. Use of this source code is governed by a BSD-style license that 11666 // can be found in the LICENSE file. 11667 // 11668@@ -9,7 +9,7 @@ 11669 // implementations. See the translator.README.txt file in the tools directory 11670 // for more information. 11671 // 11672-// $hash=0dfa6d58ed63c1e3be9992486e404a642df6e32a$ 11673+// $hash=5e9c671740881e345231547607160ce167d37728$ 11674 // 11675 11676 #ifndef CEF_LIBCEF_DLL_CPPTOC_PDF_PRINT_CALLBACK_CPPTOC_H_ 11677diff --git a/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc b/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc 11678index 4038e2c5cf85c..fe5ff538b45d3 11679--- a/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc 11680+++ b/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc 11681@@ -1,4 +1,4 @@ 11682-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11683+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11684 // reserved. Use of this source code is governed by a BSD-style license that 11685 // can be found in the LICENSE file. 11686 // 11687@@ -9,7 +9,7 @@ 11688 // implementations. See the translator.README.txt file in the tools directory 11689 // for more information. 11690 // 11691-// $hash=a0c1e9d26c0b0129b85719532cd7312019c2d5f3$ 11692+// $hash=26d002adb41352f89861e1da149863a378f00a1e$ 11693 // 11694 11695 #include "libcef_dll/cpptoc/permission_request_cpptoc.h" 11696diff --git a/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.h b/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.h 11697index fc597ec736bab..7446187b86322 11698--- a/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.h 11699+++ b/src/cef/libcef_dll/cpptoc/permission_request_cpptoc.h 11700@@ -1,4 +1,4 @@ 11701-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11702+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11703 // reserved. Use of this source code is governed by a BSD-style license that 11704 // can be found in the LICENSE file. 11705 // 11706@@ -9,7 +9,7 @@ 11707 // implementations. See the translator.README.txt file in the tools directory 11708 // for more information. 11709 // 11710-// $hash=b4bca43d1905283a291f6df6cf1a15bccf569618$ 11711+// $hash=8ef60b5e6629947be455e0c402c9170bf7848cff$ 11712 // 11713 11714 #ifndef CEF_LIBCEF_DLL_CPPTOC_PERMISSION_REQUEST_CPPTOC_H_ 11715diff --git a/src/cef/libcef_dll/cpptoc/post_data_cpptoc.cc b/src/cef/libcef_dll/cpptoc/post_data_cpptoc.cc 11716index 2b1d0e145f88b..ecbbae66b2b42 11717--- a/src/cef/libcef_dll/cpptoc/post_data_cpptoc.cc 11718+++ b/src/cef/libcef_dll/cpptoc/post_data_cpptoc.cc 11719@@ -1,4 +1,4 @@ 11720-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11721+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11722 // reserved. Use of this source code is governed by a BSD-style license that 11723 // can be found in the LICENSE file. 11724 // 11725@@ -9,7 +9,7 @@ 11726 // implementations. See the translator.README.txt file in the tools directory 11727 // for more information. 11728 // 11729-// $hash=935efc8f333c6df95b783e1e80bb84aa26d55b9b$ 11730+// $hash=0de557ec053dbe8fd6ae4e455450549ff322e195$ 11731 // 11732 11733 #include "libcef_dll/cpptoc/post_data_cpptoc.h" 11734diff --git a/src/cef/libcef_dll/cpptoc/post_data_cpptoc.h b/src/cef/libcef_dll/cpptoc/post_data_cpptoc.h 11735index ff139f20d0f14..59518a2bd8aff 11736--- a/src/cef/libcef_dll/cpptoc/post_data_cpptoc.h 11737+++ b/src/cef/libcef_dll/cpptoc/post_data_cpptoc.h 11738@@ -1,4 +1,4 @@ 11739-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11740+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11741 // reserved. Use of this source code is governed by a BSD-style license that 11742 // can be found in the LICENSE file. 11743 // 11744@@ -9,7 +9,7 @@ 11745 // implementations. See the translator.README.txt file in the tools directory 11746 // for more information. 11747 // 11748-// $hash=c73c8a6c74113ead0251ca0afb007d2baa02030b$ 11749+// $hash=784458fd59458b07ba3c6eacac3803b9901c354c$ 11750 // 11751 11752 #ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ 11753diff --git a/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc b/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc 11754index 1dff9418b3137..55916e44b4499 11755--- a/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc 11756+++ b/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc 11757@@ -1,4 +1,4 @@ 11758-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11759+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11760 // reserved. Use of this source code is governed by a BSD-style license that 11761 // can be found in the LICENSE file. 11762 // 11763@@ -9,7 +9,7 @@ 11764 // implementations. See the translator.README.txt file in the tools directory 11765 // for more information. 11766 // 11767-// $hash=6148547c3504062984362b43db9e95ee68ef1358$ 11768+// $hash=eb33ec601cd24711837575d3bc19dc603a2d939a$ 11769 // 11770 11771 #include "libcef_dll/cpptoc/post_data_element_cpptoc.h" 11772diff --git a/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h b/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h 11773index 176e3081bf016..5b57b20450e85 11774--- a/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h 11775+++ b/src/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h 11776@@ -1,4 +1,4 @@ 11777-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11778+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11779 // reserved. Use of this source code is governed by a BSD-style license that 11780 // can be found in the LICENSE file. 11781 // 11782@@ -9,7 +9,7 @@ 11783 // implementations. See the translator.README.txt file in the tools directory 11784 // for more information. 11785 // 11786-// $hash=e29b5318c16ccbffa354d79176698d1709048e32$ 11787+// $hash=6d48d5f01f5cebcdca0fcfa7ce2b39a049fdc9cd$ 11788 // 11789 11790 #ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ 11791diff --git a/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc 11792index ac4a1fbd244ba..5eb17755a750a 11793--- a/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc 11794+++ b/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc 11795@@ -1,4 +1,4 @@ 11796-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11797+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11798 // reserved. Use of this source code is governed by a BSD-style license that 11799 // can be found in the LICENSE file. 11800 // 11801@@ -9,7 +9,7 @@ 11802 // implementations. See the translator.README.txt file in the tools directory 11803 // for more information. 11804 // 11805-// $hash=5332b8cb609fa0f5b98e607878678808d21da3a4$ 11806+// $hash=bca20d1cfd7f00c65784d4532b02f8a05cf06068$ 11807 // 11808 11809 #include "libcef_dll/cpptoc/print_dialog_callback_cpptoc.h" 11810diff --git a/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h 11811index f16cff04f2825..281ef13984eb8 11812--- a/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h 11813+++ b/src/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h 11814@@ -1,4 +1,4 @@ 11815-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11816+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11817 // reserved. Use of this source code is governed by a BSD-style license that 11818 // can be found in the LICENSE file. 11819 // 11820@@ -9,7 +9,7 @@ 11821 // implementations. See the translator.README.txt file in the tools directory 11822 // for more information. 11823 // 11824-// $hash=88e44e22bb56d51ba9a60f38f59b89bb3e372748$ 11825+// $hash=ee6fd2ddae3899be82feca1e37cce919363bae99$ 11826 // 11827 11828 #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_DIALOG_CALLBACK_CPPTOC_H_ 11829diff --git a/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc 11830index dd6c36379ebb7..b2d5be1531e5c 11831--- a/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc 11832+++ b/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc 11833@@ -1,4 +1,4 @@ 11834-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11835+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11836 // reserved. Use of this source code is governed by a BSD-style license that 11837 // can be found in the LICENSE file. 11838 // 11839@@ -9,7 +9,7 @@ 11840 // implementations. See the translator.README.txt file in the tools directory 11841 // for more information. 11842 // 11843-// $hash=9c26e4bf9952a26541915f64dad82080f09dfd58$ 11844+// $hash=b23eaa74cd7c6a1075d6a8c4b7d1ecbc9effe142$ 11845 // 11846 11847 #include "libcef_dll/cpptoc/print_handler_cpptoc.h" 11848diff --git a/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.h 11849index da73686680aab..f2d71b3cc5f52 11850--- a/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.h 11851+++ b/src/cef/libcef_dll/cpptoc/print_handler_cpptoc.h 11852@@ -1,4 +1,4 @@ 11853-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11854+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11855 // reserved. Use of this source code is governed by a BSD-style license that 11856 // can be found in the LICENSE file. 11857 // 11858@@ -9,7 +9,7 @@ 11859 // implementations. See the translator.README.txt file in the tools directory 11860 // for more information. 11861 // 11862-// $hash=49bb73be2c56a31fff2e88875360591dd31bdd8c$ 11863+// $hash=cd0bb4e9c12f53896be544b28ae3c6f38b3504e2$ 11864 // 11865 11866 #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ 11867diff --git a/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc 11868index 45ec93c715f3a..038259e327373 11869--- a/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc 11870+++ b/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc 11871@@ -1,4 +1,4 @@ 11872-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11873+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11874 // reserved. Use of this source code is governed by a BSD-style license that 11875 // can be found in the LICENSE file. 11876 // 11877@@ -9,7 +9,7 @@ 11878 // implementations. See the translator.README.txt file in the tools directory 11879 // for more information. 11880 // 11881-// $hash=3becd112f5c17b36328e77fcdcd296cdf73291a3$ 11882+// $hash=e631d13c43819555aabf52b015d40ab9cd532b91$ 11883 // 11884 11885 #include "libcef_dll/cpptoc/print_job_callback_cpptoc.h" 11886diff --git a/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h 11887index ec169ba4a0ce8..cc5901085d0eb 11888--- a/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h 11889+++ b/src/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h 11890@@ -1,4 +1,4 @@ 11891-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11892+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11893 // reserved. Use of this source code is governed by a BSD-style license that 11894 // can be found in the LICENSE file. 11895 // 11896@@ -9,7 +9,7 @@ 11897 // implementations. See the translator.README.txt file in the tools directory 11898 // for more information. 11899 // 11900-// $hash=d3c680caf88e14fa8cd3c846fe44870900f82ea1$ 11901+// $hash=54a355e9511b5d0956f1a7269ee21766fa7f8c87$ 11902 // 11903 11904 #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_JOB_CALLBACK_CPPTOC_H_ 11905diff --git a/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc b/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc 11906index 4138aaf281f20..0f012ca207606 11907--- a/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc 11908+++ b/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc 11909@@ -1,4 +1,4 @@ 11910-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11911+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11912 // reserved. Use of this source code is governed by a BSD-style license that 11913 // can be found in the LICENSE file. 11914 // 11915@@ -9,7 +9,7 @@ 11916 // implementations. See the translator.README.txt file in the tools directory 11917 // for more information. 11918 // 11919-// $hash=8840518039eff950764302105148c5da0b0c996a$ 11920+// $hash=fe89e407154f3696538e128f07da6d26767b7f5c$ 11921 // 11922 11923 #include "libcef_dll/cpptoc/print_settings_cpptoc.h" 11924diff --git a/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.h b/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.h 11925index 6e6eea2140648..c7ece39229d0d 11926--- a/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.h 11927+++ b/src/cef/libcef_dll/cpptoc/print_settings_cpptoc.h 11928@@ -1,4 +1,4 @@ 11929-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11930+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11931 // reserved. Use of this source code is governed by a BSD-style license that 11932 // can be found in the LICENSE file. 11933 // 11934@@ -9,7 +9,7 @@ 11935 // implementations. See the translator.README.txt file in the tools directory 11936 // for more information. 11937 // 11938-// $hash=ab8680da4bc909d2c1a6cf723fafc1a561bfeb44$ 11939+// $hash=596144335f97b41394808d0de0908c2a69d04d7a$ 11940 // 11941 11942 #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_SETTINGS_CPPTOC_H_ 11943diff --git a/src/cef/libcef_dll/cpptoc/process_message_cpptoc.cc b/src/cef/libcef_dll/cpptoc/process_message_cpptoc.cc 11944index f6473634e0b92..a26067d9b044f 11945--- a/src/cef/libcef_dll/cpptoc/process_message_cpptoc.cc 11946+++ b/src/cef/libcef_dll/cpptoc/process_message_cpptoc.cc 11947@@ -1,4 +1,4 @@ 11948-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11949+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11950 // reserved. Use of this source code is governed by a BSD-style license that 11951 // can be found in the LICENSE file. 11952 // 11953@@ -9,7 +9,7 @@ 11954 // implementations. See the translator.README.txt file in the tools directory 11955 // for more information. 11956 // 11957-// $hash=b63f665e68e4dc6269c3e88b81068190ea90abb3$ 11958+// $hash=380c4fce89031ac6da4de226f3007d1a8a1b26ef$ 11959 // 11960 11961 #include "libcef_dll/cpptoc/process_message_cpptoc.h" 11962diff --git a/src/cef/libcef_dll/cpptoc/process_message_cpptoc.h b/src/cef/libcef_dll/cpptoc/process_message_cpptoc.h 11963index 76f2c5d97bf9c..e3f2485893858 11964--- a/src/cef/libcef_dll/cpptoc/process_message_cpptoc.h 11965+++ b/src/cef/libcef_dll/cpptoc/process_message_cpptoc.h 11966@@ -1,4 +1,4 @@ 11967-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11968+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11969 // reserved. Use of this source code is governed by a BSD-style license that 11970 // can be found in the LICENSE file. 11971 // 11972@@ -9,7 +9,7 @@ 11973 // implementations. See the translator.README.txt file in the tools directory 11974 // for more information. 11975 // 11976-// $hash=e70a96835042a2ebf0a60f2130f31d24f1ca59fd$ 11977+// $hash=6d4c104d51d4d34c0ec8b767a13db58a6fb0fef8$ 11978 // 11979 11980 #ifndef CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_ 11981diff --git a/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc 11982index ca8ec58e351c2..f2990fc4d5605 11983--- a/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc 11984+++ b/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc 11985@@ -1,4 +1,4 @@ 11986-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 11987+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 11988 // reserved. Use of this source code is governed by a BSD-style license that 11989 // can be found in the LICENSE file. 11990 // 11991@@ -9,7 +9,7 @@ 11992 // implementations. See the translator.README.txt file in the tools directory 11993 // for more information. 11994 // 11995-// $hash=a0976edc09e822700d8f402b2dae7af4c434d86f$ 11996+// $hash=dead2ddfaea0555af195b8bb7bb858a57e96f25b$ 11997 // 11998 11999 #include "libcef_dll/cpptoc/read_handler_cpptoc.h" 12000diff --git a/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.h 12001index eda92ed97ca9e..4c4ddc6ee3276 12002--- a/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.h 12003+++ b/src/cef/libcef_dll/cpptoc/read_handler_cpptoc.h 12004@@ -1,4 +1,4 @@ 12005-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12006+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12007 // reserved. Use of this source code is governed by a BSD-style license that 12008 // can be found in the LICENSE file. 12009 // 12010@@ -9,7 +9,7 @@ 12011 // implementations. See the translator.README.txt file in the tools directory 12012 // for more information. 12013 // 12014-// $hash=3c16def2c698c26a175b1087db819d3894a264fa$ 12015+// $hash=8a5eb8ffc9a8857ac10a6586e954dc532d10618a$ 12016 // 12017 12018 #ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ 12019diff --git a/src/cef/libcef_dll/cpptoc/registration_cpptoc.cc b/src/cef/libcef_dll/cpptoc/registration_cpptoc.cc 12020index 5d959db487a0e..ab7f377f33f14 12021--- a/src/cef/libcef_dll/cpptoc/registration_cpptoc.cc 12022+++ b/src/cef/libcef_dll/cpptoc/registration_cpptoc.cc 12023@@ -1,4 +1,4 @@ 12024-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12025+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12026 // reserved. Use of this source code is governed by a BSD-style license that 12027 // can be found in the LICENSE file. 12028 // 12029@@ -9,7 +9,7 @@ 12030 // implementations. See the translator.README.txt file in the tools directory 12031 // for more information. 12032 // 12033-// $hash=bfa5ab4142b6fe56939a45241a39bb74f3a84acb$ 12034+// $hash=9256f12f40a70c8a2e6100882473516f80c097c4$ 12035 // 12036 12037 #include "libcef_dll/cpptoc/registration_cpptoc.h" 12038diff --git a/src/cef/libcef_dll/cpptoc/registration_cpptoc.h b/src/cef/libcef_dll/cpptoc/registration_cpptoc.h 12039index e623e5f7d471d..8fd4ce15dc226 12040--- a/src/cef/libcef_dll/cpptoc/registration_cpptoc.h 12041+++ b/src/cef/libcef_dll/cpptoc/registration_cpptoc.h 12042@@ -1,4 +1,4 @@ 12043-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12044+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12045 // reserved. Use of this source code is governed by a BSD-style license that 12046 // can be found in the LICENSE file. 12047 // 12048@@ -9,7 +9,7 @@ 12049 // implementations. See the translator.README.txt file in the tools directory 12050 // for more information. 12051 // 12052-// $hash=edd002ac63a0564820617ad44c5c30f9674b8122$ 12053+// $hash=461d6b9297ebd61bf8d2df2e3960458a9a3705f6$ 12054 // 12055 12056 #ifndef CEF_LIBCEF_DLL_CPPTOC_REGISTRATION_CPPTOC_H_ 12057diff --git a/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc 12058index 32553b7017bae..4add57745a8f4 12059--- a/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc 12060+++ b/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc 12061@@ -1,4 +1,4 @@ 12062-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12063+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12064 // reserved. Use of this source code is governed by a BSD-style license that 12065 // can be found in the LICENSE file. 12066 // 12067@@ -9,7 +9,7 @@ 12068 // implementations. See the translator.README.txt file in the tools directory 12069 // for more information. 12070 // 12071-// $hash=c83f5f49a5411a5071750e238c12e22bfa82c48a$ 12072+// $hash=5da07c9f36d3f52ef73ea85ebd73fecb31838536$ 12073 // 12074 12075 #include "libcef_dll/cpptoc/render_handler_cpptoc.h" 12076diff --git a/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.h 12077index c213ddf908607..f56251d7d1e9b 12078--- a/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.h 12079+++ b/src/cef/libcef_dll/cpptoc/render_handler_cpptoc.h 12080@@ -1,4 +1,4 @@ 12081-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12082+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12083 // reserved. Use of this source code is governed by a BSD-style license that 12084 // can be found in the LICENSE file. 12085 // 12086@@ -9,7 +9,7 @@ 12087 // implementations. See the translator.README.txt file in the tools directory 12088 // for more information. 12089 // 12090-// $hash=18b7f5398b817f5d20f26aa4e139faa4f91cfe0b$ 12091+// $hash=a0cdfb84f8b30f01dd01556ad3e1725e043641e0$ 12092 // 12093 12094 #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ 12095diff --git a/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc 12096index 42c4ad45eceb8..fa68599a2be28 12097--- a/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc 12098+++ b/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc 12099@@ -1,4 +1,4 @@ 12100-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12101+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12102 // reserved. Use of this source code is governed by a BSD-style license that 12103 // can be found in the LICENSE file. 12104 // 12105@@ -9,7 +9,7 @@ 12106 // implementations. See the translator.README.txt file in the tools directory 12107 // for more information. 12108 // 12109-// $hash=08f14fa621595f247e87853c39c3375fce2c9326$ 12110+// $hash=05c223f2568d1c7deb34613ae3838bdcf6fdb0ee$ 12111 // 12112 12113 #include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" 12114diff --git a/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h 12115index 599203043efa4..124c4a5092987 12116--- a/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h 12117+++ b/src/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h 12118@@ -1,4 +1,4 @@ 12119-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12120+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12121 // reserved. Use of this source code is governed by a BSD-style license that 12122 // can be found in the LICENSE file. 12123 // 12124@@ -9,7 +9,7 @@ 12125 // implementations. See the translator.README.txt file in the tools directory 12126 // for more information. 12127 // 12128-// $hash=8d832edacd5ccc0baac1314aaa9424ba2ab4837c$ 12129+// $hash=1686827d48e7c0d75a603a2b6b8ca05b4f158340$ 12130 // 12131 12132 #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ 12133diff --git a/src/cef/libcef_dll/cpptoc/request_context_cpptoc.cc b/src/cef/libcef_dll/cpptoc/request_context_cpptoc.cc 12134index 228abbc4db996..5fb169abd4c74 12135--- a/src/cef/libcef_dll/cpptoc/request_context_cpptoc.cc 12136+++ b/src/cef/libcef_dll/cpptoc/request_context_cpptoc.cc 12137@@ -1,4 +1,4 @@ 12138-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12139+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12140 // reserved. Use of this source code is governed by a BSD-style license that 12141 // can be found in the LICENSE file. 12142 // 12143@@ -9,7 +9,7 @@ 12144 // implementations. See the translator.README.txt file in the tools directory 12145 // for more information. 12146 // 12147-// $hash=f895effb80d27ea9ae57687c81df2f8871e2ea53$ 12148+// $hash=8b3881774a33c2efa32765341a72e050d321db58$ 12149 // 12150 12151 #include "libcef_dll/cpptoc/request_context_cpptoc.h" 12152@@ -17,7 +17,6 @@ 12153 #include "libcef_dll/cpptoc/data_base_cpptoc.h" 12154 #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" 12155 #include "libcef_dll/cpptoc/extension_cpptoc.h" 12156-#include "libcef_dll/cpptoc/media_router_cpptoc.h" 12157 #include "libcef_dll/cpptoc/value_cpptoc.h" 12158 #include "libcef_dll/cpptoc/web_storage_cpptoc.h" 12159 #include "libcef_dll/ctocpp/completion_callback_ctocpp.h" 12160@@ -579,25 +578,6 @@ request_context_get_extension(struct _cef_request_context_t* self, 12161 return CefExtensionCppToC::Wrap(_retval); 12162 } 12163 12164-cef_media_router_t* CEF_CALLBACK 12165-request_context_get_media_router(struct _cef_request_context_t* self, 12166- cef_completion_callback_t* callback) { 12167- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 12168- 12169- DCHECK(self); 12170- if (!self) 12171- return NULL; 12172- // Unverified params: callback 12173- 12174- // Execute 12175- CefRefPtr<CefMediaRouter> _retval = 12176- CefRequestContextCppToC::Get(self)->GetMediaRouter( 12177- CefCompletionCallbackCToCpp::Wrap(callback)); 12178- 12179- // Return type: refptr_same 12180- return CefMediaRouterCppToC::Wrap(_retval); 12181-} 12182- 12183 } // namespace 12184 12185 // CONSTRUCTOR - Do not edit by hand. 12186@@ -633,7 +613,6 @@ CefRequestContextCppToC::CefRequestContextCppToC() { 12187 GetStruct()->has_extension = request_context_has_extension; 12188 GetStruct()->get_extensions = request_context_get_extensions; 12189 GetStruct()->get_extension = request_context_get_extension; 12190- GetStruct()->get_media_router = request_context_get_media_router; 12191 } 12192 12193 // DESTRUCTOR - Do not edit by hand. 12194diff --git a/src/cef/libcef_dll/cpptoc/request_context_cpptoc.h b/src/cef/libcef_dll/cpptoc/request_context_cpptoc.h 12195index bf9847b8d1767..f798fefbaecc2 12196--- a/src/cef/libcef_dll/cpptoc/request_context_cpptoc.h 12197+++ b/src/cef/libcef_dll/cpptoc/request_context_cpptoc.h 12198@@ -1,4 +1,4 @@ 12199-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12200+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12201 // reserved. Use of this source code is governed by a BSD-style license that 12202 // can be found in the LICENSE file. 12203 // 12204@@ -9,7 +9,7 @@ 12205 // implementations. See the translator.README.txt file in the tools directory 12206 // for more information. 12207 // 12208-// $hash=7350e36d25125a3560d0e0da5b46daa60295c7a7$ 12209+// $hash=07ccff0f6993fe1634467a76d9996081fca0ec3a$ 12210 // 12211 12212 #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_CPPTOC_H_ 12213diff --git a/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc 12214index 6bc9ece6db413..8d8a3464f80a5 12215--- a/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc 12216+++ b/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc 12217@@ -1,4 +1,4 @@ 12218-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12219+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12220 // reserved. Use of this source code is governed by a BSD-style license that 12221 // can be found in the LICENSE file. 12222 // 12223@@ -9,7 +9,7 @@ 12224 // implementations. See the translator.README.txt file in the tools directory 12225 // for more information. 12226 // 12227-// $hash=2e085c019a8e5c4701db0ee23fbd06b275e6342b$ 12228+// $hash=43bd770ac450f9f61d50ddebd85b209953c2fce0$ 12229 // 12230 12231 #include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" 12232diff --git a/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h 12233index aaa029d91b30c..7a002b9517cb5 12234--- a/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h 12235+++ b/src/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h 12236@@ -1,4 +1,4 @@ 12237-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12238+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12239 // reserved. Use of this source code is governed by a BSD-style license that 12240 // can be found in the LICENSE file. 12241 // 12242@@ -9,7 +9,7 @@ 12243 // implementations. See the translator.README.txt file in the tools directory 12244 // for more information. 12245 // 12246-// $hash=e1cebce8a08c570f02235a53bab5f6aa0b13699c$ 12247+// $hash=0985ec29d8f7825abf5542f7bff3a0477431fc1a$ 12248 // 12249 12250 #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ 12251diff --git a/src/cef/libcef_dll/cpptoc/request_cpptoc.cc b/src/cef/libcef_dll/cpptoc/request_cpptoc.cc 12252index ee7cd8b9be4b3..9086c22b3d087 12253--- a/src/cef/libcef_dll/cpptoc/request_cpptoc.cc 12254+++ b/src/cef/libcef_dll/cpptoc/request_cpptoc.cc 12255@@ -1,4 +1,4 @@ 12256-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12257+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12258 // reserved. Use of this source code is governed by a BSD-style license that 12259 // can be found in the LICENSE file. 12260 // 12261@@ -9,7 +9,7 @@ 12262 // implementations. See the translator.README.txt file in the tools directory 12263 // for more information. 12264 // 12265-// $hash=b1a7f857e453a625325a1a2847e60990eecc61ea$ 12266+// $hash=4f55af31ee0cf2bde8f353e26283210430f2d871$ 12267 // 12268 12269 #include "libcef_dll/cpptoc/request_cpptoc.h" 12270diff --git a/src/cef/libcef_dll/cpptoc/request_cpptoc.h b/src/cef/libcef_dll/cpptoc/request_cpptoc.h 12271index b93e0ba163e8c..723e1dec0ea38 12272--- a/src/cef/libcef_dll/cpptoc/request_cpptoc.h 12273+++ b/src/cef/libcef_dll/cpptoc/request_cpptoc.h 12274@@ -1,4 +1,4 @@ 12275-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12276+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12277 // reserved. Use of this source code is governed by a BSD-style license that 12278 // can be found in the LICENSE file. 12279 // 12280@@ -9,7 +9,7 @@ 12281 // implementations. See the translator.README.txt file in the tools directory 12282 // for more information. 12283 // 12284-// $hash=25a489e9a54195be43325a811956c66f578fbeb0$ 12285+// $hash=406c30cba514a450568bc341a7facf5495ab58a5$ 12286 // 12287 12288 #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ 12289diff --git a/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc 12290index 04ed33bc8dda2..5607a0984816f 12291--- a/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc 12292+++ b/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc 12293@@ -1,4 +1,4 @@ 12294-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12295+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12296 // reserved. Use of this source code is governed by a BSD-style license that 12297 // can be found in the LICENSE file. 12298 // 12299@@ -9,7 +9,7 @@ 12300 // implementations. See the translator.README.txt file in the tools directory 12301 // for more information. 12302 // 12303-// $hash=162a493c73858bd96eb41016a031932bb23d4a70$ 12304+// $hash=bd54d0dce483d6e05e564e7fbe6a2743f4d6b277$ 12305 // 12306 12307 #include "libcef_dll/cpptoc/request_handler_cpptoc.h" 12308diff --git a/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.h 12309index 70c502128ec88..73ff5d4c73743 12310--- a/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.h 12311+++ b/src/cef/libcef_dll/cpptoc/request_handler_cpptoc.h 12312@@ -1,4 +1,4 @@ 12313-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12314+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12315 // reserved. Use of this source code is governed by a BSD-style license that 12316 // can be found in the LICENSE file. 12317 // 12318@@ -9,7 +9,7 @@ 12319 // implementations. See the translator.README.txt file in the tools directory 12320 // for more information. 12321 // 12322-// $hash=4cda9dc12a20ead4f6889fd26a176da22ca67c50$ 12323+// $hash=0167d427e72426d439b11b2655caac2b79a7b8de$ 12324 // 12325 12326 #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ 12327diff --git a/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc 12328index 6ec72fcf3acb4..7a1f12e0e1033 12329--- a/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc 12330+++ b/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc 12331@@ -1,4 +1,4 @@ 12332-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12333+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12334 // reserved. Use of this source code is governed by a BSD-style license that 12335 // can be found in the LICENSE file. 12336 // 12337@@ -9,7 +9,7 @@ 12338 // implementations. See the translator.README.txt file in the tools directory 12339 // for more information. 12340 // 12341-// $hash=d6f5224414a15d32a42ed2862b30c0076d0b5d95$ 12342+// $hash=0a182976f79666acbe49e7bc5fe2e8b07b3afe7c$ 12343 // 12344 12345 #include "libcef_dll/cpptoc/resolve_callback_cpptoc.h" 12346diff --git a/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h 12347index 76e790de0375f..cd35ce3d73963 12348--- a/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h 12349+++ b/src/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h 12350@@ -1,4 +1,4 @@ 12351-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12352+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12353 // reserved. Use of this source code is governed by a BSD-style license that 12354 // can be found in the LICENSE file. 12355 // 12356@@ -9,7 +9,7 @@ 12357 // implementations. See the translator.README.txt file in the tools directory 12358 // for more information. 12359 // 12360-// $hash=659df5decaf5cab4624f6f15b8bceeed0bd2d228$ 12361+// $hash=aea5c318f99d23b06478b765f81720890aa098b3$ 12362 // 12363 12364 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOLVE_CALLBACK_CPPTOC_H_ 12365diff --git a/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc 12366index 97ad75f998995..8c2cd88f14cbd 12367--- a/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc 12368+++ b/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc 12369@@ -1,4 +1,4 @@ 12370-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12371+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12372 // reserved. Use of this source code is governed by a BSD-style license that 12373 // can be found in the LICENSE file. 12374 // 12375@@ -9,7 +9,7 @@ 12376 // implementations. See the translator.README.txt file in the tools directory 12377 // for more information. 12378 // 12379-// $hash=5081aa41e87ea1a44df19f1df060a478b3b902d8$ 12380+// $hash=99b8484b086c9f3d26e56621610e7761ba5d4f5e$ 12381 // 12382 12383 #include "libcef_dll/cpptoc/resource_bundle_cpptoc.h" 12384diff --git a/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h 12385index 429418a493091..8102bff0994ea 12386--- a/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h 12387+++ b/src/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h 12388@@ -1,4 +1,4 @@ 12389-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12390+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12391 // reserved. Use of this source code is governed by a BSD-style license that 12392 // can be found in the LICENSE file. 12393 // 12394@@ -9,7 +9,7 @@ 12395 // implementations. See the translator.README.txt file in the tools directory 12396 // for more information. 12397 // 12398-// $hash=808eba3682873dd7b948ed9f572d9960df9a1b2d$ 12399+// $hash=c126e6379765b577e7251c418bd3fe4dbe392522$ 12400 // 12401 12402 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_CPPTOC_H_ 12403diff --git a/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc 12404index 8e9a45951a4e3..e530d86a815ce 12405--- a/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc 12406+++ b/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc 12407@@ -1,4 +1,4 @@ 12408-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12409+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12410 // reserved. Use of this source code is governed by a BSD-style license that 12411 // can be found in the LICENSE file. 12412 // 12413@@ -9,7 +9,7 @@ 12414 // implementations. See the translator.README.txt file in the tools directory 12415 // for more information. 12416 // 12417-// $hash=486d1b31ccfd53e10dec622d3ae024c23b50e2c2$ 12418+// $hash=d7cb40bc1f7bbdf092b3c80b162f134f24253359$ 12419 // 12420 12421 #include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" 12422diff --git a/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h 12423index 12d1d945c5aa7..3b74d91484943 12424--- a/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h 12425+++ b/src/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h 12426@@ -1,4 +1,4 @@ 12427-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12428+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12429 // reserved. Use of this source code is governed by a BSD-style license that 12430 // can be found in the LICENSE file. 12431 // 12432@@ -9,7 +9,7 @@ 12433 // implementations. See the translator.README.txt file in the tools directory 12434 // for more information. 12435 // 12436-// $hash=26b5dfed49b7182c1bdf52f50547ccb26c4850fe$ 12437+// $hash=f6e9e2a12912ea7b9ab5060481e323c180698725$ 12438 // 12439 12440 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ 12441diff --git a/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc 12442index 078bd359c9ad8..cd59767ef3927 12443--- a/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc 12444+++ b/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc 12445@@ -1,4 +1,4 @@ 12446-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12447+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12448 // reserved. Use of this source code is governed by a BSD-style license that 12449 // can be found in the LICENSE file. 12450 // 12451@@ -9,7 +9,7 @@ 12452 // implementations. See the translator.README.txt file in the tools directory 12453 // for more information. 12454 // 12455-// $hash=72d9dc0e438de96161f262353c153c11b76f8ad0$ 12456+// $hash=19b5f403a0a77dfb38a0200046b35cf5d2053cfd$ 12457 // 12458 12459 #include "libcef_dll/cpptoc/resource_handler_cpptoc.h" 12460diff --git a/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h 12461index c3ed893b8db37..fc57f6477248c 12462--- a/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h 12463+++ b/src/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h 12464@@ -1,4 +1,4 @@ 12465-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12466+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12467 // reserved. Use of this source code is governed by a BSD-style license that 12468 // can be found in the LICENSE file. 12469 // 12470@@ -9,7 +9,7 @@ 12471 // implementations. See the translator.README.txt file in the tools directory 12472 // for more information. 12473 // 12474-// $hash=a2b9dcc0ff22bd3f1b0ecb70a3e10b6c1c7a0ed7$ 12475+// $hash=3853a8b89137fdd6c71bc86f801536517bde7c88$ 12476 // 12477 12478 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ 12479diff --git a/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc 12480index baffa6547229b..0e90a4bf6ea9d 12481--- a/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc 12482+++ b/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc 12483@@ -1,4 +1,4 @@ 12484-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12485+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12486 // reserved. Use of this source code is governed by a BSD-style license that 12487 // can be found in the LICENSE file. 12488 // 12489@@ -9,7 +9,7 @@ 12490 // implementations. See the translator.README.txt file in the tools directory 12491 // for more information. 12492 // 12493-// $hash=9d07f53404d3b90d1e386e37b0ed4535afb57b39$ 12494+// $hash=cf89b317501cd267ef18b96d934297412e7ddf5c$ 12495 // 12496 12497 #include "libcef_dll/cpptoc/resource_read_callback_cpptoc.h" 12498diff --git a/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h 12499index c1b4d1a5970fc..f152b5d2b300c 12500--- a/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h 12501+++ b/src/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h 12502@@ -1,4 +1,4 @@ 12503-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12504+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12505 // reserved. Use of this source code is governed by a BSD-style license that 12506 // can be found in the LICENSE file. 12507 // 12508@@ -9,7 +9,7 @@ 12509 // implementations. See the translator.README.txt file in the tools directory 12510 // for more information. 12511 // 12512-// $hash=7cd5016181dd61511cb1c1d3176d8aff5e5fba82$ 12513+// $hash=f5efbaafb5a54dfb9deb422cf31a0908c8a4cfc3$ 12514 // 12515 12516 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_READ_CALLBACK_CPPTOC_H_ 12517diff --git a/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc 12518index 3e9cea75bb47f..2462a281cf801 12519--- a/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc 12520+++ b/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc 12521@@ -1,4 +1,4 @@ 12522-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12523+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12524 // reserved. Use of this source code is governed by a BSD-style license that 12525 // can be found in the LICENSE file. 12526 // 12527@@ -9,7 +9,7 @@ 12528 // implementations. See the translator.README.txt file in the tools directory 12529 // for more information. 12530 // 12531-// $hash=57f1a169f2b2efb6ff3f1ca71aa390fb1d82ed2d$ 12532+// $hash=477291aae432b368ed8195975c5d93b5e19da36e$ 12533 // 12534 12535 #include "libcef_dll/cpptoc/resource_request_handler_cpptoc.h" 12536diff --git a/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h 12537index 813e38e8d4af7..7010001717ec1 12538--- a/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h 12539+++ b/src/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h 12540@@ -1,4 +1,4 @@ 12541-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12542+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12543 // reserved. Use of this source code is governed by a BSD-style license that 12544 // can be found in the LICENSE file. 12545 // 12546@@ -9,7 +9,7 @@ 12547 // implementations. See the translator.README.txt file in the tools directory 12548 // for more information. 12549 // 12550-// $hash=a8c2b0d3df6a4c6b336084598084d14f62860a53$ 12551+// $hash=0b8d614a76b9027970354dc850f7b491348a2941$ 12552 // 12553 12554 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_REQUEST_HANDLER_CPPTOC_H_ 12555diff --git a/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc 12556index 41bbad03226bf..2e0aa01963ee7 12557--- a/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc 12558+++ b/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc 12559@@ -1,4 +1,4 @@ 12560-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12561+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12562 // reserved. Use of this source code is governed by a BSD-style license that 12563 // can be found in the LICENSE file. 12564 // 12565@@ -9,7 +9,7 @@ 12566 // implementations. See the translator.README.txt file in the tools directory 12567 // for more information. 12568 // 12569-// $hash=3b4968443aafd1ee42fcc9a5e7b466b38fb98d28$ 12570+// $hash=ce7cc4f550ea769a9d8c3b757c19f9c48e0240d6$ 12571 // 12572 12573 #include "libcef_dll/cpptoc/resource_skip_callback_cpptoc.h" 12574diff --git a/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h 12575index c173a16715a9b..d7a82710cc2a3 12576--- a/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h 12577+++ b/src/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h 12578@@ -1,4 +1,4 @@ 12579-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12580+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12581 // reserved. Use of this source code is governed by a BSD-style license that 12582 // can be found in the LICENSE file. 12583 // 12584@@ -9,7 +9,7 @@ 12585 // implementations. See the translator.README.txt file in the tools directory 12586 // for more information. 12587 // 12588-// $hash=decf49c2d8a337c353d149e9b9392065740eb06d$ 12589+// $hash=5e756fb08a289333025a894573332555a1ab8e1f$ 12590 // 12591 12592 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_SKIP_CALLBACK_CPPTOC_H_ 12593diff --git a/src/cef/libcef_dll/cpptoc/response_cpptoc.cc b/src/cef/libcef_dll/cpptoc/response_cpptoc.cc 12594index 1cb1db789fabf..12493c5c8a052 12595--- a/src/cef/libcef_dll/cpptoc/response_cpptoc.cc 12596+++ b/src/cef/libcef_dll/cpptoc/response_cpptoc.cc 12597@@ -1,4 +1,4 @@ 12598-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12599+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12600 // reserved. Use of this source code is governed by a BSD-style license that 12601 // can be found in the LICENSE file. 12602 // 12603@@ -9,7 +9,7 @@ 12604 // implementations. See the translator.README.txt file in the tools directory 12605 // for more information. 12606 // 12607-// $hash=1dc0f59d37e6979ba3f431463671f0feefc45c31$ 12608+// $hash=09e7052fafc6202fa043603c97c56ae4b917a291$ 12609 // 12610 12611 #include "libcef_dll/cpptoc/response_cpptoc.h" 12612diff --git a/src/cef/libcef_dll/cpptoc/response_cpptoc.h b/src/cef/libcef_dll/cpptoc/response_cpptoc.h 12613index 209f550a13c05..b84c6990b56dc 12614--- a/src/cef/libcef_dll/cpptoc/response_cpptoc.h 12615+++ b/src/cef/libcef_dll/cpptoc/response_cpptoc.h 12616@@ -1,4 +1,4 @@ 12617-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12618+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12619 // reserved. Use of this source code is governed by a BSD-style license that 12620 // can be found in the LICENSE file. 12621 // 12622@@ -9,7 +9,7 @@ 12623 // implementations. See the translator.README.txt file in the tools directory 12624 // for more information. 12625 // 12626-// $hash=9bd9fdb8fe353f1af3ac543074cb74b12cdab0c5$ 12627+// $hash=624d1cb515a9f5f44d6e63574021689ccfe09b76$ 12628 // 12629 12630 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ 12631diff --git a/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc b/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc 12632index 1bc437f06fda8..bee2671e6cf58 12633--- a/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc 12634+++ b/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc 12635@@ -1,4 +1,4 @@ 12636-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12637+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12638 // reserved. Use of this source code is governed by a BSD-style license that 12639 // can be found in the LICENSE file. 12640 // 12641@@ -9,7 +9,7 @@ 12642 // implementations. See the translator.README.txt file in the tools directory 12643 // for more information. 12644 // 12645-// $hash=b6721a12a6b018187b3ccc87557beb29be130100$ 12646+// $hash=490594608437694d853b132444163af6352eb1e5$ 12647 // 12648 12649 #include "libcef_dll/cpptoc/response_filter_cpptoc.h" 12650diff --git a/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.h b/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.h 12651index b79d579543cd1..c17599dcf97cf 12652--- a/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.h 12653+++ b/src/cef/libcef_dll/cpptoc/response_filter_cpptoc.h 12654@@ -1,4 +1,4 @@ 12655-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12656+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12657 // reserved. Use of this source code is governed by a BSD-style license that 12658 // can be found in the LICENSE file. 12659 // 12660@@ -9,7 +9,7 @@ 12661 // implementations. See the translator.README.txt file in the tools directory 12662 // for more information. 12663 // 12664-// $hash=6ef35ca53f2bd4523397d3f56b02ca9b40a811f9$ 12665+// $hash=55d4dc0a6467d6d084de5e1114be0fcd36ae89b9$ 12666 // 12667 12668 #ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_FILTER_CPPTOC_H_ 12669diff --git a/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc 12670index 8cf46c83661fe..9f2df1a061d16 12671--- a/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc 12672+++ b/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc 12673@@ -1,4 +1,4 @@ 12674-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12675+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12676 // reserved. Use of this source code is governed by a BSD-style license that 12677 // can be found in the LICENSE file. 12678 // 12679@@ -9,7 +9,7 @@ 12680 // implementations. See the translator.README.txt file in the tools directory 12681 // for more information. 12682 // 12683-// $hash=d76ba7de3a561c71b88250340676e56dc7a9f84a$ 12684+// $hash=ee06834316c98179b98e7226f89b8a630a11de2b$ 12685 // 12686 12687 #include "libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h" 12688diff --git a/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h 12689index 20124e44f363f..954af2789749f 12690--- a/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h 12691+++ b/src/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h 12692@@ -1,4 +1,4 @@ 12693-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12694+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12695 // reserved. Use of this source code is governed by a BSD-style license that 12696 // can be found in the LICENSE file. 12697 // 12698@@ -9,7 +9,7 @@ 12699 // implementations. See the translator.README.txt file in the tools directory 12700 // for more information. 12701 // 12702-// $hash=d8003b6de1b89c64b2d5b53ea1665dda982effb9$ 12703+// $hash=a41928b718004e3e8cc92ba620b20f76ad9181b7$ 12704 // 12705 12706 #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_CONTEXT_MENU_CALLBACK_CPPTOC_H_ 12707diff --git a/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc 12708index 33705ecbbfad3..ddfba315fc959 12709--- a/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc 12710+++ b/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc 12711@@ -1,4 +1,4 @@ 12712-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12713+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12714 // reserved. Use of this source code is governed by a BSD-style license that 12715 // can be found in the LICENSE file. 12716 // 12717@@ -9,7 +9,7 @@ 12718 // implementations. See the translator.README.txt file in the tools directory 12719 // for more information. 12720 // 12721-// $hash=2e6aa9015192a3704df073f7dad0c6fa3b05f76c$ 12722+// $hash=9b4502e14a4597158e56d4a5ea3307e9798499f9$ 12723 // 12724 12725 #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" 12726diff --git a/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h 12727index 50dc062cb0887..c5dac2e3f32ee 12728--- a/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h 12729+++ b/src/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h 12730@@ -1,4 +1,4 @@ 12731-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12732+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12733 // reserved. Use of this source code is governed by a BSD-style license that 12734 // can be found in the LICENSE file. 12735 // 12736@@ -9,7 +9,7 @@ 12737 // implementations. See the translator.README.txt file in the tools directory 12738 // for more information. 12739 // 12740-// $hash=6542e83e5f1a6694575c89e628ee11da17bb6624$ 12741+// $hash=7f45e5e5b3772e10b2eb6901c3e27e835a873163$ 12742 // 12743 12744 #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ 12745diff --git a/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.cc 12746index 477c530ed458b..4102d17e00099 12747--- a/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.cc 12748+++ b/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.cc 12749@@ -1,4 +1,4 @@ 12750-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12751+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12752 // reserved. Use of this source code is governed by a BSD-style license that 12753 // can be found in the LICENSE file. 12754 // 12755@@ -9,7 +9,7 @@ 12756 // implementations. See the translator.README.txt file in the tools directory 12757 // for more information. 12758 // 12759-// $hash=51e850e2768a6ec8ec7d764830d27138334d82ac$ 12760+// $hash=2695b1c7532d10e5f337c353a51d1e5e97667b9e$ 12761 // 12762 12763 #include "libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h" 12764diff --git a/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h 12765index 355cfa24d1451..b8fa640fd2927 12766--- a/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h 12767+++ b/src/cef/libcef_dll/cpptoc/run_quick_menu_callback_cpptoc.h 12768@@ -1,4 +1,4 @@ 12769-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12770+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12771 // reserved. Use of this source code is governed by a BSD-style license that 12772 // can be found in the LICENSE file. 12773 // 12774@@ -9,7 +9,7 @@ 12775 // implementations. See the translator.README.txt file in the tools directory 12776 // for more information. 12777 // 12778-// $hash=b641fe8119fa5ab3e3a635105ca25985dec40bd0$ 12779+// $hash=acc845289f80273062c7fde7d81e0c034a80f4e1$ 12780 // 12781 12782 #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_QUICK_MENU_CALLBACK_CPPTOC_H_ 12783diff --git a/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc b/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc 12784index 759f5f9dc127d..40801cdfffd21 12785--- a/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc 12786+++ b/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc 12787@@ -1,4 +1,4 @@ 12788-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12789+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12790 // reserved. Use of this source code is governed by a BSD-style license that 12791 // can be found in the LICENSE file. 12792 // 12793@@ -9,7 +9,7 @@ 12794 // implementations. See the translator.README.txt file in the tools directory 12795 // for more information. 12796 // 12797-// $hash=abd81866575f873556b4ae40313ea65c89219756$ 12798+// $hash=96fb6718f22acb2425f9fe31f64bd7c71531a2a8$ 12799 // 12800 12801 #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" 12802diff --git a/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h 12803index 1c442fae769d1..75daf7c15c851 12804--- a/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h 12805+++ b/src/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h 12806@@ -1,4 +1,4 @@ 12807-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12808+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12809 // reserved. Use of this source code is governed by a BSD-style license that 12810 // can be found in the LICENSE file. 12811 // 12812@@ -9,7 +9,7 @@ 12813 // implementations. See the translator.README.txt file in the tools directory 12814 // for more information. 12815 // 12816-// $hash=b119c6e375aee04bc83623c73f61b7eb39af16f5$ 12817+// $hash=746b9d06b417c9730fa98fa456a08e5c53e5475b$ 12818 // 12819 12820 #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ 12821diff --git a/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc b/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc 12822index aee5e11789d13..622aee176c3a7 12823--- a/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc 12824+++ b/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc 12825@@ -1,4 +1,4 @@ 12826-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12827+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12828 // reserved. Use of this source code is governed by a BSD-style license that 12829 // can be found in the LICENSE file. 12830 // 12831@@ -9,7 +9,7 @@ 12832 // implementations. See the translator.README.txt file in the tools directory 12833 // for more information. 12834 // 12835-// $hash=c028de29ae5b48ed41d4e8b8ae3df9a0ee765e14$ 12836+// $hash=aef6d4c3a2016f1cfd4c9aff12d59302b2dba3a8$ 12837 // 12838 12839 #include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h" 12840diff --git a/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h b/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h 12841index 6f0265be6a39d..3966e2167ad34 12842--- a/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h 12843+++ b/src/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h 12844@@ -1,4 +1,4 @@ 12845-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12846+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12847 // reserved. Use of this source code is governed by a BSD-style license that 12848 // can be found in the LICENSE file. 12849 // 12850@@ -9,7 +9,7 @@ 12851 // implementations. See the translator.README.txt file in the tools directory 12852 // for more information. 12853 // 12854-// $hash=f14ceae023fe1f52e53b26edb60667203b919178$ 12855+// $hash=92c5fb1f7d14753510b029f71579a26970f0304c$ 12856 // 12857 12858 #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ 12859diff --git a/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc 12860index 353d69c68b20f..a74df760f3773 12861--- a/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc 12862+++ b/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc 12863@@ -1,4 +1,4 @@ 12864-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12865+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12866 // reserved. Use of this source code is governed by a BSD-style license that 12867 // can be found in the LICENSE file. 12868 // 12869@@ -9,7 +9,7 @@ 12870 // implementations. See the translator.README.txt file in the tools directory 12871 // for more information. 12872 // 12873-// $hash=d20b8b121892f6d2fe0f944c4447464ab6657feb$ 12874+// $hash=09750a65f47197298e8600d97c627fb6ee233800$ 12875 // 12876 12877 #include "libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h" 12878diff --git a/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h 12879index 678ce51dd6dd4..34cc05d56dfca 12880--- a/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h 12881+++ b/src/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h 12882@@ -1,4 +1,4 @@ 12883-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 12884+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12885 // reserved. Use of this source code is governed by a BSD-style license that 12886 // can be found in the LICENSE file. 12887 // 12888@@ -9,7 +9,7 @@ 12889 // implementations. See the translator.README.txt file in the tools directory 12890 // for more information. 12891 // 12892-// $hash=3cfa40dde5fccdecbb2d598b20e1d76cc13f4c34$ 12893+// $hash=31869f5383d73caf6fa9b3fede9f2e47f54a01ae$ 12894 // 12895 12896 #ifndef CEF_LIBCEF_DLL_CPPTOC_SELECT_CLIENT_CERTIFICATE_CALLBACK_CPPTOC_H_ 12897diff --git a/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.cc 12898new file mode 100644 12899index 0000000000000..15e1bd299ba6d 12900--- /dev/null 12901+++ b/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.cc 12902@@ -0,0 +1,95 @@ 12903+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 12904+// reserved. Use of this source code is governed by a BSD-style license that 12905+// can be found in the LICENSE file. 12906+// 12907+// --------------------------------------------------------------------------- 12908+// 12909+// This file was generated by the CEF translator tool. If making changes by 12910+// hand only do so within the body of existing method and function 12911+// implementations. See the translator.README.txt file in the tools directory 12912+// for more information. 12913+// 12914+// $hash=8d79b93a23482ece6217a0a113578c32e6926f94$ 12915+// 12916+ 12917+#include "libcef_dll/cpptoc/select_popup_callback_cpptoc.h" 12918+#include "libcef_dll/shutdown_checker.h" 12919+ 12920+namespace { 12921+ 12922+// MEMBER FUNCTIONS - Body may be edited by hand. 12923+ 12924+void CEF_CALLBACK 12925+select_popup_callback_cont(struct _cef_select_popup_callback_t* self, 12926+ size_t indicesCount, 12927+ int const* indices) { 12928+ shutdown_checker::AssertNotShutdown(); 12929+ 12930+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 12931+ 12932+ DCHECK(self); 12933+ if (!self) 12934+ return; 12935+ // Verify param: indices; type: simple_vec_byref_const 12936+ DCHECK(indicesCount == 0 || indices); 12937+ if (indicesCount > 0 && !indices) 12938+ return; 12939+ 12940+ // Translate param: indices; type: simple_vec_byref_const 12941+ std::vector<int> indicesList; 12942+ if (indicesCount > 0) { 12943+ for (size_t i = 0; i < indicesCount; ++i) { 12944+ int indicesVal = indices[i]; 12945+ indicesList.push_back(indicesVal); 12946+ } 12947+ } 12948+ 12949+ // Execute 12950+ CefSelectPopupCallbackCppToC::Get(self)->Continue(indicesList); 12951+} 12952+ 12953+void CEF_CALLBACK 12954+select_popup_callback_cancel(struct _cef_select_popup_callback_t* self) { 12955+ shutdown_checker::AssertNotShutdown(); 12956+ 12957+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 12958+ 12959+ DCHECK(self); 12960+ if (!self) 12961+ return; 12962+ 12963+ // Execute 12964+ CefSelectPopupCallbackCppToC::Get(self)->Cancel(); 12965+} 12966+ 12967+} // namespace 12968+ 12969+// CONSTRUCTOR - Do not edit by hand. 12970+ 12971+CefSelectPopupCallbackCppToC::CefSelectPopupCallbackCppToC() { 12972+ GetStruct()->cont = select_popup_callback_cont; 12973+ GetStruct()->cancel = select_popup_callback_cancel; 12974+} 12975+ 12976+// DESTRUCTOR - Do not edit by hand. 12977+ 12978+CefSelectPopupCallbackCppToC::~CefSelectPopupCallbackCppToC() { 12979+ shutdown_checker::AssertNotShutdown(); 12980+} 12981+ 12982+template <> 12983+CefRefPtr<CefSelectPopupCallback> CefCppToCRefCounted< 12984+ CefSelectPopupCallbackCppToC, 12985+ CefSelectPopupCallback, 12986+ cef_select_popup_callback_t>::UnwrapDerived(CefWrapperType type, 12987+ cef_select_popup_callback_t* 12988+ s) { 12989+ NOTREACHED() << "Unexpected class type: " << type; 12990+ return nullptr; 12991+} 12992+ 12993+template <> 12994+CefWrapperType CefCppToCRefCounted<CefSelectPopupCallbackCppToC, 12995+ CefSelectPopupCallback, 12996+ cef_select_popup_callback_t>::kWrapperType = 12997+ WT_SELECT_POPUP_CALLBACK; 12998diff --git a/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.h 12999new file mode 100644 13000index 0000000000000..75c11dffe90f1 13001--- /dev/null 13002+++ b/src/cef/libcef_dll/cpptoc/select_popup_callback_cpptoc.h 13003@@ -0,0 +1,38 @@ 13004+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13005+// reserved. Use of this source code is governed by a BSD-style license that 13006+// can be found in the LICENSE file. 13007+// 13008+// --------------------------------------------------------------------------- 13009+// 13010+// This file was generated by the CEF translator tool. If making changes by 13011+// hand only do so within the body of existing method and function 13012+// implementations. See the translator.README.txt file in the tools directory 13013+// for more information. 13014+// 13015+// $hash=38cd12caaee1fc018d0fd04eee914774eec7c41c$ 13016+// 13017+ 13018+#ifndef CEF_LIBCEF_DLL_CPPTOC_SELECT_POPUP_CALLBACK_CPPTOC_H_ 13019+#define CEF_LIBCEF_DLL_CPPTOC_SELECT_POPUP_CALLBACK_CPPTOC_H_ 13020+#pragma once 13021+ 13022+#if !defined(BUILDING_CEF_SHARED) 13023+#error This file can be included DLL-side only 13024+#endif 13025+ 13026+#include "include/capi/cef_dialog_handler_capi.h" 13027+#include "include/cef_dialog_handler.h" 13028+#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" 13029+ 13030+// Wrap a C++ class with a C structure. 13031+// This class may be instantiated and accessed DLL-side only. 13032+class CefSelectPopupCallbackCppToC 13033+ : public CefCppToCRefCounted<CefSelectPopupCallbackCppToC, 13034+ CefSelectPopupCallback, 13035+ cef_select_popup_callback_t> { 13036+ public: 13037+ CefSelectPopupCallbackCppToC(); 13038+ virtual ~CefSelectPopupCallbackCppToC(); 13039+}; 13040+ 13041+#endif // CEF_LIBCEF_DLL_CPPTOC_SELECT_POPUP_CALLBACK_CPPTOC_H_ 13042diff --git a/src/cef/libcef_dll/cpptoc/server_cpptoc.cc b/src/cef/libcef_dll/cpptoc/server_cpptoc.cc 13043index f6be3490c7cfb..48086176f16f6 13044--- a/src/cef/libcef_dll/cpptoc/server_cpptoc.cc 13045+++ b/src/cef/libcef_dll/cpptoc/server_cpptoc.cc 13046@@ -1,4 +1,4 @@ 13047-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13048+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13049 // reserved. Use of this source code is governed by a BSD-style license that 13050 // can be found in the LICENSE file. 13051 // 13052@@ -9,7 +9,7 @@ 13053 // implementations. See the translator.README.txt file in the tools directory 13054 // for more information. 13055 // 13056-// $hash=d0cfc5e4c052a2d1fe43d1c0ae264642db03c04c$ 13057+// $hash=abf39f5a0fa0be81e8c8fbd743ea6f4f4c2e14c3$ 13058 // 13059 13060 #include "libcef_dll/cpptoc/server_cpptoc.h" 13061diff --git a/src/cef/libcef_dll/cpptoc/server_cpptoc.h b/src/cef/libcef_dll/cpptoc/server_cpptoc.h 13062index fb99d54f7e0c5..fd191b03c17c5 13063--- a/src/cef/libcef_dll/cpptoc/server_cpptoc.h 13064+++ b/src/cef/libcef_dll/cpptoc/server_cpptoc.h 13065@@ -1,4 +1,4 @@ 13066-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13067+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13068 // reserved. Use of this source code is governed by a BSD-style license that 13069 // can be found in the LICENSE file. 13070 // 13071@@ -9,7 +9,7 @@ 13072 // implementations. See the translator.README.txt file in the tools directory 13073 // for more information. 13074 // 13075-// $hash=a36274939df284287ac49a8ec9321f8188d4fddb$ 13076+// $hash=edf9787173ef035101e1d1805f2926b6028530f8$ 13077 // 13078 13079 #ifndef CEF_LIBCEF_DLL_CPPTOC_SERVER_CPPTOC_H_ 13080diff --git a/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc 13081index 2688d1cc03137..e72635d24eb69 13082--- a/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc 13083+++ b/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc 13084@@ -1,4 +1,4 @@ 13085-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13086+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13087 // reserved. Use of this source code is governed by a BSD-style license that 13088 // can be found in the LICENSE file. 13089 // 13090@@ -9,7 +9,7 @@ 13091 // implementations. See the translator.README.txt file in the tools directory 13092 // for more information. 13093 // 13094-// $hash=2ef239c7779477feb8808f2198e7d2063ab74156$ 13095+// $hash=37a840b566aadeeddaa21af7fa5fda4c222b5571$ 13096 // 13097 13098 #include "libcef_dll/cpptoc/server_handler_cpptoc.h" 13099diff --git a/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.h 13100index a4c951c65a04f..c452567a21858 13101--- a/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.h 13102+++ b/src/cef/libcef_dll/cpptoc/server_handler_cpptoc.h 13103@@ -1,4 +1,4 @@ 13104-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13105+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13106 // reserved. Use of this source code is governed by a BSD-style license that 13107 // can be found in the LICENSE file. 13108 // 13109@@ -9,7 +9,7 @@ 13110 // implementations. See the translator.README.txt file in the tools directory 13111 // for more information. 13112 // 13113-// $hash=754575fa090b971fc9105fecda97a407ef0d2484$ 13114+// $hash=ba72a7b9571b7e2d9d490a02972855eca1ff987f$ 13115 // 13116 13117 #ifndef CEF_LIBCEF_DLL_CPPTOC_SERVER_HANDLER_CPPTOC_H_ 13118diff --git a/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc 13119index b4beccccd3aed..87bcae9676afe 13120--- a/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc 13121+++ b/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc 13122@@ -1,4 +1,4 @@ 13123-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13124+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13125 // reserved. Use of this source code is governed by a BSD-style license that 13126 // can be found in the LICENSE file. 13127 // 13128@@ -9,7 +9,7 @@ 13129 // implementations. See the translator.README.txt file in the tools directory 13130 // for more information. 13131 // 13132-// $hash=99f02c8911b913161cfd3834e19bbdc0ba542409$ 13133+// $hash=1672096b07c52bafaa15e3e195116c2a4b30f938$ 13134 // 13135 13136 #include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h" 13137diff --git a/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h 13138index 72e21124994a8..85c34421bd1d8 13139--- a/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h 13140+++ b/src/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h 13141@@ -1,4 +1,4 @@ 13142-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13143+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13144 // reserved. Use of this source code is governed by a BSD-style license that 13145 // can be found in the LICENSE file. 13146 // 13147@@ -9,7 +9,7 @@ 13148 // implementations. See the translator.README.txt file in the tools directory 13149 // for more information. 13150 // 13151-// $hash=3e86bf9e36a3ef63e6777dcafee8847bd4965a60$ 13152+// $hash=886b832f912900c89787888566d4d5e803c91ebc$ 13153 // 13154 13155 #ifndef CEF_LIBCEF_DLL_CPPTOC_SET_COOKIE_CALLBACK_CPPTOC_H_ 13156diff --git a/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc b/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc 13157index 7251adfda8853..2da00fed8c046 13158--- a/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc 13159+++ b/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc 13160@@ -1,4 +1,4 @@ 13161-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13162+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13163 // reserved. Use of this source code is governed by a BSD-style license that 13164 // can be found in the LICENSE file. 13165 // 13166@@ -9,7 +9,7 @@ 13167 // implementations. See the translator.README.txt file in the tools directory 13168 // for more information. 13169 // 13170-// $hash=78b529fc88b9701f7cf8d40097576704b0ef35fc$ 13171+// $hash=bd192e23b1985c9413ec6b09b7b1854ea65b5590$ 13172 // 13173 13174 #include "libcef_dll/cpptoc/sslinfo_cpptoc.h" 13175diff --git a/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h b/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h 13176index 3dc2625904e5c..bb9576808edca 13177--- a/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h 13178+++ b/src/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h 13179@@ -1,4 +1,4 @@ 13180-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13181+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13182 // reserved. Use of this source code is governed by a BSD-style license that 13183 // can be found in the LICENSE file. 13184 // 13185@@ -9,7 +9,7 @@ 13186 // implementations. See the translator.README.txt file in the tools directory 13187 // for more information. 13188 // 13189-// $hash=00ab5a37c56c5bd5f14ae97f72338a32615214b7$ 13190+// $hash=2eaaaeef70817cde9783efe192d0f57cb73ddfad$ 13191 // 13192 13193 #ifndef CEF_LIBCEF_DLL_CPPTOC_SSLINFO_CPPTOC_H_ 13194diff --git a/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc b/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc 13195index 92073dfc08fc2..840136f745795 13196--- a/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc 13197+++ b/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc 13198@@ -1,4 +1,4 @@ 13199-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13200+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13201 // reserved. Use of this source code is governed by a BSD-style license that 13202 // can be found in the LICENSE file. 13203 // 13204@@ -9,7 +9,7 @@ 13205 // implementations. See the translator.README.txt file in the tools directory 13206 // for more information. 13207 // 13208-// $hash=8596e5de45842c1e1de8e6377c2b7d932218c370$ 13209+// $hash=f645a1528c4091733cdd8b93c7d076c11cb8a329$ 13210 // 13211 13212 #include "libcef_dll/cpptoc/sslstatus_cpptoc.h" 13213diff --git a/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h b/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h 13214index 2d45ad428005a..4e5379fbd6828 13215--- a/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h 13216+++ b/src/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h 13217@@ -1,4 +1,4 @@ 13218-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13219+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13220 // reserved. Use of this source code is governed by a BSD-style license that 13221 // can be found in the LICENSE file. 13222 // 13223@@ -9,7 +9,7 @@ 13224 // implementations. See the translator.README.txt file in the tools directory 13225 // for more information. 13226 // 13227-// $hash=8f0a00c305a6defdcbf4caa2ea437cefe49a191f$ 13228+// $hash=dba266754e189de39172bddaacf0dfa3fdd79351$ 13229 // 13230 13231 #ifndef CEF_LIBCEF_DLL_CPPTOC_SSLSTATUS_CPPTOC_H_ 13232diff --git a/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.cc 13233index 4c69ff14accfb..9289ae8db375b 13234--- a/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.cc 13235+++ b/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.cc 13236@@ -1,4 +1,4 @@ 13237-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13238+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13239 // reserved. Use of this source code is governed by a BSD-style license that 13240 // can be found in the LICENSE file. 13241 // 13242@@ -9,7 +9,7 @@ 13243 // implementations. See the translator.README.txt file in the tools directory 13244 // for more information. 13245 // 13246-// $hash=63e0d5c68603a8478c9b8a638618c9b6554665cb$ 13247+// $hash=018aea8a22d2cd56b94fdb4afe6cda26e5267e50$ 13248 // 13249 13250 #include "libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h" 13251diff --git a/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h 13252index c80f743fff7ae..3df50719b18f0 13253--- a/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h 13254+++ b/src/cef/libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h 13255@@ -1,4 +1,4 @@ 13256-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13257+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13258 // reserved. Use of this source code is governed by a BSD-style license that 13259 // can be found in the LICENSE file. 13260 // 13261@@ -9,7 +9,7 @@ 13262 // implementations. See the translator.README.txt file in the tools directory 13263 // for more information. 13264 // 13265-// $hash=1471041bc8e9230b7bef9e42aabaf441e641ab96$ 13266+// $hash=a9b06d8d2a8a85752732cfdc632a1c67070f2a3a$ 13267 // 13268 13269 #ifndef CEF_LIBCEF_DLL_CPPTOC_STORE_WEB_ARCHIVE_RESULT_CALLBACK_CPPTOC_H_ 13270diff --git a/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc b/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc 13271index 3d6b7f73788a9..3d1273476ce61 13272--- a/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc 13273+++ b/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc 13274@@ -1,4 +1,4 @@ 13275-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13276+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13277 // reserved. Use of this source code is governed by a BSD-style license that 13278 // can be found in the LICENSE file. 13279 // 13280@@ -9,7 +9,7 @@ 13281 // implementations. See the translator.README.txt file in the tools directory 13282 // for more information. 13283 // 13284-// $hash=fcbdc299c4f34868f817a9b77777a9b88f3cf07b$ 13285+// $hash=5301e5393a92345b12208721df602fd8f9d25abe$ 13286 // 13287 13288 #include "libcef_dll/cpptoc/stream_reader_cpptoc.h" 13289diff --git a/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h b/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h 13290index df8cc7fd6f642..d4d5dc5aab651 13291--- a/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h 13292+++ b/src/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h 13293@@ -1,4 +1,4 @@ 13294-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13295+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13296 // reserved. Use of this source code is governed by a BSD-style license that 13297 // can be found in the LICENSE file. 13298 // 13299@@ -9,7 +9,7 @@ 13300 // implementations. See the translator.README.txt file in the tools directory 13301 // for more information. 13302 // 13303-// $hash=c98bd38e350a4b24d11039a326e8df7fb86bfc75$ 13304+// $hash=6482aca1d5d2c06d39d226f2d085580abc8eee99$ 13305 // 13306 13307 #ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ 13308diff --git a/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc b/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc 13309index d402161f2d7d7..8b73d15c90576 13310--- a/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc 13311+++ b/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc 13312@@ -1,4 +1,4 @@ 13313-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13314+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13315 // reserved. Use of this source code is governed by a BSD-style license that 13316 // can be found in the LICENSE file. 13317 // 13318@@ -9,7 +9,7 @@ 13319 // implementations. See the translator.README.txt file in the tools directory 13320 // for more information. 13321 // 13322-// $hash=ac20659d83a6efb764f3b55756dbc8c686fc5363$ 13323+// $hash=5f8cba4541a5f92cbbe2c9aad2ec270528f597cb$ 13324 // 13325 13326 #include "libcef_dll/cpptoc/stream_writer_cpptoc.h" 13327diff --git a/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h b/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h 13328index 815bc3feba6e9..0a5ed64e89418 13329--- a/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h 13330+++ b/src/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h 13331@@ -1,4 +1,4 @@ 13332-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13333+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13334 // reserved. Use of this source code is governed by a BSD-style license that 13335 // can be found in the LICENSE file. 13336 // 13337@@ -9,7 +9,7 @@ 13338 // implementations. See the translator.README.txt file in the tools directory 13339 // for more information. 13340 // 13341-// $hash=9204925136614f1d4e4f4609ea6ee30dad0c2782$ 13342+// $hash=7b95fc6bea4023038075ee6712eaceb6c0a153a8$ 13343 // 13344 13345 #ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ 13346diff --git a/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc 13347index 34e6a844d3faa..cb498b859fe14 13348--- a/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc 13349+++ b/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc 13350@@ -1,4 +1,4 @@ 13351-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13352+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13353 // reserved. Use of this source code is governed by a BSD-style license that 13354 // can be found in the LICENSE file. 13355 // 13356@@ -9,7 +9,7 @@ 13357 // implementations. See the translator.README.txt file in the tools directory 13358 // for more information. 13359 // 13360-// $hash=cad58a7370ef2b36aacb2fdf527fe1c061f4a868$ 13361+// $hash=5e22146a6ab1326e04c4de9d822b663e9ce6dee4$ 13362 // 13363 13364 #include "libcef_dll/cpptoc/string_visitor_cpptoc.h" 13365diff --git a/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h b/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h 13366index 672cf3dab8c50..86a2b46fbd7f4 13367--- a/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h 13368+++ b/src/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h 13369@@ -1,4 +1,4 @@ 13370-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13371+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13372 // reserved. Use of this source code is governed by a BSD-style license that 13373 // can be found in the LICENSE file. 13374 // 13375@@ -9,7 +9,7 @@ 13376 // implementations. See the translator.README.txt file in the tools directory 13377 // for more information. 13378 // 13379-// $hash=4cf29c1d2d715dee4855acda840ca47d5f1fabbf$ 13380+// $hash=8f717e4df178cef8f90d5af081094a4952fcc90e$ 13381 // 13382 13383 #ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ 13384diff --git a/src/cef/libcef_dll/cpptoc/task_cpptoc.cc b/src/cef/libcef_dll/cpptoc/task_cpptoc.cc 13385index ef51cfac7b44c..3a65c73ba29a3 13386--- a/src/cef/libcef_dll/cpptoc/task_cpptoc.cc 13387+++ b/src/cef/libcef_dll/cpptoc/task_cpptoc.cc 13388@@ -1,4 +1,4 @@ 13389-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13390+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13391 // reserved. Use of this source code is governed by a BSD-style license that 13392 // can be found in the LICENSE file. 13393 // 13394@@ -9,7 +9,7 @@ 13395 // implementations. See the translator.README.txt file in the tools directory 13396 // for more information. 13397 // 13398-// $hash=47bacb389bbb262f0be39b49c5d6251b8bf1c507$ 13399+// $hash=d9ce29d70c61b486d32a45e8908b317f3b191a8b$ 13400 // 13401 13402 #include "libcef_dll/cpptoc/task_cpptoc.h" 13403diff --git a/src/cef/libcef_dll/cpptoc/task_cpptoc.h b/src/cef/libcef_dll/cpptoc/task_cpptoc.h 13404index cdf9aab98e552..9a702d94f5a1d 13405--- a/src/cef/libcef_dll/cpptoc/task_cpptoc.h 13406+++ b/src/cef/libcef_dll/cpptoc/task_cpptoc.h 13407@@ -1,4 +1,4 @@ 13408-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13409+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13410 // reserved. Use of this source code is governed by a BSD-style license that 13411 // can be found in the LICENSE file. 13412 // 13413@@ -9,7 +9,7 @@ 13414 // implementations. See the translator.README.txt file in the tools directory 13415 // for more information. 13416 // 13417-// $hash=a22ba7af43964082c9e8570da140389ca9953a12$ 13418+// $hash=32859b75e638cd76a9319561b675fa3583818905$ 13419 // 13420 13421 #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ 13422diff --git a/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc b/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc 13423index 435cada85f56c..b814b90b9d4f2 13424--- a/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc 13425+++ b/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc 13426@@ -1,4 +1,4 @@ 13427-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13428+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13429 // reserved. Use of this source code is governed by a BSD-style license that 13430 // can be found in the LICENSE file. 13431 // 13432@@ -9,7 +9,7 @@ 13433 // implementations. See the translator.README.txt file in the tools directory 13434 // for more information. 13435 // 13436-// $hash=7c1bd7fe9f9c91bc488299a2278f83a0850befe7$ 13437+// $hash=cc3f60147bbed7acd8e4d111a53bf519757687b2$ 13438 // 13439 13440 #include "libcef_dll/cpptoc/task_runner_cpptoc.h" 13441diff --git a/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.h b/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.h 13442index 9a8f6ded34aa7..d462c7e147832 13443--- a/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.h 13444+++ b/src/cef/libcef_dll/cpptoc/task_runner_cpptoc.h 13445@@ -1,4 +1,4 @@ 13446-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13447+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13448 // reserved. Use of this source code is governed by a BSD-style license that 13449 // can be found in the LICENSE file. 13450 // 13451@@ -9,7 +9,7 @@ 13452 // implementations. See the translator.README.txt file in the tools directory 13453 // for more information. 13454 // 13455-// $hash=3422c7340cee9aaf51c62fa1868b3e665ef34b2f$ 13456+// $hash=66efea72ce623fbf542496f15d0b5fe33d426286$ 13457 // 13458 13459 #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_RUNNER_CPPTOC_H_ 13460diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc 13461index 4b5e412551bcd..1e897e06769ac 13462--- a/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc 13463+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc 13464@@ -1,4 +1,4 @@ 13465-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13466+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13467 // reserved. Use of this source code is governed by a BSD-style license that 13468 // can be found in the LICENSE file. 13469 // 13470@@ -9,7 +9,7 @@ 13471 // implementations. See the translator.README.txt file in the tools directory 13472 // for more information. 13473 // 13474-// $hash=0192ac51914013c4452ffbb99c3a2589137f7c78$ 13475+// $hash=4117623ecedbef67bdfc9346f89208255798688e$ 13476 // 13477 13478 #include "libcef_dll/cpptoc/test/translator_test_cpptoc.h" 13479diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h 13480index 60be8a4191550..c84b470058d6e 13481--- a/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h 13482+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h 13483@@ -1,4 +1,4 @@ 13484-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13485+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13486 // reserved. Use of this source code is governed by a BSD-style license that 13487 // can be found in the LICENSE file. 13488 // 13489@@ -9,7 +9,7 @@ 13490 // implementations. See the translator.README.txt file in the tools directory 13491 // for more information. 13492 // 13493-// $hash=aeae16842d711fd6e5d54cd14333d27cbc06c400$ 13494+// $hash=5f0f8e9729af10fb258c197facf57ae150969f1a$ 13495 // 13496 13497 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_CPPTOC_H_ 13498diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc 13499index d3ac64f4981f0..4f77ecb7ff798 13500--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc 13501+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc 13502@@ -1,4 +1,4 @@ 13503-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13504+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13505 // reserved. Use of this source code is governed by a BSD-style license that 13506 // can be found in the LICENSE file. 13507 // 13508@@ -9,7 +9,7 @@ 13509 // implementations. See the translator.README.txt file in the tools directory 13510 // for more information. 13511 // 13512-// $hash=5eb9ef23f60f99db031e0e3da6cdfc81c979f5ff$ 13513+// $hash=e673b289ae45b277af9c33ee74fe9056cff6e265$ 13514 // 13515 13516 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h" 13517diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h 13518index e32aee6a7f57f..71d3384f479d5 13519--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h 13520+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h 13521@@ -1,4 +1,4 @@ 13522-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13523+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13524 // reserved. Use of this source code is governed by a BSD-style license that 13525 // can be found in the LICENSE file. 13526 // 13527@@ -9,7 +9,7 @@ 13528 // implementations. See the translator.README.txt file in the tools directory 13529 // for more information. 13530 // 13531-// $hash=f84f12aa3e444b6ae98c620147bdacf6c32af8df$ 13532+// $hash=b6731cceb5f02011f2bafe6afa336b95355a1bf0$ 13533 // 13534 13535 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CPPTOC_H_ 13536diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc 13537index 22ddee2c75dc0..fe25e680782a3 13538--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc 13539+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc 13540@@ -1,4 +1,4 @@ 13541-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13542+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13543 // reserved. Use of this source code is governed by a BSD-style license that 13544 // can be found in the LICENSE file. 13545 // 13546@@ -9,7 +9,7 @@ 13547 // implementations. See the translator.README.txt file in the tools directory 13548 // for more information. 13549 // 13550-// $hash=f331b4d8e20683281cee5cf873950c236fc6cffd$ 13551+// $hash=7bbb368ca482601286a12f0ab7cc652fd16a1929$ 13552 // 13553 13554 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h" 13555diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h 13556index 2f752aed77d7c..e8a5309622d43 13557--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h 13558+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h 13559@@ -1,4 +1,4 @@ 13560-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13561+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13562 // reserved. Use of this source code is governed by a BSD-style license that 13563 // can be found in the LICENSE file. 13564 // 13565@@ -9,7 +9,7 @@ 13566 // implementations. See the translator.README.txt file in the tools directory 13567 // for more information. 13568 // 13569-// $hash=abcdf3e219cfeac25ddf87a82c173189d0707bbd$ 13570+// $hash=871a3626f0e6928f2b1094b6fd01175f2bc82a29$ 13571 // 13572 13573 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CPPTOC_H_ 13574diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc 13575index 2709126202650..c6165f7552d67 13576--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc 13577+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc 13578@@ -1,4 +1,4 @@ 13579-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13580+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13581 // reserved. Use of this source code is governed by a BSD-style license that 13582 // can be found in the LICENSE file. 13583 // 13584@@ -9,7 +9,7 @@ 13585 // implementations. See the translator.README.txt file in the tools directory 13586 // for more information. 13587 // 13588-// $hash=693175fcf035e056074e56a8a5e39e3f5d1c218d$ 13589+// $hash=3c88df3fd064a4d053a17e1db85c95f2faa0f55a$ 13590 // 13591 13592 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h" 13593diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h 13594index f9c3a093817da..c17f7181d86e9 13595--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h 13596+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h 13597@@ -1,4 +1,4 @@ 13598-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13599+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13600 // reserved. Use of this source code is governed by a BSD-style license that 13601 // can be found in the LICENSE file. 13602 // 13603@@ -9,7 +9,7 @@ 13604 // implementations. See the translator.README.txt file in the tools directory 13605 // for more information. 13606 // 13607-// $hash=602040c56e366821ec632f5675d22d5b1787d046$ 13608+// $hash=c578229af8491c038b4a036ca870c5dd268b9244$ 13609 // 13610 13611 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CPPTOC_H_ 13612diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc 13613index b807842346485..d58c36511144d 13614--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc 13615+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc 13616@@ -1,4 +1,4 @@ 13617-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13618+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13619 // reserved. Use of this source code is governed by a BSD-style license that 13620 // can be found in the LICENSE file. 13621 // 13622@@ -9,7 +9,7 @@ 13623 // implementations. See the translator.README.txt file in the tools directory 13624 // for more information. 13625 // 13626-// $hash=8331f68f4339fbe375428550af8c793d455ef432$ 13627+// $hash=1f115b393d5226e9be5216e8209cdd9d1a8df345$ 13628 // 13629 13630 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h" 13631diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h 13632index a95b9af96faeb..0ed52386f0e2e 13633--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h 13634+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h 13635@@ -1,4 +1,4 @@ 13636-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13637+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13638 // reserved. Use of this source code is governed by a BSD-style license that 13639 // can be found in the LICENSE file. 13640 // 13641@@ -9,7 +9,7 @@ 13642 // implementations. See the translator.README.txt file in the tools directory 13643 // for more information. 13644 // 13645-// $hash=80d99f15db9d7a39f51b24769104d2daeb100ef7$ 13646+// $hash=f138313a94a2c2943926df60ee5293f5dc9f62b8$ 13647 // 13648 13649 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CPPTOC_H_ 13650diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc 13651index b0a9754827888..0159dc5bc28d1 13652--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc 13653+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc 13654@@ -1,4 +1,4 @@ 13655-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13656+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13657 // reserved. Use of this source code is governed by a BSD-style license that 13658 // can be found in the LICENSE file. 13659 // 13660@@ -9,7 +9,7 @@ 13661 // implementations. See the translator.README.txt file in the tools directory 13662 // for more information. 13663 // 13664-// $hash=215ecf50a38a26a660ebd9c9784ddba9ef9ac336$ 13665+// $hash=bf4d4b7f5a7395de486eeab67d16ad48310b0771$ 13666 // 13667 13668 #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h" 13669diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h 13670index c0011d3ce753a..e1420e8f2175d 13671--- a/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h 13672+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h 13673@@ -1,4 +1,4 @@ 13674-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13675+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13676 // reserved. Use of this source code is governed by a BSD-style license that 13677 // can be found in the LICENSE file. 13678 // 13679@@ -9,7 +9,7 @@ 13680 // implementations. See the translator.README.txt file in the tools directory 13681 // for more information. 13682 // 13683-// $hash=cf13344b75658fdc4d727598a1ca9cf1d2d9aebe$ 13684+// $hash=f431a7518ff642f5b307dbd716bfcd75c5bcb37a$ 13685 // 13686 13687 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CPPTOC_H_ 13688diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc 13689index 6912405ebfc68..e64cd734766e7 13690--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc 13691+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc 13692@@ -1,4 +1,4 @@ 13693-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13694+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13695 // reserved. Use of this source code is governed by a BSD-style license that 13696 // can be found in the LICENSE file. 13697 // 13698@@ -9,7 +9,7 @@ 13699 // implementations. See the translator.README.txt file in the tools directory 13700 // for more information. 13701 // 13702-// $hash=ba3de8f4ffca578355877eb66e19a61e337fab63$ 13703+// $hash=6bcfc2738c1acbf4476fe6fcdb62d3bb7f14f44b$ 13704 // 13705 13706 #include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h" 13707diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h 13708index afb925f57fb88..894345cccc680 13709--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h 13710+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h 13711@@ -1,4 +1,4 @@ 13712-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13713+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13714 // reserved. Use of this source code is governed by a BSD-style license that 13715 // can be found in the LICENSE file. 13716 // 13717@@ -9,7 +9,7 @@ 13718 // implementations. See the translator.README.txt file in the tools directory 13719 // for more information. 13720 // 13721-// $hash=3a46ac0b98d0a79f8506ffc09a5c3cdcca353f29$ 13722+// $hash=7a7900759a192fa0586d1ab7e2706c513ed9b715$ 13723 // 13724 13725 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CPPTOC_H_ 13726diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc 13727index f528e64e083eb..6fc05d57e3d58 13728--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc 13729+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc 13730@@ -1,4 +1,4 @@ 13731-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13732+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13733 // reserved. Use of this source code is governed by a BSD-style license that 13734 // can be found in the LICENSE file. 13735 // 13736@@ -9,7 +9,7 @@ 13737 // implementations. See the translator.README.txt file in the tools directory 13738 // for more information. 13739 // 13740-// $hash=da43c88a9d20786247371fa3a69230862f8619a6$ 13741+// $hash=9d7c60f524e97dfb4ef831ee5c00037372d42673$ 13742 // 13743 13744 #include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h" 13745diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h 13746index 591e1c7c41fea..d73036be67c74 13747--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h 13748+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h 13749@@ -1,4 +1,4 @@ 13750-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13751+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13752 // reserved. Use of this source code is governed by a BSD-style license that 13753 // can be found in the LICENSE file. 13754 // 13755@@ -9,7 +9,7 @@ 13756 // implementations. See the translator.README.txt file in the tools directory 13757 // for more information. 13758 // 13759-// $hash=c639d2f671cbfeb508e95a481c0d81ee92b87c29$ 13760+// $hash=bf705a17d41da4d434c122928b0f55c8760d3689$ 13761 // 13762 13763 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_ 13764diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc 13765index 09704c592128c..16cee5f001c7a 13766--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc 13767+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc 13768@@ -1,4 +1,4 @@ 13769-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13770+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13771 // reserved. Use of this source code is governed by a BSD-style license that 13772 // can be found in the LICENSE file. 13773 // 13774@@ -9,7 +9,7 @@ 13775 // implementations. See the translator.README.txt file in the tools directory 13776 // for more information. 13777 // 13778-// $hash=428d7bab8b87fe39bf70e53c8bf1d0a50bf88c33$ 13779+// $hash=b1ca84e5a38b7d473cdd8386868c9cc7372e1ebf$ 13780 // 13781 13782 #include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h" 13783diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h 13784index 104f2992ef182..3602a4b03e324 13785--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h 13786+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h 13787@@ -1,4 +1,4 @@ 13788-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13789+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13790 // reserved. Use of this source code is governed by a BSD-style license that 13791 // can be found in the LICENSE file. 13792 // 13793@@ -9,7 +9,7 @@ 13794 // implementations. See the translator.README.txt file in the tools directory 13795 // for more information. 13796 // 13797-// $hash=26db238e377ea4db7b6c005d00dcaf270be64ce6$ 13798+// $hash=333a572bf8bb3cde5058ae36410b571d777cd157$ 13799 // 13800 13801 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CPPTOC_H_ 13802diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc 13803index 2dfe000ef0ecc..1ef86633a44e0 13804--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc 13805+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc 13806@@ -1,4 +1,4 @@ 13807-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13808+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13809 // reserved. Use of this source code is governed by a BSD-style license that 13810 // can be found in the LICENSE file. 13811 // 13812@@ -9,7 +9,7 @@ 13813 // implementations. See the translator.README.txt file in the tools directory 13814 // for more information. 13815 // 13816-// $hash=c7dafd30c4f75e38e507feabdc40dc234d21a06b$ 13817+// $hash=603f865fe40c123657e8d8213b6c03cb9fea36ad$ 13818 // 13819 13820 #include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h" 13821diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h 13822index b6ee58dab1cb2..e1c516aa0f178 13823--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h 13824+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h 13825@@ -1,4 +1,4 @@ 13826-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13827+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13828 // reserved. Use of this source code is governed by a BSD-style license that 13829 // can be found in the LICENSE file. 13830 // 13831@@ -9,7 +9,7 @@ 13832 // implementations. See the translator.README.txt file in the tools directory 13833 // for more information. 13834 // 13835-// $hash=87924524eab4c309d13dc3e9656c601fd65c7449$ 13836+// $hash=df48c52988d69bfd94bc4245d1c2069f45512f7a$ 13837 // 13838 13839 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CPPTOC_H_ 13840diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc 13841index cc253be262b15..2359a3a4cf418 13842--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc 13843+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc 13844@@ -1,4 +1,4 @@ 13845-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13846+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13847 // reserved. Use of this source code is governed by a BSD-style license that 13848 // can be found in the LICENSE file. 13849 // 13850@@ -9,7 +9,7 @@ 13851 // implementations. See the translator.README.txt file in the tools directory 13852 // for more information. 13853 // 13854-// $hash=442b86286b5b3126fd0a0f0849ca661ef7487fb3$ 13855+// $hash=481e41d324069dcb26cfc0c69b51ad4281e95144$ 13856 // 13857 13858 #include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h" 13859diff --git a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h 13860index dbdd75ed0972f..f03840613b6c1 13861--- a/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h 13862+++ b/src/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h 13863@@ -1,4 +1,4 @@ 13864-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13865+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13866 // reserved. Use of this source code is governed by a BSD-style license that 13867 // can be found in the LICENSE file. 13868 // 13869@@ -9,7 +9,7 @@ 13870 // implementations. See the translator.README.txt file in the tools directory 13871 // for more information. 13872 // 13873-// $hash=43b0a0576a86ba1d2dda27c83af22554da773221$ 13874+// $hash=029af2aa3f312b751ca30b039f22e5c4fbd42295$ 13875 // 13876 13877 #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_ 13878diff --git a/src/cef/libcef_dll/cpptoc/thread_cpptoc.cc b/src/cef/libcef_dll/cpptoc/thread_cpptoc.cc 13879index b48ba593ce01b..a63f79ed25c65 13880--- a/src/cef/libcef_dll/cpptoc/thread_cpptoc.cc 13881+++ b/src/cef/libcef_dll/cpptoc/thread_cpptoc.cc 13882@@ -1,4 +1,4 @@ 13883-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13884+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13885 // reserved. Use of this source code is governed by a BSD-style license that 13886 // can be found in the LICENSE file. 13887 // 13888@@ -9,7 +9,7 @@ 13889 // implementations. See the translator.README.txt file in the tools directory 13890 // for more information. 13891 // 13892-// $hash=9975067d09206080d5237a7d1e8dd70155deb554$ 13893+// $hash=d8f0260fca4ead50ef8cfc5856fa94e835844846$ 13894 // 13895 13896 #include "libcef_dll/cpptoc/thread_cpptoc.h" 13897diff --git a/src/cef/libcef_dll/cpptoc/thread_cpptoc.h b/src/cef/libcef_dll/cpptoc/thread_cpptoc.h 13898index 66da3dbc79e66..37f0be30ccfa2 13899--- a/src/cef/libcef_dll/cpptoc/thread_cpptoc.h 13900+++ b/src/cef/libcef_dll/cpptoc/thread_cpptoc.h 13901@@ -1,4 +1,4 @@ 13902-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13903+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13904 // reserved. Use of this source code is governed by a BSD-style license that 13905 // can be found in the LICENSE file. 13906 // 13907@@ -9,7 +9,7 @@ 13908 // implementations. See the translator.README.txt file in the tools directory 13909 // for more information. 13910 // 13911-// $hash=820a6a8e017c6ba2a19f5c0b8db0f8aa628a0cfa$ 13912+// $hash=684bc72317e634d7357bdea53bf7dfe81d9d536b$ 13913 // 13914 13915 #ifndef CEF_LIBCEF_DLL_CPPTOC_THREAD_CPPTOC_H_ 13916diff --git a/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc 13917index dc445270043ff..d36bb74093246 13918--- a/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc 13919+++ b/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc 13920@@ -1,4 +1,4 @@ 13921-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13922+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13923 // reserved. Use of this source code is governed by a BSD-style license that 13924 // can be found in the LICENSE file. 13925 // 13926@@ -9,7 +9,7 @@ 13927 // implementations. See the translator.README.txt file in the tools directory 13928 // for more information. 13929 // 13930-// $hash=db92b5330f0b984051a202144f77b389501a260e$ 13931+// $hash=e5112f59f64307d7059920de8a59527494dad903$ 13932 // 13933 13934 #include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" 13935diff --git a/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h 13936index 085a6000827b7..551f69c51b8c1 13937--- a/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h 13938+++ b/src/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h 13939@@ -1,4 +1,4 @@ 13940-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13941+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13942 // reserved. Use of this source code is governed by a BSD-style license that 13943 // can be found in the LICENSE file. 13944 // 13945@@ -9,7 +9,7 @@ 13946 // implementations. See the translator.README.txt file in the tools directory 13947 // for more information. 13948 // 13949-// $hash=6ab5f8f6ff4a68382bd5e239ad2c8e2c12c39c6d$ 13950+// $hash=da593bcc58bec4b7dc1159fdc2fd2b8f472a6c93$ 13951 // 13952 13953 #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ 13954diff --git a/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc b/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc 13955index 805b66a820e23..f7d7f6805fd2c 13956--- a/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc 13957+++ b/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc 13958@@ -1,4 +1,4 @@ 13959-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13960+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13961 // reserved. Use of this source code is governed by a BSD-style license that 13962 // can be found in the LICENSE file. 13963 // 13964@@ -9,7 +9,7 @@ 13965 // implementations. See the translator.README.txt file in the tools directory 13966 // for more information. 13967 // 13968-// $hash=6193670d2d0577eaf226bd1825cde7b3f70c0f68$ 13969+// $hash=baa94bdc57a09aa7dfd6b040963510d037a6e37c$ 13970 // 13971 13972 #include "libcef_dll/cpptoc/urlrequest_cpptoc.h" 13973diff --git a/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h b/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h 13974index b798d658857f5..3ed15df73fd55 13975--- a/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h 13976+++ b/src/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h 13977@@ -1,4 +1,4 @@ 13978-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13979+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13980 // reserved. Use of this source code is governed by a BSD-style license that 13981 // can be found in the LICENSE file. 13982 // 13983@@ -9,7 +9,7 @@ 13984 // implementations. See the translator.README.txt file in the tools directory 13985 // for more information. 13986 // 13987-// $hash=1902918d90c40d3b524c0f7adcb56dc9a565df4d$ 13988+// $hash=f870036a626bd6ba126425b586b0a3116030c8d6$ 13989 // 13990 13991 #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CPPTOC_H_ 13992diff --git a/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc 13993index a6bfe77e3b060..39ddef322cd2d 13994--- a/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc 13995+++ b/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc 13996@@ -1,4 +1,4 @@ 13997-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 13998+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 13999 // reserved. Use of this source code is governed by a BSD-style license that 14000 // can be found in the LICENSE file. 14001 // 14002@@ -9,7 +9,7 @@ 14003 // implementations. See the translator.README.txt file in the tools directory 14004 // for more information. 14005 // 14006-// $hash=35161ccb0b72898e250d905b4b245b4839fe7ecc$ 14007+// $hash=ff5e74bff88361fed356300624c8ee8deab15554$ 14008 // 14009 14010 #include "libcef_dll/cpptoc/v8accessor_cpptoc.h" 14011diff --git a/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h 14012index dd68c064bb05d..fb40f8632a3a8 14013--- a/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h 14014+++ b/src/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h 14015@@ -1,4 +1,4 @@ 14016-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14017+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14018 // reserved. Use of this source code is governed by a BSD-style license that 14019 // can be found in the LICENSE file. 14020 // 14021@@ -9,7 +9,7 @@ 14022 // implementations. See the translator.README.txt file in the tools directory 14023 // for more information. 14024 // 14025-// $hash=cbf062496a14d367e643c3e52afd460df4176fde$ 14026+// $hash=b8975b107d5912bdcc3e66229119fed6316d269c$ 14027 // 14028 14029 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ 14030diff --git a/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc 14031index 9c5e28070d88b..48587b103705b 14032--- a/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc 14033+++ b/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc 14034@@ -1,4 +1,4 @@ 14035-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14036+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14037 // reserved. Use of this source code is governed by a BSD-style license that 14038 // can be found in the LICENSE file. 14039 // 14040@@ -9,7 +9,7 @@ 14041 // implementations. See the translator.README.txt file in the tools directory 14042 // for more information. 14043 // 14044-// $hash=0a7885c5553c99c1ff7539c8aba3a340aa6f3d08$ 14045+// $hash=2b44fa06894c671a055dfbba079bc3373902fcb9$ 14046 // 14047 14048 #include "libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h" 14049diff --git a/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h 14050index a5b0463b7bb69..650881c3262d1 14051--- a/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h 14052+++ b/src/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h 14053@@ -1,4 +1,4 @@ 14054-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14055+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14056 // reserved. Use of this source code is governed by a BSD-style license that 14057 // can be found in the LICENSE file. 14058 // 14059@@ -9,7 +9,7 @@ 14060 // implementations. See the translator.README.txt file in the tools directory 14061 // for more information. 14062 // 14063-// $hash=aa87e37fdfa915cb160cb4b7577c46b9e903a698$ 14064+// $hash=f3cb7f220bf24ad178eed9b14d8b6e3d1baed6d5$ 14065 // 14066 14067 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ARRAY_BUFFER_RELEASE_CALLBACK_CPPTOC_H_ 14068diff --git a/src/cef/libcef_dll/cpptoc/v8context_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8context_cpptoc.cc 14069index fc02f3c2496bf..191e9714e89dc 14070--- a/src/cef/libcef_dll/cpptoc/v8context_cpptoc.cc 14071+++ b/src/cef/libcef_dll/cpptoc/v8context_cpptoc.cc 14072@@ -1,4 +1,4 @@ 14073-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14074+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14075 // reserved. Use of this source code is governed by a BSD-style license that 14076 // can be found in the LICENSE file. 14077 // 14078@@ -9,7 +9,7 @@ 14079 // implementations. See the translator.README.txt file in the tools directory 14080 // for more information. 14081 // 14082-// $hash=5fb43e3f68ef5f431fe6d6f84d399dc0cd292d7d$ 14083+// $hash=cf1f345f1f55c603ab3d5fb7dad775152bed8bd5$ 14084 // 14085 14086 #include "libcef_dll/cpptoc/v8context_cpptoc.h" 14087diff --git a/src/cef/libcef_dll/cpptoc/v8context_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8context_cpptoc.h 14088index 073ea9e248be4..5b7746d2b41f8 14089--- a/src/cef/libcef_dll/cpptoc/v8context_cpptoc.h 14090+++ b/src/cef/libcef_dll/cpptoc/v8context_cpptoc.h 14091@@ -1,4 +1,4 @@ 14092-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14093+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14094 // reserved. Use of this source code is governed by a BSD-style license that 14095 // can be found in the LICENSE file. 14096 // 14097@@ -9,7 +9,7 @@ 14098 // implementations. See the translator.README.txt file in the tools directory 14099 // for more information. 14100 // 14101-// $hash=e0d02da9f3e8216559bd80e50b0e3d061455b0af$ 14102+// $hash=251051522f71e61a56b0844596a6ca2d858915c8$ 14103 // 14104 14105 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ 14106diff --git a/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc 14107index c142b061d5b85..bcbd9eb4a2a81 14108--- a/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc 14109+++ b/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc 14110@@ -1,4 +1,4 @@ 14111-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14112+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14113 // reserved. Use of this source code is governed by a BSD-style license that 14114 // can be found in the LICENSE file. 14115 // 14116@@ -9,7 +9,7 @@ 14117 // implementations. See the translator.README.txt file in the tools directory 14118 // for more information. 14119 // 14120-// $hash=bcf73c22701825bb552e78ece2e62c1e6b8da282$ 14121+// $hash=be0ac1aa2ae8d92bf3e2552497345e4559776b6f$ 14122 // 14123 14124 #include "libcef_dll/cpptoc/v8exception_cpptoc.h" 14125diff --git a/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.h 14126index 83f329540cabb..d9f8725b58953 14127--- a/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.h 14128+++ b/src/cef/libcef_dll/cpptoc/v8exception_cpptoc.h 14129@@ -1,4 +1,4 @@ 14130-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14131+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14132 // reserved. Use of this source code is governed by a BSD-style license that 14133 // can be found in the LICENSE file. 14134 // 14135@@ -9,7 +9,7 @@ 14136 // implementations. See the translator.README.txt file in the tools directory 14137 // for more information. 14138 // 14139-// $hash=8d6ac0b98bc8a8efc173365c7542907fe1d229ae$ 14140+// $hash=438f4efa56776c515c7c42c6a7dae68937729fef$ 14141 // 14142 14143 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ 14144diff --git a/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc 14145index 63fe01b9c9490..931d8a7a0a177 14146--- a/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc 14147+++ b/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc 14148@@ -1,4 +1,4 @@ 14149-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14150+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14151 // reserved. Use of this source code is governed by a BSD-style license that 14152 // can be found in the LICENSE file. 14153 // 14154@@ -9,7 +9,7 @@ 14155 // implementations. See the translator.README.txt file in the tools directory 14156 // for more information. 14157 // 14158-// $hash=7a072d883f46856cf79bf868560689797b31e362$ 14159+// $hash=116eee182be2336fac01047c154a177dd5c6de49$ 14160 // 14161 14162 #include "libcef_dll/cpptoc/v8handler_cpptoc.h" 14163diff --git a/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.h 14164index bbf4e955e4f98..f3122ffc622aa 14165--- a/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.h 14166+++ b/src/cef/libcef_dll/cpptoc/v8handler_cpptoc.h 14167@@ -1,4 +1,4 @@ 14168-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14169+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14170 // reserved. Use of this source code is governed by a BSD-style license that 14171 // can be found in the LICENSE file. 14172 // 14173@@ -9,7 +9,7 @@ 14174 // implementations. See the translator.README.txt file in the tools directory 14175 // for more information. 14176 // 14177-// $hash=8a1d3087cb27c365c8972bc22f712c8433db37a7$ 14178+// $hash=25ab4ee4f4c72c6be2e4df28dfaa8bbe5ec522d6$ 14179 // 14180 14181 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ 14182diff --git a/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc 14183index 6a590da10e22b..4367178dcc054 14184--- a/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc 14185+++ b/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc 14186@@ -1,4 +1,4 @@ 14187-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14188+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14189 // reserved. Use of this source code is governed by a BSD-style license that 14190 // can be found in the LICENSE file. 14191 // 14192@@ -9,7 +9,7 @@ 14193 // implementations. See the translator.README.txt file in the tools directory 14194 // for more information. 14195 // 14196-// $hash=fd651a7fef9dbbce9765c8200660c4057808e6cc$ 14197+// $hash=acc06c29fd11d4eecb3d8114c48f4f3f0548abce$ 14198 // 14199 14200 #include "libcef_dll/cpptoc/v8interceptor_cpptoc.h" 14201diff --git a/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h 14202index e13ff18779b9c..07f4a629dc3f0 14203--- a/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h 14204+++ b/src/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h 14205@@ -1,4 +1,4 @@ 14206-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14207+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14208 // reserved. Use of this source code is governed by a BSD-style license that 14209 // can be found in the LICENSE file. 14210 // 14211@@ -9,7 +9,7 @@ 14212 // implementations. See the translator.README.txt file in the tools directory 14213 // for more information. 14214 // 14215-// $hash=ea56a3340775acdee89516a9e1107f725e0f8c47$ 14216+// $hash=17704763b12cf8c125a358d2db96037f13613b17$ 14217 // 14218 14219 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8INTERCEPTOR_CPPTOC_H_ 14220diff --git a/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc 14221index 68cf92f231984..0887c3f66a98a 14222--- a/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc 14223+++ b/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc 14224@@ -1,4 +1,4 @@ 14225-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14226+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14227 // reserved. Use of this source code is governed by a BSD-style license that 14228 // can be found in the LICENSE file. 14229 // 14230@@ -9,7 +9,7 @@ 14231 // implementations. See the translator.README.txt file in the tools directory 14232 // for more information. 14233 // 14234-// $hash=bcf0ccd2d4220eaa8f31b1f4f9b64440f81f563e$ 14235+// $hash=d57266ae37abe823a7a91d36416da50f75e7c663$ 14236 // 14237 14238 #include "libcef_dll/cpptoc/v8stack_frame_cpptoc.h" 14239diff --git a/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h 14240index 2c4659cbd5b3f..fabdf222e3fb2 14241--- a/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h 14242+++ b/src/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h 14243@@ -1,4 +1,4 @@ 14244-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14245+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14246 // reserved. Use of this source code is governed by a BSD-style license that 14247 // can be found in the LICENSE file. 14248 // 14249@@ -9,7 +9,7 @@ 14250 // implementations. See the translator.README.txt file in the tools directory 14251 // for more information. 14252 // 14253-// $hash=08e9e87d39ea58ed8bd7edc6dbf7cf2873218eee$ 14254+// $hash=a804ebb160de9a40b1e8ce65e1dfca67e5ffb658$ 14255 // 14256 14257 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8STACK_FRAME_CPPTOC_H_ 14258diff --git a/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc 14259index 6e33464a3ceaa..d797ec93f65e4 14260--- a/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc 14261+++ b/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc 14262@@ -1,4 +1,4 @@ 14263-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14264+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14265 // reserved. Use of this source code is governed by a BSD-style license that 14266 // can be found in the LICENSE file. 14267 // 14268@@ -9,7 +9,7 @@ 14269 // implementations. See the translator.README.txt file in the tools directory 14270 // for more information. 14271 // 14272-// $hash=69faf917e01945c29e5f20a00abbcc69aac7c0a7$ 14273+// $hash=c9f42c7ec65dbe45094126c7668ecab5bc0dba4a$ 14274 // 14275 14276 #include "libcef_dll/cpptoc/v8stack_trace_cpptoc.h" 14277diff --git a/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h 14278index d7c2f079f5f5e..c0374479ea34f 14279--- a/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h 14280+++ b/src/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h 14281@@ -1,4 +1,4 @@ 14282-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14283+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14284 // reserved. Use of this source code is governed by a BSD-style license that 14285 // can be found in the LICENSE file. 14286 // 14287@@ -9,7 +9,7 @@ 14288 // implementations. See the translator.README.txt file in the tools directory 14289 // for more information. 14290 // 14291-// $hash=01a737cd8e6ea8e747d0a404c4b370a620eada94$ 14292+// $hash=7d064189557bf22631a1daf8a757128680743960$ 14293 // 14294 14295 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8STACK_TRACE_CPPTOC_H_ 14296diff --git a/src/cef/libcef_dll/cpptoc/v8value_cpptoc.cc b/src/cef/libcef_dll/cpptoc/v8value_cpptoc.cc 14297index 49dd142b07ecd..fd550f13bee69 14298--- a/src/cef/libcef_dll/cpptoc/v8value_cpptoc.cc 14299+++ b/src/cef/libcef_dll/cpptoc/v8value_cpptoc.cc 14300@@ -1,4 +1,4 @@ 14301-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14302+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14303 // reserved. Use of this source code is governed by a BSD-style license that 14304 // can be found in the LICENSE file. 14305 // 14306@@ -9,7 +9,7 @@ 14307 // implementations. See the translator.README.txt file in the tools directory 14308 // for more information. 14309 // 14310-// $hash=0cb915346153880872b44bd1f857c24787ed52af$ 14311+// $hash=9a17d4cb73ff68c45251d606252cbcb84ddffbff$ 14312 // 14313 14314 #include "libcef_dll/cpptoc/v8value_cpptoc.h" 14315diff --git a/src/cef/libcef_dll/cpptoc/v8value_cpptoc.h b/src/cef/libcef_dll/cpptoc/v8value_cpptoc.h 14316index 363743ce1f016..87862ae754c8e 14317--- a/src/cef/libcef_dll/cpptoc/v8value_cpptoc.h 14318+++ b/src/cef/libcef_dll/cpptoc/v8value_cpptoc.h 14319@@ -1,4 +1,4 @@ 14320-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14321+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14322 // reserved. Use of this source code is governed by a BSD-style license that 14323 // can be found in the LICENSE file. 14324 // 14325@@ -9,7 +9,7 @@ 14326 // implementations. See the translator.README.txt file in the tools directory 14327 // for more information. 14328 // 14329-// $hash=0d07225656f5400129aca5cef75bbefcaaacb70d$ 14330+// $hash=5b314dd35111aa303aa5d695e75839076f874c90$ 14331 // 14332 14333 #ifndef CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ 14334diff --git a/src/cef/libcef_dll/cpptoc/value_cpptoc.cc b/src/cef/libcef_dll/cpptoc/value_cpptoc.cc 14335index 1d4001b723399..196df482bdf67 14336--- a/src/cef/libcef_dll/cpptoc/value_cpptoc.cc 14337+++ b/src/cef/libcef_dll/cpptoc/value_cpptoc.cc 14338@@ -1,4 +1,4 @@ 14339-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14340+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14341 // reserved. Use of this source code is governed by a BSD-style license that 14342 // can be found in the LICENSE file. 14343 // 14344@@ -9,7 +9,7 @@ 14345 // implementations. See the translator.README.txt file in the tools directory 14346 // for more information. 14347 // 14348-// $hash=680adcc74e385af7d83fa8b28b36b2215bc20f2b$ 14349+// $hash=610af325d95f1242db8993e38da62713feafe0a7$ 14350 // 14351 14352 #include "libcef_dll/cpptoc/value_cpptoc.h" 14353diff --git a/src/cef/libcef_dll/cpptoc/value_cpptoc.h b/src/cef/libcef_dll/cpptoc/value_cpptoc.h 14354index 72b6a3dab4322..512155e5c6a0b 14355--- a/src/cef/libcef_dll/cpptoc/value_cpptoc.h 14356+++ b/src/cef/libcef_dll/cpptoc/value_cpptoc.h 14357@@ -1,4 +1,4 @@ 14358-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14359+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14360 // reserved. Use of this source code is governed by a BSD-style license that 14361 // can be found in the LICENSE file. 14362 // 14363@@ -9,7 +9,7 @@ 14364 // implementations. See the translator.README.txt file in the tools directory 14365 // for more information. 14366 // 14367-// $hash=108679f1ab32ec8b2e0ffe77602e89603f6c279f$ 14368+// $hash=19a491010366c91259449297ea4fb37414ae2a8e$ 14369 // 14370 14371 #ifndef CEF_LIBCEF_DLL_CPPTOC_VALUE_CPPTOC_H_ 14372diff --git a/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc 14373index 4e7d723cdeccb..6db8fb3acb527 14374--- a/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc 14375+++ b/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc 14376@@ -1,4 +1,4 @@ 14377-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14378+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14379 // reserved. Use of this source code is governed by a BSD-style license that 14380 // can be found in the LICENSE file. 14381 // 14382@@ -9,7 +9,7 @@ 14383 // implementations. See the translator.README.txt file in the tools directory 14384 // for more information. 14385 // 14386-// $hash=95678987551b26755e5dc718c3cad2e975b574c7$ 14387+// $hash=0603aa2ef3dd35d5630bafc47763307f77f64c8e$ 14388 // 14389 14390 #include "libcef_dll/cpptoc/views/box_layout_cpptoc.h" 14391diff --git a/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h 14392index e67288a57d5d5..fc41243e66b16 14393--- a/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h 14394+++ b/src/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h 14395@@ -1,4 +1,4 @@ 14396-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14397+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14398 // reserved. Use of this source code is governed by a BSD-style license that 14399 // can be found in the LICENSE file. 14400 // 14401@@ -9,7 +9,7 @@ 14402 // implementations. See the translator.README.txt file in the tools directory 14403 // for more information. 14404 // 14405-// $hash=e665defe8e51c3405d75a3f1d9f382f6e9e9f81f$ 14406+// $hash=3f9e4984c1e1eff7e51ab13f9f7fe2ab249657ec$ 14407 // 14408 14409 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BOX_LAYOUT_CPPTOC_H_ 14410diff --git a/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc 14411index 2109aac1d9e5f..2bc455e6b441f 14412--- a/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc 14413+++ b/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc 14414@@ -1,4 +1,4 @@ 14415-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14416+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14417 // reserved. Use of this source code is governed by a BSD-style license that 14418 // can be found in the LICENSE file. 14419 // 14420@@ -9,7 +9,7 @@ 14421 // implementations. See the translator.README.txt file in the tools directory 14422 // for more information. 14423 // 14424-// $hash=ed2a9f38555ed559f342f6fd39f21192611771ee$ 14425+// $hash=a07b2f308b7192403cc92086f11545fd6adca28d$ 14426 // 14427 14428 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h" 14429diff --git a/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h 14430index f4e36ae4f19c1..2f9fd838f8df4 14431--- a/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h 14432+++ b/src/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h 14433@@ -1,4 +1,4 @@ 14434-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14435+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14436 // reserved. Use of this source code is governed by a BSD-style license that 14437 // can be found in the LICENSE file. 14438 // 14439@@ -9,7 +9,7 @@ 14440 // implementations. See the translator.README.txt file in the tools directory 14441 // for more information. 14442 // 14443-// $hash=dc07da6d436a7d99817045690a3932010cd1acfd$ 14444+// $hash=f981c5f7247ec57926549c145c47a7cdcbdd80a0$ 14445 // 14446 14447 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_CPPTOC_H_ 14448diff --git a/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc 14449index 46d9fa3794932..2ef39d183df08 14450--- a/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc 14451+++ b/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc 14452@@ -1,4 +1,4 @@ 14453-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14454+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14455 // reserved. Use of this source code is governed by a BSD-style license that 14456 // can be found in the LICENSE file. 14457 // 14458@@ -9,7 +9,7 @@ 14459 // implementations. See the translator.README.txt file in the tools directory 14460 // for more information. 14461 // 14462-// $hash=8f3129779912a325240795e05610d6190997e028$ 14463+// $hash=d2fdb9e5fa608211f3583bafc74602d0573421c1$ 14464 // 14465 14466 #include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h" 14467diff --git a/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h 14468index feb502ae7e5f2..f0761f3bbc572 14469--- a/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h 14470+++ b/src/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h 14471@@ -1,4 +1,4 @@ 14472-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14473+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14474 // reserved. Use of this source code is governed by a BSD-style license that 14475 // can be found in the LICENSE file. 14476 // 14477@@ -9,7 +9,7 @@ 14478 // implementations. See the translator.README.txt file in the tools directory 14479 // for more information. 14480 // 14481-// $hash=5bd6bbfbc74b0059f073463c28b74c9b31916e59$ 14482+// $hash=b091e620040d148171ce5c99d5376cb00356eb37$ 14483 // 14484 14485 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_DELEGATE_CPPTOC_H_ 14486diff --git a/src/cef/libcef_dll/cpptoc/views/button_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/button_cpptoc.cc 14487index 7ccd17db62912..890ca97f8b920 14488--- a/src/cef/libcef_dll/cpptoc/views/button_cpptoc.cc 14489+++ b/src/cef/libcef_dll/cpptoc/views/button_cpptoc.cc 14490@@ -1,4 +1,4 @@ 14491-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14492+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14493 // reserved. Use of this source code is governed by a BSD-style license that 14494 // can be found in the LICENSE file. 14495 // 14496@@ -9,7 +9,7 @@ 14497 // implementations. See the translator.README.txt file in the tools directory 14498 // for more information. 14499 // 14500-// $hash=f002c60074ac76bb3e4db3d070b5ea1b430e620d$ 14501+// $hash=d1d8ab075e6ac6cf29e2284f21b17a7e0648af71$ 14502 // 14503 14504 #include "libcef_dll/cpptoc/views/button_cpptoc.h" 14505diff --git a/src/cef/libcef_dll/cpptoc/views/button_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/button_cpptoc.h 14506index 5848a3fd83e7c..ed70f485bb601 14507--- a/src/cef/libcef_dll/cpptoc/views/button_cpptoc.h 14508+++ b/src/cef/libcef_dll/cpptoc/views/button_cpptoc.h 14509@@ -1,4 +1,4 @@ 14510-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14511+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14512 // reserved. Use of this source code is governed by a BSD-style license that 14513 // can be found in the LICENSE file. 14514 // 14515@@ -9,7 +9,7 @@ 14516 // implementations. See the translator.README.txt file in the tools directory 14517 // for more information. 14518 // 14519-// $hash=60660c0973fee97e850fcf4026b57a6f367ea294$ 14520+// $hash=3fc906cb8937c58418501c33ba81462806b26860$ 14521 // 14522 14523 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_CPPTOC_H_ 14524diff --git a/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc 14525index 05464b089ed6e..c04277528fc71 14526--- a/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc 14527+++ b/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc 14528@@ -1,4 +1,4 @@ 14529-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14530+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14531 // reserved. Use of this source code is governed by a BSD-style license that 14532 // can be found in the LICENSE file. 14533 // 14534@@ -9,7 +9,7 @@ 14535 // implementations. See the translator.README.txt file in the tools directory 14536 // for more information. 14537 // 14538-// $hash=4e776c8db93f07efd47e80fe380071539e94ec81$ 14539+// $hash=4bcd9e786dcddeb99de73e14839f121a211f0e2d$ 14540 // 14541 14542 #include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h" 14543diff --git a/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h 14544index 3a682e09bcf4d..b342d8c50d4fe 14545--- a/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h 14546+++ b/src/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h 14547@@ -1,4 +1,4 @@ 14548-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14549+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14550 // reserved. Use of this source code is governed by a BSD-style license that 14551 // can be found in the LICENSE file. 14552 // 14553@@ -9,7 +9,7 @@ 14554 // implementations. See the translator.README.txt file in the tools directory 14555 // for more information. 14556 // 14557-// $hash=f3b8ad78e8614f873ee581697ac29cad49a19260$ 14558+// $hash=455b4eb400cc642cfb4cf0089b12059b8be31af6$ 14559 // 14560 14561 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_DELEGATE_CPPTOC_H_ 14562diff --git a/src/cef/libcef_dll/cpptoc/views/display_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/display_cpptoc.cc 14563index 470fee9d11971..41d13961f52f4 14564--- a/src/cef/libcef_dll/cpptoc/views/display_cpptoc.cc 14565+++ b/src/cef/libcef_dll/cpptoc/views/display_cpptoc.cc 14566@@ -1,4 +1,4 @@ 14567-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14568+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14569 // reserved. Use of this source code is governed by a BSD-style license that 14570 // can be found in the LICENSE file. 14571 // 14572@@ -9,7 +9,7 @@ 14573 // implementations. See the translator.README.txt file in the tools directory 14574 // for more information. 14575 // 14576-// $hash=546b8f890852fb4df26a85aec6b83effe1bdc6e6$ 14577+// $hash=19b9c4f4c94c1109c599ccda41440f573c966009$ 14578 // 14579 14580 #include "libcef_dll/cpptoc/views/display_cpptoc.h" 14581diff --git a/src/cef/libcef_dll/cpptoc/views/display_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/display_cpptoc.h 14582index 6ae1863347202..13eb6a6591302 14583--- a/src/cef/libcef_dll/cpptoc/views/display_cpptoc.h 14584+++ b/src/cef/libcef_dll/cpptoc/views/display_cpptoc.h 14585@@ -1,4 +1,4 @@ 14586-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14587+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14588 // reserved. Use of this source code is governed by a BSD-style license that 14589 // can be found in the LICENSE file. 14590 // 14591@@ -9,7 +9,7 @@ 14592 // implementations. See the translator.README.txt file in the tools directory 14593 // for more information. 14594 // 14595-// $hash=5918cca150c476ead77121bb93599c763a3e13e7$ 14596+// $hash=73811073aeb490787e777b5e7f8e41ef34cd6369$ 14597 // 14598 14599 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_DISPLAY_CPPTOC_H_ 14600diff --git a/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc 14601index b6b3a99c2a3a8..e42c249a84afc 14602--- a/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc 14603+++ b/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc 14604@@ -1,4 +1,4 @@ 14605-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14606+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14607 // reserved. Use of this source code is governed by a BSD-style license that 14608 // can be found in the LICENSE file. 14609 // 14610@@ -9,7 +9,7 @@ 14611 // implementations. See the translator.README.txt file in the tools directory 14612 // for more information. 14613 // 14614-// $hash=304f5db25f7e2a1e4cf169f7cc205013bb06f861$ 14615+// $hash=04718b744aa511fa8917dbcc464aecf6cda4550a$ 14616 // 14617 14618 #include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h" 14619diff --git a/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h 14620index a9bdbaf9d538a..a695842261622 14621--- a/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h 14622+++ b/src/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h 14623@@ -1,4 +1,4 @@ 14624-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14625+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14626 // reserved. Use of this source code is governed by a BSD-style license that 14627 // can be found in the LICENSE file. 14628 // 14629@@ -9,7 +9,7 @@ 14630 // implementations. See the translator.README.txt file in the tools directory 14631 // for more information. 14632 // 14633-// $hash=e2bad567245e3e1bdf240be33a3b0008ec0e3b18$ 14634+// $hash=88b95199af576610e6ce7e71603fb3c8b1426046$ 14635 // 14636 14637 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_FILL_LAYOUT_CPPTOC_H_ 14638diff --git a/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc 14639index 9916f2ecfd30b..56c31670f73bd 14640--- a/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc 14641+++ b/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc 14642@@ -1,4 +1,4 @@ 14643-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14644+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14645 // reserved. Use of this source code is governed by a BSD-style license that 14646 // can be found in the LICENSE file. 14647 // 14648@@ -9,7 +9,7 @@ 14649 // implementations. See the translator.README.txt file in the tools directory 14650 // for more information. 14651 // 14652-// $hash=c32cf44685b993619659ae5f6fb681e40d0b4cd9$ 14653+// $hash=c71d13ab650b2516ba6ae3b3cfda6b2f67b45e97$ 14654 // 14655 14656 #include "libcef_dll/cpptoc/views/label_button_cpptoc.h" 14657diff --git a/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h 14658index a26b71ad35f67..dad5d89582a65 14659--- a/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h 14660+++ b/src/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h 14661@@ -1,4 +1,4 @@ 14662-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14663+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14664 // reserved. Use of this source code is governed by a BSD-style license that 14665 // can be found in the LICENSE file. 14666 // 14667@@ -9,7 +9,7 @@ 14668 // implementations. See the translator.README.txt file in the tools directory 14669 // for more information. 14670 // 14671-// $hash=60d980037705be97fb1113e0b23b0e4bdd29b801$ 14672+// $hash=8e86fa292ee6e5debd2525e71eaa3ae8e42c8e55$ 14673 // 14674 14675 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LABEL_BUTTON_CPPTOC_H_ 14676diff --git a/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc 14677index 5976c28b094d8..e4c688b99a411 14678--- a/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc 14679+++ b/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc 14680@@ -1,4 +1,4 @@ 14681-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14682+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14683 // reserved. Use of this source code is governed by a BSD-style license that 14684 // can be found in the LICENSE file. 14685 // 14686@@ -9,7 +9,7 @@ 14687 // implementations. See the translator.README.txt file in the tools directory 14688 // for more information. 14689 // 14690-// $hash=91327244b4a4c037841a54ea2a06ebe42efe5477$ 14691+// $hash=ef68f133e06458b067d4768ea64360b48f6f7b76$ 14692 // 14693 14694 #include "libcef_dll/cpptoc/views/layout_cpptoc.h" 14695diff --git a/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.h 14696index 93ac800c7ac30..76c9930eef23f 14697--- a/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.h 14698+++ b/src/cef/libcef_dll/cpptoc/views/layout_cpptoc.h 14699@@ -1,4 +1,4 @@ 14700-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14701+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14702 // reserved. Use of this source code is governed by a BSD-style license that 14703 // can be found in the LICENSE file. 14704 // 14705@@ -9,7 +9,7 @@ 14706 // implementations. See the translator.README.txt file in the tools directory 14707 // for more information. 14708 // 14709-// $hash=8044bcf51ec6feacc1a186f6780c9076f5c1ec74$ 14710+// $hash=d0adda3ed7bbb825b0c9959960f832d23f75ccdc$ 14711 // 14712 14713 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LAYOUT_CPPTOC_H_ 14714diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc 14715index 4f3f0fb971be5..d43d7c55aed6a 14716--- a/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc 14717+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc 14718@@ -1,4 +1,4 @@ 14719-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14720+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14721 // reserved. Use of this source code is governed by a BSD-style license that 14722 // can be found in the LICENSE file. 14723 // 14724@@ -9,7 +9,7 @@ 14725 // implementations. See the translator.README.txt file in the tools directory 14726 // for more information. 14727 // 14728-// $hash=be533dcd2dd95060259a8baaece87bf2c6df0c27$ 14729+// $hash=b40df03337901e30bbd3db00a852dedc7ea500d8$ 14730 // 14731 14732 #include "libcef_dll/cpptoc/views/menu_button_cpptoc.h" 14733diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h 14734index 6b38233af507d..52f93e09a71c7 14735--- a/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h 14736+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h 14737@@ -1,4 +1,4 @@ 14738-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14739+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14740 // reserved. Use of this source code is governed by a BSD-style license that 14741 // can be found in the LICENSE file. 14742 // 14743@@ -9,7 +9,7 @@ 14744 // implementations. See the translator.README.txt file in the tools directory 14745 // for more information. 14746 // 14747-// $hash=d3b01ef1bca22e454dd4375df90a5a3fbd0f11f3$ 14748+// $hash=f2f44594e4cbcb3ef1ee3eb39d3d498f7a6cafbc$ 14749 // 14750 14751 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_CPPTOC_H_ 14752diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc 14753index 6fe5582d5c00f..295a2851e8ae2 14754--- a/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc 14755+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc 14756@@ -1,4 +1,4 @@ 14757-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14758+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14759 // reserved. Use of this source code is governed by a BSD-style license that 14760 // can be found in the LICENSE file. 14761 // 14762@@ -9,7 +9,7 @@ 14763 // implementations. See the translator.README.txt file in the tools directory 14764 // for more information. 14765 // 14766-// $hash=269173ab9f81796dec4b732e2050e26a177d8387$ 14767+// $hash=869a0291457438cf60cb7464dcc63dd0ac7a8cfc$ 14768 // 14769 14770 #include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h" 14771diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h 14772index 0ecc9e377eb0c..5f70f5a485c48 14773--- a/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h 14774+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h 14775@@ -1,4 +1,4 @@ 14776-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14777+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14778 // reserved. Use of this source code is governed by a BSD-style license that 14779 // can be found in the LICENSE file. 14780 // 14781@@ -9,7 +9,7 @@ 14782 // implementations. See the translator.README.txt file in the tools directory 14783 // for more information. 14784 // 14785-// $hash=670b8f7f67a5eacd3288724ec6439c56248477ec$ 14786+// $hash=9178b58c1b03965fc20636f3efd97c2385618574$ 14787 // 14788 14789 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_DELEGATE_CPPTOC_H_ 14790diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc 14791index daa1e5fdd8d64..c3d85d202a0aa 14792--- a/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc 14793+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc 14794@@ -1,4 +1,4 @@ 14795-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14796+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14797 // reserved. Use of this source code is governed by a BSD-style license that 14798 // can be found in the LICENSE file. 14799 // 14800@@ -9,7 +9,7 @@ 14801 // implementations. See the translator.README.txt file in the tools directory 14802 // for more information. 14803 // 14804-// $hash=c6db7f8e7c031a323e9da96aed3aee7fd7a4f558$ 14805+// $hash=2dc6b6ba5f4b65f25877aa56083d0e6dea42e7ae$ 14806 // 14807 14808 #include "libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h" 14809diff --git a/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h 14810index 51cac8072d11e..79a8566ee59ac 14811--- a/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h 14812+++ b/src/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h 14813@@ -1,4 +1,4 @@ 14814-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14815+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14816 // reserved. Use of this source code is governed by a BSD-style license that 14817 // can be found in the LICENSE file. 14818 // 14819@@ -9,7 +9,7 @@ 14820 // implementations. See the translator.README.txt file in the tools directory 14821 // for more information. 14822 // 14823-// $hash=072279b56eeeaf089107f5f78ee431c907afda46$ 14824+// $hash=5d7f30f1265294fc8617b444bd35bee3da172746$ 14825 // 14826 14827 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_PRESSED_LOCK_CPPTOC_H_ 14828diff --git a/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc 14829index d830c864bcf15..d8ce4395261fd 14830--- a/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc 14831+++ b/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.cc 14832@@ -1,4 +1,4 @@ 14833-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14834+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14835 // reserved. Use of this source code is governed by a BSD-style license that 14836 // can be found in the LICENSE file. 14837 // 14838@@ -9,7 +9,7 @@ 14839 // implementations. See the translator.README.txt file in the tools directory 14840 // for more information. 14841 // 14842-// $hash=6cf61c4e2900a7776278d4a0542f2b3e32d4420b$ 14843+// $hash=eec6e92443829047f908febc6d9ce7e6eafc6566$ 14844 // 14845 14846 #include "libcef_dll/cpptoc/views/overlay_controller_cpptoc.h" 14847diff --git a/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.h 14848index 8e428ae9da78f..b89f8b4b273c0 14849--- a/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.h 14850+++ b/src/cef/libcef_dll/cpptoc/views/overlay_controller_cpptoc.h 14851@@ -1,4 +1,4 @@ 14852-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14853+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14854 // reserved. Use of this source code is governed by a BSD-style license that 14855 // can be found in the LICENSE file. 14856 // 14857@@ -9,7 +9,7 @@ 14858 // implementations. See the translator.README.txt file in the tools directory 14859 // for more information. 14860 // 14861-// $hash=15c5e3c251b7a4f882b2e49e9a2ee6e84deb21e1$ 14862+// $hash=8d50609d2e79539752a8118f831e853b845892f4$ 14863 // 14864 14865 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_OVERLAY_CONTROLLER_CPPTOC_H_ 14866diff --git a/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc 14867index 3c7aeecd67dec..396ff3ee062b0 14868--- a/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc 14869+++ b/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc 14870@@ -1,4 +1,4 @@ 14871-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14872+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14873 // reserved. Use of this source code is governed by a BSD-style license that 14874 // can be found in the LICENSE file. 14875 // 14876@@ -9,7 +9,7 @@ 14877 // implementations. See the translator.README.txt file in the tools directory 14878 // for more information. 14879 // 14880-// $hash=fbec1a9b566580497409a7dbd3382e7c51db61ae$ 14881+// $hash=27650c566e4a7c056e5bb87a76df335ba641ab0f$ 14882 // 14883 14884 #include "libcef_dll/cpptoc/views/panel_cpptoc.h" 14885diff --git a/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.h 14886index ae2d99182ac5e..7411c0d35d823 14887--- a/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.h 14888+++ b/src/cef/libcef_dll/cpptoc/views/panel_cpptoc.h 14889@@ -1,4 +1,4 @@ 14890-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14891+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14892 // reserved. Use of this source code is governed by a BSD-style license that 14893 // can be found in the LICENSE file. 14894 // 14895@@ -9,7 +9,7 @@ 14896 // implementations. See the translator.README.txt file in the tools directory 14897 // for more information. 14898 // 14899-// $hash=4fd7a58485d8ef00e6b2dff8ffdfcb1405eb4fcc$ 14900+// $hash=2c4b5c88fc2a00039dc5eb01aaa90ecd7c2ea0ad$ 14901 // 14902 14903 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_CPPTOC_H_ 14904diff --git a/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc 14905index ba1fabff98ba7..68f6d427f4ebb 14906--- a/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc 14907+++ b/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc 14908@@ -1,4 +1,4 @@ 14909-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14910+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14911 // reserved. Use of this source code is governed by a BSD-style license that 14912 // can be found in the LICENSE file. 14913 // 14914@@ -9,7 +9,7 @@ 14915 // implementations. See the translator.README.txt file in the tools directory 14916 // for more information. 14917 // 14918-// $hash=03a39472314a6cb7cf93fb0196be57e9ae308c53$ 14919+// $hash=7b91896f42ce5d096e4278d9e96dc3ac99a9e86b$ 14920 // 14921 14922 #include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h" 14923diff --git a/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h 14924index 05fb713501368..578ce7c78238e 14925--- a/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h 14926+++ b/src/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h 14927@@ -1,4 +1,4 @@ 14928-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14929+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14930 // reserved. Use of this source code is governed by a BSD-style license that 14931 // can be found in the LICENSE file. 14932 // 14933@@ -9,7 +9,7 @@ 14934 // implementations. See the translator.README.txt file in the tools directory 14935 // for more information. 14936 // 14937-// $hash=821d48d74b437c7a0387b1d0ac1875621873b2e4$ 14938+// $hash=1eedf21b5a9e1edb24e6c24de55c991388b50c7c$ 14939 // 14940 14941 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_DELEGATE_CPPTOC_H_ 14942diff --git a/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc 14943index 2b15cdde26698..4b55421134531 14944--- a/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc 14945+++ b/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc 14946@@ -1,4 +1,4 @@ 14947-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14948+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14949 // reserved. Use of this source code is governed by a BSD-style license that 14950 // can be found in the LICENSE file. 14951 // 14952@@ -9,7 +9,7 @@ 14953 // implementations. See the translator.README.txt file in the tools directory 14954 // for more information. 14955 // 14956-// $hash=02f2588f9c40c510115d3279fbffdb9bf2f4dcfb$ 14957+// $hash=9d80193629328eede62d0da7ed5bf06b16781f52$ 14958 // 14959 14960 #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h" 14961diff --git a/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h 14962index a08983a1fcb16..1861706c60cf3 14963--- a/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h 14964+++ b/src/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h 14965@@ -1,4 +1,4 @@ 14966-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14967+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14968 // reserved. Use of this source code is governed by a BSD-style license that 14969 // can be found in the LICENSE file. 14970 // 14971@@ -9,7 +9,7 @@ 14972 // implementations. See the translator.README.txt file in the tools directory 14973 // for more information. 14974 // 14975-// $hash=a5d02fd363950248101f5113ceeee2c280dd831c$ 14976+// $hash=f0b7e40e7ec1e3870dbc7f25430978c46eb1a51f$ 14977 // 14978 14979 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_SCROLL_VIEW_CPPTOC_H_ 14980diff --git a/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc 14981index 9ea6250ee730f..b8a8e7452d0ad 14982--- a/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc 14983+++ b/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc 14984@@ -1,4 +1,4 @@ 14985-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 14986+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 14987 // reserved. Use of this source code is governed by a BSD-style license that 14988 // can be found in the LICENSE file. 14989 // 14990@@ -9,7 +9,7 @@ 14991 // implementations. See the translator.README.txt file in the tools directory 14992 // for more information. 14993 // 14994-// $hash=1fab78c3e307dcdcdfbcc5d458121f50e23bf626$ 14995+// $hash=f21462763c1f6f19e8c0a18c100edb60cb13660c$ 14996 // 14997 14998 #include "libcef_dll/cpptoc/views/textfield_cpptoc.h" 14999diff --git a/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h 15000index 730d6486d2022..790835306ec36 15001--- a/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h 15002+++ b/src/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h 15003@@ -1,4 +1,4 @@ 15004-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15005+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15006 // reserved. Use of this source code is governed by a BSD-style license that 15007 // can be found in the LICENSE file. 15008 // 15009@@ -9,7 +9,7 @@ 15010 // implementations. See the translator.README.txt file in the tools directory 15011 // for more information. 15012 // 15013-// $hash=2e8b2aebc574d685d1c39e7cb96b2e8c724a6d9c$ 15014+// $hash=0b5018c0b9d42f4ee100098365c46e0ea723ea29$ 15015 // 15016 15017 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_CPPTOC_H_ 15018diff --git a/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc 15019index 83590dc8889c2..dd9ad3ace4988 15020--- a/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc 15021+++ b/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc 15022@@ -1,4 +1,4 @@ 15023-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15024+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15025 // reserved. Use of this source code is governed by a BSD-style license that 15026 // can be found in the LICENSE file. 15027 // 15028@@ -9,7 +9,7 @@ 15029 // implementations. See the translator.README.txt file in the tools directory 15030 // for more information. 15031 // 15032-// $hash=0009ced13fa9f1e26064455df0c9f5043d7618cf$ 15033+// $hash=e9c21f1320ea2c7c750afbe1901f273f71df8213$ 15034 // 15035 15036 #include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h" 15037diff --git a/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h 15038index 75abe63a36ebc..2ad4735f35999 15039--- a/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h 15040+++ b/src/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h 15041@@ -1,4 +1,4 @@ 15042-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15043+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15044 // reserved. Use of this source code is governed by a BSD-style license that 15045 // can be found in the LICENSE file. 15046 // 15047@@ -9,7 +9,7 @@ 15048 // implementations. See the translator.README.txt file in the tools directory 15049 // for more information. 15050 // 15051-// $hash=157e47e42dbb25aa2effd5bd085228d1dc3ad061$ 15052+// $hash=33ba2bd44c946bf204f2f7a929b8d208768ca3dd$ 15053 // 15054 15055 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_DELEGATE_CPPTOC_H_ 15056diff --git a/src/cef/libcef_dll/cpptoc/views/view_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/view_cpptoc.cc 15057index f5728725a0bbf..e9b1fff41244a 15058--- a/src/cef/libcef_dll/cpptoc/views/view_cpptoc.cc 15059+++ b/src/cef/libcef_dll/cpptoc/views/view_cpptoc.cc 15060@@ -1,4 +1,4 @@ 15061-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15062+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15063 // reserved. Use of this source code is governed by a BSD-style license that 15064 // can be found in the LICENSE file. 15065 // 15066@@ -9,7 +9,7 @@ 15067 // implementations. See the translator.README.txt file in the tools directory 15068 // for more information. 15069 // 15070-// $hash=48694fa56762351ccd3369dca9e679efbda61160$ 15071+// $hash=4808be531e96aa028463b2713f2141d9d1d7cd8b$ 15072 // 15073 15074 #include "libcef_dll/cpptoc/views/view_cpptoc.h" 15075diff --git a/src/cef/libcef_dll/cpptoc/views/view_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/view_cpptoc.h 15076index e508ab45a5731..efb597517ef8d 15077--- a/src/cef/libcef_dll/cpptoc/views/view_cpptoc.h 15078+++ b/src/cef/libcef_dll/cpptoc/views/view_cpptoc.h 15079@@ -1,4 +1,4 @@ 15080-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15081+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15082 // reserved. Use of this source code is governed by a BSD-style license that 15083 // can be found in the LICENSE file. 15084 // 15085@@ -9,7 +9,7 @@ 15086 // implementations. See the translator.README.txt file in the tools directory 15087 // for more information. 15088 // 15089-// $hash=725abc7d1f25861799c54c827de37617b23a1bd5$ 15090+// $hash=0d24d12448e97907667f8347a38818e0a4d713ed$ 15091 // 15092 15093 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_CPPTOC_H_ 15094diff --git a/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc 15095index 28e568feef411..804f515ac3d06 15096--- a/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc 15097+++ b/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc 15098@@ -1,4 +1,4 @@ 15099-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15100+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15101 // reserved. Use of this source code is governed by a BSD-style license that 15102 // can be found in the LICENSE file. 15103 // 15104@@ -9,7 +9,7 @@ 15105 // implementations. See the translator.README.txt file in the tools directory 15106 // for more information. 15107 // 15108-// $hash=43217c47279478323050eef44d6403cb4b5c62a6$ 15109+// $hash=58ecca3b863657322cdb1280298486167d55bdfe$ 15110 // 15111 15112 #include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h" 15113diff --git a/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h 15114index 38d6332b824c5..a6903ef4f71e5 15115--- a/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h 15116+++ b/src/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h 15117@@ -1,4 +1,4 @@ 15118-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15119+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15120 // reserved. Use of this source code is governed by a BSD-style license that 15121 // can be found in the LICENSE file. 15122 // 15123@@ -9,7 +9,7 @@ 15124 // implementations. See the translator.README.txt file in the tools directory 15125 // for more information. 15126 // 15127-// $hash=ebd265b4907f2531eacce52bd6cfd1f8848b7abf$ 15128+// $hash=384b7d1f2df446d35d6ba46e62d89976d88fef7c$ 15129 // 15130 15131 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_DELEGATE_CPPTOC_H_ 15132diff --git a/src/cef/libcef_dll/cpptoc/views/window_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/window_cpptoc.cc 15133index 53932f99f8248..b4c3387060178 15134--- a/src/cef/libcef_dll/cpptoc/views/window_cpptoc.cc 15135+++ b/src/cef/libcef_dll/cpptoc/views/window_cpptoc.cc 15136@@ -1,4 +1,4 @@ 15137-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15138+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15139 // reserved. Use of this source code is governed by a BSD-style license that 15140 // can be found in the LICENSE file. 15141 // 15142@@ -9,7 +9,7 @@ 15143 // implementations. See the translator.README.txt file in the tools directory 15144 // for more information. 15145 // 15146-// $hash=360b248f7f43cd62a111f59a79fc81b40f8d4023$ 15147+// $hash=e89c6c2ef5a7af05e58a2a7e76097910e97c9db4$ 15148 // 15149 15150 #include "libcef_dll/cpptoc/views/window_cpptoc.h" 15151diff --git a/src/cef/libcef_dll/cpptoc/views/window_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/window_cpptoc.h 15152index de348f70d4a58..e02be4494da84 15153--- a/src/cef/libcef_dll/cpptoc/views/window_cpptoc.h 15154+++ b/src/cef/libcef_dll/cpptoc/views/window_cpptoc.h 15155@@ -1,4 +1,4 @@ 15156-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15157+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15158 // reserved. Use of this source code is governed by a BSD-style license that 15159 // can be found in the LICENSE file. 15160 // 15161@@ -9,7 +9,7 @@ 15162 // implementations. See the translator.README.txt file in the tools directory 15163 // for more information. 15164 // 15165-// $hash=5b14236c7e00a7dafa47fdc32ce78d347de477a1$ 15166+// $hash=12ff3d7d14f9977ff1f62e9a35b04b153a135480$ 15167 // 15168 15169 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_CPPTOC_H_ 15170diff --git a/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc 15171index 769c84a11a7f5..cdc36f8fac76e 15172--- a/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc 15173+++ b/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc 15174@@ -1,4 +1,4 @@ 15175-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15176+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15177 // reserved. Use of this source code is governed by a BSD-style license that 15178 // can be found in the LICENSE file. 15179 // 15180@@ -9,7 +9,7 @@ 15181 // implementations. See the translator.README.txt file in the tools directory 15182 // for more information. 15183 // 15184-// $hash=9a65c4a9e35ba40f01a3d27c772ef9b736eb75ea$ 15185+// $hash=cd7d5a65be4a9c5b983b390ec08670baf6f82be2$ 15186 // 15187 15188 #include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h" 15189diff --git a/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h b/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h 15190index dff58e097e217..441a2ca239b81 15191--- a/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h 15192+++ b/src/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h 15193@@ -1,4 +1,4 @@ 15194-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15195+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15196 // reserved. Use of this source code is governed by a BSD-style license that 15197 // can be found in the LICENSE file. 15198 // 15199@@ -9,7 +9,7 @@ 15200 // implementations. See the translator.README.txt file in the tools directory 15201 // for more information. 15202 // 15203-// $hash=594a3ff498c14872187e0ae8d466a023664c92b6$ 15204+// $hash=b4d82958ac79ac843f904c4aa8010a6909ca06fa$ 15205 // 15206 15207 #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_DELEGATE_CPPTOC_H_ 15208diff --git a/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc b/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc 15209index f65b2038dc345..3af7d1b6c0951 15210--- a/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc 15211+++ b/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc 15212@@ -1,4 +1,4 @@ 15213-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15214+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15215 // reserved. Use of this source code is governed by a BSD-style license that 15216 // can be found in the LICENSE file. 15217 // 15218@@ -9,7 +9,7 @@ 15219 // implementations. See the translator.README.txt file in the tools directory 15220 // for more information. 15221 // 15222-// $hash=ea0c4c4d8c202a47a9b5b63a57525dc726c1e40e$ 15223+// $hash=c74bf87e609f7e27581c49144f0c751199f7c2cb$ 15224 // 15225 15226 #include "libcef_dll/cpptoc/waitable_event_cpptoc.h" 15227diff --git a/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h b/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h 15228index cc466b7b3ed5e..1e1ba61868eaf 15229--- a/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h 15230+++ b/src/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h 15231@@ -1,4 +1,4 @@ 15232-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15233+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15234 // reserved. Use of this source code is governed by a BSD-style license that 15235 // can be found in the LICENSE file. 15236 // 15237@@ -9,7 +9,7 @@ 15238 // implementations. See the translator.README.txt file in the tools directory 15239 // for more information. 15240 // 15241-// $hash=f19f05824d06a9aadd3ad10b58e2041eb855a66e$ 15242+// $hash=c3d08738052ecc67921493df15ea0df38c040314$ 15243 // 15244 15245 #ifndef CEF_LIBCEF_DLL_CPPTOC_WAITABLE_EVENT_CPPTOC_H_ 15246diff --git a/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.cc b/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.cc 15247new file mode 100644 15248index 0000000000000..e791792deed44 15249--- /dev/null 15250+++ b/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.cc 15251@@ -0,0 +1,71 @@ 15252+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15253+// reserved. Use of this source code is governed by a BSD-style license that 15254+// can be found in the LICENSE file. 15255+// 15256+// --------------------------------------------------------------------------- 15257+// 15258+// This file was generated by the CEF translator tool. If making changes by 15259+// hand only do so within the body of existing method and function 15260+// implementations. See the translator.README.txt file in the tools directory 15261+// for more information. 15262+// 15263+// $hash=4a0b96e9541249b0a756bb5709359fade8df76f6$ 15264+// 15265+ 15266+#include "libcef_dll/cpptoc/web_message_receiver_cpptoc.h" 15267+#include "libcef_dll/ctocpp/value_ctocpp.h" 15268+#include "libcef_dll/shutdown_checker.h" 15269+ 15270+namespace { 15271+ 15272+// MEMBER FUNCTIONS - Body may be edited by hand. 15273+ 15274+void CEF_CALLBACK 15275+web_message_receiver_on_message(struct _cef_web_message_receiver_t* self, 15276+ struct _cef_value_t* message) { 15277+ shutdown_checker::AssertNotShutdown(); 15278+ 15279+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 15280+ 15281+ DCHECK(self); 15282+ if (!self) 15283+ return; 15284+ // Verify param: message; type: refptr_diff 15285+ DCHECK(message); 15286+ if (!message) 15287+ return; 15288+ 15289+ // Execute 15290+ CefWebMessageReceiverCppToC::Get(self)->OnMessage( 15291+ CefValueCToCpp::Wrap(message)); 15292+} 15293+ 15294+} // namespace 15295+ 15296+// CONSTRUCTOR - Do not edit by hand. 15297+ 15298+CefWebMessageReceiverCppToC::CefWebMessageReceiverCppToC() { 15299+ GetStruct()->on_message = web_message_receiver_on_message; 15300+} 15301+ 15302+// DESTRUCTOR - Do not edit by hand. 15303+ 15304+CefWebMessageReceiverCppToC::~CefWebMessageReceiverCppToC() { 15305+ shutdown_checker::AssertNotShutdown(); 15306+} 15307+ 15308+template <> 15309+CefRefPtr<CefWebMessageReceiver> CefCppToCRefCounted< 15310+ CefWebMessageReceiverCppToC, 15311+ CefWebMessageReceiver, 15312+ cef_web_message_receiver_t>::UnwrapDerived(CefWrapperType type, 15313+ cef_web_message_receiver_t* s) { 15314+ NOTREACHED() << "Unexpected class type: " << type; 15315+ return nullptr; 15316+} 15317+ 15318+template <> 15319+CefWrapperType CefCppToCRefCounted<CefWebMessageReceiverCppToC, 15320+ CefWebMessageReceiver, 15321+ cef_web_message_receiver_t>::kWrapperType = 15322+ WT_WEB_MESSAGE_RECEIVER; 15323diff --git a/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.h b/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.h 15324new file mode 100644 15325index 0000000000000..9846b0985a9bf 15326--- /dev/null 15327+++ b/src/cef/libcef_dll/cpptoc/web_message_receiver_cpptoc.h 15328@@ -0,0 +1,40 @@ 15329+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15330+// reserved. Use of this source code is governed by a BSD-style license that 15331+// can be found in the LICENSE file. 15332+// 15333+// --------------------------------------------------------------------------- 15334+// 15335+// This file was generated by the CEF translator tool. If making changes by 15336+// hand only do so within the body of existing method and function 15337+// implementations. See the translator.README.txt file in the tools directory 15338+// for more information. 15339+// 15340+// $hash=849fd01178757316d7b9a87fcc89d7a862186798$ 15341+// 15342+ 15343+#ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_MESSAGE_RECEIVER_CPPTOC_H_ 15344+#define CEF_LIBCEF_DLL_CPPTOC_WEB_MESSAGE_RECEIVER_CPPTOC_H_ 15345+#pragma once 15346+ 15347+#if !defined(WRAPPING_CEF_SHARED) 15348+#error This file can be included wrapper-side only 15349+#endif 15350+ 15351+#include "include/capi/cef_browser_capi.h" 15352+#include "include/capi/cef_client_capi.h" 15353+#include "include/cef_browser.h" 15354+#include "include/cef_client.h" 15355+#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" 15356+ 15357+// Wrap a C++ class with a C structure. 15358+// This class may be instantiated and accessed wrapper-side only. 15359+class CefWebMessageReceiverCppToC 15360+ : public CefCppToCRefCounted<CefWebMessageReceiverCppToC, 15361+ CefWebMessageReceiver, 15362+ cef_web_message_receiver_t> { 15363+ public: 15364+ CefWebMessageReceiverCppToC(); 15365+ virtual ~CefWebMessageReceiverCppToC(); 15366+}; 15367+ 15368+#endif // CEF_LIBCEF_DLL_CPPTOC_WEB_MESSAGE_RECEIVER_CPPTOC_H_ 15369diff --git a/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.cc b/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.cc 15370index 5176cd1efbcd8..648fdc96bc2ee 15371--- a/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.cc 15372+++ b/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.cc 15373@@ -1,4 +1,4 @@ 15374-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15375+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15376 // reserved. Use of this source code is governed by a BSD-style license that 15377 // can be found in the LICENSE file. 15378 // 15379@@ -9,7 +9,7 @@ 15380 // implementations. See the translator.README.txt file in the tools directory 15381 // for more information. 15382 // 15383-// $hash=959e73af8a9517a5a2381606195efc0fde114317$ 15384+// $hash=53c636c06989583d0ad24c92f4aedce825e5e8ad$ 15385 // 15386 15387 #include "libcef_dll/cpptoc/web_storage_cpptoc.h" 15388diff --git a/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.h b/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.h 15389index 1e1b951eccc99..6c3ea996fbd0e 15390--- a/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.h 15391+++ b/src/cef/libcef_dll/cpptoc/web_storage_cpptoc.h 15392@@ -1,4 +1,4 @@ 15393-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15394+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15395 // reserved. Use of this source code is governed by a BSD-style license that 15396 // can be found in the LICENSE file. 15397 // 15398@@ -9,7 +9,7 @@ 15399 // implementations. See the translator.README.txt file in the tools directory 15400 // for more information. 15401 // 15402-// $hash=e96ec830a2f1b20fc1ec99664ce7a2df266b73dc$ 15403+// $hash=811b936281434fdc17bbb33dc50640bfc8d5dd33$ 15404 // 15405 15406 #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_STORAGE_CPPTOC_H_ 15407diff --git a/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc b/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc 15408index 8de6eb3a2e2fa..5cb60f31a9a19 15409--- a/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc 15410+++ b/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc 15411@@ -1,4 +1,4 @@ 15412-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15413+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15414 // reserved. Use of this source code is governed by a BSD-style license that 15415 // can be found in the LICENSE file. 15416 // 15417@@ -9,7 +9,7 @@ 15418 // implementations. See the translator.README.txt file in the tools directory 15419 // for more information. 15420 // 15421-// $hash=208b9651cb7a357f7665e6d449c6ba974dfae9e3$ 15422+// $hash=9c53b2b7086bf095aa4a4b39fbf5beb6b89b8ea7$ 15423 // 15424 15425 #include "libcef_dll/cpptoc/write_handler_cpptoc.h" 15426diff --git a/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.h b/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.h 15427index dfcfd5b41dadf..60a0ba7924f85 15428--- a/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.h 15429+++ b/src/cef/libcef_dll/cpptoc/write_handler_cpptoc.h 15430@@ -1,4 +1,4 @@ 15431-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15432+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15433 // reserved. Use of this source code is governed by a BSD-style license that 15434 // can be found in the LICENSE file. 15435 // 15436@@ -9,7 +9,7 @@ 15437 // implementations. See the translator.README.txt file in the tools directory 15438 // for more information. 15439 // 15440-// $hash=b6360b7899237a1d616dd8c1cff016d397acbcd3$ 15441+// $hash=94c67ea9a0a7a44b92ef2d322f7dd34490f5b8e6$ 15442 // 15443 15444 #ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ 15445diff --git a/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc b/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc 15446index abbd87a9ba645..f0685aeada23c 15447--- a/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc 15448+++ b/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc 15449@@ -1,4 +1,4 @@ 15450-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15451+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15452 // reserved. Use of this source code is governed by a BSD-style license that 15453 // can be found in the LICENSE file. 15454 // 15455@@ -9,7 +9,7 @@ 15456 // implementations. See the translator.README.txt file in the tools directory 15457 // for more information. 15458 // 15459-// $hash=08b0ac0ef8621f8ce81753616044a5e04dc4a191$ 15460+// $hash=513c53172ce1c11c036ff200d1ea73c4015b7f3d$ 15461 // 15462 15463 #include "libcef_dll/cpptoc/x509cert_principal_cpptoc.h" 15464diff --git a/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h b/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h 15465index 244854b81a8d6..8aba2d611d836 15466--- a/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h 15467+++ b/src/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h 15468@@ -1,4 +1,4 @@ 15469-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15470+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15471 // reserved. Use of this source code is governed by a BSD-style license that 15472 // can be found in the LICENSE file. 15473 // 15474@@ -9,7 +9,7 @@ 15475 // implementations. See the translator.README.txt file in the tools directory 15476 // for more information. 15477 // 15478-// $hash=2041bbbdcbf9434c1a5205ebae8438d47725aa1f$ 15479+// $hash=6e97a51d6d111d04e88c67e98eff127d7ca09dc1$ 15480 // 15481 15482 #ifndef CEF_LIBCEF_DLL_CPPTOC_X509CERT_PRINCIPAL_CPPTOC_H_ 15483diff --git a/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc b/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc 15484index e510b4d19200f..6a0b07933fcd1 15485--- a/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc 15486+++ b/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc 15487@@ -1,4 +1,4 @@ 15488-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15489+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15490 // reserved. Use of this source code is governed by a BSD-style license that 15491 // can be found in the LICENSE file. 15492 // 15493@@ -9,7 +9,7 @@ 15494 // implementations. See the translator.README.txt file in the tools directory 15495 // for more information. 15496 // 15497-// $hash=cac3e88ea15965e3a7786500606845b0b6157212$ 15498+// $hash=42a3effdf914b981136faef4528708ea47aba8c1$ 15499 // 15500 15501 #include "libcef_dll/cpptoc/x509certificate_cpptoc.h" 15502diff --git a/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h b/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h 15503index 29644da070b96..6ef90271fca96 15504--- a/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h 15505+++ b/src/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h 15506@@ -1,4 +1,4 @@ 15507-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15508+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15509 // reserved. Use of this source code is governed by a BSD-style license that 15510 // can be found in the LICENSE file. 15511 // 15512@@ -9,7 +9,7 @@ 15513 // implementations. See the translator.README.txt file in the tools directory 15514 // for more information. 15515 // 15516-// $hash=6eb11abb213e5b3e50494c956c51d6286020ca39$ 15517+// $hash=11090b23faf77d87bde0a603e74a0697be58fa7c$ 15518 // 15519 15520 #ifndef CEF_LIBCEF_DLL_CPPTOC_X509CERTIFICATE_CPPTOC_H_ 15521diff --git a/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc b/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc 15522index ae117e5f241ce..a782ff1432587 15523--- a/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc 15524+++ b/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc 15525@@ -1,4 +1,4 @@ 15526-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15527+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15528 // reserved. Use of this source code is governed by a BSD-style license that 15529 // can be found in the LICENSE file. 15530 // 15531@@ -9,7 +9,7 @@ 15532 // implementations. See the translator.README.txt file in the tools directory 15533 // for more information. 15534 // 15535-// $hash=3ac5f5c45a59bad3310db431653227ceac42186e$ 15536+// $hash=e4ec9a462bd52b87a605d8c2c677b278943e55f9$ 15537 // 15538 15539 #include "libcef_dll/cpptoc/xml_reader_cpptoc.h" 15540diff --git a/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h b/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h 15541index 5f32d62c81f89..0a69e23f147a2 15542--- a/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h 15543+++ b/src/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h 15544@@ -1,4 +1,4 @@ 15545-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15546+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15547 // reserved. Use of this source code is governed by a BSD-style license that 15548 // can be found in the LICENSE file. 15549 // 15550@@ -9,7 +9,7 @@ 15551 // implementations. See the translator.README.txt file in the tools directory 15552 // for more information. 15553 // 15554-// $hash=397fee4bf9eb4c1dc2117bba9ac2b63542335196$ 15555+// $hash=1305b95acf584a0a0e5fd412e948f195233f476b$ 15556 // 15557 15558 #ifndef CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ 15559diff --git a/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc b/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc 15560index a53a7a724eeb0..7231cc3ffead5 15561--- a/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc 15562+++ b/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc 15563@@ -1,4 +1,4 @@ 15564-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15565+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15566 // reserved. Use of this source code is governed by a BSD-style license that 15567 // can be found in the LICENSE file. 15568 // 15569@@ -9,7 +9,7 @@ 15570 // implementations. See the translator.README.txt file in the tools directory 15571 // for more information. 15572 // 15573-// $hash=9fe9e9199e284af22669ba2abfb715d0e7ae8de3$ 15574+// $hash=1fdbab5695a0c6e3eb026cd78dda309b620c75a7$ 15575 // 15576 15577 #include "libcef_dll/cpptoc/zip_reader_cpptoc.h" 15578diff --git a/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h b/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h 15579index c04789a0c9290..06233d39eae09 15580--- a/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h 15581+++ b/src/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h 15582@@ -1,4 +1,4 @@ 15583-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15584+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15585 // reserved. Use of this source code is governed by a BSD-style license that 15586 // can be found in the LICENSE file. 15587 // 15588@@ -9,7 +9,7 @@ 15589 // implementations. See the translator.README.txt file in the tools directory 15590 // for more information. 15591 // 15592-// $hash=10530d641ffc50165b89d16e76230b9ab3f9aca5$ 15593+// $hash=488ca93df16ff22fdd9d397aab117990f01f3331$ 15594 // 15595 15596 #ifndef CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ 15597diff --git a/src/cef/libcef_dll/ctocpp/access_request_ctocpp.cc b/src/cef/libcef_dll/ctocpp/access_request_ctocpp.cc 15598index 4d7e095ef4da0..800bc7e9e08db 15599--- a/src/cef/libcef_dll/ctocpp/access_request_ctocpp.cc 15600+++ b/src/cef/libcef_dll/ctocpp/access_request_ctocpp.cc 15601@@ -1,4 +1,4 @@ 15602-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15603+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15604 // reserved. Use of this source code is governed by a BSD-style license that 15605 // can be found in the LICENSE file. 15606 // 15607@@ -9,7 +9,7 @@ 15608 // implementations. See the translator.README.txt file in the tools directory 15609 // for more information. 15610 // 15611-// $hash=05b34b1c04c69b654aad9a8136efbe83693d255f$ 15612+// $hash=1e70efca41e4964cb02f68b5f93dc4a4567b60da$ 15613 // 15614 15615 #include "libcef_dll/ctocpp/access_request_ctocpp.h" 15616diff --git a/src/cef/libcef_dll/ctocpp/access_request_ctocpp.h b/src/cef/libcef_dll/ctocpp/access_request_ctocpp.h 15617index fc0300402f19d..5eb1d7f759de9 15618--- a/src/cef/libcef_dll/ctocpp/access_request_ctocpp.h 15619+++ b/src/cef/libcef_dll/ctocpp/access_request_ctocpp.h 15620@@ -1,4 +1,4 @@ 15621-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15622+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15623 // reserved. Use of this source code is governed by a BSD-style license that 15624 // can be found in the LICENSE file. 15625 // 15626@@ -9,7 +9,7 @@ 15627 // implementations. See the translator.README.txt file in the tools directory 15628 // for more information. 15629 // 15630-// $hash=9a6a1dd32258b15f1694c3070c61bf0d0092f18f$ 15631+// $hash=08c6bc8913ed7dcf8134fe99745d8f9a4fbc7fa4$ 15632 // 15633 15634 #ifndef CEF_LIBCEF_DLL_CTOCPP_ACCESS_REQUEST_CTOCPP_H_ 15635diff --git a/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc 15636index 544ecf2731753..1f6d139cc9793 15637--- a/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc 15638+++ b/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc 15639@@ -1,4 +1,4 @@ 15640-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15641+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15642 // reserved. Use of this source code is governed by a BSD-style license that 15643 // can be found in the LICENSE file. 15644 // 15645@@ -9,7 +9,7 @@ 15646 // implementations. See the translator.README.txt file in the tools directory 15647 // for more information. 15648 // 15649-// $hash=ced6517a7c7149502b418c5fb06386ff30777630$ 15650+// $hash=0613e7faeb146728fa191bcb163f5d2a7386378f$ 15651 // 15652 15653 #include "libcef_dll/ctocpp/accessibility_handler_ctocpp.h" 15654diff --git a/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h 15655index 17804af63428b..0a94e2ead1e4e 15656--- a/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h 15657+++ b/src/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h 15658@@ -1,4 +1,4 @@ 15659-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15660+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15661 // reserved. Use of this source code is governed by a BSD-style license that 15662 // can be found in the LICENSE file. 15663 // 15664@@ -9,7 +9,7 @@ 15665 // implementations. See the translator.README.txt file in the tools directory 15666 // for more information. 15667 // 15668-// $hash=7ab53ef41cd69320ac6441e514582fd583203207$ 15669+// $hash=3bfebc6542251128247e89a55fba8cbb3bc7061d$ 15670 // 15671 15672 #ifndef CEF_LIBCEF_DLL_CTOCPP_ACCESSIBILITY_HANDLER_CTOCPP_H_ 15673diff --git a/src/cef/libcef_dll/ctocpp/app_ctocpp.cc b/src/cef/libcef_dll/ctocpp/app_ctocpp.cc 15674index 6d60e8f0cd219..49ca33f2e07c5 15675--- a/src/cef/libcef_dll/ctocpp/app_ctocpp.cc 15676+++ b/src/cef/libcef_dll/ctocpp/app_ctocpp.cc 15677@@ -1,4 +1,4 @@ 15678-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15679+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15680 // reserved. Use of this source code is governed by a BSD-style license that 15681 // can be found in the LICENSE file. 15682 // 15683@@ -9,7 +9,7 @@ 15684 // implementations. See the translator.README.txt file in the tools directory 15685 // for more information. 15686 // 15687-// $hash=9986455b9b29bd88504e9b4c2b73bfebc87cfc61$ 15688+// $hash=60ccdb3fa2c50678bc2ba4aeb04a6ed9428f0671$ 15689 // 15690 15691 #include "libcef_dll/ctocpp/app_ctocpp.h" 15692diff --git a/src/cef/libcef_dll/ctocpp/app_ctocpp.h b/src/cef/libcef_dll/ctocpp/app_ctocpp.h 15693index bac5ba4bb12b3..80424a306c27b 15694--- a/src/cef/libcef_dll/ctocpp/app_ctocpp.h 15695+++ b/src/cef/libcef_dll/ctocpp/app_ctocpp.h 15696@@ -1,4 +1,4 @@ 15697-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15698+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15699 // reserved. Use of this source code is governed by a BSD-style license that 15700 // can be found in the LICENSE file. 15701 // 15702@@ -9,7 +9,7 @@ 15703 // implementations. See the translator.README.txt file in the tools directory 15704 // for more information. 15705 // 15706-// $hash=b1a38565477fd1c436d8a62bfa9d41747f7fe30f$ 15707+// $hash=ea433c4f09f9cc1c432e3406dacfe27ec81c20cb$ 15708 // 15709 15710 #ifndef CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_ 15711diff --git a/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc 15712index fcba4e08799dd..0352ecfc01bef 15713--- a/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc 15714+++ b/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc 15715@@ -1,4 +1,4 @@ 15716-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15717+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15718 // reserved. Use of this source code is governed by a BSD-style license that 15719 // can be found in the LICENSE file. 15720 // 15721@@ -9,7 +9,7 @@ 15722 // implementations. See the translator.README.txt file in the tools directory 15723 // for more information. 15724 // 15725-// $hash=e2df55073d0fb809dcd4cf0f6bb7ed36dcd4f73c$ 15726+// $hash=de4ec961ee7ee01943cf5a21b7e0729109d74d31$ 15727 // 15728 15729 #include "libcef_dll/ctocpp/audio_handler_ctocpp.h" 15730diff --git a/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h 15731index cdb6138637ad3..07bf46b6327a1 15732--- a/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h 15733+++ b/src/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h 15734@@ -1,4 +1,4 @@ 15735-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15736+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15737 // reserved. Use of this source code is governed by a BSD-style license that 15738 // can be found in the LICENSE file. 15739 // 15740@@ -9,7 +9,7 @@ 15741 // implementations. See the translator.README.txt file in the tools directory 15742 // for more information. 15743 // 15744-// $hash=9de91dcf5136e07c0d5c06ad9be8173b918f668a$ 15745+// $hash=761b05f6a7cd2f0cfc1968a3902bd874060ad79b$ 15746 // 15747 15748 #ifndef CEF_LIBCEF_DLL_CTOCPP_AUDIO_HANDLER_CTOCPP_H_ 15749diff --git a/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc 15750index ee290eb9b4c8f..e86d64fbbb335 15751--- a/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc 15752+++ b/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc 15753@@ -1,4 +1,4 @@ 15754-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15755+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15756 // reserved. Use of this source code is governed by a BSD-style license that 15757 // can be found in the LICENSE file. 15758 // 15759@@ -9,7 +9,7 @@ 15760 // implementations. See the translator.README.txt file in the tools directory 15761 // for more information. 15762 // 15763-// $hash=e7ec4903d06110c27d271a7e946c90231b8d3f08$ 15764+// $hash=1397d65bac566cf536f65f10709e0cd0448692fa$ 15765 // 15766 15767 #include "libcef_dll/ctocpp/auth_callback_ctocpp.h" 15768diff --git a/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h 15769index c03f19aec0d3b..aba08fadedf4e 15770--- a/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h 15771+++ b/src/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h 15772@@ -1,4 +1,4 @@ 15773-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15774+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15775 // reserved. Use of this source code is governed by a BSD-style license that 15776 // can be found in the LICENSE file. 15777 // 15778@@ -9,7 +9,7 @@ 15779 // implementations. See the translator.README.txt file in the tools directory 15780 // for more information. 15781 // 15782-// $hash=74b470ef09c99a7d2ccbe7e9134e0b4d1f11be03$ 15783+// $hash=b21ded769da39fdf3e0ae7991bdc6a2175a4113d$ 15784 // 15785 15786 #ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ 15787diff --git a/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc 15788index 35b0bb6593a34..e98722822d887 15789--- a/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc 15790+++ b/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc 15791@@ -1,4 +1,4 @@ 15792-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15793+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15794 // reserved. Use of this source code is governed by a BSD-style license that 15795 // can be found in the LICENSE file. 15796 // 15797@@ -9,7 +9,7 @@ 15798 // implementations. See the translator.README.txt file in the tools directory 15799 // for more information. 15800 // 15801-// $hash=dab6c53c94db70fbeb54b440584a5147c52fe082$ 15802+// $hash=70cd50b1ed22e0b0068a90539de1f00ddd0511dd$ 15803 // 15804 15805 #include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" 15806diff --git a/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h 15807index 52415e89675ad..23739dd84de11 15808--- a/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h 15809+++ b/src/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h 15810@@ -1,4 +1,4 @@ 15811-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15812+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15813 // reserved. Use of this source code is governed by a BSD-style license that 15814 // can be found in the LICENSE file. 15815 // 15816@@ -9,7 +9,7 @@ 15817 // implementations. See the translator.README.txt file in the tools directory 15818 // for more information. 15819 // 15820-// $hash=f2b6a61b2459566fef19ee3824d7c155bf7f25d1$ 15821+// $hash=743f5b5893055b96eb373b93368c727b3d36d3c6$ 15822 // 15823 15824 #ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ 15825diff --git a/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc b/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc 15826index 307b982cde15b..b9c7809c3ece0 15827--- a/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc 15828+++ b/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc 15829@@ -1,4 +1,4 @@ 15830-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15831+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15832 // reserved. Use of this source code is governed by a BSD-style license that 15833 // can be found in the LICENSE file. 15834 // 15835@@ -9,7 +9,7 @@ 15836 // implementations. See the translator.README.txt file in the tools directory 15837 // for more information. 15838 // 15839-// $hash=80a91b8a85dc537cb49cbd5eaea974f92fbf9cde$ 15840+// $hash=50f74bf4eaafce6b10c91af2a9bf516fac113cf5$ 15841 // 15842 15843 #include "libcef_dll/ctocpp/binary_value_ctocpp.h" 15844diff --git a/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.h b/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.h 15845index 5a768b4747b97..414f70260ccf9 15846--- a/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.h 15847+++ b/src/cef/libcef_dll/ctocpp/binary_value_ctocpp.h 15848@@ -1,4 +1,4 @@ 15849-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15850+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15851 // reserved. Use of this source code is governed by a BSD-style license that 15852 // can be found in the LICENSE file. 15853 // 15854@@ -9,7 +9,7 @@ 15855 // implementations. See the translator.README.txt file in the tools directory 15856 // for more information. 15857 // 15858-// $hash=e9e56607998130280b093c45987aa294c06f1912$ 15859+// $hash=b6f011a6c26b4264084eb68dae0d63032c07013c$ 15860 // 15861 15862 #ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ 15863diff --git a/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc 15864index f2a84fea5f8a4..a9bdc2a55717a 15865--- a/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc 15866+++ b/src/cef/libcef_dll/ctocpp/browser_ctocpp.cc 15867@@ -1,4 +1,4 @@ 15868-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15869+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15870 // reserved. Use of this source code is governed by a BSD-style license that 15871 // can be found in the LICENSE file. 15872 // 15873@@ -9,7 +9,7 @@ 15874 // implementations. See the translator.README.txt file in the tools directory 15875 // for more information. 15876 // 15877-// $hash=8a99c30f78379c8bac224637139db4110d8801cb$ 15878+// $hash=ab991c66f7028ebb53acbd5cf350c89a880f4383$ 15879 // 15880 15881 #include "libcef_dll/ctocpp/browser_ctocpp.h" 15882diff --git a/src/cef/libcef_dll/ctocpp/browser_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_ctocpp.h 15883index df1823631cb26..f59811147206e 15884--- a/src/cef/libcef_dll/ctocpp/browser_ctocpp.h 15885+++ b/src/cef/libcef_dll/ctocpp/browser_ctocpp.h 15886@@ -1,4 +1,4 @@ 15887-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15888+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15889 // reserved. Use of this source code is governed by a BSD-style license that 15890 // can be found in the LICENSE file. 15891 // 15892@@ -9,7 +9,7 @@ 15893 // implementations. See the translator.README.txt file in the tools directory 15894 // for more information. 15895 // 15896-// $hash=4e74199d2ef640e3276988dc06a53ff84140b3fc$ 15897+// $hash=66aac50bedd02f309bb3715b0d4cafb0cd824c4d$ 15898 // 15899 15900 #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ 15901diff --git a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc 15902index 5ee4cf01c6285..188871e22d02a 15903--- a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc 15904+++ b/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc 15905@@ -1,4 +1,4 @@ 15906-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 15907+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 15908 // reserved. Use of this source code is governed by a BSD-style license that 15909 // can be found in the LICENSE file. 15910 // 15911@@ -9,7 +9,7 @@ 15912 // implementations. See the translator.README.txt file in the tools directory 15913 // for more information. 15914 // 15915-// $hash=da4be0653a8e67000f1c6e34219ee3f7b288ca58$ 15916+// $hash=4912cb91f0c5d4e550ab1441c8848477bc787a11$ 15917 // 15918 15919 #include "libcef_dll/ctocpp/browser_host_ctocpp.h" 15920@@ -22,6 +22,8 @@ 15921 #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" 15922 #include "libcef_dll/cpptoc/store_web_archive_result_callback_cpptoc.h" 15923 #include "libcef_dll/cpptoc/task_cpptoc.h" 15924+#include "libcef_dll/cpptoc/web_message_receiver_cpptoc.h" 15925+#include "libcef_dll/ctocpp/binary_value_ctocpp.h" 15926 #include "libcef_dll/ctocpp/browser_ctocpp.h" 15927 #include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" 15928 #include "libcef_dll/ctocpp/drag_data_ctocpp.h" 15929@@ -29,6 +31,7 @@ 15930 #include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" 15931 #include "libcef_dll/ctocpp/registration_ctocpp.h" 15932 #include "libcef_dll/ctocpp/request_context_ctocpp.h" 15933+#include "libcef_dll/ctocpp/value_ctocpp.h" 15934 #include "libcef_dll/shutdown_checker.h" 15935 #include "libcef_dll/transfer_util.h" 15936 15937@@ -1122,7 +1125,7 @@ void CefBrowserHostCToCpp::DestroyAllWebMessagePorts() { 15938 15939 NO_SANITIZE("cfi-icall") 15940 void CefBrowserHostCToCpp::PostPortMessage(CefString& port_handle, 15941- CefString& data) { 15942+ CefRefPtr<CefValue> message) { 15943 shutdown_checker::AssertNotShutdown(); 15944 15945 cef_browser_host_t* _struct = GetStruct(); 15946@@ -1131,15 +1134,20 @@ void CefBrowserHostCToCpp::PostPortMessage(CefString& port_handle, 15947 15948 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 15949 15950+ // Verify param: message; type: refptr_same 15951+ DCHECK(message.get()); 15952+ if (!message.get()) 15953+ return; 15954+ 15955 // Execute 15956 _struct->post_port_message(_struct, port_handle.GetWritableStruct(), 15957- data.GetWritableStruct()); 15958+ CefValueCToCpp::Unwrap(message)); 15959 } 15960 15961 NO_SANITIZE("cfi-icall") 15962 void CefBrowserHostCToCpp::SetPortMessageCallback( 15963 CefString& port_handle, 15964- CefRefPtr<CefJavaScriptResultCallback> callback) { 15965+ CefRefPtr<CefWebMessageReceiver> callback) { 15966 shutdown_checker::AssertNotShutdown(); 15967 15968 cef_browser_host_t* _struct = GetStruct(); 15969@@ -1156,7 +1164,7 @@ void CefBrowserHostCToCpp::SetPortMessageCallback( 15970 // Execute 15971 _struct->set_port_message_callback( 15972 _struct, port_handle.GetWritableStruct(), 15973- CefJavaScriptResultCallbackCppToC::Wrap(callback)); 15974+ CefWebMessageReceiverCppToC::Wrap(callback)); 15975 } 15976 15977 NO_SANITIZE("cfi-icall") 15978@@ -1758,6 +1766,143 @@ void CefBrowserHostCToCpp::RemoveCache(bool include_disk_files) { 15979 _struct->remove_cache(_struct, include_disk_files); 15980 } 15981 15982+NO_SANITIZE("cfi-icall") 15983+void CefBrowserHostCToCpp::ScrollPageUpDown(bool is_up, 15984+ bool is_half, 15985+ float view_height) { 15986+ shutdown_checker::AssertNotShutdown(); 15987+ 15988+ cef_browser_host_t* _struct = GetStruct(); 15989+ if (CEF_MEMBER_MISSING(_struct, scroll_page_up_down)) 15990+ return; 15991+ 15992+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 15993+ 15994+ // Execute 15995+ _struct->scroll_page_up_down(_struct, is_up, is_half, view_height); 15996+} 15997+ 15998+NO_SANITIZE("cfi-icall") 15999+CefRefPtr<CefBinaryValue> CefBrowserHostCToCpp::GetWebState() { 16000+ shutdown_checker::AssertNotShutdown(); 16001+ 16002+ cef_browser_host_t* _struct = GetStruct(); 16003+ if (CEF_MEMBER_MISSING(_struct, get_web_state)) 16004+ return nullptr; 16005+ 16006+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16007+ 16008+ // Execute 16009+ cef_binary_value_t* _retval = _struct->get_web_state(_struct); 16010+ 16011+ // Return type: refptr_same 16012+ return CefBinaryValueCToCpp::Wrap(_retval); 16013+} 16014+ 16015+NO_SANITIZE("cfi-icall") 16016+bool CefBrowserHostCToCpp::RestoreWebState( 16017+ const CefRefPtr<CefBinaryValue> state) { 16018+ shutdown_checker::AssertNotShutdown(); 16019+ 16020+ cef_browser_host_t* _struct = GetStruct(); 16021+ if (CEF_MEMBER_MISSING(_struct, restore_web_state)) 16022+ return false; 16023+ 16024+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16025+ 16026+ // Verify param: state; type: refptr_same 16027+ DCHECK(state.get()); 16028+ if (!state.get()) 16029+ return false; 16030+ 16031+ // Execute 16032+ int _retval = 16033+ _struct->restore_web_state(_struct, CefBinaryValueCToCpp::Unwrap(state)); 16034+ 16035+ // Return type: bool 16036+ return _retval ? true : false; 16037+} 16038+ 16039+NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::ScrollTo(float x, float y) { 16040+ shutdown_checker::AssertNotShutdown(); 16041+ 16042+ cef_browser_host_t* _struct = GetStruct(); 16043+ if (CEF_MEMBER_MISSING(_struct, scroll_to)) 16044+ return; 16045+ 16046+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16047+ 16048+ // Execute 16049+ _struct->scroll_to(_struct, x, y); 16050+} 16051+ 16052+NO_SANITIZE("cfi-icall") 16053+void CefBrowserHostCToCpp::ScrollBy(float delta_x, float delta_y) { 16054+ shutdown_checker::AssertNotShutdown(); 16055+ 16056+ cef_browser_host_t* _struct = GetStruct(); 16057+ if (CEF_MEMBER_MISSING(_struct, scroll_by)) 16058+ return; 16059+ 16060+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16061+ 16062+ // Execute 16063+ _struct->scroll_by(_struct, delta_x, delta_y); 16064+} 16065+ 16066+NO_SANITIZE("cfi-icall") 16067+void CefBrowserHostCToCpp::SlideScroll(float vx, float vy) { 16068+ shutdown_checker::AssertNotShutdown(); 16069+ 16070+ cef_browser_host_t* _struct = GetStruct(); 16071+ if (CEF_MEMBER_MISSING(_struct, slide_scroll)) 16072+ return; 16073+ 16074+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16075+ 16076+ // Execute 16077+ _struct->slide_scroll(_struct, vx, vy); 16078+} 16079+ 16080+NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SetFileAccess(bool falg) { 16081+ shutdown_checker::AssertNotShutdown(); 16082+ 16083+ cef_browser_host_t* _struct = GetStruct(); 16084+ if (CEF_MEMBER_MISSING(_struct, set_file_access)) 16085+ return; 16086+ 16087+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16088+ 16089+ // Execute 16090+ _struct->set_file_access(_struct, falg); 16091+} 16092+ 16093+NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SetBlockNetwork(bool falg) { 16094+ shutdown_checker::AssertNotShutdown(); 16095+ 16096+ cef_browser_host_t* _struct = GetStruct(); 16097+ if (CEF_MEMBER_MISSING(_struct, set_block_network)) 16098+ return; 16099+ 16100+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16101+ 16102+ // Execute 16103+ _struct->set_block_network(_struct, falg); 16104+} 16105+ 16106+NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::SetCacheMode(int falg) { 16107+ shutdown_checker::AssertNotShutdown(); 16108+ 16109+ cef_browser_host_t* _struct = GetStruct(); 16110+ if (CEF_MEMBER_MISSING(_struct, set_cache_mode)) 16111+ return; 16112+ 16113+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16114+ 16115+ // Execute 16116+ _struct->set_cache_mode(_struct, falg); 16117+} 16118+ 16119 // CONSTRUCTOR - Do not edit by hand. 16120 16121 CefBrowserHostCToCpp::CefBrowserHostCToCpp() {} 16122diff --git a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h 16123index ece6642e28544..f75f810a9f13e 16124--- a/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h 16125+++ b/src/cef/libcef_dll/ctocpp/browser_host_ctocpp.h 16126@@ -1,4 +1,4 @@ 16127-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16128+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16129 // reserved. Use of this source code is governed by a BSD-style license that 16130 // can be found in the LICENSE file. 16131 // 16132@@ -9,7 +9,7 @@ 16133 // implementations. See the translator.README.txt file in the tools directory 16134 // for more information. 16135 // 16136-// $hash=7d2cea734649b808710e6c44ee7eab4f5e5b47cc$ 16137+// $hash=29c3bfce4a45f38ec3fd21096e13addeb83f6310$ 16138 // 16139 16140 #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ 16141@@ -129,10 +129,11 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp, 16142 CefString& targetUri) override; 16143 void ClosePort(CefString& port_handle) override; 16144 void DestroyAllWebMessagePorts() override; 16145- void PostPortMessage(CefString& port_handle, CefString& data) override; 16146+ void PostPortMessage(CefString& port_handle, 16147+ CefRefPtr<CefValue> message) override; 16148 void SetPortMessageCallback( 16149 CefString& port_handle, 16150- CefRefPtr<CefJavaScriptResultCallback> callback) override; 16151+ CefRefPtr<CefWebMessageReceiver> callback) override; 16152 void GetHitData(int& type, CefString& extra_data) override; 16153 void SetInitialScale(float scale) override; 16154 int PageLoadProgress() override; 16155@@ -186,6 +187,15 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted<CefBrowserHostCToCpp, 16156 CefString GetOriginalUrl() override; 16157 void PutNetworkAvailable(bool available) override; 16158 void RemoveCache(bool include_disk_files) override; 16159+ void ScrollPageUpDown(bool is_up, bool is_half, float view_height) override; 16160+ CefRefPtr<CefBinaryValue> GetWebState() override; 16161+ bool RestoreWebState(const CefRefPtr<CefBinaryValue> state) override; 16162+ void ScrollTo(float x, float y) override; 16163+ void ScrollBy(float delta_x, float delta_y) override; 16164+ void SlideScroll(float vx, float vy) override; 16165+ void SetFileAccess(bool falg) override; 16166+ void SetBlockNetwork(bool falg) override; 16167+ void SetCacheMode(int falg) override; 16168 }; 16169 16170 #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ 16171diff --git a/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc 16172index 378b2e54202dd..2cca93268f1ef 16173--- a/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc 16174+++ b/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc 16175@@ -1,4 +1,4 @@ 16176-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16177+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16178 // reserved. Use of this source code is governed by a BSD-style license that 16179 // can be found in the LICENSE file. 16180 // 16181@@ -9,7 +9,7 @@ 16182 // implementations. See the translator.README.txt file in the tools directory 16183 // for more information. 16184 // 16185-// $hash=4a9c34d8dd8e49725dd7288c3a8c3e2a978c977c$ 16186+// $hash=7af372362be16cd5150da026dbbf41c85daeba88$ 16187 // 16188 16189 #include "libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h" 16190@@ -19,10 +19,11 @@ 16191 16192 NO_SANITIZE("cfi-icall") 16193 void CefBrowserPermissionRequestDelegateCToCpp::AskGeolocationPermission( 16194- const CefString &origin, cef_permission_callback_t callback) { 16195+ const CefString& origin, 16196+ cef_permission_callback_t callback) { 16197 shutdown_checker::AssertNotShutdown(); 16198 16199- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16200+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16201 if (CEF_MEMBER_MISSING(_struct, ask_geolocation_permission)) 16202 return; 16203 16204@@ -39,10 +40,10 @@ void CefBrowserPermissionRequestDelegateCToCpp::AskGeolocationPermission( 16205 16206 NO_SANITIZE("cfi-icall") 16207 void CefBrowserPermissionRequestDelegateCToCpp::AbortAskGeolocationPermission( 16208- const CefString &origin) { 16209+ const CefString& origin) { 16210 shutdown_checker::AssertNotShutdown(); 16211 16212- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16213+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16214 if (CEF_MEMBER_MISSING(_struct, abort_ask_geolocation_permission)) 16215 return; 16216 16217@@ -59,11 +60,11 @@ void CefBrowserPermissionRequestDelegateCToCpp::AbortAskGeolocationPermission( 16218 16219 NO_SANITIZE("cfi-icall") 16220 void CefBrowserPermissionRequestDelegateCToCpp:: 16221- AskProtectedMediaIdentifierPermission(const CefString &origin, 16222+ AskProtectedMediaIdentifierPermission(const CefString& origin, 16223 cef_permission_callback_t callback) { 16224 shutdown_checker::AssertNotShutdown(); 16225 16226- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16227+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16228 if (CEF_MEMBER_MISSING(_struct, ask_protected_media_identifier_permission)) 16229 return; 16230 16231@@ -81,10 +82,10 @@ void CefBrowserPermissionRequestDelegateCToCpp:: 16232 16233 NO_SANITIZE("cfi-icall") 16234 void CefBrowserPermissionRequestDelegateCToCpp:: 16235- AbortAskProtectedMediaIdentifierPermission(const CefString &origin) { 16236+ AbortAskProtectedMediaIdentifierPermission(const CefString& origin) { 16237 shutdown_checker::AssertNotShutdown(); 16238 16239- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16240+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16241 if (CEF_MEMBER_MISSING(_struct, 16242 abort_ask_protected_media_identifier_permission)) 16243 return; 16244@@ -103,10 +104,11 @@ void CefBrowserPermissionRequestDelegateCToCpp:: 16245 16246 NO_SANITIZE("cfi-icall") 16247 void CefBrowserPermissionRequestDelegateCToCpp::AskMIDISysexPermission( 16248- const CefString &origin, cef_permission_callback_t callback) { 16249+ const CefString& origin, 16250+ cef_permission_callback_t callback) { 16251 shutdown_checker::AssertNotShutdown(); 16252 16253- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16254+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16255 if (CEF_MEMBER_MISSING(_struct, ask_midisysex_permission)) 16256 return; 16257 16258@@ -123,10 +125,10 @@ void CefBrowserPermissionRequestDelegateCToCpp::AskMIDISysexPermission( 16259 16260 NO_SANITIZE("cfi-icall") 16261 void CefBrowserPermissionRequestDelegateCToCpp::AbortAskMIDISysexPermission( 16262- const CefString &origin) { 16263+ const CefString& origin) { 16264 shutdown_checker::AssertNotShutdown(); 16265 16266- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16267+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16268 if (CEF_MEMBER_MISSING(_struct, abort_ask_midisysex_permission)) 16269 return; 16270 16271@@ -143,10 +145,11 @@ void CefBrowserPermissionRequestDelegateCToCpp::AbortAskMIDISysexPermission( 16272 16273 NO_SANITIZE("cfi-icall") 16274 void CefBrowserPermissionRequestDelegateCToCpp::NotifyGeolocationPermission( 16275- bool value, const CefString &origin) { 16276+ bool value, 16277+ const CefString& origin) { 16278 shutdown_checker::AssertNotShutdown(); 16279 16280- cef_browser_permission_request_delegate_t *_struct = GetStruct(); 16281+ cef_browser_permission_request_delegate_t* _struct = GetStruct(); 16282 if (CEF_MEMBER_MISSING(_struct, notify_geolocation_permission)) 16283 return; 16284 16285@@ -174,11 +177,11 @@ CefBrowserPermissionRequestDelegateCToCpp:: 16286 } 16287 16288 template <> 16289-cef_browser_permission_request_delegate_t * 16290+cef_browser_permission_request_delegate_t* 16291 CefCToCppRefCounted<CefBrowserPermissionRequestDelegateCToCpp, 16292 CefBrowserPermissionRequestDelegate, 16293 cef_browser_permission_request_delegate_t>:: 16294- UnwrapDerived(CefWrapperType type, CefBrowserPermissionRequestDelegate *c) { 16295+ UnwrapDerived(CefWrapperType type, CefBrowserPermissionRequestDelegate* c) { 16296 NOTREACHED() << "Unexpected class type: " << type; 16297 return nullptr; 16298 } 16299diff --git a/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h 16300index 4b7598dc129c5..39c61973fe3be 16301--- a/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h 16302+++ b/src/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h 16303@@ -1,4 +1,4 @@ 16304-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16305+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16306 // reserved. Use of this source code is governed by a BSD-style license that 16307 // can be found in the LICENSE file. 16308 // 16309@@ -9,7 +9,7 @@ 16310 // implementations. See the translator.README.txt file in the tools directory 16311 // for more information. 16312 // 16313-// $hash=c9c5f759ffc22b4c39e35c6273d17966ec357b35$ 16314+// $hash=a2e7c9e77ee45cef4da269e9e613fd4fdef5f9ac$ 16315 // 16316 16317 #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ 16318@@ -30,23 +30,24 @@ class CefBrowserPermissionRequestDelegateCToCpp 16319 : public CefCToCppRefCounted<CefBrowserPermissionRequestDelegateCToCpp, 16320 CefBrowserPermissionRequestDelegate, 16321 cef_browser_permission_request_delegate_t> { 16322-public: 16323+ public: 16324 CefBrowserPermissionRequestDelegateCToCpp(); 16325 virtual ~CefBrowserPermissionRequestDelegateCToCpp(); 16326 16327 // CefBrowserPermissionRequestDelegate methods. 16328- void AskGeolocationPermission(const CefString &origin, 16329+ void AskGeolocationPermission(const CefString& origin, 16330 cef_permission_callback_t callback) override; 16331- void AbortAskGeolocationPermission(const CefString &origin) override; 16332+ void AbortAskGeolocationPermission(const CefString& origin) override; 16333 void AskProtectedMediaIdentifierPermission( 16334- const CefString &origin, cef_permission_callback_t callback) override; 16335- void 16336- AbortAskProtectedMediaIdentifierPermission(const CefString &origin) override; 16337- void AskMIDISysexPermission(const CefString &origin, 16338+ const CefString& origin, 16339+ cef_permission_callback_t callback) override; 16340+ void AbortAskProtectedMediaIdentifierPermission( 16341+ const CefString& origin) override; 16342+ void AskMIDISysexPermission(const CefString& origin, 16343 cef_permission_callback_t callback) override; 16344- void AbortAskMIDISysexPermission(const CefString &origin) override; 16345+ void AbortAskMIDISysexPermission(const CefString& origin) override; 16346 void NotifyGeolocationPermission(bool value, 16347- const CefString &origin) override; 16348+ const CefString& origin) override; 16349 }; 16350 16351-#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ 16352+#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ 16353diff --git a/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc 16354index 2338c499f1748..c8739c79bde6f 16355--- a/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc 16356+++ b/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc 16357@@ -1,4 +1,4 @@ 16358-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16359+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16360 // reserved. Use of this source code is governed by a BSD-style license that 16361 // can be found in the LICENSE file. 16362 // 16363@@ -9,7 +9,7 @@ 16364 // implementations. See the translator.README.txt file in the tools directory 16365 // for more information. 16366 // 16367-// $hash=3302f28c60da03b9f5ba5fa110523b353765d1a3$ 16368+// $hash=a2e2cd65794078959c9d31ee3a294fb937d6f802$ 16369 // 16370 16371 #include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" 16372diff --git a/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h 16373index 3871506b1a685..50c763307fbc5 16374--- a/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h 16375+++ b/src/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h 16376@@ -1,4 +1,4 @@ 16377-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16378+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16379 // reserved. Use of this source code is governed by a BSD-style license that 16380 // can be found in the LICENSE file. 16381 // 16382@@ -9,7 +9,7 @@ 16383 // implementations. See the translator.README.txt file in the tools directory 16384 // for more information. 16385 // 16386-// $hash=7a13d15a99d1c92a757b776bb00d932296012054$ 16387+// $hash=66b5c3e001c23a720ae8a8e6d98afeb2419e5038$ 16388 // 16389 16390 #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_ 16391diff --git a/src/cef/libcef_dll/ctocpp/callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/callback_ctocpp.cc 16392index c0030004cbe5b..8c86cd7330e2d 16393--- a/src/cef/libcef_dll/ctocpp/callback_ctocpp.cc 16394+++ b/src/cef/libcef_dll/ctocpp/callback_ctocpp.cc 16395@@ -1,4 +1,4 @@ 16396-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16397+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16398 // reserved. Use of this source code is governed by a BSD-style license that 16399 // can be found in the LICENSE file. 16400 // 16401@@ -9,7 +9,7 @@ 16402 // implementations. See the translator.README.txt file in the tools directory 16403 // for more information. 16404 // 16405-// $hash=ef330e0d61e143966544b8a80f04b72dc32ec4e3$ 16406+// $hash=669523b79dbdfe2fff4015e8a1b247e7f90e62e0$ 16407 // 16408 16409 #include "libcef_dll/ctocpp/callback_ctocpp.h" 16410diff --git a/src/cef/libcef_dll/ctocpp/callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/callback_ctocpp.h 16411index f4d7a15e7851f..1e59651494167 16412--- a/src/cef/libcef_dll/ctocpp/callback_ctocpp.h 16413+++ b/src/cef/libcef_dll/ctocpp/callback_ctocpp.h 16414@@ -1,4 +1,4 @@ 16415-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16416+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16417 // reserved. Use of this source code is governed by a BSD-style license that 16418 // can be found in the LICENSE file. 16419 // 16420@@ -9,7 +9,7 @@ 16421 // implementations. See the translator.README.txt file in the tools directory 16422 // for more information. 16423 // 16424-// $hash=4a884b7737dd5ba552273873e63dd4df51a632b7$ 16425+// $hash=33a36c40703e1a794c2d8365f0ed692bad529e4b$ 16426 // 16427 16428 #ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ 16429diff --git a/src/cef/libcef_dll/ctocpp/client_ctocpp.cc b/src/cef/libcef_dll/ctocpp/client_ctocpp.cc 16430index 5a741e37ed727..f31c0ee080445 16431--- a/src/cef/libcef_dll/ctocpp/client_ctocpp.cc 16432+++ b/src/cef/libcef_dll/ctocpp/client_ctocpp.cc 16433@@ -1,4 +1,4 @@ 16434-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16435+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16436 // reserved. Use of this source code is governed by a BSD-style license that 16437 // can be found in the LICENSE file. 16438 // 16439@@ -9,7 +9,7 @@ 16440 // implementations. See the translator.README.txt file in the tools directory 16441 // for more information. 16442 // 16443-// $hash=6c7761f17f60e6c3db928ffc15b373b0c50dfb47$ 16444+// $hash=d090744e28308c8ad6b47906ee231b4fe52fa6a2$ 16445 // 16446 16447 #include "libcef_dll/ctocpp/client_ctocpp.h" 16448@@ -39,14 +39,14 @@ 16449 16450 NO_SANITIZE("cfi-icall") 16451 CefRefPtr<CefAudioHandler> CefClientCToCpp::GetAudioHandler() { 16452- cef_client_t *_struct = GetStruct(); 16453+ cef_client_t* _struct = GetStruct(); 16454 if (CEF_MEMBER_MISSING(_struct, get_audio_handler)) 16455 return nullptr; 16456 16457 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16458 16459 // Execute 16460- cef_audio_handler_t *_retval = _struct->get_audio_handler(_struct); 16461+ cef_audio_handler_t* _retval = _struct->get_audio_handler(_struct); 16462 16463 // Return type: refptr_same 16464 return CefAudioHandlerCToCpp::Wrap(_retval); 16465@@ -54,14 +54,14 @@ CefRefPtr<CefAudioHandler> CefClientCToCpp::GetAudioHandler() { 16466 16467 NO_SANITIZE("cfi-icall") 16468 CefRefPtr<CefContextMenuHandler> CefClientCToCpp::GetContextMenuHandler() { 16469- cef_client_t *_struct = GetStruct(); 16470+ cef_client_t* _struct = GetStruct(); 16471 if (CEF_MEMBER_MISSING(_struct, get_context_menu_handler)) 16472 return nullptr; 16473 16474 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16475 16476 // Execute 16477- cef_context_menu_handler_t *_retval = 16478+ cef_context_menu_handler_t* _retval = 16479 _struct->get_context_menu_handler(_struct); 16480 16481 // Return type: refptr_same 16482@@ -70,14 +70,14 @@ CefRefPtr<CefContextMenuHandler> CefClientCToCpp::GetContextMenuHandler() { 16483 16484 NO_SANITIZE("cfi-icall") 16485 CefRefPtr<CefDialogHandler> CefClientCToCpp::GetDialogHandler() { 16486- cef_client_t *_struct = GetStruct(); 16487+ cef_client_t* _struct = GetStruct(); 16488 if (CEF_MEMBER_MISSING(_struct, get_dialog_handler)) 16489 return nullptr; 16490 16491 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16492 16493 // Execute 16494- cef_dialog_handler_t *_retval = _struct->get_dialog_handler(_struct); 16495+ cef_dialog_handler_t* _retval = _struct->get_dialog_handler(_struct); 16496 16497 // Return type: refptr_same 16498 return CefDialogHandlerCToCpp::Wrap(_retval); 16499@@ -85,14 +85,14 @@ CefRefPtr<CefDialogHandler> CefClientCToCpp::GetDialogHandler() { 16500 16501 NO_SANITIZE("cfi-icall") 16502 CefRefPtr<CefDisplayHandler> CefClientCToCpp::GetDisplayHandler() { 16503- cef_client_t *_struct = GetStruct(); 16504+ cef_client_t* _struct = GetStruct(); 16505 if (CEF_MEMBER_MISSING(_struct, get_display_handler)) 16506 return nullptr; 16507 16508 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16509 16510 // Execute 16511- cef_display_handler_t *_retval = _struct->get_display_handler(_struct); 16512+ cef_display_handler_t* _retval = _struct->get_display_handler(_struct); 16513 16514 // Return type: refptr_same 16515 return CefDisplayHandlerCToCpp::Wrap(_retval); 16516@@ -100,14 +100,14 @@ CefRefPtr<CefDisplayHandler> CefClientCToCpp::GetDisplayHandler() { 16517 16518 NO_SANITIZE("cfi-icall") 16519 CefRefPtr<CefDownloadHandler> CefClientCToCpp::GetDownloadHandler() { 16520- cef_client_t *_struct = GetStruct(); 16521+ cef_client_t* _struct = GetStruct(); 16522 if (CEF_MEMBER_MISSING(_struct, get_download_handler)) 16523 return nullptr; 16524 16525 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16526 16527 // Execute 16528- cef_download_handler_t *_retval = _struct->get_download_handler(_struct); 16529+ cef_download_handler_t* _retval = _struct->get_download_handler(_struct); 16530 16531 // Return type: refptr_same 16532 return CefDownloadHandlerCToCpp::Wrap(_retval); 16533@@ -115,14 +115,14 @@ CefRefPtr<CefDownloadHandler> CefClientCToCpp::GetDownloadHandler() { 16534 16535 NO_SANITIZE("cfi-icall") 16536 CefRefPtr<CefDragHandler> CefClientCToCpp::GetDragHandler() { 16537- cef_client_t *_struct = GetStruct(); 16538+ cef_client_t* _struct = GetStruct(); 16539 if (CEF_MEMBER_MISSING(_struct, get_drag_handler)) 16540 return nullptr; 16541 16542 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16543 16544 // Execute 16545- cef_drag_handler_t *_retval = _struct->get_drag_handler(_struct); 16546+ cef_drag_handler_t* _retval = _struct->get_drag_handler(_struct); 16547 16548 // Return type: refptr_same 16549 return CefDragHandlerCToCpp::Wrap(_retval); 16550@@ -130,14 +130,14 @@ CefRefPtr<CefDragHandler> CefClientCToCpp::GetDragHandler() { 16551 16552 NO_SANITIZE("cfi-icall") 16553 CefRefPtr<CefFindHandler> CefClientCToCpp::GetFindHandler() { 16554- cef_client_t *_struct = GetStruct(); 16555+ cef_client_t* _struct = GetStruct(); 16556 if (CEF_MEMBER_MISSING(_struct, get_find_handler)) 16557 return nullptr; 16558 16559 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16560 16561 // Execute 16562- cef_find_handler_t *_retval = _struct->get_find_handler(_struct); 16563+ cef_find_handler_t* _retval = _struct->get_find_handler(_struct); 16564 16565 // Return type: refptr_same 16566 return CefFindHandlerCToCpp::Wrap(_retval); 16567@@ -145,14 +145,14 @@ CefRefPtr<CefFindHandler> CefClientCToCpp::GetFindHandler() { 16568 16569 NO_SANITIZE("cfi-icall") 16570 CefRefPtr<CefFocusHandler> CefClientCToCpp::GetFocusHandler() { 16571- cef_client_t *_struct = GetStruct(); 16572+ cef_client_t* _struct = GetStruct(); 16573 if (CEF_MEMBER_MISSING(_struct, get_focus_handler)) 16574 return nullptr; 16575 16576 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16577 16578 // Execute 16579- cef_focus_handler_t *_retval = _struct->get_focus_handler(_struct); 16580+ cef_focus_handler_t* _retval = _struct->get_focus_handler(_struct); 16581 16582 // Return type: refptr_same 16583 return CefFocusHandlerCToCpp::Wrap(_retval); 16584@@ -160,14 +160,14 @@ CefRefPtr<CefFocusHandler> CefClientCToCpp::GetFocusHandler() { 16585 16586 NO_SANITIZE("cfi-icall") 16587 CefRefPtr<CefFrameHandler> CefClientCToCpp::GetFrameHandler() { 16588- cef_client_t *_struct = GetStruct(); 16589+ cef_client_t* _struct = GetStruct(); 16590 if (CEF_MEMBER_MISSING(_struct, get_frame_handler)) 16591 return nullptr; 16592 16593 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16594 16595 // Execute 16596- cef_frame_handler_t *_retval = _struct->get_frame_handler(_struct); 16597+ cef_frame_handler_t* _retval = _struct->get_frame_handler(_struct); 16598 16599 // Return type: refptr_same 16600 return CefFrameHandlerCToCpp::Wrap(_retval); 16601@@ -175,14 +175,14 @@ CefRefPtr<CefFrameHandler> CefClientCToCpp::GetFrameHandler() { 16602 16603 NO_SANITIZE("cfi-icall") 16604 CefRefPtr<CefJSDialogHandler> CefClientCToCpp::GetJSDialogHandler() { 16605- cef_client_t *_struct = GetStruct(); 16606+ cef_client_t* _struct = GetStruct(); 16607 if (CEF_MEMBER_MISSING(_struct, get_jsdialog_handler)) 16608 return nullptr; 16609 16610 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16611 16612 // Execute 16613- cef_jsdialog_handler_t *_retval = _struct->get_jsdialog_handler(_struct); 16614+ cef_jsdialog_handler_t* _retval = _struct->get_jsdialog_handler(_struct); 16615 16616 // Return type: refptr_same 16617 return CefJSDialogHandlerCToCpp::Wrap(_retval); 16618@@ -190,14 +190,14 @@ CefRefPtr<CefJSDialogHandler> CefClientCToCpp::GetJSDialogHandler() { 16619 16620 NO_SANITIZE("cfi-icall") 16621 CefRefPtr<CefKeyboardHandler> CefClientCToCpp::GetKeyboardHandler() { 16622- cef_client_t *_struct = GetStruct(); 16623+ cef_client_t* _struct = GetStruct(); 16624 if (CEF_MEMBER_MISSING(_struct, get_keyboard_handler)) 16625 return nullptr; 16626 16627 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16628 16629 // Execute 16630- cef_keyboard_handler_t *_retval = _struct->get_keyboard_handler(_struct); 16631+ cef_keyboard_handler_t* _retval = _struct->get_keyboard_handler(_struct); 16632 16633 // Return type: refptr_same 16634 return CefKeyboardHandlerCToCpp::Wrap(_retval); 16635@@ -205,14 +205,14 @@ CefRefPtr<CefKeyboardHandler> CefClientCToCpp::GetKeyboardHandler() { 16636 16637 NO_SANITIZE("cfi-icall") 16638 CefRefPtr<CefLifeSpanHandler> CefClientCToCpp::GetLifeSpanHandler() { 16639- cef_client_t *_struct = GetStruct(); 16640+ cef_client_t* _struct = GetStruct(); 16641 if (CEF_MEMBER_MISSING(_struct, get_life_span_handler)) 16642 return nullptr; 16643 16644 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16645 16646 // Execute 16647- cef_life_span_handler_t *_retval = _struct->get_life_span_handler(_struct); 16648+ cef_life_span_handler_t* _retval = _struct->get_life_span_handler(_struct); 16649 16650 // Return type: refptr_same 16651 return CefLifeSpanHandlerCToCpp::Wrap(_retval); 16652@@ -220,14 +220,14 @@ CefRefPtr<CefLifeSpanHandler> CefClientCToCpp::GetLifeSpanHandler() { 16653 16654 NO_SANITIZE("cfi-icall") 16655 CefRefPtr<CefLoadHandler> CefClientCToCpp::GetLoadHandler() { 16656- cef_client_t *_struct = GetStruct(); 16657+ cef_client_t* _struct = GetStruct(); 16658 if (CEF_MEMBER_MISSING(_struct, get_load_handler)) 16659 return nullptr; 16660 16661 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16662 16663 // Execute 16664- cef_load_handler_t *_retval = _struct->get_load_handler(_struct); 16665+ cef_load_handler_t* _retval = _struct->get_load_handler(_struct); 16666 16667 // Return type: refptr_same 16668 return CefLoadHandlerCToCpp::Wrap(_retval); 16669@@ -235,14 +235,14 @@ CefRefPtr<CefLoadHandler> CefClientCToCpp::GetLoadHandler() { 16670 16671 NO_SANITIZE("cfi-icall") 16672 CefRefPtr<CefPrintHandler> CefClientCToCpp::GetPrintHandler() { 16673- cef_client_t *_struct = GetStruct(); 16674+ cef_client_t* _struct = GetStruct(); 16675 if (CEF_MEMBER_MISSING(_struct, get_print_handler)) 16676 return nullptr; 16677 16678 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16679 16680 // Execute 16681- cef_print_handler_t *_retval = _struct->get_print_handler(_struct); 16682+ cef_print_handler_t* _retval = _struct->get_print_handler(_struct); 16683 16684 // Return type: refptr_same 16685 return CefPrintHandlerCToCpp::Wrap(_retval); 16686@@ -250,14 +250,14 @@ CefRefPtr<CefPrintHandler> CefClientCToCpp::GetPrintHandler() { 16687 16688 NO_SANITIZE("cfi-icall") 16689 CefRefPtr<CefRenderHandler> CefClientCToCpp::GetRenderHandler() { 16690- cef_client_t *_struct = GetStruct(); 16691+ cef_client_t* _struct = GetStruct(); 16692 if (CEF_MEMBER_MISSING(_struct, get_render_handler)) 16693 return nullptr; 16694 16695 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16696 16697 // Execute 16698- cef_render_handler_t *_retval = _struct->get_render_handler(_struct); 16699+ cef_render_handler_t* _retval = _struct->get_render_handler(_struct); 16700 16701 // Return type: refptr_same 16702 return CefRenderHandlerCToCpp::Wrap(_retval); 16703@@ -265,14 +265,14 @@ CefRefPtr<CefRenderHandler> CefClientCToCpp::GetRenderHandler() { 16704 16705 NO_SANITIZE("cfi-icall") 16706 CefRefPtr<CefRequestHandler> CefClientCToCpp::GetRequestHandler() { 16707- cef_client_t *_struct = GetStruct(); 16708+ cef_client_t* _struct = GetStruct(); 16709 if (CEF_MEMBER_MISSING(_struct, get_request_handler)) 16710 return nullptr; 16711 16712 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16713 16714 // Execute 16715- cef_request_handler_t *_retval = _struct->get_request_handler(_struct); 16716+ cef_request_handler_t* _retval = _struct->get_request_handler(_struct); 16717 16718 // Return type: refptr_same 16719 return CefRequestHandlerCToCpp::Wrap(_retval); 16720@@ -280,14 +280,14 @@ CefRefPtr<CefRequestHandler> CefClientCToCpp::GetRequestHandler() { 16721 16722 NO_SANITIZE("cfi-icall") 16723 CefRefPtr<CefPermissionRequest> CefClientCToCpp::GetPermissionRequest() { 16724- cef_client_t *_struct = GetStruct(); 16725+ cef_client_t* _struct = GetStruct(); 16726 if (CEF_MEMBER_MISSING(_struct, get_permission_request)) 16727 return nullptr; 16728 16729 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16730 16731 // Execute 16732- cef_permission_request_t *_retval = _struct->get_permission_request(_struct); 16733+ cef_permission_request_t* _retval = _struct->get_permission_request(_struct); 16734 16735 // Return type: refptr_same 16736 return CefPermissionRequestCToCpp::Wrap(_retval); 16737@@ -295,9 +295,11 @@ CefRefPtr<CefPermissionRequest> CefClientCToCpp::GetPermissionRequest() { 16738 16739 NO_SANITIZE("cfi-icall") 16740 bool CefClientCToCpp::OnProcessMessageReceived( 16741- CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, 16742- CefProcessId source_process, CefRefPtr<CefProcessMessage> message) { 16743- cef_client_t *_struct = GetStruct(); 16744+ CefRefPtr<CefBrowser> browser, 16745+ CefRefPtr<CefFrame> frame, 16746+ CefProcessId source_process, 16747+ CefRefPtr<CefProcessMessage> message) { 16748+ cef_client_t* _struct = GetStruct(); 16749 if (CEF_MEMBER_MISSING(_struct, on_process_message_received)) 16750 return false; 16751 16752@@ -327,10 +329,10 @@ bool CefClientCToCpp::OnProcessMessageReceived( 16753 16754 NO_SANITIZE("cfi-icall") 16755 int CefClientCToCpp::NotifyJavaScriptResult(CefRefPtr<CefListValue> args, 16756- const CefString &method, 16757- const CefString &object_name, 16758+ const CefString& method, 16759+ const CefString& object_name, 16760 CefRefPtr<CefListValue> result) { 16761- cef_client_t *_struct = GetStruct(); 16762+ cef_client_t* _struct = GetStruct(); 16763 if (CEF_MEMBER_MISSING(_struct, notify_java_script_result)) 16764 return 0; 16765 16766@@ -371,13 +373,14 @@ CefClientCToCpp::CefClientCToCpp() {} 16767 CefClientCToCpp::~CefClientCToCpp() {} 16768 16769 template <> 16770-cef_client_t * 16771+cef_client_t* 16772 CefCToCppRefCounted<CefClientCToCpp, CefClient, cef_client_t>::UnwrapDerived( 16773- CefWrapperType type, CefClient *c) { 16774+ CefWrapperType type, 16775+ CefClient* c) { 16776 NOTREACHED() << "Unexpected class type: " << type; 16777 return nullptr; 16778 } 16779 16780 template <> 16781-CefWrapperType CefCToCppRefCounted<CefClientCToCpp, CefClient, 16782- cef_client_t>::kWrapperType = WT_CLIENT; 16783+CefWrapperType CefCToCppRefCounted<CefClientCToCpp, CefClient, cef_client_t>:: 16784+ kWrapperType = WT_CLIENT; 16785diff --git a/src/cef/libcef_dll/ctocpp/client_ctocpp.h b/src/cef/libcef_dll/ctocpp/client_ctocpp.h 16786index 72c58879a1cc4..37f3eb67cc0ea 16787--- a/src/cef/libcef_dll/ctocpp/client_ctocpp.h 16788+++ b/src/cef/libcef_dll/ctocpp/client_ctocpp.h 16789@@ -1,4 +1,4 @@ 16790-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16791+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16792 // reserved. Use of this source code is governed by a BSD-style license that 16793 // can be found in the LICENSE file. 16794 // 16795@@ -9,7 +9,7 @@ 16796 // implementations. See the translator.README.txt file in the tools directory 16797 // for more information. 16798 // 16799-// $hash=7516e646aea8db0ff68ea79041e05ebb9a320cf2$ 16800+// $hash=13d421c7598593f4bee5b3e62cb8aaf348a350f9$ 16801 // 16802 16803 #ifndef CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ 16804@@ -28,7 +28,7 @@ 16805 // This class may be instantiated and accessed DLL-side only. 16806 class CefClientCToCpp 16807 : public CefCToCppRefCounted<CefClientCToCpp, CefClient, cef_client_t> { 16808-public: 16809+ public: 16810 CefClientCToCpp(); 16811 virtual ~CefClientCToCpp(); 16812 16813@@ -55,9 +55,9 @@ public: 16814 CefProcessId source_process, 16815 CefRefPtr<CefProcessMessage> message) override; 16816 int NotifyJavaScriptResult(CefRefPtr<CefListValue> args, 16817- const CefString &method, 16818- const CefString &object_name, 16819+ const CefString& method, 16820+ const CefString& object_name, 16821 CefRefPtr<CefListValue> result) override; 16822 }; 16823 16824-#endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ 16825+#endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ 16826diff --git a/src/cef/libcef_dll/ctocpp/command_line_ctocpp.cc b/src/cef/libcef_dll/ctocpp/command_line_ctocpp.cc 16827index a96b067677f06..e7b02e834fad5 16828--- a/src/cef/libcef_dll/ctocpp/command_line_ctocpp.cc 16829+++ b/src/cef/libcef_dll/ctocpp/command_line_ctocpp.cc 16830@@ -1,4 +1,4 @@ 16831-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16832+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16833 // reserved. Use of this source code is governed by a BSD-style license that 16834 // can be found in the LICENSE file. 16835 // 16836@@ -9,7 +9,7 @@ 16837 // implementations. See the translator.README.txt file in the tools directory 16838 // for more information. 16839 // 16840-// $hash=cc3c62b07c8e4d6f019637a0338673ac21ffa017$ 16841+// $hash=2f7f88a79dc5c9bb4c7af27e6abac4b4e7ba3d76$ 16842 // 16843 16844 #include "libcef_dll/ctocpp/command_line_ctocpp.h" 16845diff --git a/src/cef/libcef_dll/ctocpp/command_line_ctocpp.h b/src/cef/libcef_dll/ctocpp/command_line_ctocpp.h 16846index e11c013b6bf61..7beaa99e038c6 16847--- a/src/cef/libcef_dll/ctocpp/command_line_ctocpp.h 16848+++ b/src/cef/libcef_dll/ctocpp/command_line_ctocpp.h 16849@@ -1,4 +1,4 @@ 16850-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16851+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16852 // reserved. Use of this source code is governed by a BSD-style license that 16853 // can be found in the LICENSE file. 16854 // 16855@@ -9,7 +9,7 @@ 16856 // implementations. See the translator.README.txt file in the tools directory 16857 // for more information. 16858 // 16859-// $hash=6dffc109a4a5bdc10bda0a03950f1a8b81f964b7$ 16860+// $hash=c91f76be5a60016fa78afe2813b0d4df3bb422e7$ 16861 // 16862 16863 #ifndef CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ 16864diff --git a/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc 16865index 4b9308d9569e9..302cfe2802419 16866--- a/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc 16867+++ b/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc 16868@@ -1,4 +1,4 @@ 16869-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16870+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16871 // reserved. Use of this source code is governed by a BSD-style license that 16872 // can be found in the LICENSE file. 16873 // 16874@@ -9,7 +9,7 @@ 16875 // implementations. See the translator.README.txt file in the tools directory 16876 // for more information. 16877 // 16878-// $hash=f65d432f0ca5891aa466010183e437ba5e2007be$ 16879+// $hash=bc0832e0b26f161d96d699a1922df4144ae6cf2d$ 16880 // 16881 16882 #include "libcef_dll/ctocpp/completion_callback_ctocpp.h" 16883diff --git a/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h 16884index a934d50e22740..37956aadac1fb 16885--- a/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h 16886+++ b/src/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h 16887@@ -1,4 +1,4 @@ 16888-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16889+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16890 // reserved. Use of this source code is governed by a BSD-style license that 16891 // can be found in the LICENSE file. 16892 // 16893@@ -9,7 +9,7 @@ 16894 // implementations. See the translator.README.txt file in the tools directory 16895 // for more information. 16896 // 16897-// $hash=d8c3f928349e064d8afe7853d4a47c90c1ed0114$ 16898+// $hash=bbdf6c23d87122deb5d3100430547b2c608497a9$ 16899 // 16900 16901 #ifndef CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_ 16902diff --git a/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc 16903index eea53aa71656c..6d1bd15c9aa41 16904--- a/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc 16905+++ b/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc 16906@@ -1,4 +1,4 @@ 16907-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16908+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16909 // reserved. Use of this source code is governed by a BSD-style license that 16910 // can be found in the LICENSE file. 16911 // 16912@@ -9,7 +9,7 @@ 16913 // implementations. See the translator.README.txt file in the tools directory 16914 // for more information. 16915 // 16916-// $hash=e251b197b3369b44f3d66ce414094ac24ba1db10$ 16917+// $hash=074448a6721865377653c8625a38925aef5f3c7d$ 16918 // 16919 16920 #include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" 16921diff --git a/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h 16922index d5e0c793ac084..92e77bccbb2e8 16923--- a/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h 16924+++ b/src/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h 16925@@ -1,4 +1,4 @@ 16926-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16927+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16928 // reserved. Use of this source code is governed by a BSD-style license that 16929 // can be found in the LICENSE file. 16930 // 16931@@ -9,7 +9,7 @@ 16932 // implementations. See the translator.README.txt file in the tools directory 16933 // for more information. 16934 // 16935-// $hash=533df2bb508d88d0828f0da6284732c2ecbbafab$ 16936+// $hash=0d0bcb30d9e8b5894158c9ecf80fa710e4ce6b7d$ 16937 // 16938 16939 #ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_ 16940diff --git a/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc b/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc 16941index c5dd4186ddc9e..18323da16151c 16942--- a/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc 16943+++ b/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc 16944@@ -1,4 +1,4 @@ 16945-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 16946+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 16947 // reserved. Use of this source code is governed by a BSD-style license that 16948 // can be found in the LICENSE file. 16949 // 16950@@ -9,7 +9,7 @@ 16951 // implementations. See the translator.README.txt file in the tools directory 16952 // for more information. 16953 // 16954-// $hash=233d530cb984468703b97752bda1178191d4ba75$ 16955+// $hash=bc04acf3a86598987676f33a6d39c10435dded70$ 16956 // 16957 16958 #include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" 16959@@ -230,7 +230,7 @@ CefContextMenuParams::MediaType CefContextMenuParamsCToCpp::GetMediaType() { 16960 16961 NO_SANITIZE("cfi-icall") 16962 CefContextMenuParams::MediaStateFlags 16963-CefContextMenuParamsCToCpp::GetMediaStateFlags() { 16964+ CefContextMenuParamsCToCpp::GetMediaStateFlags() { 16965 shutdown_checker::AssertNotShutdown(); 16966 16967 cef_context_menu_params_t* _struct = GetStruct(); 16968@@ -351,7 +351,7 @@ bool CefContextMenuParamsCToCpp::IsSpellCheckEnabled() { 16969 16970 NO_SANITIZE("cfi-icall") 16971 CefContextMenuParams::EditStateFlags 16972-CefContextMenuParamsCToCpp::GetEditStateFlags() { 16973+ CefContextMenuParamsCToCpp::GetEditStateFlags() { 16974 shutdown_checker::AssertNotShutdown(); 16975 16976 cef_context_menu_params_t* _struct = GetStruct(); 16977@@ -384,6 +384,42 @@ NO_SANITIZE("cfi-icall") bool CefContextMenuParamsCToCpp::IsCustomMenu() { 16978 return _retval ? true : false; 16979 } 16980 16981+NO_SANITIZE("cfi-icall") 16982+CefContextMenuParams::InputFieldType 16983+ CefContextMenuParamsCToCpp::GetInputFieldType() { 16984+ shutdown_checker::AssertNotShutdown(); 16985+ 16986+ cef_context_menu_params_t* _struct = GetStruct(); 16987+ if (CEF_MEMBER_MISSING(_struct, get_input_field_type)) 16988+ return CM_INPUTFIELDTYPE_NONE; 16989+ 16990+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 16991+ 16992+ // Execute 16993+ cef_context_menu_input_field_type_t _retval = 16994+ _struct->get_input_field_type(_struct); 16995+ 16996+ // Return type: simple 16997+ return _retval; 16998+} 16999+ 17000+NO_SANITIZE("cfi-icall") 17001+CefContextMenuParams::SourceType CefContextMenuParamsCToCpp::GetSourceType() { 17002+ shutdown_checker::AssertNotShutdown(); 17003+ 17004+ cef_context_menu_params_t* _struct = GetStruct(); 17005+ if (CEF_MEMBER_MISSING(_struct, get_source_type)) 17006+ return CM_SOURCETYPE_NONE; 17007+ 17008+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 17009+ 17010+ // Execute 17011+ cef_context_menu_source_type_t _retval = _struct->get_source_type(_struct); 17012+ 17013+ // Return type: simple 17014+ return _retval; 17015+} 17016+ 17017 // CONSTRUCTOR - Do not edit by hand. 17018 17019 CefContextMenuParamsCToCpp::CefContextMenuParamsCToCpp() {} 17020diff --git a/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h 17021index b692a5160bbce..2540013e815c4 17022--- a/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h 17023+++ b/src/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h 17024@@ -1,4 +1,4 @@ 17025-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17026+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17027 // reserved. Use of this source code is governed by a BSD-style license that 17028 // can be found in the LICENSE file. 17029 // 17030@@ -9,7 +9,7 @@ 17031 // implementations. See the translator.README.txt file in the tools directory 17032 // for more information. 17033 // 17034-// $hash=de83ca0067722af09407abc0b7723a8d91d083ad$ 17035+// $hash=fd06aad327c518573e68c645f3facd55fea2da34$ 17036 // 17037 17038 #ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ 17039@@ -56,6 +56,8 @@ class CefContextMenuParamsCToCpp 17040 bool IsSpellCheckEnabled() override; 17041 EditStateFlags GetEditStateFlags() override; 17042 bool IsCustomMenu() override; 17043+ InputFieldType GetInputFieldType() override; 17044+ SourceType GetSourceType() override; 17045 }; 17046 17047 #endif // CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ 17048diff --git a/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc b/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc 17049index 3156b1db01495..53958890ff8c0 17050--- a/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc 17051+++ b/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc 17052@@ -1,4 +1,4 @@ 17053-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17054+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17055 // reserved. Use of this source code is governed by a BSD-style license that 17056 // can be found in the LICENSE file. 17057 // 17058@@ -9,7 +9,7 @@ 17059 // implementations. See the translator.README.txt file in the tools directory 17060 // for more information. 17061 // 17062-// $hash=b1ae8622378ad8661289554e6c542e970850aaed$ 17063+// $hash=d24bf7fb06a84dfbe57aa7bfe49cbb0de242a840$ 17064 // 17065 17066 #include "libcef_dll/ctocpp/cookie_access_filter_ctocpp.h" 17067diff --git a/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h b/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h 17068index 0170c33256d11..0da831215c084 17069--- a/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h 17070+++ b/src/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h 17071@@ -1,4 +1,4 @@ 17072-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17073+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17074 // reserved. Use of this source code is governed by a BSD-style license that 17075 // can be found in the LICENSE file. 17076 // 17077@@ -9,7 +9,7 @@ 17078 // implementations. See the translator.README.txt file in the tools directory 17079 // for more information. 17080 // 17081-// $hash=7a3357796fd02da5a233d4dfa6b8c7194ba8f969$ 17082+// $hash=b325a81a438e8e510eb826bc4e6acf5df04281c8$ 17083 // 17084 17085 #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_ACCESS_FILTER_CTOCPP_H_ 17086diff --git a/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc b/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc 17087index 9f8b8ea1acbea..8d8bd262840d1 17088--- a/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc 17089+++ b/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc 17090@@ -1,4 +1,4 @@ 17091-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17092+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17093 // reserved. Use of this source code is governed by a BSD-style license that 17094 // can be found in the LICENSE file. 17095 // 17096@@ -9,7 +9,7 @@ 17097 // implementations. See the translator.README.txt file in the tools directory 17098 // for more information. 17099 // 17100-// $hash=6e1bd6af22e730b6d6a12a7296414250bf415979$ 17101+// $hash=3a8702e5b54310d93f9f43d60dd4d6d77b83da9d$ 17102 // 17103 17104 #include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" 17105@@ -28,7 +28,7 @@ CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager( 17106 // Unverified params: callback 17107 17108 // Execute 17109- cef_cookie_manager_t *_retval = cef_cookie_manager_get_global_manager( 17110+ cef_cookie_manager_t* _retval = cef_cookie_manager_get_global_manager( 17111 CefCompletionCallbackCppToC::Wrap(callback)); 17112 17113 // Return type: refptr_same 17114@@ -36,9 +36,9 @@ CefRefPtr<CefCookieManager> CefCookieManager::GetGlobalManager( 17115 } 17116 17117 NO_SANITIZE("cfi-icall") 17118-bool CefCookieManager::CreateCefCookie(const CefString &url, 17119- const CefString &value, 17120- CefCookie &cef_cookie) { 17121+bool CefCookieManager::CreateCefCookie(const CefString& url, 17122+ const CefString& value, 17123+ CefCookie& cef_cookie) { 17124 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 17125 17126 // Verify param: url; type: string_byref_const 17127@@ -61,7 +61,7 @@ bool CefCookieManager::CreateCefCookie(const CefString &url, 17128 // VIRTUAL METHODS - Body may be edited by hand. 17129 17130 NO_SANITIZE("cfi-icall") bool CefCookieManagerCToCpp::IsAcceptCookieAllowed() { 17131- cef_cookie_manager_t *_struct = GetStruct(); 17132+ cef_cookie_manager_t* _struct = GetStruct(); 17133 if (CEF_MEMBER_MISSING(_struct, is_accept_cookie_allowed)) 17134 return false; 17135 17136@@ -76,7 +76,7 @@ NO_SANITIZE("cfi-icall") bool CefCookieManagerCToCpp::IsAcceptCookieAllowed() { 17137 17138 NO_SANITIZE("cfi-icall") 17139 void CefCookieManagerCToCpp::PutAcceptCookieEnabled(bool accept) { 17140- cef_cookie_manager_t *_struct = GetStruct(); 17141+ cef_cookie_manager_t* _struct = GetStruct(); 17142 if (CEF_MEMBER_MISSING(_struct, put_accept_cookie_enabled)) 17143 return; 17144 17145@@ -88,7 +88,7 @@ void CefCookieManagerCToCpp::PutAcceptCookieEnabled(bool accept) { 17146 17147 NO_SANITIZE("cfi-icall") 17148 bool CefCookieManagerCToCpp::IsThirdPartyCookieAllowed() { 17149- cef_cookie_manager_t *_struct = GetStruct(); 17150+ cef_cookie_manager_t* _struct = GetStruct(); 17151 if (CEF_MEMBER_MISSING(_struct, is_third_party_cookie_allowed)) 17152 return false; 17153 17154@@ -103,7 +103,7 @@ bool CefCookieManagerCToCpp::IsThirdPartyCookieAllowed() { 17155 17156 NO_SANITIZE("cfi-icall") 17157 void CefCookieManagerCToCpp::PutAcceptThirdPartyCookieEnabled(bool accept) { 17158- cef_cookie_manager_t *_struct = GetStruct(); 17159+ cef_cookie_manager_t* _struct = GetStruct(); 17160 if (CEF_MEMBER_MISSING(_struct, put_accept_third_party_cookie_enabled)) 17161 return; 17162 17163@@ -115,7 +115,7 @@ void CefCookieManagerCToCpp::PutAcceptThirdPartyCookieEnabled(bool accept) { 17164 17165 NO_SANITIZE("cfi-icall") 17166 bool CefCookieManagerCToCpp::IsFileURLSchemeCookiesAllowed() { 17167- cef_cookie_manager_t *_struct = GetStruct(); 17168+ cef_cookie_manager_t* _struct = GetStruct(); 17169 if (CEF_MEMBER_MISSING(_struct, is_file_urlscheme_cookies_allowed)) 17170 return false; 17171 17172@@ -130,7 +130,7 @@ bool CefCookieManagerCToCpp::IsFileURLSchemeCookiesAllowed() { 17173 17174 NO_SANITIZE("cfi-icall") 17175 void CefCookieManagerCToCpp::PutAcceptFileURLSchemeCookiesEnabled(bool allow) { 17176- cef_cookie_manager_t *_struct = GetStruct(); 17177+ cef_cookie_manager_t* _struct = GetStruct(); 17178 if (CEF_MEMBER_MISSING(_struct, put_accept_file_urlscheme_cookies_enabled)) 17179 return; 17180 17181@@ -143,7 +143,7 @@ void CefCookieManagerCToCpp::PutAcceptFileURLSchemeCookiesEnabled(bool allow) { 17182 NO_SANITIZE("cfi-icall") 17183 bool CefCookieManagerCToCpp::VisitAllCookies( 17184 CefRefPtr<CefCookieVisitor> visitor) { 17185- cef_cookie_manager_t *_struct = GetStruct(); 17186+ cef_cookie_manager_t* _struct = GetStruct(); 17187 if (CEF_MEMBER_MISSING(_struct, visit_all_cookies)) 17188 return false; 17189 17190@@ -164,9 +164,10 @@ bool CefCookieManagerCToCpp::VisitAllCookies( 17191 17192 NO_SANITIZE("cfi-icall") 17193 bool CefCookieManagerCToCpp::VisitUrlCookies( 17194- const CefString &url, bool includeHttpOnly, 17195+ const CefString& url, 17196+ bool includeHttpOnly, 17197 CefRefPtr<CefCookieVisitor> visitor) { 17198- cef_cookie_manager_t *_struct = GetStruct(); 17199+ cef_cookie_manager_t* _struct = GetStruct(); 17200 if (CEF_MEMBER_MISSING(_struct, visit_url_cookies)) 17201 return false; 17202 17203@@ -192,9 +193,10 @@ bool CefCookieManagerCToCpp::VisitUrlCookies( 17204 17205 NO_SANITIZE("cfi-icall") 17206 bool CefCookieManagerCToCpp::SetCookie( 17207- const CefString &url, const CefCookie &cookie, 17208+ const CefString& url, 17209+ const CefCookie& cookie, 17210 CefRefPtr<CefSetCookieCallback> callback) { 17211- cef_cookie_manager_t *_struct = GetStruct(); 17212+ cef_cookie_manager_t* _struct = GetStruct(); 17213 if (CEF_MEMBER_MISSING(_struct, set_cookie)) 17214 return false; 17215 17216@@ -216,9 +218,11 @@ bool CefCookieManagerCToCpp::SetCookie( 17217 17218 NO_SANITIZE("cfi-icall") 17219 bool CefCookieManagerCToCpp::DeleteCookies( 17220- const CefString &url, const CefString &cookie_name, bool is_session, 17221+ const CefString& url, 17222+ const CefString& cookie_name, 17223+ bool is_session, 17224 CefRefPtr<CefDeleteCookiesCallback> callback) { 17225- cef_cookie_manager_t *_struct = GetStruct(); 17226+ cef_cookie_manager_t* _struct = GetStruct(); 17227 if (CEF_MEMBER_MISSING(_struct, delete_cookies)) 17228 return false; 17229 17230@@ -238,7 +242,7 @@ bool CefCookieManagerCToCpp::DeleteCookies( 17231 NO_SANITIZE("cfi-icall") 17232 bool CefCookieManagerCToCpp::FlushStore( 17233 CefRefPtr<CefCompletionCallback> callback) { 17234- cef_cookie_manager_t *_struct = GetStruct(); 17235+ cef_cookie_manager_t* _struct = GetStruct(); 17236 if (CEF_MEMBER_MISSING(_struct, flush_store)) 17237 return false; 17238 17239@@ -263,15 +267,17 @@ CefCookieManagerCToCpp::CefCookieManagerCToCpp() {} 17240 CefCookieManagerCToCpp::~CefCookieManagerCToCpp() {} 17241 17242 template <> 17243-cef_cookie_manager_t * 17244-CefCToCppRefCounted<CefCookieManagerCToCpp, CefCookieManager, 17245+cef_cookie_manager_t* 17246+CefCToCppRefCounted<CefCookieManagerCToCpp, 17247+ CefCookieManager, 17248 cef_cookie_manager_t>::UnwrapDerived(CefWrapperType type, 17249- CefCookieManager *c) { 17250+ CefCookieManager* c) { 17251 NOTREACHED() << "Unexpected class type: " << type; 17252 return nullptr; 17253 } 17254 17255 template <> 17256-CefWrapperType CefCToCppRefCounted<CefCookieManagerCToCpp, CefCookieManager, 17257+CefWrapperType CefCToCppRefCounted<CefCookieManagerCToCpp, 17258+ CefCookieManager, 17259 cef_cookie_manager_t>::kWrapperType = 17260 WT_COOKIE_MANAGER; 17261diff --git a/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h 17262index cfdbc7af723a6..02e2ba430134b 17263--- a/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h 17264+++ b/src/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h 17265@@ -1,4 +1,4 @@ 17266-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17267+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17268 // reserved. Use of this source code is governed by a BSD-style license that 17269 // can be found in the LICENSE file. 17270 // 17271@@ -9,7 +9,7 @@ 17272 // implementations. See the translator.README.txt file in the tools directory 17273 // for more information. 17274 // 17275-// $hash=f92d6bb66153459fd6906db5e1fe32781dfafa2d$ 17276+// $hash=23d749e39a04142c1e7d09579460dba887d31d9b$ 17277 // 17278 17279 #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ 17280diff --git a/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc 17281index c915510144dc1..9468de70c0879 17282--- a/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc 17283+++ b/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc 17284@@ -1,4 +1,4 @@ 17285-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17286+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17287 // reserved. Use of this source code is governed by a BSD-style license that 17288 // can be found in the LICENSE file. 17289 // 17290@@ -9,7 +9,7 @@ 17291 // implementations. See the translator.README.txt file in the tools directory 17292 // for more information. 17293 // 17294-// $hash=46632d6c9d6e3c6891abc90323313bea54d7419e$ 17295+// $hash=708c4aeb30bed97847155c90b86fecc6388b0a60$ 17296 // 17297 17298 #include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" 17299diff --git a/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h b/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h 17300index 62d00723628ae..25aae27f205f1 17301--- a/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h 17302+++ b/src/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h 17303@@ -1,4 +1,4 @@ 17304-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17305+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17306 // reserved. Use of this source code is governed by a BSD-style license that 17307 // can be found in the LICENSE file. 17308 // 17309@@ -9,7 +9,7 @@ 17310 // implementations. See the translator.README.txt file in the tools directory 17311 // for more information. 17312 // 17313-// $hash=c1dca55691f6d564ad2a69b38acd141982368895$ 17314+// $hash=1824342f14e23ea975b7faed0406036568d88ba8$ 17315 // 17316 17317 #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ 17318diff --git a/src/cef/libcef_dll/ctocpp/data_base_ctocpp.cc b/src/cef/libcef_dll/ctocpp/data_base_ctocpp.cc 17319index 28b630c8dd5b7..447b0734ffdb5 17320--- a/src/cef/libcef_dll/ctocpp/data_base_ctocpp.cc 17321+++ b/src/cef/libcef_dll/ctocpp/data_base_ctocpp.cc 17322@@ -1,4 +1,4 @@ 17323-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17324+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17325 // reserved. Use of this source code is governed by a BSD-style license that 17326 // can be found in the LICENSE file. 17327 // 17328@@ -9,7 +9,7 @@ 17329 // implementations. See the translator.README.txt file in the tools directory 17330 // for more information. 17331 // 17332-// $hash=3ab167d92ecbdc7c4c52483058038ed50a68231a$ 17333+// $hash=2cf79925fe0507a777cba65aadf5d72f57e38a3c$ 17334 // 17335 17336 #include "libcef_dll/ctocpp/data_base_ctocpp.h" 17337@@ -90,10 +90,11 @@ void CefDataBaseCToCpp::SaveHttpAuthCredentials(const CefString& host, 17338 } 17339 17340 NO_SANITIZE("cfi-icall") 17341-void CefDataBaseCToCpp::GetHttpAuthCredentials( 17342- const CefString& host, 17343- const CefString& realm, 17344- std::vector<CefString>& username_password) { 17345+void CefDataBaseCToCpp::GetHttpAuthCredentials(const CefString& host, 17346+ const CefString& realm, 17347+ CefString& username, 17348+ char* password, 17349+ uint32_t passwordSize) { 17350 cef_data_base_t* _struct = GetStruct(); 17351 if (CEF_MEMBER_MISSING(_struct, get_http_auth_credentials)) 17352 return; 17353@@ -108,29 +109,21 @@ void CefDataBaseCToCpp::GetHttpAuthCredentials( 17354 DCHECK(!realm.empty()); 17355 if (realm.empty()) 17356 return; 17357- 17358- // Translate param: username_password; type: string_vec_byref 17359- cef_string_list_t username_passwordList = cef_string_list_alloc(); 17360- DCHECK(username_passwordList); 17361- if (username_passwordList) 17362- transfer_string_list_contents(username_password, username_passwordList); 17363+ // Verify param: password; type: simple_byaddr 17364+ DCHECK(password); 17365+ if (!password) 17366+ return; 17367 17368 // Execute 17369- _struct->get_http_auth_credentials(_struct, host.GetStruct(), 17370- realm.GetStruct(), username_passwordList); 17371- 17372- // Restore param:username_password; type: string_vec_byref 17373- if (username_passwordList) { 17374- username_password.clear(); 17375- transfer_string_list_contents(username_passwordList, username_password); 17376- cef_string_list_free(username_passwordList); 17377- } 17378+ _struct->get_http_auth_credentials( 17379+ _struct, host.GetStruct(), realm.GetStruct(), 17380+ username.GetWritableStruct(), password, passwordSize); 17381 } 17382 17383 NO_SANITIZE("cfi-icall") 17384-bool CefDataBaseCToCpp::ExistPermissionByOrigin(const CefString &origin, 17385+bool CefDataBaseCToCpp::ExistPermissionByOrigin(const CefString& origin, 17386 int type) { 17387- cef_data_base_t *_struct = GetStruct(); 17388+ cef_data_base_t* _struct = GetStruct(); 17389 if (CEF_MEMBER_MISSING(_struct, exist_permission_by_origin)) 17390 return false; 17391 17392@@ -150,9 +143,10 @@ bool CefDataBaseCToCpp::ExistPermissionByOrigin(const CefString &origin, 17393 } 17394 17395 NO_SANITIZE("cfi-icall") 17396-bool CefDataBaseCToCpp::GetPermissionResultByOrigin(const CefString &origin, 17397- int type, bool &result) { 17398- cef_data_base_t *_struct = GetStruct(); 17399+bool CefDataBaseCToCpp::GetPermissionResultByOrigin(const CefString& origin, 17400+ int type, 17401+ bool& result) { 17402+ cef_data_base_t* _struct = GetStruct(); 17403 if (CEF_MEMBER_MISSING(_struct, get_permission_result_by_origin)) 17404 return false; 17405 17406@@ -178,9 +172,10 @@ bool CefDataBaseCToCpp::GetPermissionResultByOrigin(const CefString &origin, 17407 } 17408 17409 NO_SANITIZE("cfi-icall") 17410-void CefDataBaseCToCpp::SetPermissionByOrigin(const CefString &origin, int type, 17411+void CefDataBaseCToCpp::SetPermissionByOrigin(const CefString& origin, 17412+ int type, 17413 bool result) { 17414- cef_data_base_t *_struct = GetStruct(); 17415+ cef_data_base_t* _struct = GetStruct(); 17416 if (CEF_MEMBER_MISSING(_struct, set_permission_by_origin)) 17417 return; 17418 17419@@ -196,9 +191,9 @@ void CefDataBaseCToCpp::SetPermissionByOrigin(const CefString &origin, int type, 17420 } 17421 17422 NO_SANITIZE("cfi-icall") 17423-void CefDataBaseCToCpp::ClearPermissionByOrigin(const CefString &origin, 17424+void CefDataBaseCToCpp::ClearPermissionByOrigin(const CefString& origin, 17425 int type) { 17426- cef_data_base_t *_struct = GetStruct(); 17427+ cef_data_base_t* _struct = GetStruct(); 17428 if (CEF_MEMBER_MISSING(_struct, clear_permission_by_origin)) 17429 return; 17430 17431@@ -214,7 +209,7 @@ void CefDataBaseCToCpp::ClearPermissionByOrigin(const CefString &origin, 17432 } 17433 17434 NO_SANITIZE("cfi-icall") void CefDataBaseCToCpp::ClearAllPermission(int type) { 17435- cef_data_base_t *_struct = GetStruct(); 17436+ cef_data_base_t* _struct = GetStruct(); 17437 if (CEF_MEMBER_MISSING(_struct, clear_all_permission)) 17438 return; 17439 17440@@ -226,8 +221,9 @@ NO_SANITIZE("cfi-icall") void CefDataBaseCToCpp::ClearAllPermission(int type) { 17441 17442 NO_SANITIZE("cfi-icall") 17443 void CefDataBaseCToCpp::GetOriginsByPermission( 17444- int type, std::vector<CefString> &origins) { 17445- cef_data_base_t *_struct = GetStruct(); 17446+ int type, 17447+ std::vector<CefString>& origins) { 17448+ cef_data_base_t* _struct = GetStruct(); 17449 if (CEF_MEMBER_MISSING(_struct, get_origins_by_permission)) 17450 return; 17451 17452diff --git a/src/cef/libcef_dll/ctocpp/data_base_ctocpp.h b/src/cef/libcef_dll/ctocpp/data_base_ctocpp.h 17453index 36a158f4d2aa9..41b9a15b369a7 17454--- a/src/cef/libcef_dll/ctocpp/data_base_ctocpp.h 17455+++ b/src/cef/libcef_dll/ctocpp/data_base_ctocpp.h 17456@@ -1,4 +1,4 @@ 17457-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17458+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17459 // reserved. Use of this source code is governed by a BSD-style license that 17460 // can be found in the LICENSE file. 17461 // 17462@@ -9,7 +9,7 @@ 17463 // implementations. See the translator.README.txt file in the tools directory 17464 // for more information. 17465 // 17466-// $hash=7b5c7ec8ac08f9547744baa38e840cf35a3e7a25$ 17467+// $hash=0a76a650645cbe773c0109fd95ce88ff4c0841e5$ 17468 // 17469 17470 #ifndef CEF_LIBCEF_DLL_CTOCPP_DATA_BASE_CTOCPP_H_ 17471@@ -41,10 +41,11 @@ class CefDataBaseCToCpp : public CefCToCppRefCounted<CefDataBaseCToCpp, 17472 const CefString& realm, 17473 const CefString& username, 17474 const char* password) override; 17475- void GetHttpAuthCredentials( 17476- const CefString& host, 17477- const CefString& realm, 17478- std::vector<CefString>& username_password) override; 17479+ void GetHttpAuthCredentials(const CefString& host, 17480+ const CefString& realm, 17481+ CefString& username, 17482+ char* password, 17483+ uint32_t passwordSize) override; 17484 bool ExistPermissionByOrigin(const CefString& origin, int type) override; 17485 bool GetPermissionResultByOrigin(const CefString& origin, 17486 int type, 17487diff --git a/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc 17488index 4f5301ec811ed..25be285954dae 17489--- a/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc 17490+++ b/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc 17491@@ -1,4 +1,4 @@ 17492-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17493+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17494 // reserved. Use of this source code is governed by a BSD-style license that 17495 // can be found in the LICENSE file. 17496 // 17497@@ -9,7 +9,7 @@ 17498 // implementations. See the translator.README.txt file in the tools directory 17499 // for more information. 17500 // 17501-// $hash=765b5a3f3e0ac077f2ff72541ae26ca342c4ca78$ 17502+// $hash=55be7ac3ac6c4e07af7c20c920c6c83b7d0a25d3$ 17503 // 17504 17505 #include "libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h" 17506diff --git a/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h 17507index 90f109ac9e05b..7e7bdaf33bc11 17508--- a/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h 17509+++ b/src/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h 17510@@ -1,4 +1,4 @@ 17511-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17512+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17513 // reserved. Use of this source code is governed by a BSD-style license that 17514 // can be found in the LICENSE file. 17515 // 17516@@ -9,7 +9,7 @@ 17517 // implementations. See the translator.README.txt file in the tools directory 17518 // for more information. 17519 // 17520-// $hash=cd33af6263f686958bccf5907e1c4622950a7a40$ 17521+// $hash=e064baa776ef2fb9b70d51ec556613859a222067$ 17522 // 17523 17524 #ifndef CEF_LIBCEF_DLL_CTOCPP_DELETE_COOKIES_CALLBACK_CTOCPP_H_ 17525diff --git a/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc b/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc 17526index 367af2dd9ad49..b7da42aca079b 17527--- a/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc 17528+++ b/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc 17529@@ -1,4 +1,4 @@ 17530-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17531+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17532 // reserved. Use of this source code is governed by a BSD-style license that 17533 // can be found in the LICENSE file. 17534 // 17535@@ -9,7 +9,7 @@ 17536 // implementations. See the translator.README.txt file in the tools directory 17537 // for more information. 17538 // 17539-// $hash=610f96da1baaa48d1aa7fcff8a4c4fb33d2965ab$ 17540+// $hash=dc9df8e6b51991e751cb5f6607db87d3d9b3bb18$ 17541 // 17542 17543 #include "libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h" 17544diff --git a/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h b/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h 17545index 99eb59beed067..c328e21fdbccb 17546--- a/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h 17547+++ b/src/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h 17548@@ -1,4 +1,4 @@ 17549-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17550+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17551 // reserved. Use of this source code is governed by a BSD-style license that 17552 // can be found in the LICENSE file. 17553 // 17554@@ -9,7 +9,7 @@ 17555 // implementations. See the translator.README.txt file in the tools directory 17556 // for more information. 17557 // 17558-// $hash=3b8cfdd8e4bc8e1981634fdd6a78f8eb9a23da4b$ 17559+// $hash=13f5ab113bea9ee958f3d92e1c10898fd182c14e$ 17560 // 17561 17562 #ifndef CEF_LIBCEF_DLL_CTOCPP_DEV_TOOLS_MESSAGE_OBSERVER_CTOCPP_H_ 17563diff --git a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc 17564index 2cb31ef5631ed..01d360a03eabd 17565--- a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc 17566+++ b/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc 17567@@ -1,4 +1,4 @@ 17568-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17569+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17570 // reserved. Use of this source code is governed by a BSD-style license that 17571 // can be found in the LICENSE file. 17572 // 17573@@ -9,12 +9,13 @@ 17574 // implementations. See the translator.README.txt file in the tools directory 17575 // for more information. 17576 // 17577-// $hash=df2505130721df8255b0d5bd511fb8ef394a7d8e$ 17578+// $hash=2ce0bd2dda4afb008613b357545251c4e498dd53$ 17579 // 17580 17581 #include "libcef_dll/ctocpp/dialog_handler_ctocpp.h" 17582 #include "libcef_dll/cpptoc/browser_cpptoc.h" 17583 #include "libcef_dll/cpptoc/file_dialog_callback_cpptoc.h" 17584+#include "libcef_dll/cpptoc/select_popup_callback_cpptoc.h" 17585 #include "libcef_dll/shutdown_checker.h" 17586 #include "libcef_dll/transfer_util.h" 17587 17588@@ -72,6 +73,59 @@ bool CefDialogHandlerCToCpp::OnFileDialog( 17589 return _retval ? true : false; 17590 } 17591 17592+NO_SANITIZE("cfi-icall") 17593+void CefDialogHandlerCToCpp::OnSelectPopupMenu( 17594+ CefRefPtr<CefBrowser> browser, 17595+ const CefRect& bounds, 17596+ int item_height, 17597+ double item_font_size, 17598+ int selected_item, 17599+ const std::vector<CefSelectPopupItem>& menu_items, 17600+ bool right_aligned, 17601+ bool allow_multiple_selection, 17602+ CefRefPtr<CefSelectPopupCallback> callback) { 17603+ shutdown_checker::AssertNotShutdown(); 17604+ 17605+ cef_dialog_handler_t* _struct = GetStruct(); 17606+ if (CEF_MEMBER_MISSING(_struct, on_select_popup_menu)) 17607+ return; 17608+ 17609+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 17610+ 17611+ // Verify param: browser; type: refptr_diff 17612+ DCHECK(browser.get()); 17613+ if (!browser.get()) 17614+ return; 17615+ // Verify param: callback; type: refptr_diff 17616+ DCHECK(callback.get()); 17617+ if (!callback.get()) 17618+ return; 17619+ 17620+ // Translate param: menu_items; type: simple_vec_byref_const 17621+ const size_t menu_itemsCount = menu_items.size(); 17622+ cef_select_popup_item_t* menu_itemsList = NULL; 17623+ if (menu_itemsCount > 0) { 17624+ menu_itemsList = new cef_select_popup_item_t[menu_itemsCount]; 17625+ DCHECK(menu_itemsList); 17626+ if (menu_itemsList) { 17627+ for (size_t i = 0; i < menu_itemsCount; ++i) { 17628+ menu_itemsList[i] = menu_items[i]; 17629+ } 17630+ } 17631+ } 17632+ 17633+ // Execute 17634+ _struct->on_select_popup_menu(_struct, CefBrowserCppToC::Wrap(browser), 17635+ &bounds, item_height, item_font_size, 17636+ selected_item, menu_itemsCount, menu_itemsList, 17637+ right_aligned, allow_multiple_selection, 17638+ CefSelectPopupCallbackCppToC::Wrap(callback)); 17639+ 17640+ // Restore param:menu_items; type: simple_vec_byref_const 17641+ if (menu_itemsList) 17642+ delete[] menu_itemsList; 17643+} 17644+ 17645 // CONSTRUCTOR - Do not edit by hand. 17646 17647 CefDialogHandlerCToCpp::CefDialogHandlerCToCpp() {} 17648diff --git a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h 17649index 6ebdca55397a2..f3096ae0457b7 17650--- a/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h 17651+++ b/src/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h 17652@@ -1,4 +1,4 @@ 17653-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17654+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17655 // reserved. Use of this source code is governed by a BSD-style license that 17656 // can be found in the LICENSE file. 17657 // 17658@@ -9,7 +9,7 @@ 17659 // implementations. See the translator.README.txt file in the tools directory 17660 // for more information. 17661 // 17662-// $hash=fb268437c35b6a412dc6305ae83798d4d1db56d6$ 17663+// $hash=9d70e8e88a252b29a7157b30e487ce44b6d77404$ 17664 // 17665 17666 #ifndef CEF_LIBCEF_DLL_CTOCPP_DIALOG_HANDLER_CTOCPP_H_ 17667@@ -44,6 +44,15 @@ class CefDialogHandlerCToCpp 17668 int selected_accept_filter, 17669 bool capture, 17670 CefRefPtr<CefFileDialogCallback> callback) override; 17671+ void OnSelectPopupMenu(CefRefPtr<CefBrowser> browser, 17672+ const CefRect& bounds, 17673+ int item_height, 17674+ double item_font_size, 17675+ int selected_item, 17676+ const std::vector<CefSelectPopupItem>& menu_items, 17677+ bool right_aligned, 17678+ bool allow_multiple_selection, 17679+ CefRefPtr<CefSelectPopupCallback> callback) override; 17680 }; 17681 17682 #endif // CEF_LIBCEF_DLL_CTOCPP_DIALOG_HANDLER_CTOCPP_H_ 17683diff --git a/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc b/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc 17684index f7263738203fd..de5fa0b770e7f 17685--- a/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc 17686+++ b/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc 17687@@ -1,4 +1,4 @@ 17688-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17689+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17690 // reserved. Use of this source code is governed by a BSD-style license that 17691 // can be found in the LICENSE file. 17692 // 17693@@ -9,7 +9,7 @@ 17694 // implementations. See the translator.README.txt file in the tools directory 17695 // for more information. 17696 // 17697-// $hash=70aa25f8ab57f0c152666a730aff4247684108f9$ 17698+// $hash=aa3f8a292eeec9a65ab219958a3706b40500faa5$ 17699 // 17700 17701 #include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" 17702diff --git a/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h 17703index a0af1d99608b4..ba9843f84957a 17704--- a/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h 17705+++ b/src/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h 17706@@ -1,4 +1,4 @@ 17707-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17708+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17709 // reserved. Use of this source code is governed by a BSD-style license that 17710 // can be found in the LICENSE file. 17711 // 17712@@ -9,7 +9,7 @@ 17713 // implementations. See the translator.README.txt file in the tools directory 17714 // for more information. 17715 // 17716-// $hash=ad04d2893bd8949c1384a4dcd68c9acb0f2b967d$ 17717+// $hash=68a7aff9f01e57edaeaa53bfbbc4c6121ebb3a1b$ 17718 // 17719 17720 #ifndef CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ 17721diff --git a/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc 17722index 1281236ab0c23..8834d04bd513d 17723--- a/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc 17724+++ b/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc 17725@@ -1,4 +1,4 @@ 17726-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17727+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17728 // reserved. Use of this source code is governed by a BSD-style license that 17729 // can be found in the LICENSE file. 17730 // 17731@@ -9,7 +9,7 @@ 17732 // implementations. See the translator.README.txt file in the tools directory 17733 // for more information. 17734 // 17735-// $hash=dcdaebfe8fdc44caf9f4903321577b155b2ec959$ 17736+// $hash=c3f669584e3f282ce2eb05b3aca53e97e0548d8a$ 17737 // 17738 17739 #include "libcef_dll/ctocpp/display_handler_ctocpp.h" 17740diff --git a/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.h 17741index b40137e95cf7a..dafe883cd9bd1 17742--- a/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.h 17743+++ b/src/cef/libcef_dll/ctocpp/display_handler_ctocpp.h 17744@@ -1,4 +1,4 @@ 17745-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17746+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17747 // reserved. Use of this source code is governed by a BSD-style license that 17748 // can be found in the LICENSE file. 17749 // 17750@@ -9,7 +9,7 @@ 17751 // implementations. See the translator.README.txt file in the tools directory 17752 // for more information. 17753 // 17754-// $hash=dc1b9dda1a8f57d46d2c0049cd62a57dd5f56868$ 17755+// $hash=b242381316d4973e89fe4ae2c9f41e2ef7be2242$ 17756 // 17757 17758 #ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_ 17759diff --git a/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc b/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc 17760index 3506a6b90e091..e1bcbda6790a6 17761--- a/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc 17762+++ b/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc 17763@@ -1,4 +1,4 @@ 17764-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17765+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17766 // reserved. Use of this source code is governed by a BSD-style license that 17767 // can be found in the LICENSE file. 17768 // 17769@@ -9,7 +9,7 @@ 17770 // implementations. See the translator.README.txt file in the tools directory 17771 // for more information. 17772 // 17773-// $hash=e5f17a1d61c8211bcf16be848e8aaf48934c5b0c$ 17774+// $hash=4dddf3528abafd3fce06482308a76df0a056cd3c$ 17775 // 17776 17777 #include "libcef_dll/ctocpp/domdocument_ctocpp.h" 17778diff --git a/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.h b/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.h 17779index b795fe326dbac..29fe326f855a3 17780--- a/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.h 17781+++ b/src/cef/libcef_dll/ctocpp/domdocument_ctocpp.h 17782@@ -1,4 +1,4 @@ 17783-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17784+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17785 // reserved. Use of this source code is governed by a BSD-style license that 17786 // can be found in the LICENSE file. 17787 // 17788@@ -9,7 +9,7 @@ 17789 // implementations. See the translator.README.txt file in the tools directory 17790 // for more information. 17791 // 17792-// $hash=50b7c300f95667c483dcb19c13f274fbc352f7d1$ 17793+// $hash=987816a9b106341068d08f3cd9254c98cf77f6ad$ 17794 // 17795 17796 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ 17797diff --git a/src/cef/libcef_dll/ctocpp/domnode_ctocpp.cc b/src/cef/libcef_dll/ctocpp/domnode_ctocpp.cc 17798index 566e426bf9015..f4b1c0e27a4ee 17799--- a/src/cef/libcef_dll/ctocpp/domnode_ctocpp.cc 17800+++ b/src/cef/libcef_dll/ctocpp/domnode_ctocpp.cc 17801@@ -1,4 +1,4 @@ 17802-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17803+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17804 // reserved. Use of this source code is governed by a BSD-style license that 17805 // can be found in the LICENSE file. 17806 // 17807@@ -9,7 +9,7 @@ 17808 // implementations. See the translator.README.txt file in the tools directory 17809 // for more information. 17810 // 17811-// $hash=64846f6de30a56d2aaed093cbfd9959c7cc2f1af$ 17812+// $hash=bc1d300ce01b57d299dff3b67d54508fa827489e$ 17813 // 17814 17815 #include "libcef_dll/ctocpp/domnode_ctocpp.h" 17816diff --git a/src/cef/libcef_dll/ctocpp/domnode_ctocpp.h b/src/cef/libcef_dll/ctocpp/domnode_ctocpp.h 17817index 4678361566ab3..a16b3109a5788 17818--- a/src/cef/libcef_dll/ctocpp/domnode_ctocpp.h 17819+++ b/src/cef/libcef_dll/ctocpp/domnode_ctocpp.h 17820@@ -1,4 +1,4 @@ 17821-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17822+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17823 // reserved. Use of this source code is governed by a BSD-style license that 17824 // can be found in the LICENSE file. 17825 // 17826@@ -9,7 +9,7 @@ 17827 // implementations. See the translator.README.txt file in the tools directory 17828 // for more information. 17829 // 17830-// $hash=a824395854fca10143c0329a0f95dcfc837c6d86$ 17831+// $hash=343a5f84d09a6933f005c3915582c73c43bda406$ 17832 // 17833 17834 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ 17835diff --git a/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc 17836index 3ece62f9ed3ad..1361ee52a0b28 17837--- a/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc 17838+++ b/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc 17839@@ -1,4 +1,4 @@ 17840-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17841+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17842 // reserved. Use of this source code is governed by a BSD-style license that 17843 // can be found in the LICENSE file. 17844 // 17845@@ -9,7 +9,7 @@ 17846 // implementations. See the translator.README.txt file in the tools directory 17847 // for more information. 17848 // 17849-// $hash=c3351e11fd6ae488bd77aeba4b4c8485f24119ad$ 17850+// $hash=7379b70849292e5b7709d2ff0a4e2541869c86a5$ 17851 // 17852 17853 #include "libcef_dll/ctocpp/domvisitor_ctocpp.h" 17854diff --git a/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h b/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h 17855index b1cf8b622addf..0504b52266ade 17856--- a/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h 17857+++ b/src/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h 17858@@ -1,4 +1,4 @@ 17859-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17860+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17861 // reserved. Use of this source code is governed by a BSD-style license that 17862 // can be found in the LICENSE file. 17863 // 17864@@ -9,7 +9,7 @@ 17865 // implementations. See the translator.README.txt file in the tools directory 17866 // for more information. 17867 // 17868-// $hash=950252a2903cd57d097fb9dcd4eacf0761914e7a$ 17869+// $hash=9f8a534b9feef5b972259d972bf30ad838e1a788$ 17870 // 17871 17872 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ 17873diff --git a/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc 17874index 981d59333f344..6da1c6e272d2c 17875--- a/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc 17876+++ b/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc 17877@@ -1,4 +1,4 @@ 17878-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17879+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17880 // reserved. Use of this source code is governed by a BSD-style license that 17881 // can be found in the LICENSE file. 17882 // 17883@@ -9,7 +9,7 @@ 17884 // implementations. See the translator.README.txt file in the tools directory 17885 // for more information. 17886 // 17887-// $hash=c4e47ffd023b528b9c5b658126f4a1d9fd05cf98$ 17888+// $hash=9fc07deae728fc443a569cc273456e5c5b98af4a$ 17889 // 17890 17891 #include "libcef_dll/ctocpp/download_handler_ctocpp.h" 17892diff --git a/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.h 17893index a74b923cf19f8..71a554efaf5c9 17894--- a/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.h 17895+++ b/src/cef/libcef_dll/ctocpp/download_handler_ctocpp.h 17896@@ -1,4 +1,4 @@ 17897-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17898+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17899 // reserved. Use of this source code is governed by a BSD-style license that 17900 // can be found in the LICENSE file. 17901 // 17902@@ -9,7 +9,7 @@ 17903 // implementations. See the translator.README.txt file in the tools directory 17904 // for more information. 17905 // 17906-// $hash=172a12dd9e68b65afff9eef5b93f0e480beaf904$ 17907+// $hash=2a8f0822ec7ffa38dc5a712c913a48adc216eead$ 17908 // 17909 17910 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_ 17911diff --git a/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc 17912index 73a483afcb324..e9c3070ecfd63 17913--- a/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc 17914+++ b/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc 17915@@ -1,4 +1,4 @@ 17916-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17917+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17918 // reserved. Use of this source code is governed by a BSD-style license that 17919 // can be found in the LICENSE file. 17920 // 17921@@ -9,7 +9,7 @@ 17922 // implementations. See the translator.README.txt file in the tools directory 17923 // for more information. 17924 // 17925-// $hash=8568e306d0db860b1cd222f7c6dba344f349cb2d$ 17926+// $hash=b838fd3af2c144711044cae354ea86e336ce39a8$ 17927 // 17928 17929 #include "libcef_dll/ctocpp/download_image_callback_ctocpp.h" 17930diff --git a/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h 17931index ff4558668f291..5c7b7ccb064e2 17932--- a/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h 17933+++ b/src/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h 17934@@ -1,4 +1,4 @@ 17935-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17936+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17937 // reserved. Use of this source code is governed by a BSD-style license that 17938 // can be found in the LICENSE file. 17939 // 17940@@ -9,7 +9,7 @@ 17941 // implementations. See the translator.README.txt file in the tools directory 17942 // for more information. 17943 // 17944-// $hash=fa13abafcf97f6a71d08ca7ec67d45a71d636603$ 17945+// $hash=c281c09951a9b4f85556d0a9008b2524326254dd$ 17946 // 17947 17948 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_IMAGE_CALLBACK_CTOCPP_H_ 17949diff --git a/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc 17950index 06081331571ee..e4b2d18132cde 17951--- a/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc 17952+++ b/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc 17953@@ -1,4 +1,4 @@ 17954-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17955+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17956 // reserved. Use of this source code is governed by a BSD-style license that 17957 // can be found in the LICENSE file. 17958 // 17959@@ -9,7 +9,7 @@ 17960 // implementations. See the translator.README.txt file in the tools directory 17961 // for more information. 17962 // 17963-// $hash=092e50c318b7d1c933ffb293ff062df17bfbb736$ 17964+// $hash=c7e4d15ade6e97ad9019c493941a06a5807b3e25$ 17965 // 17966 17967 #include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" 17968diff --git a/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h 17969index 78eaf83b49c83..0f52a4120b1da 17970--- a/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h 17971+++ b/src/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h 17972@@ -1,4 +1,4 @@ 17973-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17974+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17975 // reserved. Use of this source code is governed by a BSD-style license that 17976 // can be found in the LICENSE file. 17977 // 17978@@ -9,7 +9,7 @@ 17979 // implementations. See the translator.README.txt file in the tools directory 17980 // for more information. 17981 // 17982-// $hash=dc38ebb20863207084498e6d14e8a5e8fde59eea$ 17983+// $hash=013ef6edbf734cdf4e6d00ba5b8be6c46284e2ca$ 17984 // 17985 17986 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ 17987diff --git a/src/cef/libcef_dll/ctocpp/download_item_ctocpp.cc b/src/cef/libcef_dll/ctocpp/download_item_ctocpp.cc 17988index 66f136e42f1cb..62e08e36a4ccf 17989--- a/src/cef/libcef_dll/ctocpp/download_item_ctocpp.cc 17990+++ b/src/cef/libcef_dll/ctocpp/download_item_ctocpp.cc 17991@@ -1,4 +1,4 @@ 17992-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 17993+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 17994 // reserved. Use of this source code is governed by a BSD-style license that 17995 // can be found in the LICENSE file. 17996 // 17997@@ -9,7 +9,7 @@ 17998 // implementations. See the translator.README.txt file in the tools directory 17999 // for more information. 18000 // 18001-// $hash=05c6527a7cdeb9495bca9da965956fb3006a7bdd$ 18002+// $hash=b99a604e59d6759cf17a05dbdb8e7dbf6080f43c$ 18003 // 18004 18005 #include "libcef_dll/ctocpp/download_item_ctocpp.h" 18006diff --git a/src/cef/libcef_dll/ctocpp/download_item_ctocpp.h b/src/cef/libcef_dll/ctocpp/download_item_ctocpp.h 18007index 07900a1549b1b..265c2e8a6a4d8 18008--- a/src/cef/libcef_dll/ctocpp/download_item_ctocpp.h 18009+++ b/src/cef/libcef_dll/ctocpp/download_item_ctocpp.h 18010@@ -1,4 +1,4 @@ 18011-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18012+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18013 // reserved. Use of this source code is governed by a BSD-style license that 18014 // can be found in the LICENSE file. 18015 // 18016@@ -9,7 +9,7 @@ 18017 // implementations. See the translator.README.txt file in the tools directory 18018 // for more information. 18019 // 18020-// $hash=800621bf853598aa11673f3c38e5f30858aa1ff1$ 18021+// $hash=30923eaf63fab5b36c95a1a8da4a2e229a794a86$ 18022 // 18023 18024 #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ 18025diff --git a/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc b/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc 18026index fc33a78e534a2..f6fb0e57c20c8 18027--- a/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc 18028+++ b/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc 18029@@ -1,4 +1,4 @@ 18030-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18031+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18032 // reserved. Use of this source code is governed by a BSD-style license that 18033 // can be found in the LICENSE file. 18034 // 18035@@ -9,7 +9,7 @@ 18036 // implementations. See the translator.README.txt file in the tools directory 18037 // for more information. 18038 // 18039-// $hash=57352ff85ca98fc34a0f2c58afbb1224ce1a1f09$ 18040+// $hash=a9a85999cc0792beae39e7b2796eedf435a88a1b$ 18041 // 18042 18043 #include "libcef_dll/ctocpp/drag_data_ctocpp.h" 18044diff --git a/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.h b/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.h 18045index 9b903e3b5cf52..c072f5811fec1 18046--- a/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.h 18047+++ b/src/cef/libcef_dll/ctocpp/drag_data_ctocpp.h 18048@@ -1,4 +1,4 @@ 18049-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18050+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18051 // reserved. Use of this source code is governed by a BSD-style license that 18052 // can be found in the LICENSE file. 18053 // 18054@@ -9,7 +9,7 @@ 18055 // implementations. See the translator.README.txt file in the tools directory 18056 // for more information. 18057 // 18058-// $hash=0814e8ced30cbbd7c5867464550da973395b385b$ 18059+// $hash=acf7963e32fc361fd12874da55d86e4b0f9090d1$ 18060 // 18061 18062 #ifndef CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_ 18063diff --git a/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc 18064index ccf11d8fb5187..1109f595e3ce2 18065--- a/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc 18066+++ b/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc 18067@@ -1,4 +1,4 @@ 18068-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18069+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18070 // reserved. Use of this source code is governed by a BSD-style license that 18071 // can be found in the LICENSE file. 18072 // 18073@@ -9,7 +9,7 @@ 18074 // implementations. See the translator.README.txt file in the tools directory 18075 // for more information. 18076 // 18077-// $hash=83bbaf05bb87f369d819d4202110581c3bbe60a1$ 18078+// $hash=19cc3c5f296c806db31572ecc826788ba6d8e837$ 18079 // 18080 18081 #include "libcef_dll/ctocpp/drag_handler_ctocpp.h" 18082diff --git a/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h 18083index 47488db5e3326..153cf4982e17d 18084--- a/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h 18085+++ b/src/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h 18086@@ -1,4 +1,4 @@ 18087-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18088+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18089 // reserved. Use of this source code is governed by a BSD-style license that 18090 // can be found in the LICENSE file. 18091 // 18092@@ -9,7 +9,7 @@ 18093 // implementations. See the translator.README.txt file in the tools directory 18094 // for more information. 18095 // 18096-// $hash=87c40d04da449f1144f962dff8b3e0b5a1d70db7$ 18097+// $hash=a8523e82439b30828b0774d2eff240ea215b96d6$ 18098 // 18099 18100 #ifndef CEF_LIBCEF_DLL_CTOCPP_DRAG_HANDLER_CTOCPP_H_ 18101diff --git a/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc 18102index 9489292a433c0..523c04b3f5e12 18103--- a/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc 18104+++ b/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc 18105@@ -1,4 +1,4 @@ 18106-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18107+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18108 // reserved. Use of this source code is governed by a BSD-style license that 18109 // can be found in the LICENSE file. 18110 // 18111@@ -9,7 +9,7 @@ 18112 // implementations. See the translator.README.txt file in the tools directory 18113 // for more information. 18114 // 18115-// $hash=7f660f5500f6e299ef56d598c71ade363f5581b9$ 18116+// $hash=57b26c7374b16644439f70555241a061fa08c617$ 18117 // 18118 18119 #include "libcef_dll/ctocpp/end_tracing_callback_ctocpp.h" 18120diff --git a/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h 18121index 81b82fc18031d..c915803e6a90b 18122--- a/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h 18123+++ b/src/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h 18124@@ -1,4 +1,4 @@ 18125-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18126+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18127 // reserved. Use of this source code is governed by a BSD-style license that 18128 // can be found in the LICENSE file. 18129 // 18130@@ -9,7 +9,7 @@ 18131 // implementations. See the translator.README.txt file in the tools directory 18132 // for more information. 18133 // 18134-// $hash=43c23da2432e1336afcd21889ae744bcc109e3ed$ 18135+// $hash=d798b3255a8ad2aea9d4afbe3492eaad538d8d0a$ 18136 // 18137 18138 #ifndef CEF_LIBCEF_DLL_CTOCPP_END_TRACING_CALLBACK_CTOCPP_H_ 18139diff --git a/src/cef/libcef_dll/ctocpp/extension_ctocpp.cc b/src/cef/libcef_dll/ctocpp/extension_ctocpp.cc 18140index a891cd0190f33..af426fa3b96ee 18141--- a/src/cef/libcef_dll/ctocpp/extension_ctocpp.cc 18142+++ b/src/cef/libcef_dll/ctocpp/extension_ctocpp.cc 18143@@ -1,4 +1,4 @@ 18144-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18145+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18146 // reserved. Use of this source code is governed by a BSD-style license that 18147 // can be found in the LICENSE file. 18148 // 18149@@ -9,7 +9,7 @@ 18150 // implementations. See the translator.README.txt file in the tools directory 18151 // for more information. 18152 // 18153-// $hash=de6b935b77168bd9b44f26643c510f360f8b6ebd$ 18154+// $hash=7bee2237c6ee537f23635d3fc6d1d62ca7eaf5c4$ 18155 // 18156 18157 #include "libcef_dll/ctocpp/extension_ctocpp.h" 18158diff --git a/src/cef/libcef_dll/ctocpp/extension_ctocpp.h b/src/cef/libcef_dll/ctocpp/extension_ctocpp.h 18159index 5192cba43ed57..b186810837867 18160--- a/src/cef/libcef_dll/ctocpp/extension_ctocpp.h 18161+++ b/src/cef/libcef_dll/ctocpp/extension_ctocpp.h 18162@@ -1,4 +1,4 @@ 18163-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18164+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18165 // reserved. Use of this source code is governed by a BSD-style license that 18166 // can be found in the LICENSE file. 18167 // 18168@@ -9,7 +9,7 @@ 18169 // implementations. See the translator.README.txt file in the tools directory 18170 // for more information. 18171 // 18172-// $hash=8e52bd30f4ec56b17b163c2daf4981ae55e72993$ 18173+// $hash=07a08b9dd260059e77dfb433f43686cbc5569bea$ 18174 // 18175 18176 #ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_CTOCPP_H_ 18177diff --git a/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc 18178index b6826310cf3aa..0df341099031c 18179--- a/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc 18180+++ b/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc 18181@@ -1,4 +1,4 @@ 18182-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18183+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18184 // reserved. Use of this source code is governed by a BSD-style license that 18185 // can be found in the LICENSE file. 18186 // 18187@@ -9,7 +9,7 @@ 18188 // implementations. See the translator.README.txt file in the tools directory 18189 // for more information. 18190 // 18191-// $hash=befb9e9bd438e431bb55b7c67413d9d7a7b263f2$ 18192+// $hash=f2661cdc6ea68b840409c2fcf84fb31c25e0f1b8$ 18193 // 18194 18195 #include "libcef_dll/ctocpp/extension_handler_ctocpp.h" 18196diff --git a/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h 18197index b8bd638ea6643..eab84e7d05997 18198--- a/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h 18199+++ b/src/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h 18200@@ -1,4 +1,4 @@ 18201-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18202+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18203 // reserved. Use of this source code is governed by a BSD-style license that 18204 // can be found in the LICENSE file. 18205 // 18206@@ -9,7 +9,7 @@ 18207 // implementations. See the translator.README.txt file in the tools directory 18208 // for more information. 18209 // 18210-// $hash=147ef76bff631531a075ac9a2c823d3e9f84c409$ 18211+// $hash=5e432e7dd8e10b681b96bad3694ba2d0bf79fad6$ 18212 // 18213 18214 #ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_HANDLER_CTOCPP_H_ 18215diff --git a/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc 18216index 3b90ba5a36928..229dfa874e1fa 18217--- a/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc 18218+++ b/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc 18219@@ -1,4 +1,4 @@ 18220-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18221+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18222 // reserved. Use of this source code is governed by a BSD-style license that 18223 // can be found in the LICENSE file. 18224 // 18225@@ -9,7 +9,7 @@ 18226 // implementations. See the translator.README.txt file in the tools directory 18227 // for more information. 18228 // 18229-// $hash=8fecb808fb6a84d630d1e8c5380a5ffd900b3654$ 18230+// $hash=ae1de0166e8b2c1f50d4ed5da69ae63a5bb8ebaf$ 18231 // 18232 18233 #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" 18234diff --git a/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h 18235index f18ffeabcb4f7..b9eacd6adec9c 18236--- a/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h 18237+++ b/src/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h 18238@@ -1,4 +1,4 @@ 18239-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18240+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18241 // reserved. Use of this source code is governed by a BSD-style license that 18242 // can be found in the LICENSE file. 18243 // 18244@@ -9,7 +9,7 @@ 18245 // implementations. See the translator.README.txt file in the tools directory 18246 // for more information. 18247 // 18248-// $hash=d84ac439b3372160aa3886b28b3ff81e49f05a6d$ 18249+// $hash=190953cb1d900d253258bbbaae2220512509c3a9$ 18250 // 18251 18252 #ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ 18253diff --git a/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc 18254index a12e2e089c172..47e3104366f05 18255--- a/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc 18256+++ b/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc 18257@@ -1,4 +1,4 @@ 18258-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18259+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18260 // reserved. Use of this source code is governed by a BSD-style license that 18261 // can be found in the LICENSE file. 18262 // 18263@@ -9,7 +9,7 @@ 18264 // implementations. See the translator.README.txt file in the tools directory 18265 // for more information. 18266 // 18267-// $hash=22af1e946668e89411cc87596b88c8a47880a78a$ 18268+// $hash=fbb70e4dd2af2d9cbc4377c0f62097933f26cea9$ 18269 // 18270 18271 #include "libcef_dll/ctocpp/find_handler_ctocpp.h" 18272diff --git a/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.h 18273index ce9cffbae8051..98f75b2d51185 18274--- a/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.h 18275+++ b/src/cef/libcef_dll/ctocpp/find_handler_ctocpp.h 18276@@ -1,4 +1,4 @@ 18277-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18278+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18279 // reserved. Use of this source code is governed by a BSD-style license that 18280 // can be found in the LICENSE file. 18281 // 18282@@ -9,7 +9,7 @@ 18283 // implementations. See the translator.README.txt file in the tools directory 18284 // for more information. 18285 // 18286-// $hash=d6ed1e4a341c9deecc217c49ecd52f444d18e236$ 18287+// $hash=8b86bd425ab5e9283d8fc8ac96b54740bf495cbb$ 18288 // 18289 18290 #ifndef CEF_LIBCEF_DLL_CTOCPP_FIND_HANDLER_CTOCPP_H_ 18291diff --git a/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc 18292index 42f46d1d1257f..d12ed78ef9dbd 18293--- a/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc 18294+++ b/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc 18295@@ -1,4 +1,4 @@ 18296-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18297+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18298 // reserved. Use of this source code is governed by a BSD-style license that 18299 // can be found in the LICENSE file. 18300 // 18301@@ -9,7 +9,7 @@ 18302 // implementations. See the translator.README.txt file in the tools directory 18303 // for more information. 18304 // 18305-// $hash=fe5dc43b11c24ea7a1e9a1c31846cd433a425a48$ 18306+// $hash=adf870620ee814a41457a906d12265a23cd71bc1$ 18307 // 18308 18309 #include "libcef_dll/ctocpp/focus_handler_ctocpp.h" 18310diff --git a/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h 18311index 0c31eca72d2c9..6c0f92203cfd8 18312--- a/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h 18313+++ b/src/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h 18314@@ -1,4 +1,4 @@ 18315-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18316+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18317 // reserved. Use of this source code is governed by a BSD-style license that 18318 // can be found in the LICENSE file. 18319 // 18320@@ -9,7 +9,7 @@ 18321 // implementations. See the translator.README.txt file in the tools directory 18322 // for more information. 18323 // 18324-// $hash=7a41bfc84063e89ae6a9a02ad4252b6145e06d48$ 18325+// $hash=6a454cd9846e772380a72c5429d114f73cc3c1f5$ 18326 // 18327 18328 #ifndef CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_ 18329diff --git a/src/cef/libcef_dll/ctocpp/frame_ctocpp.cc b/src/cef/libcef_dll/ctocpp/frame_ctocpp.cc 18330index 936999f892036..96c1964a67614 18331--- a/src/cef/libcef_dll/ctocpp/frame_ctocpp.cc 18332+++ b/src/cef/libcef_dll/ctocpp/frame_ctocpp.cc 18333@@ -1,4 +1,4 @@ 18334-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18335+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18336 // reserved. Use of this source code is governed by a BSD-style license that 18337 // can be found in the LICENSE file. 18338 // 18339@@ -9,7 +9,7 @@ 18340 // implementations. See the translator.README.txt file in the tools directory 18341 // for more information. 18342 // 18343-// $hash=5bfee30715aa6f371b446b195cba6e5e05f7793f$ 18344+// $hash=01a4bfc4420c23325504191dfa18a83e0e6d344f$ 18345 // 18346 18347 #include "libcef_dll/ctocpp/frame_ctocpp.h" 18348diff --git a/src/cef/libcef_dll/ctocpp/frame_ctocpp.h b/src/cef/libcef_dll/ctocpp/frame_ctocpp.h 18349index a7fd407070320..3fed19753264c 18350--- a/src/cef/libcef_dll/ctocpp/frame_ctocpp.h 18351+++ b/src/cef/libcef_dll/ctocpp/frame_ctocpp.h 18352@@ -1,4 +1,4 @@ 18353-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18354+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18355 // reserved. Use of this source code is governed by a BSD-style license that 18356 // can be found in the LICENSE file. 18357 // 18358@@ -9,7 +9,7 @@ 18359 // implementations. See the translator.README.txt file in the tools directory 18360 // for more information. 18361 // 18362-// $hash=922843bbc541ce7c7c8e1aa93e23bc7dde770d68$ 18363+// $hash=617aa71107c0089df6f4b832a7dd30c850abc171$ 18364 // 18365 18366 #ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ 18367diff --git a/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.cc 18368index 370011e23830d..965b4a5dc577c 18369--- a/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.cc 18370+++ b/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.cc 18371@@ -1,4 +1,4 @@ 18372-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18373+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18374 // reserved. Use of this source code is governed by a BSD-style license that 18375 // can be found in the LICENSE file. 18376 // 18377@@ -9,7 +9,7 @@ 18378 // implementations. See the translator.README.txt file in the tools directory 18379 // for more information. 18380 // 18381-// $hash=2c1533712df282ba8ab092a2b42e69296c4d4771$ 18382+// $hash=805b22d1d623b4b536d2aa1f71ad05cc32e23fc2$ 18383 // 18384 18385 #include "libcef_dll/ctocpp/frame_handler_ctocpp.h" 18386diff --git a/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.h 18387index d15a3f11990cd..be28fb88ae3ed 18388--- a/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.h 18389+++ b/src/cef/libcef_dll/ctocpp/frame_handler_ctocpp.h 18390@@ -1,4 +1,4 @@ 18391-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18392+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18393 // reserved. Use of this source code is governed by a BSD-style license that 18394 // can be found in the LICENSE file. 18395 // 18396@@ -9,7 +9,7 @@ 18397 // implementations. See the translator.README.txt file in the tools directory 18398 // for more information. 18399 // 18400-// $hash=caae9971af64aba87b484e5024603dd53c406df0$ 18401+// $hash=a1366f78329888eadf9121d7df819687d82a40c7$ 18402 // 18403 18404 #ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_HANDLER_CTOCPP_H_ 18405diff --git a/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc b/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc 18406index 8be91dcf1aac8..7fb2625b586f4 18407--- a/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc 18408+++ b/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc 18409@@ -1,4 +1,4 @@ 18410-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18411+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18412 // reserved. Use of this source code is governed by a BSD-style license that 18413 // can be found in the LICENSE file. 18414 // 18415@@ -9,7 +9,7 @@ 18416 // implementations. See the translator.README.txt file in the tools directory 18417 // for more information. 18418 // 18419-// $hash=3997657ceba0e011684fe481bdcc221dacd24369$ 18420+// $hash=dec8ab50f7084f8ea2bd48d74173c91134bc6d92$ 18421 // 18422 18423 #include "libcef_dll/ctocpp/geolocation_acess_ctocpp.h" 18424diff --git a/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h b/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h 18425index 0ab7994425856..ad8331787663d 18426--- a/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h 18427+++ b/src/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h 18428@@ -1,4 +1,4 @@ 18429-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18430+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18431 // reserved. Use of this source code is governed by a BSD-style license that 18432 // can be found in the LICENSE file. 18433 // 18434@@ -9,7 +9,7 @@ 18435 // implementations. See the translator.README.txt file in the tools directory 18436 // for more information. 18437 // 18438-// $hash=cfc297c4453970267ed52cecbc2469423ba4540f$ 18439+// $hash=d405020431caf6f891ba21f967b35cc9d08da93a$ 18440 // 18441 18442 #ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_ACESS_CTOCPP_H_ 18443diff --git a/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc 18444index faee8d512775d..5b0bbf37a1865 18445--- a/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc 18446+++ b/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc 18447@@ -1,4 +1,4 @@ 18448-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18449+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18450 // reserved. Use of this source code is governed by a BSD-style license that 18451 // can be found in the LICENSE file. 18452 // 18453@@ -9,7 +9,7 @@ 18454 // implementations. See the translator.README.txt file in the tools directory 18455 // for more information. 18456 // 18457-// $hash=2747a6d847a7abbc8adcde347308ff7826918884$ 18458+// $hash=de3ebaabf9a63c53433469d01241fd97197d7c60$ 18459 // 18460 18461 #include "libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h" 18462diff --git a/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h 18463index c0c5289edb963..afebabd4ca880 18464--- a/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h 18465+++ b/src/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h 18466@@ -1,4 +1,4 @@ 18467-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18468+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18469 // reserved. Use of this source code is governed by a BSD-style license that 18470 // can be found in the LICENSE file. 18471 // 18472@@ -9,7 +9,7 @@ 18473 // implementations. See the translator.README.txt file in the tools directory 18474 // for more information. 18475 // 18476-// $hash=f86929f0ec5dc6292a33e6f4d05b788e503bdad1$ 18477+// $hash=fd92d3650c1f3f04b84d9a0847631463b9e9ca2c$ 18478 // 18479 18480 #ifndef CEF_LIBCEF_DLL_CTOCPP_GET_EXTENSION_RESOURCE_CALLBACK_CTOCPP_H_ 18481diff --git a/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.cc 18482index 2954981876b3f..39ad7b6b7807d 18483--- a/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.cc 18484+++ b/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.cc 18485@@ -1,4 +1,4 @@ 18486-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18487+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18488 // reserved. Use of this source code is governed by a BSD-style license that 18489 // can be found in the LICENSE file. 18490 // 18491@@ -9,7 +9,7 @@ 18492 // implementations. See the translator.README.txt file in the tools directory 18493 // for more information. 18494 // 18495-// $hash=a8eda6ac0b338e7a41d207927a67fa2c83045449$ 18496+// $hash=d5ba12d9fa862751e9c07d8b13afb7131c45c365$ 18497 // 18498 18499 #include "libcef_dll/ctocpp/get_images_callback_ctocpp.h" 18500diff --git a/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.h 18501index 97f1d9524e978..8d2c93af6fff1 18502--- a/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.h 18503+++ b/src/cef/libcef_dll/ctocpp/get_images_callback_ctocpp.h 18504@@ -1,4 +1,4 @@ 18505-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18506+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18507 // reserved. Use of this source code is governed by a BSD-style license that 18508 // can be found in the LICENSE file. 18509 // 18510@@ -9,7 +9,7 @@ 18511 // implementations. See the translator.README.txt file in the tools directory 18512 // for more information. 18513 // 18514-// $hash=6708fab47b851dda8fd97a3d425f673186906b4c$ 18515+// $hash=5569d10c20b8f19c8907133c7b21e293ebe9a2bd$ 18516 // 18517 18518 #ifndef CEF_LIBCEF_DLL_CTOCPP_GET_IMAGES_CALLBACK_CTOCPP_H_ 18519diff --git a/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.cc 18520index 584b4d086729b..ea37e4f02f825 18521--- a/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.cc 18522+++ b/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.cc 18523@@ -1,4 +1,4 @@ 18524-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18525+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18526 // reserved. Use of this source code is governed by a BSD-style license that 18527 // can be found in the LICENSE file. 18528 // 18529@@ -9,7 +9,7 @@ 18530 // implementations. See the translator.README.txt file in the tools directory 18531 // for more information. 18532 // 18533-// $hash=070d1f0064cc25f4e3e13d9b2931a4ba1c8341d4$ 18534+// $hash=ffc3258b25dcb01dccb60e75f4d3f4b10e3224f8$ 18535 // 18536 18537 #include "libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.h" 18538diff --git a/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.h 18539index e8dc6f55ed97c..beab5ac78b35b 18540--- a/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.h 18541+++ b/src/cef/libcef_dll/ctocpp/get_origin_usage_or_quota_callback_ctocpp.h 18542@@ -1,4 +1,4 @@ 18543-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18544+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18545 // reserved. Use of this source code is governed by a BSD-style license that 18546 // can be found in the LICENSE file. 18547 // 18548@@ -9,7 +9,7 @@ 18549 // implementations. See the translator.README.txt file in the tools directory 18550 // for more information. 18551 // 18552-// $hash=128e55210f65fe29b0d2d84160fd2a9427bc6429$ 18553+// $hash=5a32e1b78e328e377d937e5f3d53afb869e153d9$ 18554 // 18555 18556 #ifndef CEF_LIBCEF_DLL_CTOCPP_GET_ORIGIN_USAGE_OR_QUOTA_CALLBACK_CTOCPP_H_ 18557diff --git a/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.cc 18558index d0240181d2a5c..c834557b5914d 18559--- a/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.cc 18560+++ b/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.cc 18561@@ -1,4 +1,4 @@ 18562-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18563+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18564 // reserved. Use of this source code is governed by a BSD-style license that 18565 // can be found in the LICENSE file. 18566 // 18567@@ -9,7 +9,7 @@ 18568 // implementations. See the translator.README.txt file in the tools directory 18569 // for more information. 18570 // 18571-// $hash=c81051ff9ec3bd7b14f89c09f00eea970ed14b14$ 18572+// $hash=42082bd4962aa5bd8556918888da73635e4b36c5$ 18573 // 18574 18575 #include "libcef_dll/ctocpp/get_origins_callback_ctocpp.h" 18576diff --git a/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.h 18577index b2edbb96bfd1d..0b85d91656698 18578--- a/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.h 18579+++ b/src/cef/libcef_dll/ctocpp/get_origins_callback_ctocpp.h 18580@@ -1,4 +1,4 @@ 18581-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18582+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18583 // reserved. Use of this source code is governed by a BSD-style license that 18584 // can be found in the LICENSE file. 18585 // 18586@@ -9,7 +9,7 @@ 18587 // implementations. See the translator.README.txt file in the tools directory 18588 // for more information. 18589 // 18590-// $hash=308fccc205e0e4ac146d6affbe48559dc1a27a5a$ 18591+// $hash=feb219add5c02bf679128a2abdf6817ba47c1b25$ 18592 // 18593 18594 #ifndef CEF_LIBCEF_DLL_CTOCPP_GET_ORIGINS_CALLBACK_CTOCPP_H_ 18595diff --git a/src/cef/libcef_dll/ctocpp/image_ctocpp.cc b/src/cef/libcef_dll/ctocpp/image_ctocpp.cc 18596index b766c79cd0f5c..ff463fbd992cf 18597--- a/src/cef/libcef_dll/ctocpp/image_ctocpp.cc 18598+++ b/src/cef/libcef_dll/ctocpp/image_ctocpp.cc 18599@@ -1,4 +1,4 @@ 18600-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18601+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18602 // reserved. Use of this source code is governed by a BSD-style license that 18603 // can be found in the LICENSE file. 18604 // 18605@@ -9,7 +9,7 @@ 18606 // implementations. See the translator.README.txt file in the tools directory 18607 // for more information. 18608 // 18609-// $hash=33aeaefa103664f5cead6898d2f957d8a9a97a92$ 18610+// $hash=a36ffa56b60291c4fb99a00413950d2315ddfc13$ 18611 // 18612 18613 #include "libcef_dll/ctocpp/image_ctocpp.h" 18614diff --git a/src/cef/libcef_dll/ctocpp/image_ctocpp.h b/src/cef/libcef_dll/ctocpp/image_ctocpp.h 18615index a234b97b6dcf3..8d635fddafb5d 18616--- a/src/cef/libcef_dll/ctocpp/image_ctocpp.h 18617+++ b/src/cef/libcef_dll/ctocpp/image_ctocpp.h 18618@@ -1,4 +1,4 @@ 18619-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18620+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18621 // reserved. Use of this source code is governed by a BSD-style license that 18622 // can be found in the LICENSE file. 18623 // 18624@@ -9,7 +9,7 @@ 18625 // implementations. See the translator.README.txt file in the tools directory 18626 // for more information. 18627 // 18628-// $hash=30ebbc8a004b2e371be3ee2bc305858c303f37fd$ 18629+// $hash=13afe421110fa07e94c1724d21302b018a71a633$ 18630 // 18631 18632 #ifndef CEF_LIBCEF_DLL_CTOCPP_IMAGE_CTOCPP_H_ 18633diff --git a/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc 18634index 7e7ca331e740d..ee92ac0261b44 18635--- a/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc 18636+++ b/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc 18637@@ -1,4 +1,4 @@ 18638-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18639+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18640 // reserved. Use of this source code is governed by a BSD-style license that 18641 // can be found in the LICENSE file. 18642 // 18643@@ -9,7 +9,7 @@ 18644 // implementations. See the translator.README.txt file in the tools directory 18645 // for more information. 18646 // 18647-// $hash=d54225cb81f976412f5924f0342241e5e1c15604$ 18648+// $hash=ec746fb1184b4ac8124e90ddcb226035a06bfeb2$ 18649 // 18650 18651 #include "libcef_dll/ctocpp/java_script_result_callback_ctocpp.h" 18652diff --git a/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h 18653index b09edef38ac80..6cb9bf41c40d3 18654--- a/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h 18655+++ b/src/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h 18656@@ -1,4 +1,4 @@ 18657-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18658+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18659 // reserved. Use of this source code is governed by a BSD-style license that 18660 // can be found in the LICENSE file. 18661 // 18662@@ -9,7 +9,7 @@ 18663 // implementations. See the translator.README.txt file in the tools directory 18664 // for more information. 18665 // 18666-// $hash=2e761fc082e89fe46754e498234c96e873d519dc$ 18667+// $hash=17a3f0d9b77b19f01a9c147f900dc30016fa9e6e$ 18668 // 18669 18670 #ifndef CEF_LIBCEF_DLL_CTOCPP_JAVA_SCRIPT_RESULT_CALLBACK_CTOCPP_H_ 18671diff --git a/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc 18672index ad5341aba0868..7f674dbf01a84 18673--- a/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc 18674+++ b/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc 18675@@ -1,4 +1,4 @@ 18676-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18677+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18678 // reserved. Use of this source code is governed by a BSD-style license that 18679 // can be found in the LICENSE file. 18680 // 18681@@ -9,7 +9,7 @@ 18682 // implementations. See the translator.README.txt file in the tools directory 18683 // for more information. 18684 // 18685-// $hash=8fa9cd400d5a9ecce87183cdbbee8673845b2228$ 18686+// $hash=a328cc485e128abc40fa08e69633f3d6be490ad0$ 18687 // 18688 18689 #include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" 18690diff --git a/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h 18691index b0a153944757e..a73df8ad32ea1 18692--- a/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h 18693+++ b/src/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h 18694@@ -1,4 +1,4 @@ 18695-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18696+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18697 // reserved. Use of this source code is governed by a BSD-style license that 18698 // can be found in the LICENSE file. 18699 // 18700@@ -9,7 +9,7 @@ 18701 // implementations. See the translator.README.txt file in the tools directory 18702 // for more information. 18703 // 18704-// $hash=8f505c768b727bd821e5d619227533b45fd6029b$ 18705+// $hash=5e91e201bc50f771d1ded89088fffcb0da8d34d7$ 18706 // 18707 18708 #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ 18709diff --git a/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc 18710index 5293e9098def4..dba10ebfc9efe 18711--- a/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc 18712+++ b/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc 18713@@ -1,4 +1,4 @@ 18714-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18715+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18716 // reserved. Use of this source code is governed by a BSD-style license that 18717 // can be found in the LICENSE file. 18718 // 18719@@ -9,7 +9,7 @@ 18720 // implementations. See the translator.README.txt file in the tools directory 18721 // for more information. 18722 // 18723-// $hash=cf3f4ea060216018445b03ed1626f0698c01839b$ 18724+// $hash=c95849f5069d934dcca81e86a11e76931582a22b$ 18725 // 18726 18727 #include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h" 18728diff --git a/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h 18729index 24f690eafad62..740330b350f62 18730--- a/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h 18731+++ b/src/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h 18732@@ -1,4 +1,4 @@ 18733-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18734+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18735 // reserved. Use of this source code is governed by a BSD-style license that 18736 // can be found in the LICENSE file. 18737 // 18738@@ -9,7 +9,7 @@ 18739 // implementations. See the translator.README.txt file in the tools directory 18740 // for more information. 18741 // 18742-// $hash=d486b4a8044df978ea21be7c6a48841ea48d7ad7$ 18743+// $hash=55b3bcb925cfaf44f79c0e03fc55878d748f55ce$ 18744 // 18745 18746 #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_ 18747diff --git a/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc 18748index c9c167cbcccea..17ab239a26d1a 18749--- a/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc 18750+++ b/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc 18751@@ -1,4 +1,4 @@ 18752-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18753+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18754 // reserved. Use of this source code is governed by a BSD-style license that 18755 // can be found in the LICENSE file. 18756 // 18757@@ -9,7 +9,7 @@ 18758 // implementations. See the translator.README.txt file in the tools directory 18759 // for more information. 18760 // 18761-// $hash=d5ba873aeb2b734e753d47420bbe10e290e8658d$ 18762+// $hash=e6cddc00cf20f1abd640865c61a70dd54dc54d95$ 18763 // 18764 18765 #include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" 18766diff --git a/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h 18767index 48818cf81570a..65c681eba30ce 18768--- a/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h 18769+++ b/src/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h 18770@@ -1,4 +1,4 @@ 18771-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18772+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18773 // reserved. Use of this source code is governed by a BSD-style license that 18774 // can be found in the LICENSE file. 18775 // 18776@@ -9,7 +9,7 @@ 18777 // implementations. See the translator.README.txt file in the tools directory 18778 // for more information. 18779 // 18780-// $hash=ab70636733b9287db1e87f11f8c73610afa35337$ 18781+// $hash=a25080ecb1a098b748d8384bc5af591ea773deff$ 18782 // 18783 18784 #ifndef CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_ 18785diff --git a/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc 18786index 3edea1aa767ae..5b9fe7e624a6d 18787--- a/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc 18788+++ b/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc 18789@@ -1,4 +1,4 @@ 18790-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18791+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18792 // reserved. Use of this source code is governed by a BSD-style license that 18793 // can be found in the LICENSE file. 18794 // 18795@@ -9,7 +9,7 @@ 18796 // implementations. See the translator.README.txt file in the tools directory 18797 // for more information. 18798 // 18799-// $hash=1c8c2d9b0eff1833a030f2e75515f7d7c60cada4$ 18800+// $hash=873c979fdd4b48e65375437e6a70a900de50840d$ 18801 // 18802 18803 #include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" 18804diff --git a/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h 18805index d38e48851fd4d..9693f44b28917 18806--- a/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h 18807+++ b/src/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h 18808@@ -1,4 +1,4 @@ 18809-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18810+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18811 // reserved. Use of this source code is governed by a BSD-style license that 18812 // can be found in the LICENSE file. 18813 // 18814@@ -9,7 +9,7 @@ 18815 // implementations. See the translator.README.txt file in the tools directory 18816 // for more information. 18817 // 18818-// $hash=bfe3eba26049a9f15b7922d979395bc7b0ac4055$ 18819+// $hash=580b424b488c3974143484a05df444e91edfca5c$ 18820 // 18821 18822 #ifndef CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_ 18823diff --git a/src/cef/libcef_dll/ctocpp/list_value_ctocpp.cc b/src/cef/libcef_dll/ctocpp/list_value_ctocpp.cc 18824index 9194d1da62ba1..7fd13d4b65fce 18825--- a/src/cef/libcef_dll/ctocpp/list_value_ctocpp.cc 18826+++ b/src/cef/libcef_dll/ctocpp/list_value_ctocpp.cc 18827@@ -1,4 +1,4 @@ 18828-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18829+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18830 // reserved. Use of this source code is governed by a BSD-style license that 18831 // can be found in the LICENSE file. 18832 // 18833@@ -9,7 +9,7 @@ 18834 // implementations. See the translator.README.txt file in the tools directory 18835 // for more information. 18836 // 18837-// $hash=93f45c1e39dc2ba72a6cb44bc3d762f3870f2ef2$ 18838+// $hash=531f5719300934d7a039855559835715de9c765a$ 18839 // 18840 18841 #include "libcef_dll/ctocpp/list_value_ctocpp.h" 18842diff --git a/src/cef/libcef_dll/ctocpp/list_value_ctocpp.h b/src/cef/libcef_dll/ctocpp/list_value_ctocpp.h 18843index 0ebd5c120dfc9..d09dfb95d8c36 18844--- a/src/cef/libcef_dll/ctocpp/list_value_ctocpp.h 18845+++ b/src/cef/libcef_dll/ctocpp/list_value_ctocpp.h 18846@@ -1,4 +1,4 @@ 18847-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18848+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18849 // reserved. Use of this source code is governed by a BSD-style license that 18850 // can be found in the LICENSE file. 18851 // 18852@@ -9,7 +9,7 @@ 18853 // implementations. See the translator.README.txt file in the tools directory 18854 // for more information. 18855 // 18856-// $hash=2c6664443a865936b74fcea903f131011736d689$ 18857+// $hash=99b478c698261aa2aaf566b283fc938aacf3b2bf$ 18858 // 18859 18860 #ifndef CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ 18861diff --git a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc 18862index 38699d565ae7c..e0bb3339e6564 18863--- a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc 18864+++ b/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc 18865@@ -1,4 +1,4 @@ 18866-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18867+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18868 // reserved. Use of this source code is governed by a BSD-style license that 18869 // can be found in the LICENSE file. 18870 // 18871@@ -9,7 +9,7 @@ 18872 // implementations. See the translator.README.txt file in the tools directory 18873 // for more information. 18874 // 18875-// $hash=6be01fd6f359ff9960cea2ec422a489673b72bd6$ 18876+// $hash=710979924c3b6f6b6f1479dd75ed0e3c6dd02126$ 18877 // 18878 18879 #include "libcef_dll/ctocpp/load_handler_ctocpp.h" 18880diff --git a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h 18881index c6795b684e589..cc7e15c185844 18882--- a/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h 18883+++ b/src/cef/libcef_dll/ctocpp/load_handler_ctocpp.h 18884@@ -1,4 +1,4 @@ 18885-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18886+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18887 // reserved. Use of this source code is governed by a BSD-style license that 18888 // can be found in the LICENSE file. 18889 // 18890@@ -9,7 +9,7 @@ 18891 // implementations. See the translator.README.txt file in the tools directory 18892 // for more information. 18893 // 18894-// $hash=1ae727d2a86654472d0312033fe4bd5df06556fe$ 18895+// $hash=12b88b0080727a6c6abf49b8ab17b8c18dc4e2f5$ 18896 // 18897 18898 #ifndef CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ 18899diff --git a/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc b/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc 18900index 7bf4664867269..ae5d52807f415 18901--- a/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc 18902+++ b/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc 18903@@ -1,4 +1,4 @@ 18904-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18905+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18906 // reserved. Use of this source code is governed by a BSD-style license that 18907 // can be found in the LICENSE file. 18908 // 18909@@ -9,7 +9,7 @@ 18910 // implementations. See the translator.README.txt file in the tools directory 18911 // for more information. 18912 // 18913-// $hash=16bf2696e26746eddb06f7c6003eec81d3fc1c23$ 18914+// $hash=042362d0195aca3ce86ceea3d2f42e34c1ad2f03$ 18915 // 18916 18917 #include "libcef_dll/ctocpp/menu_model_ctocpp.h" 18918diff --git a/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.h b/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.h 18919index edd9ef704f59f..10f461e4bdfb2 18920--- a/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.h 18921+++ b/src/cef/libcef_dll/ctocpp/menu_model_ctocpp.h 18922@@ -1,4 +1,4 @@ 18923-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18924+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18925 // reserved. Use of this source code is governed by a BSD-style license that 18926 // can be found in the LICENSE file. 18927 // 18928@@ -9,7 +9,7 @@ 18929 // implementations. See the translator.README.txt file in the tools directory 18930 // for more information. 18931 // 18932-// $hash=4cb6a46bc1c8fa0d912c04d58a07afddd250d9b9$ 18933+// $hash=f7d0cf26743b3559f4e826452f3cb2c561dd75d1$ 18934 // 18935 18936 #ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ 18937diff --git a/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc 18938index 407692062f05a..b9f47a865277e 18939--- a/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc 18940+++ b/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc 18941@@ -1,4 +1,4 @@ 18942-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18943+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18944 // reserved. Use of this source code is governed by a BSD-style license that 18945 // can be found in the LICENSE file. 18946 // 18947@@ -9,7 +9,7 @@ 18948 // implementations. See the translator.README.txt file in the tools directory 18949 // for more information. 18950 // 18951-// $hash=09421982fe76735de86b67b1f7d8828a1cc36f6e$ 18952+// $hash=9445255c84ab78ee3b9b61cbd10abe5233f0688b$ 18953 // 18954 18955 #include "libcef_dll/ctocpp/menu_model_delegate_ctocpp.h" 18956diff --git a/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h 18957index 6fc6c44150a55..7762f4e8c32b3 18958--- a/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h 18959+++ b/src/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h 18960@@ -1,4 +1,4 @@ 18961-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18962+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18963 // reserved. Use of this source code is governed by a BSD-style license that 18964 // can be found in the LICENSE file. 18965 // 18966@@ -9,7 +9,7 @@ 18967 // implementations. See the translator.README.txt file in the tools directory 18968 // for more information. 18969 // 18970-// $hash=0dcaca76119b9db970c61a30ba90d841f2fb7186$ 18971+// $hash=6ac8a9990cf50850d8f8716096094d1180215be9$ 18972 // 18973 18974 #ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_DELEGATE_CTOCPP_H_ 18975diff --git a/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc b/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc 18976index 82298bd15996a..98165391165e4 18977--- a/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc 18978+++ b/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc 18979@@ -1,4 +1,4 @@ 18980-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 18981+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 18982 // reserved. Use of this source code is governed by a BSD-style license that 18983 // can be found in the LICENSE file. 18984 // 18985@@ -9,7 +9,7 @@ 18986 // implementations. See the translator.README.txt file in the tools directory 18987 // for more information. 18988 // 18989-// $hash=2356b5283bbfa5a587b5db964b281dff6fb8233d$ 18990+// $hash=47dac2be50c91cdd5c314a6d78a64ad90fa6b1a3$ 18991 // 18992 18993 #include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" 18994diff --git a/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h b/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h 18995index 0514e7bb50365..5e5e6ab1ecdbd 18996--- a/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h 18997+++ b/src/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h 18998@@ -1,4 +1,4 @@ 18999-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19000+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19001 // reserved. Use of this source code is governed by a BSD-style license that 19002 // can be found in the LICENSE file. 19003 // 19004@@ -9,7 +9,7 @@ 19005 // implementations. See the translator.README.txt file in the tools directory 19006 // for more information. 19007 // 19008-// $hash=dd86b1cd3bb9fb67f7e7dfdee204fd752e27e410$ 19009+// $hash=a76314c5c7b7732bcc2b87df342cbdf78f36b8d6$ 19010 // 19011 19012 #ifndef CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ 19013diff --git a/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc 19014index e9f156b0bdd53..66ecd5a110459 19015--- a/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc 19016+++ b/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc 19017@@ -1,4 +1,4 @@ 19018-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19019+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19020 // reserved. Use of this source code is governed by a BSD-style license that 19021 // can be found in the LICENSE file. 19022 // 19023@@ -9,7 +9,7 @@ 19024 // implementations. See the translator.README.txt file in the tools directory 19025 // for more information. 19026 // 19027-// $hash=057910c31bf56f3bb5def469638942802300c7d8$ 19028+// $hash=606184483441192c6ede228dd014eca4baa1e2ac$ 19029 // 19030 19031 #include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h" 19032diff --git a/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h b/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h 19033index f619bfc41d302..bcaa2c93351c0 19034--- a/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h 19035+++ b/src/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h 19036@@ -1,4 +1,4 @@ 19037-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19038+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19039 // reserved. Use of this source code is governed by a BSD-style license that 19040 // can be found in the LICENSE file. 19041 // 19042@@ -9,7 +9,7 @@ 19043 // implementations. See the translator.README.txt file in the tools directory 19044 // for more information. 19045 // 19046-// $hash=478d39c2ee5c0e2dcd0e0923d47b20bc05e8a3b7$ 19047+// $hash=3dbe29abccbfa1d1cc7014630bbe312d9de42ac8$ 19048 // 19049 19050 #ifndef CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_VISITOR_CTOCPP_H_ 19051diff --git a/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc 19052index 74720e7fdc612..729223d21001d 19053--- a/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc 19054+++ b/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc 19055@@ -1,4 +1,4 @@ 19056-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19057+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19058 // reserved. Use of this source code is governed by a BSD-style license that 19059 // can be found in the LICENSE file. 19060 // 19061@@ -9,7 +9,7 @@ 19062 // implementations. See the translator.README.txt file in the tools directory 19063 // for more information. 19064 // 19065-// $hash=970ecf239bb133f5c62c372762e00ba913e492a2$ 19066+// $hash=296e7ba74dedad13612fea5dfbc09163a5b15872$ 19067 // 19068 19069 #include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h" 19070diff --git a/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h 19071index ba235369d5b27..7abf1c11c7644 19072--- a/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h 19073+++ b/src/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h 19074@@ -1,4 +1,4 @@ 19075-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19076+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19077 // reserved. Use of this source code is governed by a BSD-style license that 19078 // can be found in the LICENSE file. 19079 // 19080@@ -9,7 +9,7 @@ 19081 // implementations. See the translator.README.txt file in the tools directory 19082 // for more information. 19083 // 19084-// $hash=6ec768e5cc0ef58766105bee24c3841367995a1e$ 19085+// $hash=0387fbd8f6ad59dac67959eeded82630a2bba935$ 19086 // 19087 19088 #ifndef CEF_LIBCEF_DLL_CTOCPP_PDF_PRINT_CALLBACK_CTOCPP_H_ 19089diff --git a/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc b/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc 19090index 1b5876d57113e..89e5e16bd7371 19091--- a/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc 19092+++ b/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc 19093@@ -1,4 +1,4 @@ 19094-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19095+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19096 // reserved. Use of this source code is governed by a BSD-style license that 19097 // can be found in the LICENSE file. 19098 // 19099@@ -9,7 +9,7 @@ 19100 // implementations. See the translator.README.txt file in the tools directory 19101 // for more information. 19102 // 19103-// $hash=12f03dbc264ba05a28f5dc8273117ca6c6c74b8b$ 19104+// $hash=62fd641af7c0e8767c775f3e5d0148103822d62d$ 19105 // 19106 19107 #include "libcef_dll/ctocpp/permission_request_ctocpp.h" 19108diff --git a/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.h b/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.h 19109index 2ed4bcebcafae..d5060b5b50160 19110--- a/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.h 19111+++ b/src/cef/libcef_dll/ctocpp/permission_request_ctocpp.h 19112@@ -1,4 +1,4 @@ 19113-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19114+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19115 // reserved. Use of this source code is governed by a BSD-style license that 19116 // can be found in the LICENSE file. 19117 // 19118@@ -9,7 +9,7 @@ 19119 // implementations. See the translator.README.txt file in the tools directory 19120 // for more information. 19121 // 19122-// $hash=d3dcf1dc594597e78adcd93c64e185a6223992d1$ 19123+// $hash=8600f1096fac8d37c3506fce7d76157ae067b427$ 19124 // 19125 19126 #ifndef CEF_LIBCEF_DLL_CTOCPP_PERMISSION_REQUEST_CTOCPP_H_ 19127diff --git a/src/cef/libcef_dll/ctocpp/post_data_ctocpp.cc b/src/cef/libcef_dll/ctocpp/post_data_ctocpp.cc 19128index 123d5c364a8f0..cdf909ef85077 19129--- a/src/cef/libcef_dll/ctocpp/post_data_ctocpp.cc 19130+++ b/src/cef/libcef_dll/ctocpp/post_data_ctocpp.cc 19131@@ -1,4 +1,4 @@ 19132-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19133+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19134 // reserved. Use of this source code is governed by a BSD-style license that 19135 // can be found in the LICENSE file. 19136 // 19137@@ -9,7 +9,7 @@ 19138 // implementations. See the translator.README.txt file in the tools directory 19139 // for more information. 19140 // 19141-// $hash=7a24d4020666f0277e76e190926df2081637a174$ 19142+// $hash=16d0f97a19f6cab36f8a40bb7a5db900bc74c872$ 19143 // 19144 19145 #include "libcef_dll/ctocpp/post_data_ctocpp.h" 19146diff --git a/src/cef/libcef_dll/ctocpp/post_data_ctocpp.h b/src/cef/libcef_dll/ctocpp/post_data_ctocpp.h 19147index 068d9d84c5b82..7666035c6a12d 19148--- a/src/cef/libcef_dll/ctocpp/post_data_ctocpp.h 19149+++ b/src/cef/libcef_dll/ctocpp/post_data_ctocpp.h 19150@@ -1,4 +1,4 @@ 19151-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19152+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19153 // reserved. Use of this source code is governed by a BSD-style license that 19154 // can be found in the LICENSE file. 19155 // 19156@@ -9,7 +9,7 @@ 19157 // implementations. See the translator.README.txt file in the tools directory 19158 // for more information. 19159 // 19160-// $hash=7f744704ab0c6d50b814469b168b610f74a118d8$ 19161+// $hash=e70d58d7c779528d03b49ead50c162ebf0eb0ca7$ 19162 // 19163 19164 #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ 19165diff --git a/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc b/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc 19166index ac01ab2ad7355..0bf45f1027433 19167--- a/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc 19168+++ b/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc 19169@@ -1,4 +1,4 @@ 19170-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19171+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19172 // reserved. Use of this source code is governed by a BSD-style license that 19173 // can be found in the LICENSE file. 19174 // 19175@@ -9,7 +9,7 @@ 19176 // implementations. See the translator.README.txt file in the tools directory 19177 // for more information. 19178 // 19179-// $hash=027842b89846614ba6d0e3056db65004bc3a6b06$ 19180+// $hash=21bd5d7adae7aad41bf500eb30bfb917f33f1750$ 19181 // 19182 19183 #include "libcef_dll/ctocpp/post_data_element_ctocpp.h" 19184diff --git a/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h b/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h 19185index ac2442ccb16a5..e422be541b1a3 19186--- a/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h 19187+++ b/src/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h 19188@@ -1,4 +1,4 @@ 19189-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19190+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19191 // reserved. Use of this source code is governed by a BSD-style license that 19192 // can be found in the LICENSE file. 19193 // 19194@@ -9,7 +9,7 @@ 19195 // implementations. See the translator.README.txt file in the tools directory 19196 // for more information. 19197 // 19198-// $hash=7f8d7ce807aae88cd94eb0bf8fed88208b052dce$ 19199+// $hash=a81732545889a9d401edb7f5540e0762bb787526$ 19200 // 19201 19202 #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ 19203diff --git a/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc 19204index 27c6e0b33145c..6bd053f64753f 19205--- a/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc 19206+++ b/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc 19207@@ -1,4 +1,4 @@ 19208-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19209+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19210 // reserved. Use of this source code is governed by a BSD-style license that 19211 // can be found in the LICENSE file. 19212 // 19213@@ -9,7 +9,7 @@ 19214 // implementations. See the translator.README.txt file in the tools directory 19215 // for more information. 19216 // 19217-// $hash=2e3cda6569368540518b84119205e1e5f6e0d36b$ 19218+// $hash=a251f867872c76ea64f247d745b7eb895f24e477$ 19219 // 19220 19221 #include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" 19222diff --git a/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h 19223index ffba4100bc864..cf5e9cbe36f38 19224--- a/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h 19225+++ b/src/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h 19226@@ -1,4 +1,4 @@ 19227-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19228+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19229 // reserved. Use of this source code is governed by a BSD-style license that 19230 // can be found in the LICENSE file. 19231 // 19232@@ -9,7 +9,7 @@ 19233 // implementations. See the translator.README.txt file in the tools directory 19234 // for more information. 19235 // 19236-// $hash=7d1df66731aeda9ede696254998eb6531a5d3531$ 19237+// $hash=7c49e07c9ba8bfc8f7620952b19140828a3bf011$ 19238 // 19239 19240 #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ 19241diff --git a/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc 19242index b5f02d80bff8b..5bfb4c37d601e 19243--- a/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc 19244+++ b/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc 19245@@ -1,4 +1,4 @@ 19246-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19247+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19248 // reserved. Use of this source code is governed by a BSD-style license that 19249 // can be found in the LICENSE file. 19250 // 19251@@ -9,7 +9,7 @@ 19252 // implementations. See the translator.README.txt file in the tools directory 19253 // for more information. 19254 // 19255-// $hash=f81708853d5cb6ee2fb397f401787068b722b060$ 19256+// $hash=d1160c71777c77bffaaef2db26b53d3a4ab269b3$ 19257 // 19258 19259 #include "libcef_dll/ctocpp/print_handler_ctocpp.h" 19260diff --git a/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.h 19261index e82154e3e7c62..5e7722f26575b 19262--- a/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.h 19263+++ b/src/cef/libcef_dll/ctocpp/print_handler_ctocpp.h 19264@@ -1,4 +1,4 @@ 19265-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19266+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19267 // reserved. Use of this source code is governed by a BSD-style license that 19268 // can be found in the LICENSE file. 19269 // 19270@@ -9,7 +9,7 @@ 19271 // implementations. See the translator.README.txt file in the tools directory 19272 // for more information. 19273 // 19274-// $hash=861bf98595a13f8c42a23b5742471332c066b57a$ 19275+// $hash=b1d082ab9bea88f46372a371b68b9b4c25a96ca2$ 19276 // 19277 19278 #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_HANDLER_CTOCPP_H_ 19279diff --git a/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc 19280index 072666c9d1f8a..3069f55a35a3d 19281--- a/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc 19282+++ b/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc 19283@@ -1,4 +1,4 @@ 19284-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19285+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19286 // reserved. Use of this source code is governed by a BSD-style license that 19287 // can be found in the LICENSE file. 19288 // 19289@@ -9,7 +9,7 @@ 19290 // implementations. See the translator.README.txt file in the tools directory 19291 // for more information. 19292 // 19293-// $hash=c952b7985eb56fd18e552e4905a5563380277bac$ 19294+// $hash=a3bb609c6cbc5d38d8359a427664780c8e8a5625$ 19295 // 19296 19297 #include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" 19298diff --git a/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h 19299index 29e7d30de0968..6f7710e1bf53e 19300--- a/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h 19301+++ b/src/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h 19302@@ -1,4 +1,4 @@ 19303-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19304+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19305 // reserved. Use of this source code is governed by a BSD-style license that 19306 // can be found in the LICENSE file. 19307 // 19308@@ -9,7 +9,7 @@ 19309 // implementations. See the translator.README.txt file in the tools directory 19310 // for more information. 19311 // 19312-// $hash=6e70e242c6ffef77f0c3ceeeb5773f0b8037395e$ 19313+// $hash=6ac2e8d5475582b66e40e297b192bdbdc8acbeed$ 19314 // 19315 19316 #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ 19317diff --git a/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc b/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc 19318index 04880402b9982..ce25e243fa934 19319--- a/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc 19320+++ b/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc 19321@@ -1,4 +1,4 @@ 19322-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19323+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19324 // reserved. Use of this source code is governed by a BSD-style license that 19325 // can be found in the LICENSE file. 19326 // 19327@@ -9,7 +9,7 @@ 19328 // implementations. See the translator.README.txt file in the tools directory 19329 // for more information. 19330 // 19331-// $hash=70eeeda85eb67d546066854051f2f921fadcca18$ 19332+// $hash=953bf2909c532598f70a4f7ad09c16d774dad5f8$ 19333 // 19334 19335 #include "libcef_dll/ctocpp/print_settings_ctocpp.h" 19336diff --git a/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.h b/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.h 19337index 5ce656192a282..3c23fc18fd3be 19338--- a/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.h 19339+++ b/src/cef/libcef_dll/ctocpp/print_settings_ctocpp.h 19340@@ -1,4 +1,4 @@ 19341-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19342+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19343 // reserved. Use of this source code is governed by a BSD-style license that 19344 // can be found in the LICENSE file. 19345 // 19346@@ -9,7 +9,7 @@ 19347 // implementations. See the translator.README.txt file in the tools directory 19348 // for more information. 19349 // 19350-// $hash=e74e75adf68001ef29e441fa1bbac27e3aa5c3c1$ 19351+// $hash=75238f577e768438cead970fa7362e4b04856894$ 19352 // 19353 19354 #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_SETTINGS_CTOCPP_H_ 19355diff --git a/src/cef/libcef_dll/ctocpp/process_message_ctocpp.cc b/src/cef/libcef_dll/ctocpp/process_message_ctocpp.cc 19356index afa319731a6c6..3e3aa68804d74 19357--- a/src/cef/libcef_dll/ctocpp/process_message_ctocpp.cc 19358+++ b/src/cef/libcef_dll/ctocpp/process_message_ctocpp.cc 19359@@ -1,4 +1,4 @@ 19360-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19361+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19362 // reserved. Use of this source code is governed by a BSD-style license that 19363 // can be found in the LICENSE file. 19364 // 19365@@ -9,7 +9,7 @@ 19366 // implementations. See the translator.README.txt file in the tools directory 19367 // for more information. 19368 // 19369-// $hash=7ab779c6c98a1bd2385f14d514304a28ef58717f$ 19370+// $hash=c68e571b03dfbb3e50a989f5e8abde1fe21837e2$ 19371 // 19372 19373 #include "libcef_dll/ctocpp/process_message_ctocpp.h" 19374diff --git a/src/cef/libcef_dll/ctocpp/process_message_ctocpp.h b/src/cef/libcef_dll/ctocpp/process_message_ctocpp.h 19375index 1b786f5b2ce1e..db214ff09789a 19376--- a/src/cef/libcef_dll/ctocpp/process_message_ctocpp.h 19377+++ b/src/cef/libcef_dll/ctocpp/process_message_ctocpp.h 19378@@ -1,4 +1,4 @@ 19379-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19380+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19381 // reserved. Use of this source code is governed by a BSD-style license that 19382 // can be found in the LICENSE file. 19383 // 19384@@ -9,7 +9,7 @@ 19385 // implementations. See the translator.README.txt file in the tools directory 19386 // for more information. 19387 // 19388-// $hash=39bf2321370b32cf02bf502529568e935b303550$ 19389+// $hash=ce134ef72dcd3df8303e202db7489cc2920a3ad2$ 19390 // 19391 19392 #ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ 19393diff --git a/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc 19394index 858a1cc301c06..e05dfadd698c0 19395--- a/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc 19396+++ b/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc 19397@@ -1,4 +1,4 @@ 19398-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19399+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19400 // reserved. Use of this source code is governed by a BSD-style license that 19401 // can be found in the LICENSE file. 19402 // 19403@@ -9,7 +9,7 @@ 19404 // implementations. See the translator.README.txt file in the tools directory 19405 // for more information. 19406 // 19407-// $hash=0332caff5ce6230d2cb2d7663fc0bbfac8e45069$ 19408+// $hash=a0abf42da8392486549644489052218f494ae8dd$ 19409 // 19410 19411 #include "libcef_dll/ctocpp/read_handler_ctocpp.h" 19412diff --git a/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.h 19413index a1b88e03fb474..546462a4dcf88 19414--- a/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.h 19415+++ b/src/cef/libcef_dll/ctocpp/read_handler_ctocpp.h 19416@@ -1,4 +1,4 @@ 19417-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19418+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19419 // reserved. Use of this source code is governed by a BSD-style license that 19420 // can be found in the LICENSE file. 19421 // 19422@@ -9,7 +9,7 @@ 19423 // implementations. See the translator.README.txt file in the tools directory 19424 // for more information. 19425 // 19426-// $hash=f3d43ae771f8e17084fd9397fd4e2bef9471ea73$ 19427+// $hash=d4b05ef2f8edd18da8b5ed9c5d4afe8162f81069$ 19428 // 19429 19430 #ifndef CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_ 19431diff --git a/src/cef/libcef_dll/ctocpp/registration_ctocpp.cc b/src/cef/libcef_dll/ctocpp/registration_ctocpp.cc 19432index fad182ef7bc54..a0b5a00b4f57f 19433--- a/src/cef/libcef_dll/ctocpp/registration_ctocpp.cc 19434+++ b/src/cef/libcef_dll/ctocpp/registration_ctocpp.cc 19435@@ -1,4 +1,4 @@ 19436-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19437+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19438 // reserved. Use of this source code is governed by a BSD-style license that 19439 // can be found in the LICENSE file. 19440 // 19441@@ -9,7 +9,7 @@ 19442 // implementations. See the translator.README.txt file in the tools directory 19443 // for more information. 19444 // 19445-// $hash=36f275457b15025ac7b979eca3179cd127f45ffb$ 19446+// $hash=e1eade4ceaefc7079366e8b0d29d499590273e8c$ 19447 // 19448 19449 #include "libcef_dll/ctocpp/registration_ctocpp.h" 19450diff --git a/src/cef/libcef_dll/ctocpp/registration_ctocpp.h b/src/cef/libcef_dll/ctocpp/registration_ctocpp.h 19451index 00c48e0213577..b60a76fd07dea 19452--- a/src/cef/libcef_dll/ctocpp/registration_ctocpp.h 19453+++ b/src/cef/libcef_dll/ctocpp/registration_ctocpp.h 19454@@ -1,4 +1,4 @@ 19455-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19456+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19457 // reserved. Use of this source code is governed by a BSD-style license that 19458 // can be found in the LICENSE file. 19459 // 19460@@ -9,7 +9,7 @@ 19461 // implementations. See the translator.README.txt file in the tools directory 19462 // for more information. 19463 // 19464-// $hash=84ca9a25ae345642994cc1b44cd71f90e7406f19$ 19465+// $hash=8b9f37f2e0d395e737bc158d7d4bfb5f5e85e5c4$ 19466 // 19467 19468 #ifndef CEF_LIBCEF_DLL_CTOCPP_REGISTRATION_CTOCPP_H_ 19469diff --git a/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc 19470index 0f7259200dd2d..52053ab91a14c 19471--- a/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc 19472+++ b/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc 19473@@ -1,4 +1,4 @@ 19474-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19475+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19476 // reserved. Use of this source code is governed by a BSD-style license that 19477 // can be found in the LICENSE file. 19478 // 19479@@ -9,7 +9,7 @@ 19480 // implementations. See the translator.README.txt file in the tools directory 19481 // for more information. 19482 // 19483-// $hash=4542e0e52791a8d283c997922779ab33d40ad54c$ 19484+// $hash=f2f817e11a4ff708bf3e1be68b75527681387d39$ 19485 // 19486 19487 #include "libcef_dll/ctocpp/render_handler_ctocpp.h" 19488diff --git a/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.h 19489index 66d289eea55e9..4b830fb9b0bb6 19490--- a/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.h 19491+++ b/src/cef/libcef_dll/ctocpp/render_handler_ctocpp.h 19492@@ -1,4 +1,4 @@ 19493-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19494+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19495 // reserved. Use of this source code is governed by a BSD-style license that 19496 // can be found in the LICENSE file. 19497 // 19498@@ -9,7 +9,7 @@ 19499 // implementations. See the translator.README.txt file in the tools directory 19500 // for more information. 19501 // 19502-// $hash=f70633e6b53acb79709008ad6aaa692c77f7d136$ 19503+// $hash=db2cc3ecd0fa1658ae8ce19b1347175a1902daec$ 19504 // 19505 19506 #ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_ 19507diff --git a/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc 19508index c5c5cc3b2649c..af212bedabe0b 19509--- a/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc 19510+++ b/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc 19511@@ -1,4 +1,4 @@ 19512-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19513+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19514 // reserved. Use of this source code is governed by a BSD-style license that 19515 // can be found in the LICENSE file. 19516 // 19517@@ -9,7 +9,7 @@ 19518 // implementations. See the translator.README.txt file in the tools directory 19519 // for more information. 19520 // 19521-// $hash=a75829d0f47e772086a586f213cfdfe54ff5554c$ 19522+// $hash=7e1d2051125a7c9845153bb1ed978e92c00d101b$ 19523 // 19524 19525 #include "libcef_dll/ctocpp/render_process_handler_ctocpp.h" 19526diff --git a/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h 19527index b587be7aa25d2..dcf49a67e967b 19528--- a/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h 19529+++ b/src/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h 19530@@ -1,4 +1,4 @@ 19531-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19532+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19533 // reserved. Use of this source code is governed by a BSD-style license that 19534 // can be found in the LICENSE file. 19535 // 19536@@ -9,7 +9,7 @@ 19537 // implementations. See the translator.README.txt file in the tools directory 19538 // for more information. 19539 // 19540-// $hash=c87a2a5637615d6b7994f80cef17651c73cdb8e2$ 19541+// $hash=1e5030658a4775df8e1eb8bbd54c43cdacf4572a$ 19542 // 19543 19544 #ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_ 19545diff --git a/src/cef/libcef_dll/ctocpp/request_context_ctocpp.cc b/src/cef/libcef_dll/ctocpp/request_context_ctocpp.cc 19546index 50855c12ec282..579120bf14025 19547--- a/src/cef/libcef_dll/ctocpp/request_context_ctocpp.cc 19548+++ b/src/cef/libcef_dll/ctocpp/request_context_ctocpp.cc 19549@@ -1,4 +1,4 @@ 19550-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19551+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19552 // reserved. Use of this source code is governed by a BSD-style license that 19553 // can be found in the LICENSE file. 19554 // 19555@@ -9,7 +9,7 @@ 19556 // implementations. See the translator.README.txt file in the tools directory 19557 // for more information. 19558 // 19559-// $hash=30c4985c5d42f2b4409c2650ded5265209f210f4$ 19560+// $hash=dc0625b92b6258aa5bad4b5407431a7fff11124b$ 19561 // 19562 19563 #include "libcef_dll/ctocpp/request_context_ctocpp.h" 19564@@ -22,7 +22,6 @@ 19565 #include "libcef_dll/ctocpp/data_base_ctocpp.h" 19566 #include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" 19567 #include "libcef_dll/ctocpp/extension_ctocpp.h" 19568-#include "libcef_dll/ctocpp/media_router_ctocpp.h" 19569 #include "libcef_dll/ctocpp/value_ctocpp.h" 19570 #include "libcef_dll/ctocpp/web_storage_ctocpp.h" 19571 #include "libcef_dll/transfer_util.h" 19572@@ -566,25 +565,6 @@ CefRefPtr<CefExtension> CefRequestContextCToCpp::GetExtension( 19573 return CefExtensionCToCpp::Wrap(_retval); 19574 } 19575 19576-NO_SANITIZE("cfi-icall") 19577-CefRefPtr<CefMediaRouter> CefRequestContextCToCpp::GetMediaRouter( 19578- CefRefPtr<CefCompletionCallback> callback) { 19579- cef_request_context_t* _struct = GetStruct(); 19580- if (CEF_MEMBER_MISSING(_struct, get_media_router)) 19581- return nullptr; 19582- 19583- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 19584- 19585- // Unverified params: callback 19586- 19587- // Execute 19588- cef_media_router_t* _retval = _struct->get_media_router( 19589- _struct, CefCompletionCallbackCppToC::Wrap(callback)); 19590- 19591- // Return type: refptr_same 19592- return CefMediaRouterCToCpp::Wrap(_retval); 19593-} 19594- 19595 // CONSTRUCTOR - Do not edit by hand. 19596 19597 CefRequestContextCToCpp::CefRequestContextCToCpp() {} 19598diff --git a/src/cef/libcef_dll/ctocpp/request_context_ctocpp.h b/src/cef/libcef_dll/ctocpp/request_context_ctocpp.h 19599index a4b3680ddd315..bc46f069c3a57 19600--- a/src/cef/libcef_dll/ctocpp/request_context_ctocpp.h 19601+++ b/src/cef/libcef_dll/ctocpp/request_context_ctocpp.h 19602@@ -1,4 +1,4 @@ 19603-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19604+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19605 // reserved. Use of this source code is governed by a BSD-style license that 19606 // can be found in the LICENSE file. 19607 // 19608@@ -9,7 +9,7 @@ 19609 // implementations. See the translator.README.txt file in the tools directory 19610 // for more information. 19611 // 19612-// $hash=caa6b1e4b3ff4716bb47e181b96c9483342b28de$ 19613+// $hash=178710b8193986502c91eff7bbe6cbfe0e158055$ 19614 // 19615 19616 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 19617@@ -79,8 +79,6 @@ class CefRequestContextCToCpp 19618 bool HasExtension(const CefString& extension_id) override; 19619 bool GetExtensions(std::vector<CefString>& extension_ids) override; 19620 CefRefPtr<CefExtension> GetExtension(const CefString& extension_id) override; 19621- CefRefPtr<CefMediaRouter> GetMediaRouter( 19622- CefRefPtr<CefCompletionCallback> callback) override; 19623 }; 19624 19625 #endif // CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ 19626diff --git a/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc 19627index fd2bde57aad07..d4ff6e78f085a 19628--- a/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc 19629+++ b/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc 19630@@ -1,4 +1,4 @@ 19631-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19632+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19633 // reserved. Use of this source code is governed by a BSD-style license that 19634 // can be found in the LICENSE file. 19635 // 19636@@ -9,7 +9,7 @@ 19637 // implementations. See the translator.README.txt file in the tools directory 19638 // for more information. 19639 // 19640-// $hash=a57c9c762ed21459113a931ad31387aa1ab2c441$ 19641+// $hash=8a94f1c67a481d85041012d944a85e9a1bcce7c8$ 19642 // 19643 19644 #include "libcef_dll/ctocpp/request_context_handler_ctocpp.h" 19645@@ -41,15 +41,14 @@ void CefRequestContextHandlerCToCpp::OnRequestContextInitialized( 19646 } 19647 19648 NO_SANITIZE("cfi-icall") 19649-CefRefPtr<CefResourceRequestHandler> 19650-CefRequestContextHandlerCToCpp::GetResourceRequestHandler( 19651- CefRefPtr<CefBrowser> browser, 19652- CefRefPtr<CefFrame> frame, 19653- CefRefPtr<CefRequest> request, 19654- bool is_navigation, 19655- bool is_download, 19656- const CefString& request_initiator, 19657- bool& disable_default_handling) { 19658+CefRefPtr<CefResourceRequestHandler> CefRequestContextHandlerCToCpp:: 19659+ GetResourceRequestHandler(CefRefPtr<CefBrowser> browser, 19660+ CefRefPtr<CefFrame> frame, 19661+ CefRefPtr<CefRequest> request, 19662+ bool is_navigation, 19663+ bool is_download, 19664+ const CefString& request_initiator, 19665+ bool& disable_default_handling) { 19666 cef_request_context_handler_t* _struct = GetStruct(); 19667 if (CEF_MEMBER_MISSING(_struct, get_resource_request_handler)) 19668 return nullptr; 19669diff --git a/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h 19670index aec6839cae6b5..004f130ab8a39 19671--- a/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h 19672+++ b/src/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h 19673@@ -1,4 +1,4 @@ 19674-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19675+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19676 // reserved. Use of this source code is governed by a BSD-style license that 19677 // can be found in the LICENSE file. 19678 // 19679@@ -9,7 +9,7 @@ 19680 // implementations. See the translator.README.txt file in the tools directory 19681 // for more information. 19682 // 19683-// $hash=f1c0285ef66144b395f364bf1e6d211634028df7$ 19684+// $hash=8f4c9ab7910a1497890d9bb3bc7aef80e23b7306$ 19685 // 19686 19687 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_HANDLER_CTOCPP_H_ 19688diff --git a/src/cef/libcef_dll/ctocpp/request_ctocpp.cc b/src/cef/libcef_dll/ctocpp/request_ctocpp.cc 19689index 5626e4c25d07c..85b7fb9ceabbe 19690--- a/src/cef/libcef_dll/ctocpp/request_ctocpp.cc 19691+++ b/src/cef/libcef_dll/ctocpp/request_ctocpp.cc 19692@@ -1,4 +1,4 @@ 19693-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19694+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19695 // reserved. Use of this source code is governed by a BSD-style license that 19696 // can be found in the LICENSE file. 19697 // 19698@@ -9,7 +9,7 @@ 19699 // implementations. See the translator.README.txt file in the tools directory 19700 // for more information. 19701 // 19702-// $hash=b1dd4486a797ac139f453e02e3a49c74b7568ca8$ 19703+// $hash=0cd351db644cd18b1cde6adf5355d2ceff949827$ 19704 // 19705 19706 #include "libcef_dll/ctocpp/request_ctocpp.h" 19707diff --git a/src/cef/libcef_dll/ctocpp/request_ctocpp.h b/src/cef/libcef_dll/ctocpp/request_ctocpp.h 19708index ec852c0757a6d..7b3b665425029 19709--- a/src/cef/libcef_dll/ctocpp/request_ctocpp.h 19710+++ b/src/cef/libcef_dll/ctocpp/request_ctocpp.h 19711@@ -1,4 +1,4 @@ 19712-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19713+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19714 // reserved. Use of this source code is governed by a BSD-style license that 19715 // can be found in the LICENSE file. 19716 // 19717@@ -9,7 +9,7 @@ 19718 // implementations. See the translator.README.txt file in the tools directory 19719 // for more information. 19720 // 19721-// $hash=6a1638068718eb98ce3311395809c7da4c9f7422$ 19722+// $hash=7e87acb36c494058615248f36c7536368d3d5fb5$ 19723 // 19724 19725 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ 19726diff --git a/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc 19727index 62b1ce741dc2b..8dee0dc3edec7 19728--- a/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc 19729+++ b/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc 19730@@ -1,4 +1,4 @@ 19731-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19732+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19733 // reserved. Use of this source code is governed by a BSD-style license that 19734 // can be found in the LICENSE file. 19735 // 19736@@ -9,7 +9,7 @@ 19737 // implementations. See the translator.README.txt file in the tools directory 19738 // for more information. 19739 // 19740-// $hash=1622488c5f5a264c0672564c1862e3d64b87e8e8$ 19741+// $hash=f65a730888f266775539eaa278925d619b5a4be2$ 19742 // 19743 19744 #include "libcef_dll/ctocpp/request_handler_ctocpp.h" 19745diff --git a/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.h 19746index 75aeadbcda6ee..6c1eb88effee5 19747--- a/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.h 19748+++ b/src/cef/libcef_dll/ctocpp/request_handler_ctocpp.h 19749@@ -1,4 +1,4 @@ 19750-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19751+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19752 // reserved. Use of this source code is governed by a BSD-style license that 19753 // can be found in the LICENSE file. 19754 // 19755@@ -9,7 +9,7 @@ 19756 // implementations. See the translator.README.txt file in the tools directory 19757 // for more information. 19758 // 19759-// $hash=da31c462d342652746056a6a1013bcf5f4f5155c$ 19760+// $hash=e407bf6537c825d8fe5e340aa3e29b61f78574ae$ 19761 // 19762 19763 #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_ 19764diff --git a/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc 19765index d348c199a617a..fe697c32c50fe 19766--- a/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc 19767+++ b/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc 19768@@ -1,4 +1,4 @@ 19769-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19770+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19771 // reserved. Use of this source code is governed by a BSD-style license that 19772 // can be found in the LICENSE file. 19773 // 19774@@ -9,7 +9,7 @@ 19775 // implementations. See the translator.README.txt file in the tools directory 19776 // for more information. 19777 // 19778-// $hash=c71d6fd8b0ee493102fdae90612f15b01e4a9f6b$ 19779+// $hash=e8659cb8919878e3ad14e22b9c30b61eae0fe71d$ 19780 // 19781 19782 #include "libcef_dll/ctocpp/resolve_callback_ctocpp.h" 19783diff --git a/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h 19784index b1f00880bc8a2..f9e115e76f528 19785--- a/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h 19786+++ b/src/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h 19787@@ -1,4 +1,4 @@ 19788-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19789+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19790 // reserved. Use of this source code is governed by a BSD-style license that 19791 // can be found in the LICENSE file. 19792 // 19793@@ -9,7 +9,7 @@ 19794 // implementations. See the translator.README.txt file in the tools directory 19795 // for more information. 19796 // 19797-// $hash=493826dcfb1c8e1b46489225a74332552d591d63$ 19798+// $hash=648f3d66272798ab00f7a97d33126aef193d5fa5$ 19799 // 19800 19801 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOLVE_CALLBACK_CTOCPP_H_ 19802diff --git a/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc 19803index 66bc65cc316a9..98cc508a1a452 19804--- a/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc 19805+++ b/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc 19806@@ -1,4 +1,4 @@ 19807-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19808+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19809 // reserved. Use of this source code is governed by a BSD-style license that 19810 // can be found in the LICENSE file. 19811 // 19812@@ -9,7 +9,7 @@ 19813 // implementations. See the translator.README.txt file in the tools directory 19814 // for more information. 19815 // 19816-// $hash=a62aa669321b0f86ea3508ce31ea5b1a0bc3f9b5$ 19817+// $hash=8ac944f0c572916a56506165359595f4c607a66c$ 19818 // 19819 19820 #include "libcef_dll/ctocpp/resource_bundle_ctocpp.h" 19821diff --git a/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h 19822index 08d8f47fc8a7b..9d0444e6cea3a 19823--- a/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h 19824+++ b/src/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h 19825@@ -1,4 +1,4 @@ 19826-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19827+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19828 // reserved. Use of this source code is governed by a BSD-style license that 19829 // can be found in the LICENSE file. 19830 // 19831@@ -9,7 +9,7 @@ 19832 // implementations. See the translator.README.txt file in the tools directory 19833 // for more information. 19834 // 19835-// $hash=faa11d38d989eb250f28646485cd2f0d38438807$ 19836+// $hash=e18e48353500f27c27160812032cadc398fe00f9$ 19837 // 19838 19839 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_ 19840diff --git a/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc 19841index 722f909420153..e5d1de8a5b83b 19842--- a/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc 19843+++ b/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc 19844@@ -1,4 +1,4 @@ 19845-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19846+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19847 // reserved. Use of this source code is governed by a BSD-style license that 19848 // can be found in the LICENSE file. 19849 // 19850@@ -9,7 +9,7 @@ 19851 // implementations. See the translator.README.txt file in the tools directory 19852 // for more information. 19853 // 19854-// $hash=12556834893a7ae50b8f8bef2b71915fa1a141ca$ 19855+// $hash=dd0ca54416131ada6010e1e578eaff359488f11a$ 19856 // 19857 19858 #include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h" 19859diff --git a/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h 19860index 354a15e0781d3..0b427b1fa6b9e 19861--- a/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h 19862+++ b/src/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h 19863@@ -1,4 +1,4 @@ 19864-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19865+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19866 // reserved. Use of this source code is governed by a BSD-style license that 19867 // can be found in the LICENSE file. 19868 // 19869@@ -9,7 +9,7 @@ 19870 // implementations. See the translator.README.txt file in the tools directory 19871 // for more information. 19872 // 19873-// $hash=ba179fe7fc169637ab6f1727351a81952c82826d$ 19874+// $hash=52b1821c0ed82e859eddbb113d4a73ba2b178548$ 19875 // 19876 19877 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_ 19878diff --git a/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc 19879index 4396a57db1abc..93baa9b22cf23 19880--- a/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc 19881+++ b/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc 19882@@ -1,4 +1,4 @@ 19883-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19884+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19885 // reserved. Use of this source code is governed by a BSD-style license that 19886 // can be found in the LICENSE file. 19887 // 19888@@ -9,7 +9,7 @@ 19889 // implementations. See the translator.README.txt file in the tools directory 19890 // for more information. 19891 // 19892-// $hash=16d3a6bd2555917b295d7dbb3ccd95ccfc35b111$ 19893+// $hash=8641dd9a90013088eb4840c691effe87c7a38348$ 19894 // 19895 19896 #include "libcef_dll/ctocpp/resource_handler_ctocpp.h" 19897diff --git a/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h 19898index ae74e58fd3106..da05687c859bb 19899--- a/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h 19900+++ b/src/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h 19901@@ -1,4 +1,4 @@ 19902-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19903+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19904 // reserved. Use of this source code is governed by a BSD-style license that 19905 // can be found in the LICENSE file. 19906 // 19907@@ -9,7 +9,7 @@ 19908 // implementations. See the translator.README.txt file in the tools directory 19909 // for more information. 19910 // 19911-// $hash=2b60744909728ffbff2e846438bf122a61fec5c7$ 19912+// $hash=8cf5fea5fc1d33f8268a4608417a75ef6ee9bf51$ 19913 // 19914 19915 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_ 19916diff --git a/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc 19917index 1e9523ef77cdd..80ba66ece67a4 19918--- a/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc 19919+++ b/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc 19920@@ -1,4 +1,4 @@ 19921-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19922+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19923 // reserved. Use of this source code is governed by a BSD-style license that 19924 // can be found in the LICENSE file. 19925 // 19926@@ -9,7 +9,7 @@ 19927 // implementations. See the translator.README.txt file in the tools directory 19928 // for more information. 19929 // 19930-// $hash=c251aa59688ffe5c12d2ec3c8a4a896d016e86a0$ 19931+// $hash=4f01fc764e74bb4a40a53b43ddc4e4857e51e4e2$ 19932 // 19933 19934 #include "libcef_dll/ctocpp/resource_read_callback_ctocpp.h" 19935diff --git a/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h 19936index 4a304a20b054c..37b79c96656b9 19937--- a/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h 19938+++ b/src/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h 19939@@ -1,4 +1,4 @@ 19940-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19941+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19942 // reserved. Use of this source code is governed by a BSD-style license that 19943 // can be found in the LICENSE file. 19944 // 19945@@ -9,7 +9,7 @@ 19946 // implementations. See the translator.README.txt file in the tools directory 19947 // for more information. 19948 // 19949-// $hash=b655936b8ea2584164546d261263876bf9d3f0ac$ 19950+// $hash=aeb2eaecc30bb2498b709af0ec45dd6b5dc9b392$ 19951 // 19952 19953 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_READ_CALLBACK_CTOCPP_H_ 19954diff --git a/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc 19955index 1d8cbac585eac..1a5e9edc413b3 19956--- a/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc 19957+++ b/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc 19958@@ -1,4 +1,4 @@ 19959-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 19960+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 19961 // reserved. Use of this source code is governed by a BSD-style license that 19962 // can be found in the LICENSE file. 19963 // 19964@@ -9,7 +9,7 @@ 19965 // implementations. See the translator.README.txt file in the tools directory 19966 // for more information. 19967 // 19968-// $hash=76e8ba6d6c7860c2a1b630dd632f5c647391f564$ 19969+// $hash=7a1e7b377527ff331e4950f3f52c85f2a341517d$ 19970 // 19971 19972 #include "libcef_dll/ctocpp/resource_request_handler_ctocpp.h" 19973@@ -25,11 +25,10 @@ 19974 // VIRTUAL METHODS - Body may be edited by hand. 19975 19976 NO_SANITIZE("cfi-icall") 19977-CefRefPtr<CefCookieAccessFilter> 19978-CefResourceRequestHandlerCToCpp::GetCookieAccessFilter( 19979- CefRefPtr<CefBrowser> browser, 19980- CefRefPtr<CefFrame> frame, 19981- CefRefPtr<CefRequest> request) { 19982+CefRefPtr<CefCookieAccessFilter> CefResourceRequestHandlerCToCpp:: 19983+ GetCookieAccessFilter(CefRefPtr<CefBrowser> browser, 19984+ CefRefPtr<CefFrame> frame, 19985+ CefRefPtr<CefRequest> request) { 19986 cef_resource_request_handler_t* _struct = GetStruct(); 19987 if (CEF_MEMBER_MISSING(_struct, get_cookie_access_filter)) 19988 return nullptr; 19989@@ -53,11 +52,11 @@ CefResourceRequestHandlerCToCpp::GetCookieAccessFilter( 19990 19991 NO_SANITIZE("cfi-icall") 19992 CefResourceRequestHandler::ReturnValue 19993-CefResourceRequestHandlerCToCpp::OnBeforeResourceLoad( 19994- CefRefPtr<CefBrowser> browser, 19995- CefRefPtr<CefFrame> frame, 19996- CefRefPtr<CefRequest> request, 19997- CefRefPtr<CefCallback> callback) { 19998+ CefResourceRequestHandlerCToCpp::OnBeforeResourceLoad( 19999+ CefRefPtr<CefBrowser> browser, 20000+ CefRefPtr<CefFrame> frame, 20001+ CefRefPtr<CefRequest> request, 20002+ CefRefPtr<CefCallback> callback) { 20003 cef_resource_request_handler_t* _struct = GetStruct(); 20004 if (CEF_MEMBER_MISSING(_struct, on_before_resource_load)) 20005 return RV_CONTINUE; 20006@@ -84,11 +83,10 @@ CefResourceRequestHandlerCToCpp::OnBeforeResourceLoad( 20007 } 20008 20009 NO_SANITIZE("cfi-icall") 20010-CefRefPtr<CefResourceHandler> 20011-CefResourceRequestHandlerCToCpp::GetResourceHandler( 20012- CefRefPtr<CefBrowser> browser, 20013- CefRefPtr<CefFrame> frame, 20014- CefRefPtr<CefRequest> request) { 20015+CefRefPtr<CefResourceHandler> CefResourceRequestHandlerCToCpp:: 20016+ GetResourceHandler(CefRefPtr<CefBrowser> browser, 20017+ CefRefPtr<CefFrame> frame, 20018+ CefRefPtr<CefRequest> request) { 20019 cef_resource_request_handler_t* _struct = GetStruct(); 20020 if (CEF_MEMBER_MISSING(_struct, get_resource_handler)) 20021 return nullptr; 20022@@ -172,12 +170,11 @@ bool CefResourceRequestHandlerCToCpp::OnResourceResponse( 20023 } 20024 20025 NO_SANITIZE("cfi-icall") 20026-CefRefPtr<CefResponseFilter> 20027-CefResourceRequestHandlerCToCpp::GetResourceResponseFilter( 20028- CefRefPtr<CefBrowser> browser, 20029- CefRefPtr<CefFrame> frame, 20030- CefRefPtr<CefRequest> request, 20031- CefRefPtr<CefResponse> response) { 20032+CefRefPtr<CefResponseFilter> CefResourceRequestHandlerCToCpp:: 20033+ GetResourceResponseFilter(CefRefPtr<CefBrowser> browser, 20034+ CefRefPtr<CefFrame> frame, 20035+ CefRefPtr<CefRequest> request, 20036+ CefRefPtr<CefResponse> response) { 20037 cef_resource_request_handler_t* _struct = GetStruct(); 20038 if (CEF_MEMBER_MISSING(_struct, get_resource_response_filter)) 20039 return nullptr; 20040diff --git a/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h 20041index e2d2aa6596c53..4d2c5cd332121 20042--- a/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h 20043+++ b/src/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h 20044@@ -1,4 +1,4 @@ 20045-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20046+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20047 // reserved. Use of this source code is governed by a BSD-style license that 20048 // can be found in the LICENSE file. 20049 // 20050@@ -9,7 +9,7 @@ 20051 // implementations. See the translator.README.txt file in the tools directory 20052 // for more information. 20053 // 20054-// $hash=2a3124a23f18f81fe2effd7df7848aa999370f31$ 20055+// $hash=4564ea5efd8c4be32e2df7c98fd70a645eb9f696$ 20056 // 20057 20058 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_REQUEST_HANDLER_CTOCPP_H_ 20059diff --git a/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc 20060index cdafb7bea0301..109e4ce8f41ff 20061--- a/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc 20062+++ b/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc 20063@@ -1,4 +1,4 @@ 20064-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20065+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20066 // reserved. Use of this source code is governed by a BSD-style license that 20067 // can be found in the LICENSE file. 20068 // 20069@@ -9,7 +9,7 @@ 20070 // implementations. See the translator.README.txt file in the tools directory 20071 // for more information. 20072 // 20073-// $hash=df7b14a723e4f2b9dd7946fddfbe8dc9652ccb75$ 20074+// $hash=9b1ffc7f2bb483a6657867c8369e56b821b44684$ 20075 // 20076 20077 #include "libcef_dll/ctocpp/resource_skip_callback_ctocpp.h" 20078diff --git a/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h 20079index ac22d12ca33cc..5d8a347bbb2d9 20080--- a/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h 20081+++ b/src/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h 20082@@ -1,4 +1,4 @@ 20083-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20084+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20085 // reserved. Use of this source code is governed by a BSD-style license that 20086 // can be found in the LICENSE file. 20087 // 20088@@ -9,7 +9,7 @@ 20089 // implementations. See the translator.README.txt file in the tools directory 20090 // for more information. 20091 // 20092-// $hash=de37dc0b6e8570fc2f0d1912a5ac9e264ef5d6dc$ 20093+// $hash=ace627f34f6c16512fb0d7a9a4ebb96e9c00c78d$ 20094 // 20095 20096 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_SKIP_CALLBACK_CTOCPP_H_ 20097diff --git a/src/cef/libcef_dll/ctocpp/response_ctocpp.cc b/src/cef/libcef_dll/ctocpp/response_ctocpp.cc 20098index e34c60e857b7c..0c9aa8713cd3e 20099--- a/src/cef/libcef_dll/ctocpp/response_ctocpp.cc 20100+++ b/src/cef/libcef_dll/ctocpp/response_ctocpp.cc 20101@@ -1,4 +1,4 @@ 20102-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20103+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20104 // reserved. Use of this source code is governed by a BSD-style license that 20105 // can be found in the LICENSE file. 20106 // 20107@@ -9,7 +9,7 @@ 20108 // implementations. See the translator.README.txt file in the tools directory 20109 // for more information. 20110 // 20111-// $hash=ac30aa16fee147cd041b64db7f2743d578dc6384$ 20112+// $hash=85da34bbec6032ab48c11a9c64927c9da40fa5dc$ 20113 // 20114 20115 #include "libcef_dll/ctocpp/response_ctocpp.h" 20116diff --git a/src/cef/libcef_dll/ctocpp/response_ctocpp.h b/src/cef/libcef_dll/ctocpp/response_ctocpp.h 20117index cb1187f23a55e..00a127929b37c 20118--- a/src/cef/libcef_dll/ctocpp/response_ctocpp.h 20119+++ b/src/cef/libcef_dll/ctocpp/response_ctocpp.h 20120@@ -1,4 +1,4 @@ 20121-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20122+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20123 // reserved. Use of this source code is governed by a BSD-style license that 20124 // can be found in the LICENSE file. 20125 // 20126@@ -9,7 +9,7 @@ 20127 // implementations. See the translator.README.txt file in the tools directory 20128 // for more information. 20129 // 20130-// $hash=8e61de9ab82c665913039fa45903fa8b2213d3c2$ 20131+// $hash=3ec4c709bcd18d24997d554134b1b01e17bbd0fb$ 20132 // 20133 20134 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ 20135diff --git a/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc b/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc 20136index 668cfa6f1d3d1..336567dfd16bc 20137--- a/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc 20138+++ b/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc 20139@@ -1,4 +1,4 @@ 20140-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20141+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20142 // reserved. Use of this source code is governed by a BSD-style license that 20143 // can be found in the LICENSE file. 20144 // 20145@@ -9,7 +9,7 @@ 20146 // implementations. See the translator.README.txt file in the tools directory 20147 // for more information. 20148 // 20149-// $hash=ddb4710d1e5bc73df68f132d56661b0d22520ad9$ 20150+// $hash=dc1f2774aa0a5d586afb09a77cd4fdf5022af04a$ 20151 // 20152 20153 #include "libcef_dll/ctocpp/response_filter_ctocpp.h" 20154@@ -34,13 +34,13 @@ NO_SANITIZE("cfi-icall") bool CefResponseFilterCToCpp::InitFilter() { 20155 } 20156 20157 NO_SANITIZE("cfi-icall") 20158-CefResponseFilter::FilterStatus CefResponseFilterCToCpp::Filter( 20159- void* data_in, 20160- size_t data_in_size, 20161- size_t& data_in_read, 20162- void* data_out, 20163- size_t data_out_size, 20164- size_t& data_out_written) { 20165+CefResponseFilter::FilterStatus 20166+ CefResponseFilterCToCpp::Filter(void* data_in, 20167+ size_t data_in_size, 20168+ size_t& data_in_read, 20169+ void* data_out, 20170+ size_t data_out_size, 20171+ size_t& data_out_written) { 20172 shutdown_checker::AssertNotShutdown(); 20173 20174 cef_response_filter_t* _struct = GetStruct(); 20175diff --git a/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.h b/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.h 20176index a1f7a5eff4ecb..a15d97ff0d320 20177--- a/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.h 20178+++ b/src/cef/libcef_dll/ctocpp/response_filter_ctocpp.h 20179@@ -1,4 +1,4 @@ 20180-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20181+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20182 // reserved. Use of this source code is governed by a BSD-style license that 20183 // can be found in the LICENSE file. 20184 // 20185@@ -9,7 +9,7 @@ 20186 // implementations. See the translator.README.txt file in the tools directory 20187 // for more information. 20188 // 20189-// $hash=3e7c6b0f991e335db755172d65e2a03e5e00a270$ 20190+// $hash=b9ca51a2ee848580b14c1a06b49b2b9e048ab798$ 20191 // 20192 20193 #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_FILTER_CTOCPP_H_ 20194diff --git a/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc 20195index 4e82c15bcdfa5..c608f07f255d3 20196--- a/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc 20197+++ b/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc 20198@@ -1,4 +1,4 @@ 20199-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20200+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20201 // reserved. Use of this source code is governed by a BSD-style license that 20202 // can be found in the LICENSE file. 20203 // 20204@@ -9,7 +9,7 @@ 20205 // implementations. See the translator.README.txt file in the tools directory 20206 // for more information. 20207 // 20208-// $hash=427fe84b74eec6346d7da729cba2fdf52d1c0fd7$ 20209+// $hash=be8368d8aea24196357d54e79c935ad40b5e7d9d$ 20210 // 20211 20212 #include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h" 20213diff --git a/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h 20214index 6e413df2f4957..90d9cd66050e0 20215--- a/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h 20216+++ b/src/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h 20217@@ -1,4 +1,4 @@ 20218-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20219+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20220 // reserved. Use of this source code is governed by a BSD-style license that 20221 // can be found in the LICENSE file. 20222 // 20223@@ -9,7 +9,7 @@ 20224 // implementations. See the translator.README.txt file in the tools directory 20225 // for more information. 20226 // 20227-// $hash=ffa640e35d08dd0f9b8c0ea291db190947826915$ 20228+// $hash=7663b13ecb057bba0158685bc34783f37ef2f030$ 20229 // 20230 20231 #ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_ 20232diff --git a/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc 20233index fb42b0d4cfcda..6999776b45c9c 20234--- a/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc 20235+++ b/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc 20236@@ -1,4 +1,4 @@ 20237-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20238+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20239 // reserved. Use of this source code is governed by a BSD-style license that 20240 // can be found in the LICENSE file. 20241 // 20242@@ -9,7 +9,7 @@ 20243 // implementations. See the translator.README.txt file in the tools directory 20244 // for more information. 20245 // 20246-// $hash=cb29585261ed25ddd2ee1b4b5c890565e72e5d22$ 20247+// $hash=2e7f10559c5c3458ee2a5055d55ec4df6be246cf$ 20248 // 20249 20250 #include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h" 20251diff --git a/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h 20252index 2b4fc7dde8ffc..1d7e8588b7db3 20253--- a/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h 20254+++ b/src/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h 20255@@ -1,4 +1,4 @@ 20256-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20257+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20258 // reserved. Use of this source code is governed by a BSD-style license that 20259 // can be found in the LICENSE file. 20260 // 20261@@ -9,7 +9,7 @@ 20262 // implementations. See the translator.README.txt file in the tools directory 20263 // for more information. 20264 // 20265-// $hash=63d2d1da715395296899acc4ed165cf7dae4d78c$ 20266+// $hash=85e5a1624f1ed7c3a154f55edc0682f723374197$ 20267 // 20268 20269 #ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_FILE_DIALOG_CALLBACK_CTOCPP_H_ 20270diff --git a/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.cc 20271index 095624f724b13..1e649a0955cfb 20272--- a/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.cc 20273+++ b/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.cc 20274@@ -1,4 +1,4 @@ 20275-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20276+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20277 // reserved. Use of this source code is governed by a BSD-style license that 20278 // can be found in the LICENSE file. 20279 // 20280@@ -9,7 +9,7 @@ 20281 // implementations. See the translator.README.txt file in the tools directory 20282 // for more information. 20283 // 20284-// $hash=c0d516016a14eeed0c73bde99e2495ae691c2326$ 20285+// $hash=7d0f87f5e909c52e5424e018ff46f806960f7df2$ 20286 // 20287 20288 #include "libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h" 20289diff --git a/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h 20290index 285335e2c424c..155b0b937cfb1 20291--- a/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h 20292+++ b/src/cef/libcef_dll/ctocpp/run_quick_menu_callback_ctocpp.h 20293@@ -1,4 +1,4 @@ 20294-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20295+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20296 // reserved. Use of this source code is governed by a BSD-style license that 20297 // can be found in the LICENSE file. 20298 // 20299@@ -9,7 +9,7 @@ 20300 // implementations. See the translator.README.txt file in the tools directory 20301 // for more information. 20302 // 20303-// $hash=519977d5976a7486e0fda9d9b9b0d6fd0fd9b44f$ 20304+// $hash=c079137f43167df4c21e63f38cdd8c33f4423445$ 20305 // 20306 20307 #ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_QUICK_MENU_CALLBACK_CTOCPP_H_ 20308diff --git a/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc b/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc 20309index 9be13e699bdee..8f3f3f86d99b8 20310--- a/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc 20311+++ b/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc 20312@@ -1,4 +1,4 @@ 20313-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20314+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20315 // reserved. Use of this source code is governed by a BSD-style license that 20316 // can be found in the LICENSE file. 20317 // 20318@@ -9,7 +9,7 @@ 20319 // implementations. See the translator.README.txt file in the tools directory 20320 // for more information. 20321 // 20322-// $hash=5e94a999784332a91c40a4608644bf7dc36e0729$ 20323+// $hash=ea86d74aea74e67a896aa51760e61219743a478f$ 20324 // 20325 20326 #include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h" 20327diff --git a/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h b/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h 20328index 8e1d45052d967..6e20d97da3418 20329--- a/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h 20330+++ b/src/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h 20331@@ -1,4 +1,4 @@ 20332-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20333+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20334 // reserved. Use of this source code is governed by a BSD-style license that 20335 // can be found in the LICENSE file. 20336 // 20337@@ -9,7 +9,7 @@ 20338 // implementations. See the translator.README.txt file in the tools directory 20339 // for more information. 20340 // 20341-// $hash=ff0cb366799a5abce0f4e43bd98fcaf993fad77d$ 20342+// $hash=8553de031f140b9c850e487863fc91b97633314b$ 20343 // 20344 20345 #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_ 20346diff --git a/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc b/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc 20347index c86d129734cc9..2b548187656ba 20348--- a/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc 20349+++ b/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc 20350@@ -1,4 +1,4 @@ 20351-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20352+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20353 // reserved. Use of this source code is governed by a BSD-style license that 20354 // can be found in the LICENSE file. 20355 // 20356@@ -9,7 +9,7 @@ 20357 // implementations. See the translator.README.txt file in the tools directory 20358 // for more information. 20359 // 20360-// $hash=3f55a43485f2833e5000e7444d57ef47ff7af0e9$ 20361+// $hash=722531dae407df607f2454823d375a34db168075$ 20362 // 20363 20364 #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" 20365diff --git a/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h b/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h 20366index 110a6858a3331..8ac7075b830aa 20367--- a/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h 20368+++ b/src/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h 20369@@ -1,4 +1,4 @@ 20370-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20371+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20372 // reserved. Use of this source code is governed by a BSD-style license that 20373 // can be found in the LICENSE file. 20374 // 20375@@ -9,7 +9,7 @@ 20376 // implementations. See the translator.README.txt file in the tools directory 20377 // for more information. 20378 // 20379-// $hash=6c522fb5e064daeea21350a548af4bee6c0a2acf$ 20380+// $hash=a30e0b019ab6b34998563c8bf46f7b0c8089c3ba$ 20381 // 20382 20383 #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ 20384diff --git a/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc 20385index fda61b5069f30..1bf872280f115 20386--- a/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc 20387+++ b/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc 20388@@ -1,4 +1,4 @@ 20389-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20390+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20391 // reserved. Use of this source code is governed by a BSD-style license that 20392 // can be found in the LICENSE file. 20393 // 20394@@ -9,7 +9,7 @@ 20395 // implementations. See the translator.README.txt file in the tools directory 20396 // for more information. 20397 // 20398-// $hash=f77cbb1874239eff164c3654befdc0f4fe81fed9$ 20399+// $hash=6fd8a2097b3275a73b28725e5747cc8e5c895a63$ 20400 // 20401 20402 #include "libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h" 20403diff --git a/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h 20404index 0085926df555e..318fa12d74e73 20405--- a/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h 20406+++ b/src/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h 20407@@ -1,4 +1,4 @@ 20408-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20409+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20410 // reserved. Use of this source code is governed by a BSD-style license that 20411 // can be found in the LICENSE file. 20412 // 20413@@ -9,7 +9,7 @@ 20414 // implementations. See the translator.README.txt file in the tools directory 20415 // for more information. 20416 // 20417-// $hash=0de5941ff724adcd6ca8fcb5e1a5266143afa820$ 20418+// $hash=3ab940de86fd7e4fd434758c7064f4eea9a3de47$ 20419 // 20420 20421 #ifndef CEF_LIBCEF_DLL_CTOCPP_SELECT_CLIENT_CERTIFICATE_CALLBACK_CTOCPP_H_ 20422diff --git a/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.cc 20423new file mode 100644 20424index 0000000000000..d45fb69daa75d 20425--- /dev/null 20426+++ b/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.cc 20427@@ -0,0 +1,88 @@ 20428+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20429+// reserved. Use of this source code is governed by a BSD-style license that 20430+// can be found in the LICENSE file. 20431+// 20432+// --------------------------------------------------------------------------- 20433+// 20434+// This file was generated by the CEF translator tool. If making changes by 20435+// hand only do so within the body of existing method and function 20436+// implementations. See the translator.README.txt file in the tools directory 20437+// for more information. 20438+// 20439+// $hash=79f5a4ff76eac8f4149c11465623c3b177887128$ 20440+// 20441+ 20442+#include "libcef_dll/ctocpp/select_popup_callback_ctocpp.h" 20443+#include "libcef_dll/shutdown_checker.h" 20444+ 20445+// VIRTUAL METHODS - Body may be edited by hand. 20446+ 20447+NO_SANITIZE("cfi-icall") 20448+void CefSelectPopupCallbackCToCpp::Continue(const std::vector<int>& indices) { 20449+ shutdown_checker::AssertNotShutdown(); 20450+ 20451+ cef_select_popup_callback_t* _struct = GetStruct(); 20452+ if (CEF_MEMBER_MISSING(_struct, cont)) 20453+ return; 20454+ 20455+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 20456+ 20457+ // Translate param: indices; type: simple_vec_byref_const 20458+ const size_t indicesCount = indices.size(); 20459+ int* indicesList = NULL; 20460+ if (indicesCount > 0) { 20461+ indicesList = new int[indicesCount]; 20462+ DCHECK(indicesList); 20463+ if (indicesList) { 20464+ for (size_t i = 0; i < indicesCount; ++i) { 20465+ indicesList[i] = indices[i]; 20466+ } 20467+ } 20468+ } 20469+ 20470+ // Execute 20471+ _struct->cont(_struct, indicesCount, indicesList); 20472+ 20473+ // Restore param:indices; type: simple_vec_byref_const 20474+ if (indicesList) 20475+ delete[] indicesList; 20476+} 20477+ 20478+NO_SANITIZE("cfi-icall") void CefSelectPopupCallbackCToCpp::Cancel() { 20479+ shutdown_checker::AssertNotShutdown(); 20480+ 20481+ cef_select_popup_callback_t* _struct = GetStruct(); 20482+ if (CEF_MEMBER_MISSING(_struct, cancel)) 20483+ return; 20484+ 20485+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 20486+ 20487+ // Execute 20488+ _struct->cancel(_struct); 20489+} 20490+ 20491+// CONSTRUCTOR - Do not edit by hand. 20492+ 20493+CefSelectPopupCallbackCToCpp::CefSelectPopupCallbackCToCpp() {} 20494+ 20495+// DESTRUCTOR - Do not edit by hand. 20496+ 20497+CefSelectPopupCallbackCToCpp::~CefSelectPopupCallbackCToCpp() { 20498+ shutdown_checker::AssertNotShutdown(); 20499+} 20500+ 20501+template <> 20502+cef_select_popup_callback_t* CefCToCppRefCounted< 20503+ CefSelectPopupCallbackCToCpp, 20504+ CefSelectPopupCallback, 20505+ cef_select_popup_callback_t>::UnwrapDerived(CefWrapperType type, 20506+ CefSelectPopupCallback* c) { 20507+ NOTREACHED() << "Unexpected class type: " << type; 20508+ return nullptr; 20509+} 20510+ 20511+template <> 20512+CefWrapperType CefCToCppRefCounted<CefSelectPopupCallbackCToCpp, 20513+ CefSelectPopupCallback, 20514+ cef_select_popup_callback_t>::kWrapperType = 20515+ WT_SELECT_POPUP_CALLBACK; 20516diff --git a/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.h 20517new file mode 100644 20518index 0000000000000..aa46a0ef6f8e8 20519--- /dev/null 20520+++ b/src/cef/libcef_dll/ctocpp/select_popup_callback_ctocpp.h 20521@@ -0,0 +1,43 @@ 20522+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20523+// reserved. Use of this source code is governed by a BSD-style license that 20524+// can be found in the LICENSE file. 20525+// 20526+// --------------------------------------------------------------------------- 20527+// 20528+// This file was generated by the CEF translator tool. If making changes by 20529+// hand only do so within the body of existing method and function 20530+// implementations. See the translator.README.txt file in the tools directory 20531+// for more information. 20532+// 20533+// $hash=511a4146e38cfe2e2242f3d79950cf67415fe4d5$ 20534+// 20535+ 20536+#ifndef CEF_LIBCEF_DLL_CTOCPP_SELECT_POPUP_CALLBACK_CTOCPP_H_ 20537+#define CEF_LIBCEF_DLL_CTOCPP_SELECT_POPUP_CALLBACK_CTOCPP_H_ 20538+#pragma once 20539+ 20540+#if !defined(WRAPPING_CEF_SHARED) 20541+#error This file can be included wrapper-side only 20542+#endif 20543+ 20544+#include <vector> 20545+#include "include/capi/cef_dialog_handler_capi.h" 20546+#include "include/cef_dialog_handler.h" 20547+#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 20548+ 20549+// Wrap a C structure with a C++ class. 20550+// This class may be instantiated and accessed wrapper-side only. 20551+class CefSelectPopupCallbackCToCpp 20552+ : public CefCToCppRefCounted<CefSelectPopupCallbackCToCpp, 20553+ CefSelectPopupCallback, 20554+ cef_select_popup_callback_t> { 20555+ public: 20556+ CefSelectPopupCallbackCToCpp(); 20557+ virtual ~CefSelectPopupCallbackCToCpp(); 20558+ 20559+ // CefSelectPopupCallback methods. 20560+ void Continue(const std::vector<int>& indices) override; 20561+ void Cancel() override; 20562+}; 20563+ 20564+#endif // CEF_LIBCEF_DLL_CTOCPP_SELECT_POPUP_CALLBACK_CTOCPP_H_ 20565diff --git a/src/cef/libcef_dll/ctocpp/server_ctocpp.cc b/src/cef/libcef_dll/ctocpp/server_ctocpp.cc 20566index 51fe2ead4bd91..ba95ec8e2eaac 20567--- a/src/cef/libcef_dll/ctocpp/server_ctocpp.cc 20568+++ b/src/cef/libcef_dll/ctocpp/server_ctocpp.cc 20569@@ -1,4 +1,4 @@ 20570-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20571+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20572 // reserved. Use of this source code is governed by a BSD-style license that 20573 // can be found in the LICENSE file. 20574 // 20575@@ -9,7 +9,7 @@ 20576 // implementations. See the translator.README.txt file in the tools directory 20577 // for more information. 20578 // 20579-// $hash=d8cfb6cafc2a9aa0cffe4a998071e8a96b04740b$ 20580+// $hash=31e56774368e5a843a41c99e9446d8d97d6fc9da$ 20581 // 20582 20583 #include "libcef_dll/ctocpp/server_ctocpp.h" 20584diff --git a/src/cef/libcef_dll/ctocpp/server_ctocpp.h b/src/cef/libcef_dll/ctocpp/server_ctocpp.h 20585index b35a3255ebaa4..b9a038e2f88e0 20586--- a/src/cef/libcef_dll/ctocpp/server_ctocpp.h 20587+++ b/src/cef/libcef_dll/ctocpp/server_ctocpp.h 20588@@ -1,4 +1,4 @@ 20589-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20590+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20591 // reserved. Use of this source code is governed by a BSD-style license that 20592 // can be found in the LICENSE file. 20593 // 20594@@ -9,7 +9,7 @@ 20595 // implementations. See the translator.README.txt file in the tools directory 20596 // for more information. 20597 // 20598-// $hash=ed13956e5941bbb0885224ef57016cf7f34d389c$ 20599+// $hash=efb9652f9e2a17079ff20457264e8b0ecfd19499$ 20600 // 20601 20602 #ifndef CEF_LIBCEF_DLL_CTOCPP_SERVER_CTOCPP_H_ 20603diff --git a/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc 20604index b82fd8f5b1cd5..3300e1734bb0f 20605--- a/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc 20606+++ b/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc 20607@@ -1,4 +1,4 @@ 20608-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20609+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20610 // reserved. Use of this source code is governed by a BSD-style license that 20611 // can be found in the LICENSE file. 20612 // 20613@@ -9,7 +9,7 @@ 20614 // implementations. See the translator.README.txt file in the tools directory 20615 // for more information. 20616 // 20617-// $hash=a14c40cc86f5fd61d548d981c99c59a559619eda$ 20618+// $hash=eff1ec14b02da387e1504034a7eace1325a4ee94$ 20619 // 20620 20621 #include "libcef_dll/ctocpp/server_handler_ctocpp.h" 20622diff --git a/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.h 20623index 08df48f950e4c..fbb9d76162c4a 20624--- a/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.h 20625+++ b/src/cef/libcef_dll/ctocpp/server_handler_ctocpp.h 20626@@ -1,4 +1,4 @@ 20627-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20628+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20629 // reserved. Use of this source code is governed by a BSD-style license that 20630 // can be found in the LICENSE file. 20631 // 20632@@ -9,7 +9,7 @@ 20633 // implementations. See the translator.README.txt file in the tools directory 20634 // for more information. 20635 // 20636-// $hash=b9b38b204c2b9d385ebefb11aa0b45efcd684cbc$ 20637+// $hash=0bed1f616f1ae42a7eb755dba59b329cd600abff$ 20638 // 20639 20640 #ifndef CEF_LIBCEF_DLL_CTOCPP_SERVER_HANDLER_CTOCPP_H_ 20641diff --git a/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc 20642index 63048eec4be0c..2b8851b9f93a2 20643--- a/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc 20644+++ b/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc 20645@@ -1,4 +1,4 @@ 20646-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20647+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20648 // reserved. Use of this source code is governed by a BSD-style license that 20649 // can be found in the LICENSE file. 20650 // 20651@@ -9,7 +9,7 @@ 20652 // implementations. See the translator.README.txt file in the tools directory 20653 // for more information. 20654 // 20655-// $hash=5767c600167159c0ad3f5d10461f1bf107c668cc$ 20656+// $hash=0114a4f38f6355d772659f7a3d83e086ef2079c3$ 20657 // 20658 20659 #include "libcef_dll/ctocpp/set_cookie_callback_ctocpp.h" 20660diff --git a/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h 20661index f4ca2b5612faf..067807169e6ad 20662--- a/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h 20663+++ b/src/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h 20664@@ -1,4 +1,4 @@ 20665-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20666+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20667 // reserved. Use of this source code is governed by a BSD-style license that 20668 // can be found in the LICENSE file. 20669 // 20670@@ -9,7 +9,7 @@ 20671 // implementations. See the translator.README.txt file in the tools directory 20672 // for more information. 20673 // 20674-// $hash=83c8143e3d126fca9a02f8e5ffa75bf99d291518$ 20675+// $hash=26be0ed7d7165630ee23b480419768f1fd9b95fe$ 20676 // 20677 20678 #ifndef CEF_LIBCEF_DLL_CTOCPP_SET_COOKIE_CALLBACK_CTOCPP_H_ 20679diff --git a/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc b/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc 20680index 81512b8b693f3..57eb40cd3ed1f 20681--- a/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc 20682+++ b/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc 20683@@ -1,4 +1,4 @@ 20684-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20685+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20686 // reserved. Use of this source code is governed by a BSD-style license that 20687 // can be found in the LICENSE file. 20688 // 20689@@ -9,7 +9,7 @@ 20690 // implementations. See the translator.README.txt file in the tools directory 20691 // for more information. 20692 // 20693-// $hash=67037943cdfae2a56924694d302a4b5697dc9a22$ 20694+// $hash=ca0daba10b2ed5ebb9610092967d60efde837706$ 20695 // 20696 20697 #include "libcef_dll/ctocpp/sslinfo_ctocpp.h" 20698diff --git a/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h b/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h 20699index 957fe16ce775c..80ed6f17a515f 20700--- a/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h 20701+++ b/src/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h 20702@@ -1,4 +1,4 @@ 20703-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20704+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20705 // reserved. Use of this source code is governed by a BSD-style license that 20706 // can be found in the LICENSE file. 20707 // 20708@@ -9,7 +9,7 @@ 20709 // implementations. See the translator.README.txt file in the tools directory 20710 // for more information. 20711 // 20712-// $hash=bd6c2733149181808f331fa69f9c6199a43eb730$ 20713+// $hash=d08212eed1df4078ed5bb72dd7fc6d478f476ecb$ 20714 // 20715 20716 #ifndef CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ 20717diff --git a/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc b/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc 20718index b0392d95c4ea7..5defe8fee422e 20719--- a/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc 20720+++ b/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc 20721@@ -1,4 +1,4 @@ 20722-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20723+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20724 // reserved. Use of this source code is governed by a BSD-style license that 20725 // can be found in the LICENSE file. 20726 // 20727@@ -9,7 +9,7 @@ 20728 // implementations. See the translator.README.txt file in the tools directory 20729 // for more information. 20730 // 20731-// $hash=18492d14d83b0dfd272ddd9dd95a2fc292bf8904$ 20732+// $hash=82f44b0f9739a59e0d9cfad14282998f281dd0a8$ 20733 // 20734 20735 #include "libcef_dll/ctocpp/sslstatus_ctocpp.h" 20736diff --git a/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h b/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h 20737index 8b9e5febfb588..c36c525480511 20738--- a/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h 20739+++ b/src/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h 20740@@ -1,4 +1,4 @@ 20741-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20742+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20743 // reserved. Use of this source code is governed by a BSD-style license that 20744 // can be found in the LICENSE file. 20745 // 20746@@ -9,7 +9,7 @@ 20747 // implementations. See the translator.README.txt file in the tools directory 20748 // for more information. 20749 // 20750-// $hash=75331cb462e0944adffd05e9138561eb1cd68226$ 20751+// $hash=af612f99d0ccc287b152a20b3e9956af223f82e0$ 20752 // 20753 20754 #ifndef CEF_LIBCEF_DLL_CTOCPP_SSLSTATUS_CTOCPP_H_ 20755diff --git a/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.cc 20756index 282357f875619..8295518883e1c 20757--- a/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.cc 20758+++ b/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.cc 20759@@ -1,4 +1,4 @@ 20760-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20761+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20762 // reserved. Use of this source code is governed by a BSD-style license that 20763 // can be found in the LICENSE file. 20764 // 20765@@ -9,7 +9,7 @@ 20766 // implementations. See the translator.README.txt file in the tools directory 20767 // for more information. 20768 // 20769-// $hash=3ea3777da287fb256c81d7659000104b85d99c45$ 20770+// $hash=ef42fcbe56e93182d9f4b5063d55b33ce9086e55$ 20771 // 20772 20773 #include "libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h" 20774diff --git a/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h 20775index 75369b7e2e97c..9e1fffd6d1020 20776--- a/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h 20777+++ b/src/cef/libcef_dll/ctocpp/store_web_archive_result_callback_ctocpp.h 20778@@ -1,4 +1,4 @@ 20779-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20780+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20781 // reserved. Use of this source code is governed by a BSD-style license that 20782 // can be found in the LICENSE file. 20783 // 20784@@ -9,7 +9,7 @@ 20785 // implementations. See the translator.README.txt file in the tools directory 20786 // for more information. 20787 // 20788-// $hash=ad8ad631ed5942baa7ae146fe31316d0952d3d36$ 20789+// $hash=13d8e7ac8493bcf02b39067e63e0d9fe3e7e8e65$ 20790 // 20791 20792 #ifndef CEF_LIBCEF_DLL_CTOCPP_STORE_WEB_ARCHIVE_RESULT_CALLBACK_CTOCPP_H_ 20793diff --git a/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc b/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc 20794index 522ebdea8882e..4cf6ae4b55cec 20795--- a/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc 20796+++ b/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc 20797@@ -1,4 +1,4 @@ 20798-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20799+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20800 // reserved. Use of this source code is governed by a BSD-style license that 20801 // can be found in the LICENSE file. 20802 // 20803@@ -9,7 +9,7 @@ 20804 // implementations. See the translator.README.txt file in the tools directory 20805 // for more information. 20806 // 20807-// $hash=964179bd73f8b5fa8d8adbd955deb7e720caaca7$ 20808+// $hash=7a5ee0caa0def472edae4f8fee336bf1db392071$ 20809 // 20810 20811 #include "libcef_dll/ctocpp/stream_reader_ctocpp.h" 20812diff --git a/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h b/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h 20813index 4faf464409784..1376f71494d90 20814--- a/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h 20815+++ b/src/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h 20816@@ -1,4 +1,4 @@ 20817-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20818+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20819 // reserved. Use of this source code is governed by a BSD-style license that 20820 // can be found in the LICENSE file. 20821 // 20822@@ -9,7 +9,7 @@ 20823 // implementations. See the translator.README.txt file in the tools directory 20824 // for more information. 20825 // 20826-// $hash=e512b79f803ab83f9f67e677ea916dd9f6bb8868$ 20827+// $hash=8a1cd61b67d54a528ac936415fa11ff1936cd628$ 20828 // 20829 20830 #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ 20831diff --git a/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc b/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc 20832index d11649c31b07c..e4d6690e3af65 20833--- a/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc 20834+++ b/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc 20835@@ -1,4 +1,4 @@ 20836-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20837+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20838 // reserved. Use of this source code is governed by a BSD-style license that 20839 // can be found in the LICENSE file. 20840 // 20841@@ -9,7 +9,7 @@ 20842 // implementations. See the translator.README.txt file in the tools directory 20843 // for more information. 20844 // 20845-// $hash=e32b4745b887e33f589cb04e8b46a7317686e4c2$ 20846+// $hash=af95b6ab0679c220a35569ae4dc4c11907d30084$ 20847 // 20848 20849 #include "libcef_dll/ctocpp/stream_writer_ctocpp.h" 20850diff --git a/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h b/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h 20851index e091a67d61403..eceb31ac95f3c 20852--- a/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h 20853+++ b/src/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h 20854@@ -1,4 +1,4 @@ 20855-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20856+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20857 // reserved. Use of this source code is governed by a BSD-style license that 20858 // can be found in the LICENSE file. 20859 // 20860@@ -9,7 +9,7 @@ 20861 // implementations. See the translator.README.txt file in the tools directory 20862 // for more information. 20863 // 20864-// $hash=76a03eb8bf25cc337e838994c2bf4fe3f677aa6c$ 20865+// $hash=f1156f9657858024d8d0dc20af0b5f53e82b5d74$ 20866 // 20867 20868 #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ 20869diff --git a/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc 20870index c1ece7b76fe24..e44f6335b2085 20871--- a/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc 20872+++ b/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc 20873@@ -1,4 +1,4 @@ 20874-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20875+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20876 // reserved. Use of this source code is governed by a BSD-style license that 20877 // can be found in the LICENSE file. 20878 // 20879@@ -9,7 +9,7 @@ 20880 // implementations. See the translator.README.txt file in the tools directory 20881 // for more information. 20882 // 20883-// $hash=97c52e0e29be9e4452825fb57d4014221c537baa$ 20884+// $hash=ae0e93265c6fa1d984a669177c162602f99be475$ 20885 // 20886 20887 #include "libcef_dll/ctocpp/string_visitor_ctocpp.h" 20888diff --git a/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h b/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h 20889index c107e783ea44d..53e15edcd50a5 20890--- a/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h 20891+++ b/src/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h 20892@@ -1,4 +1,4 @@ 20893-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20894+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20895 // reserved. Use of this source code is governed by a BSD-style license that 20896 // can be found in the LICENSE file. 20897 // 20898@@ -9,7 +9,7 @@ 20899 // implementations. See the translator.README.txt file in the tools directory 20900 // for more information. 20901 // 20902-// $hash=470dd514d2a3091216588819ee28296424649b57$ 20903+// $hash=6e693b6dd1a72803aa7243d7cd5de54354338c37$ 20904 // 20905 20906 #ifndef CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_ 20907diff --git a/src/cef/libcef_dll/ctocpp/task_ctocpp.cc b/src/cef/libcef_dll/ctocpp/task_ctocpp.cc 20908index d621f77995218..3296e28b1794c 20909--- a/src/cef/libcef_dll/ctocpp/task_ctocpp.cc 20910+++ b/src/cef/libcef_dll/ctocpp/task_ctocpp.cc 20911@@ -1,4 +1,4 @@ 20912-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20913+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20914 // reserved. Use of this source code is governed by a BSD-style license that 20915 // can be found in the LICENSE file. 20916 // 20917@@ -9,7 +9,7 @@ 20918 // implementations. See the translator.README.txt file in the tools directory 20919 // for more information. 20920 // 20921-// $hash=b99582b454aa33c5e9b2fa3f891ed0754621c377$ 20922+// $hash=26d9172375112a2aa89c76d7a371796c5a7b9892$ 20923 // 20924 20925 #include "libcef_dll/ctocpp/task_ctocpp.h" 20926diff --git a/src/cef/libcef_dll/ctocpp/task_ctocpp.h b/src/cef/libcef_dll/ctocpp/task_ctocpp.h 20927index 0fdb427d2e673..ccd90edb97cc1 20928--- a/src/cef/libcef_dll/ctocpp/task_ctocpp.h 20929+++ b/src/cef/libcef_dll/ctocpp/task_ctocpp.h 20930@@ -1,4 +1,4 @@ 20931-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20932+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20933 // reserved. Use of this source code is governed by a BSD-style license that 20934 // can be found in the LICENSE file. 20935 // 20936@@ -9,7 +9,7 @@ 20937 // implementations. See the translator.README.txt file in the tools directory 20938 // for more information. 20939 // 20940-// $hash=ec78aa696165cd02a3b7f19e877b89d58518d5ad$ 20941+// $hash=e722a5b9ae2bb6e3d3236a199930600dc3b5e0f8$ 20942 // 20943 20944 #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ 20945diff --git a/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc b/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc 20946index 89bf91e95c499..5613e36b34f42 20947--- a/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc 20948+++ b/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc 20949@@ -1,4 +1,4 @@ 20950-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20951+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20952 // reserved. Use of this source code is governed by a BSD-style license that 20953 // can be found in the LICENSE file. 20954 // 20955@@ -9,7 +9,7 @@ 20956 // implementations. See the translator.README.txt file in the tools directory 20957 // for more information. 20958 // 20959-// $hash=c4e54b985b45c9cf57f70a3c560fb1d6c5230f9a$ 20960+// $hash=9d367936047c38f9b70488ef5caf6d8ca081bb50$ 20961 // 20962 20963 #include "libcef_dll/ctocpp/task_runner_ctocpp.h" 20964diff --git a/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.h b/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.h 20965index ecec13d9cf48d..2f33aaffbd2cb 20966--- a/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.h 20967+++ b/src/cef/libcef_dll/ctocpp/task_runner_ctocpp.h 20968@@ -1,4 +1,4 @@ 20969-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20970+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20971 // reserved. Use of this source code is governed by a BSD-style license that 20972 // can be found in the LICENSE file. 20973 // 20974@@ -9,7 +9,7 @@ 20975 // implementations. See the translator.README.txt file in the tools directory 20976 // for more information. 20977 // 20978-// $hash=795e78c45943dd3c23d95ed1b85e889288f2dcf1$ 20979+// $hash=372cc40047bb36d78f80f4d1edbbba30faad2c7f$ 20980 // 20981 20982 #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ 20983diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc 20984index affb998f98792..62491362aa47a 20985--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc 20986+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc 20987@@ -1,4 +1,4 @@ 20988-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 20989+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 20990 // reserved. Use of this source code is governed by a BSD-style license that 20991 // can be found in the LICENSE file. 20992 // 20993@@ -9,7 +9,7 @@ 20994 // implementations. See the translator.README.txt file in the tools directory 20995 // for more information. 20996 // 20997-// $hash=a28e85dbec92b031978a0d4c998c9cb1a853c9f8$ 20998+// $hash=fd81a3bbebda49174033f19fe2eafd501b367837$ 20999 // 21000 21001 #include "libcef_dll/ctocpp/test/translator_test_ctocpp.h" 21002@@ -692,8 +692,8 @@ NO_SANITIZE("cfi-icall") size_t CefTranslatorTestCToCpp::GetPointListSize() { 21003 } 21004 21005 NO_SANITIZE("cfi-icall") 21006-CefRefPtr<CefTranslatorTestRefPtrLibrary> 21007-CefTranslatorTestCToCpp::GetRefPtrLibrary(int val) { 21008+CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp:: 21009+ GetRefPtrLibrary(int val) { 21010 shutdown_checker::AssertNotShutdown(); 21011 21012 cef_translator_test_t* _struct = GetStruct(); 21013@@ -735,9 +735,8 @@ int CefTranslatorTestCToCpp::SetRefPtrLibrary( 21014 } 21015 21016 NO_SANITIZE("cfi-icall") 21017-CefRefPtr<CefTranslatorTestRefPtrLibrary> 21018-CefTranslatorTestCToCpp::SetRefPtrLibraryAndReturn( 21019- CefRefPtr<CefTranslatorTestRefPtrLibrary> val) { 21020+CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp:: 21021+ SetRefPtrLibraryAndReturn(CefRefPtr<CefTranslatorTestRefPtrLibrary> val) { 21022 shutdown_checker::AssertNotShutdown(); 21023 21024 cef_translator_test_t* _struct = GetStruct(); 21025@@ -785,9 +784,9 @@ int CefTranslatorTestCToCpp::SetChildRefPtrLibrary( 21026 } 21027 21028 NO_SANITIZE("cfi-icall") 21029-CefRefPtr<CefTranslatorTestRefPtrLibrary> 21030-CefTranslatorTestCToCpp::SetChildRefPtrLibraryAndReturnParent( 21031- CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) { 21032+CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestCToCpp:: 21033+ SetChildRefPtrLibraryAndReturnParent( 21034+ CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) { 21035 shutdown_checker::AssertNotShutdown(); 21036 21037 cef_translator_test_t* _struct = GetStruct(); 21038@@ -937,9 +936,8 @@ int CefTranslatorTestCToCpp::SetRefPtrClient( 21039 } 21040 21041 NO_SANITIZE("cfi-icall") 21042-CefRefPtr<CefTranslatorTestRefPtrClient> 21043-CefTranslatorTestCToCpp::SetRefPtrClientAndReturn( 21044- CefRefPtr<CefTranslatorTestRefPtrClient> val) { 21045+CefRefPtr<CefTranslatorTestRefPtrClient> CefTranslatorTestCToCpp:: 21046+ SetRefPtrClientAndReturn(CefRefPtr<CefTranslatorTestRefPtrClient> val) { 21047 shutdown_checker::AssertNotShutdown(); 21048 21049 cef_translator_test_t* _struct = GetStruct(); 21050@@ -987,9 +985,9 @@ int CefTranslatorTestCToCpp::SetChildRefPtrClient( 21051 } 21052 21053 NO_SANITIZE("cfi-icall") 21054-CefRefPtr<CefTranslatorTestRefPtrClient> 21055-CefTranslatorTestCToCpp::SetChildRefPtrClientAndReturnParent( 21056- CefRefPtr<CefTranslatorTestRefPtrClientChild> val) { 21057+CefRefPtr<CefTranslatorTestRefPtrClient> CefTranslatorTestCToCpp:: 21058+ SetChildRefPtrClientAndReturnParent( 21059+ CefRefPtr<CefTranslatorTestRefPtrClientChild> val) { 21060 shutdown_checker::AssertNotShutdown(); 21061 21062 cef_translator_test_t* _struct = GetStruct(); 21063@@ -1127,8 +1125,8 @@ size_t CefTranslatorTestCToCpp::GetRefPtrClientListSize() { 21064 } 21065 21066 NO_SANITIZE("cfi-icall") 21067-CefOwnPtr<CefTranslatorTestScopedLibrary> 21068-CefTranslatorTestCToCpp::GetOwnPtrLibrary(int val) { 21069+CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp:: 21070+ GetOwnPtrLibrary(int val) { 21071 shutdown_checker::AssertNotShutdown(); 21072 21073 cef_translator_test_t* _struct = GetStruct(); 21074@@ -1170,9 +1168,8 @@ int CefTranslatorTestCToCpp::SetOwnPtrLibrary( 21075 } 21076 21077 NO_SANITIZE("cfi-icall") 21078-CefOwnPtr<CefTranslatorTestScopedLibrary> 21079-CefTranslatorTestCToCpp::SetOwnPtrLibraryAndReturn( 21080- CefOwnPtr<CefTranslatorTestScopedLibrary> val) { 21081+CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp:: 21082+ SetOwnPtrLibraryAndReturn(CefOwnPtr<CefTranslatorTestScopedLibrary> val) { 21083 shutdown_checker::AssertNotShutdown(); 21084 21085 cef_translator_test_t* _struct = GetStruct(); 21086@@ -1222,9 +1219,9 @@ int CefTranslatorTestCToCpp::SetChildOwnPtrLibrary( 21087 } 21088 21089 NO_SANITIZE("cfi-icall") 21090-CefOwnPtr<CefTranslatorTestScopedLibrary> 21091-CefTranslatorTestCToCpp::SetChildOwnPtrLibraryAndReturnParent( 21092- CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) { 21093+CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestCToCpp:: 21094+ SetChildOwnPtrLibraryAndReturnParent( 21095+ CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) { 21096 shutdown_checker::AssertNotShutdown(); 21097 21098 cef_translator_test_t* _struct = GetStruct(); 21099@@ -1273,9 +1270,8 @@ int CefTranslatorTestCToCpp::SetOwnPtrClient( 21100 } 21101 21102 NO_SANITIZE("cfi-icall") 21103-CefOwnPtr<CefTranslatorTestScopedClient> 21104-CefTranslatorTestCToCpp::SetOwnPtrClientAndReturn( 21105- CefOwnPtr<CefTranslatorTestScopedClient> val) { 21106+CefOwnPtr<CefTranslatorTestScopedClient> CefTranslatorTestCToCpp:: 21107+ SetOwnPtrClientAndReturn(CefOwnPtr<CefTranslatorTestScopedClient> val) { 21108 shutdown_checker::AssertNotShutdown(); 21109 21110 cef_translator_test_t* _struct = GetStruct(); 21111@@ -1325,9 +1321,9 @@ int CefTranslatorTestCToCpp::SetChildOwnPtrClient( 21112 } 21113 21114 NO_SANITIZE("cfi-icall") 21115-CefOwnPtr<CefTranslatorTestScopedClient> 21116-CefTranslatorTestCToCpp::SetChildOwnPtrClientAndReturnParent( 21117- CefOwnPtr<CefTranslatorTestScopedClientChild> val) { 21118+CefOwnPtr<CefTranslatorTestScopedClient> CefTranslatorTestCToCpp:: 21119+ SetChildOwnPtrClientAndReturnParent( 21120+ CefOwnPtr<CefTranslatorTestScopedClientChild> val) { 21121 shutdown_checker::AssertNotShutdown(); 21122 21123 cef_translator_test_t* _struct = GetStruct(); 21124diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h 21125index 35da08479b6b4..8384cefe5b8ca 21126--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h 21127+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h 21128@@ -1,4 +1,4 @@ 21129-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21130+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21131 // reserved. Use of this source code is governed by a BSD-style license that 21132 // can be found in the LICENSE file. 21133 // 21134@@ -9,7 +9,7 @@ 21135 // implementations. See the translator.README.txt file in the tools directory 21136 // for more information. 21137 // 21138-// $hash=774d22a8a54e71a2511ce6a66491d9563302f0bf$ 21139+// $hash=915917340262b6243b06022fe96cc1e96625cac9$ 21140 // 21141 21142 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_CTOCPP_H_ 21143diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc 21144index 89c9f27dba596..b491fb2541c8f 21145--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc 21146+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc 21147@@ -1,4 +1,4 @@ 21148-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21149+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21150 // reserved. Use of this source code is governed by a BSD-style license that 21151 // can be found in the LICENSE file. 21152 // 21153@@ -9,7 +9,7 @@ 21154 // implementations. See the translator.README.txt file in the tools directory 21155 // for more information. 21156 // 21157-// $hash=6aacf410858db1defe08179c985f4466fca2751f$ 21158+// $hash=aa0f3c0f4378474dbd62f65751378c4402bd591c$ 21159 // 21160 21161 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h" 21162diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h 21163index 944ad33402a0d..d59c50cf4f9a2 21164--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h 21165+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h 21166@@ -1,4 +1,4 @@ 21167-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21168+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21169 // reserved. Use of this source code is governed by a BSD-style license that 21170 // can be found in the LICENSE file. 21171 // 21172@@ -9,7 +9,7 @@ 21173 // implementations. See the translator.README.txt file in the tools directory 21174 // for more information. 21175 // 21176-// $hash=f3c4158147b008b8fff038ff6f731419a9950c4d$ 21177+// $hash=971a30d8a2814ecdddb08763016621ce94b9da92$ 21178 // 21179 21180 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CTOCPP_H_ 21181diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc 21182index 014e615300eda..720d5e6dc34aa 21183--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc 21184+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc 21185@@ -1,4 +1,4 @@ 21186-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21187+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21188 // reserved. Use of this source code is governed by a BSD-style license that 21189 // can be found in the LICENSE file. 21190 // 21191@@ -9,7 +9,7 @@ 21192 // implementations. See the translator.README.txt file in the tools directory 21193 // for more information. 21194 // 21195-// $hash=ca187683ddab3822fcf3d957c76ed27db6e8e433$ 21196+// $hash=06ef08d535f3cc8b9ac7da2cb38711b01c58ca8e$ 21197 // 21198 21199 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h" 21200diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h 21201index 0c06f5828dad6..968847f2b10ca 21202--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h 21203+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h 21204@@ -1,4 +1,4 @@ 21205-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21206+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21207 // reserved. Use of this source code is governed by a BSD-style license that 21208 // can be found in the LICENSE file. 21209 // 21210@@ -9,7 +9,7 @@ 21211 // implementations. See the translator.README.txt file in the tools directory 21212 // for more information. 21213 // 21214-// $hash=2e2a98039972801804b3b4d7b1d1220406489ad3$ 21215+// $hash=a083f0198c6c93ee0fccdb262dce8dc567abbf9c$ 21216 // 21217 21218 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CTOCPP_H_ 21219diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc 21220index 2dd42a1b3e172..3e6da2333e58d 21221--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc 21222+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc 21223@@ -1,4 +1,4 @@ 21224-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21225+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21226 // reserved. Use of this source code is governed by a BSD-style license that 21227 // can be found in the LICENSE file. 21228 // 21229@@ -9,7 +9,7 @@ 21230 // implementations. See the translator.README.txt file in the tools directory 21231 // for more information. 21232 // 21233-// $hash=5e599a9605e47372695d89a86eab37827e5971f2$ 21234+// $hash=ed0f0c476f97fffa6f0b29c005508b475268f4c2$ 21235 // 21236 21237 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h" 21238@@ -18,10 +18,9 @@ 21239 // STATIC METHODS - Body may be edited by hand. 21240 21241 NO_SANITIZE("cfi-icall") 21242-CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild> 21243-CefTranslatorTestRefPtrLibraryChildChild::Create(int value, 21244- int other_value, 21245- int other_other_value) { 21246+CefRefPtr< 21247+ CefTranslatorTestRefPtrLibraryChildChild> CefTranslatorTestRefPtrLibraryChildChild:: 21248+ Create(int value, int other_value, int other_other_value) { 21249 shutdown_checker::AssertNotShutdown(); 21250 21251 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21252diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h 21253index 91721a654561f..f6a503a2956b1 21254--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h 21255+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h 21256@@ -1,4 +1,4 @@ 21257-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21258+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21259 // reserved. Use of this source code is governed by a BSD-style license that 21260 // can be found in the LICENSE file. 21261 // 21262@@ -9,7 +9,7 @@ 21263 // implementations. See the translator.README.txt file in the tools directory 21264 // for more information. 21265 // 21266-// $hash=32cd86770e8fac3498f23bff1a0efac7a875997e$ 21267+// $hash=49af27e043172c178c3ef4f37805069e6af739e6$ 21268 // 21269 21270 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CTOCPP_H_ 21271diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc 21272index ed17322cde510..17cd2c16deeca 21273--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc 21274+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc 21275@@ -1,4 +1,4 @@ 21276-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21277+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21278 // reserved. Use of this source code is governed by a BSD-style license that 21279 // can be found in the LICENSE file. 21280 // 21281@@ -9,7 +9,7 @@ 21282 // implementations. See the translator.README.txt file in the tools directory 21283 // for more information. 21284 // 21285-// $hash=8559b9fd1e73bb91333d687174f5730e67f1f0f2$ 21286+// $hash=f6e8f53e06ca266f08582a01a75da91669335bb4$ 21287 // 21288 21289 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h" 21290@@ -19,8 +19,9 @@ 21291 // STATIC METHODS - Body may be edited by hand. 21292 21293 NO_SANITIZE("cfi-icall") 21294-CefRefPtr<CefTranslatorTestRefPtrLibraryChild> 21295-CefTranslatorTestRefPtrLibraryChild::Create(int value, int other_value) { 21296+CefRefPtr< 21297+ CefTranslatorTestRefPtrLibraryChild> CefTranslatorTestRefPtrLibraryChild:: 21298+ Create(int value, int other_value) { 21299 shutdown_checker::AssertNotShutdown(); 21300 21301 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21302diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h 21303index da6b1bcfc8c3c..a5e5b711626ec 21304--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h 21305+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h 21306@@ -1,4 +1,4 @@ 21307-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21308+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21309 // reserved. Use of this source code is governed by a BSD-style license that 21310 // can be found in the LICENSE file. 21311 // 21312@@ -9,7 +9,7 @@ 21313 // implementations. See the translator.README.txt file in the tools directory 21314 // for more information. 21315 // 21316-// $hash=9d4419c7bdfefd05f890a65b0660459aaf2d09b5$ 21317+// $hash=ef77c876031b14fdee487305c5cfded6a9cb910f$ 21318 // 21319 21320 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CTOCPP_H_ 21321diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc 21322index 9d0f21f5a6257..ba122a70e23ab 21323--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc 21324+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc 21325@@ -1,4 +1,4 @@ 21326-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21327+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21328 // reserved. Use of this source code is governed by a BSD-style license that 21329 // can be found in the LICENSE file. 21330 // 21331@@ -9,7 +9,7 @@ 21332 // implementations. See the translator.README.txt file in the tools directory 21333 // for more information. 21334 // 21335-// $hash=f320ce71f5396e28767dfdb2292c87a8c2396cf8$ 21336+// $hash=9350838bdab0fb5944a83d88f3cdd07485934de3$ 21337 // 21338 21339 #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h" 21340@@ -20,8 +20,8 @@ 21341 // STATIC METHODS - Body may be edited by hand. 21342 21343 NO_SANITIZE("cfi-icall") 21344-CefRefPtr<CefTranslatorTestRefPtrLibrary> 21345-CefTranslatorTestRefPtrLibrary::Create(int value) { 21346+CefRefPtr<CefTranslatorTestRefPtrLibrary> CefTranslatorTestRefPtrLibrary:: 21347+ Create(int value) { 21348 shutdown_checker::AssertNotShutdown(); 21349 21350 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21351diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h 21352index c272ec8dba8df..94ff9da719a4a 21353--- a/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h 21354+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h 21355@@ -1,4 +1,4 @@ 21356-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21357+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21358 // reserved. Use of this source code is governed by a BSD-style license that 21359 // can be found in the LICENSE file. 21360 // 21361@@ -9,7 +9,7 @@ 21362 // implementations. See the translator.README.txt file in the tools directory 21363 // for more information. 21364 // 21365-// $hash=231daa6fa72550190c115cce1bd560cb6c1bff3d$ 21366+// $hash=9fa8897ee5081b7cd95a6cb791fb69871f61406e$ 21367 // 21368 21369 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CTOCPP_H_ 21370diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc 21371index 2d9a98250d86d..fa073a3022440 21372--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc 21373+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc 21374@@ -1,4 +1,4 @@ 21375-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21376+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21377 // reserved. Use of this source code is governed by a BSD-style license that 21378 // can be found in the LICENSE file. 21379 // 21380@@ -9,7 +9,7 @@ 21381 // implementations. See the translator.README.txt file in the tools directory 21382 // for more information. 21383 // 21384-// $hash=fa5ba1bf14400032e49a447b7fe9dbe9cf1ba397$ 21385+// $hash=80f2c8ea70fc27532676263174c3bb9dab73cd7f$ 21386 // 21387 21388 #include "libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h" 21389diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h 21390index 7476a3f9cf4a5..36339c17754ef 21391--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h 21392+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h 21393@@ -1,4 +1,4 @@ 21394-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21395+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21396 // reserved. Use of this source code is governed by a BSD-style license that 21397 // can be found in the LICENSE file. 21398 // 21399@@ -9,7 +9,7 @@ 21400 // implementations. See the translator.README.txt file in the tools directory 21401 // for more information. 21402 // 21403-// $hash=4ab24d3002067939ef0106a8686ca59559b2270e$ 21404+// $hash=ec4bff6137c66581b34dc2ef11beb02276de163a$ 21405 // 21406 21407 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CTOCPP_H_ 21408diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc 21409index 3756c08be5082..d07db6f3ca934 21410--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc 21411+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc 21412@@ -1,4 +1,4 @@ 21413-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21414+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21415 // reserved. Use of this source code is governed by a BSD-style license that 21416 // can be found in the LICENSE file. 21417 // 21418@@ -9,7 +9,7 @@ 21419 // implementations. See the translator.README.txt file in the tools directory 21420 // for more information. 21421 // 21422-// $hash=64d48341c3629153282b16d20e858e8166f6dbbd$ 21423+// $hash=d4be1c7299a237b9c5fc3ef0629e4fc502bd94d5$ 21424 // 21425 21426 #include "libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h" 21427diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h 21428index 8ca713b78e3d6..caeaf6941d6fa 21429--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h 21430+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h 21431@@ -1,4 +1,4 @@ 21432-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21433+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21434 // reserved. Use of this source code is governed by a BSD-style license that 21435 // can be found in the LICENSE file. 21436 // 21437@@ -9,7 +9,7 @@ 21438 // implementations. See the translator.README.txt file in the tools directory 21439 // for more information. 21440 // 21441-// $hash=d0a9d6ca17834c09fbd63e06ebb38c337dc64f62$ 21442+// $hash=d511f3a8273e4d9c6acff3d183b7bfa84e1385e3$ 21443 // 21444 21445 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CTOCPP_H_ 21446diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc 21447index bfeea0faffda6..be5ec972a64a9 21448--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc 21449+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc 21450@@ -1,4 +1,4 @@ 21451-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21452+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21453 // reserved. Use of this source code is governed by a BSD-style license that 21454 // can be found in the LICENSE file. 21455 // 21456@@ -9,7 +9,7 @@ 21457 // implementations. See the translator.README.txt file in the tools directory 21458 // for more information. 21459 // 21460-// $hash=2663f92f7373738d13ee8d194684e6f818afa950$ 21461+// $hash=48599a7413e48d0e2f053aa6fdfdec866387e149$ 21462 // 21463 21464 #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h" 21465@@ -17,10 +17,9 @@ 21466 // STATIC METHODS - Body may be edited by hand. 21467 21468 NO_SANITIZE("cfi-icall") 21469-CefOwnPtr<CefTranslatorTestScopedLibraryChildChild> 21470-CefTranslatorTestScopedLibraryChildChild::Create(int value, 21471- int other_value, 21472- int other_other_value) { 21473+CefOwnPtr< 21474+ CefTranslatorTestScopedLibraryChildChild> CefTranslatorTestScopedLibraryChildChild:: 21475+ Create(int value, int other_value, int other_other_value) { 21476 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21477 21478 // Execute 21479diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h 21480index e3e05d1c1a1b2..8b3fd3485db40 21481--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h 21482+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h 21483@@ -1,4 +1,4 @@ 21484-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21485+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21486 // reserved. Use of this source code is governed by a BSD-style license that 21487 // can be found in the LICENSE file. 21488 // 21489@@ -9,7 +9,7 @@ 21490 // implementations. See the translator.README.txt file in the tools directory 21491 // for more information. 21492 // 21493-// $hash=d430f8b9888494995d534bac8a61d809acb5fde7$ 21494+// $hash=b6fc182f3444ce3926bff6d2b30d14aeca4cb9ba$ 21495 // 21496 21497 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CTOCPP_H_ 21498diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc 21499index c2d2a73720920..916749490414f 21500--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc 21501+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc 21502@@ -1,4 +1,4 @@ 21503-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21504+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21505 // reserved. Use of this source code is governed by a BSD-style license that 21506 // can be found in the LICENSE file. 21507 // 21508@@ -9,7 +9,7 @@ 21509 // implementations. See the translator.README.txt file in the tools directory 21510 // for more information. 21511 // 21512-// $hash=cf0153094b5c99af0d2ff0f278da810e13a6d889$ 21513+// $hash=b591e72d8eb23b5ed62a7d877e5a498211fd029f$ 21514 // 21515 21516 #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h" 21517@@ -18,8 +18,9 @@ 21518 // STATIC METHODS - Body may be edited by hand. 21519 21520 NO_SANITIZE("cfi-icall") 21521-CefOwnPtr<CefTranslatorTestScopedLibraryChild> 21522-CefTranslatorTestScopedLibraryChild::Create(int value, int other_value) { 21523+CefOwnPtr< 21524+ CefTranslatorTestScopedLibraryChild> CefTranslatorTestScopedLibraryChild:: 21525+ Create(int value, int other_value) { 21526 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21527 21528 // Execute 21529diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h 21530index ed77db0d85abf..e4ab2f9ea42ae 21531--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h 21532+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h 21533@@ -1,4 +1,4 @@ 21534-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21535+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21536 // reserved. Use of this source code is governed by a BSD-style license that 21537 // can be found in the LICENSE file. 21538 // 21539@@ -9,7 +9,7 @@ 21540 // implementations. See the translator.README.txt file in the tools directory 21541 // for more information. 21542 // 21543-// $hash=76f7b6c6e70c1a0e516bb840287553e4163866b7$ 21544+// $hash=954fc390e3b474eedcf0bbb3df41e717c00449d3$ 21545 // 21546 21547 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CTOCPP_H_ 21548diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc 21549index e619944d5e172..2bc97d33bcd92 21550--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc 21551+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc 21552@@ -1,4 +1,4 @@ 21553-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21554+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21555 // reserved. Use of this source code is governed by a BSD-style license that 21556 // can be found in the LICENSE file. 21557 // 21558@@ -9,7 +9,7 @@ 21559 // implementations. See the translator.README.txt file in the tools directory 21560 // for more information. 21561 // 21562-// $hash=a3fd73f0bc089be47e4ebaf9db033d51bebe1498$ 21563+// $hash=75d382a064212122a7aba39519a9ab4bf8e36160$ 21564 // 21565 21566 #include "libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h" 21567@@ -19,8 +19,8 @@ 21568 // STATIC METHODS - Body may be edited by hand. 21569 21570 NO_SANITIZE("cfi-icall") 21571-CefOwnPtr<CefTranslatorTestScopedLibrary> 21572-CefTranslatorTestScopedLibrary::Create(int value) { 21573+CefOwnPtr<CefTranslatorTestScopedLibrary> CefTranslatorTestScopedLibrary:: 21574+ Create(int value) { 21575 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 21576 21577 // Execute 21578diff --git a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h 21579index 3ff0bbe1694eb..c40e19efc74b2 21580--- a/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h 21581+++ b/src/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h 21582@@ -1,4 +1,4 @@ 21583-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21584+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21585 // reserved. Use of this source code is governed by a BSD-style license that 21586 // can be found in the LICENSE file. 21587 // 21588@@ -9,7 +9,7 @@ 21589 // implementations. See the translator.README.txt file in the tools directory 21590 // for more information. 21591 // 21592-// $hash=0c47852a4585753b8775a38b380be6f38fe45027$ 21593+// $hash=5fafb4986f557d448f6f234fd49ea899eac81af1$ 21594 // 21595 21596 #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CTOCPP_H_ 21597diff --git a/src/cef/libcef_dll/ctocpp/thread_ctocpp.cc b/src/cef/libcef_dll/ctocpp/thread_ctocpp.cc 21598index 9409fb6c2d5ad..abeaabd45f539 21599--- a/src/cef/libcef_dll/ctocpp/thread_ctocpp.cc 21600+++ b/src/cef/libcef_dll/ctocpp/thread_ctocpp.cc 21601@@ -1,4 +1,4 @@ 21602-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21603+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21604 // reserved. Use of this source code is governed by a BSD-style license that 21605 // can be found in the LICENSE file. 21606 // 21607@@ -9,7 +9,7 @@ 21608 // implementations. See the translator.README.txt file in the tools directory 21609 // for more information. 21610 // 21611-// $hash=207fe292d5fec167e20971c9948d0b183e6b3b20$ 21612+// $hash=20ac33e64e1f0d3ada4403665da43b34c2ae635d$ 21613 // 21614 21615 #include "libcef_dll/ctocpp/thread_ctocpp.h" 21616diff --git a/src/cef/libcef_dll/ctocpp/thread_ctocpp.h b/src/cef/libcef_dll/ctocpp/thread_ctocpp.h 21617index cfccc6ade380a..5bdc3574ce620 21618--- a/src/cef/libcef_dll/ctocpp/thread_ctocpp.h 21619+++ b/src/cef/libcef_dll/ctocpp/thread_ctocpp.h 21620@@ -1,4 +1,4 @@ 21621-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21622+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21623 // reserved. Use of this source code is governed by a BSD-style license that 21624 // can be found in the LICENSE file. 21625 // 21626@@ -9,7 +9,7 @@ 21627 // implementations. See the translator.README.txt file in the tools directory 21628 // for more information. 21629 // 21630-// $hash=44235fe8d735fdbbb7482c647f7779247f43a2f5$ 21631+// $hash=63729fa2f06672498bde63eaa8151b20db9e6fd8$ 21632 // 21633 21634 #ifndef CEF_LIBCEF_DLL_CTOCPP_THREAD_CTOCPP_H_ 21635diff --git a/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc b/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc 21636index 8e6bf46cafb25..4471ec7c1caf5 21637--- a/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc 21638+++ b/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc 21639@@ -1,4 +1,4 @@ 21640-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21641+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21642 // reserved. Use of this source code is governed by a BSD-style license that 21643 // can be found in the LICENSE file. 21644 // 21645@@ -9,7 +9,7 @@ 21646 // implementations. See the translator.README.txt file in the tools directory 21647 // for more information. 21648 // 21649-// $hash=54962c13fcad1a38aaad37a7dae6744090ebee97$ 21650+// $hash=aff88b737847eb0217c13f396e450ce68c554bb7$ 21651 // 21652 21653 #include "libcef_dll/ctocpp/urlrequest_client_ctocpp.h" 21654diff --git a/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h b/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h 21655index 7cef3061cc6f9..dd081f9c62504 21656--- a/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h 21657+++ b/src/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h 21658@@ -1,4 +1,4 @@ 21659-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21660+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21661 // reserved. Use of this source code is governed by a BSD-style license that 21662 // can be found in the LICENSE file. 21663 // 21664@@ -9,7 +9,7 @@ 21665 // implementations. See the translator.README.txt file in the tools directory 21666 // for more information. 21667 // 21668-// $hash=31b2f537bea0b8088a861224b42c313ee87927d6$ 21669+// $hash=50740eddae0ae234cf24d2b73eadcfdb16fcf0f0$ 21670 // 21671 21672 #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_ 21673diff --git a/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc b/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc 21674index 6acd4a9cd2be2..b754fc9e00288 21675--- a/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc 21676+++ b/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc 21677@@ -1,4 +1,4 @@ 21678-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21679+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21680 // reserved. Use of this source code is governed by a BSD-style license that 21681 // can be found in the LICENSE file. 21682 // 21683@@ -9,7 +9,7 @@ 21684 // implementations. See the translator.README.txt file in the tools directory 21685 // for more information. 21686 // 21687-// $hash=d3d0a83754df9a39d8f951ea488dd5417d20e9b2$ 21688+// $hash=eb0b6de22dac921f6fc10121ca33f3dd31ddf6c9$ 21689 // 21690 21691 #include "libcef_dll/ctocpp/urlrequest_ctocpp.h" 21692diff --git a/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h b/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h 21693index 5c879dd06436f..7a2bff5eac300 21694--- a/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h 21695+++ b/src/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h 21696@@ -1,4 +1,4 @@ 21697-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21698+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21699 // reserved. Use of this source code is governed by a BSD-style license that 21700 // can be found in the LICENSE file. 21701 // 21702@@ -9,7 +9,7 @@ 21703 // implementations. See the translator.README.txt file in the tools directory 21704 // for more information. 21705 // 21706-// $hash=896c3b5eea61c12c9101ddc5795ed63125ec3445$ 21707+// $hash=8c953a3dd5cdec5cba6160e848884c2f7c9b3ac6$ 21708 // 21709 21710 #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ 21711diff --git a/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc 21712index 8b6fd3bd718f1..ac60daf2a2712 21713--- a/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc 21714+++ b/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc 21715@@ -1,4 +1,4 @@ 21716-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21717+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21718 // reserved. Use of this source code is governed by a BSD-style license that 21719 // can be found in the LICENSE file. 21720 // 21721@@ -9,7 +9,7 @@ 21722 // implementations. See the translator.README.txt file in the tools directory 21723 // for more information. 21724 // 21725-// $hash=c2815712e9960e6850bb646ba0009fe42e8a2624$ 21726+// $hash=5bcd3bf00cfea75a32f61b539fd3232a87b0ccdc$ 21727 // 21728 21729 #include "libcef_dll/ctocpp/v8accessor_ctocpp.h" 21730diff --git a/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h 21731index 6b552a781ea20..45c4de9f41133 21732--- a/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h 21733+++ b/src/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h 21734@@ -1,4 +1,4 @@ 21735-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21736+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21737 // reserved. Use of this source code is governed by a BSD-style license that 21738 // can be found in the LICENSE file. 21739 // 21740@@ -9,7 +9,7 @@ 21741 // implementations. See the translator.README.txt file in the tools directory 21742 // for more information. 21743 // 21744-// $hash=0c7b83fe013c87d35cf3c944e53ec7afef0ac11a$ 21745+// $hash=1d8a3afd0e6a0344a9c5f6e301b517e5f906c186$ 21746 // 21747 21748 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_ 21749diff --git a/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc 21750index aa062aa4a61fc..c6f707eb815b2 21751--- a/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc 21752+++ b/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc 21753@@ -1,4 +1,4 @@ 21754-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21755+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21756 // reserved. Use of this source code is governed by a BSD-style license that 21757 // can be found in the LICENSE file. 21758 // 21759@@ -9,7 +9,7 @@ 21760 // implementations. See the translator.README.txt file in the tools directory 21761 // for more information. 21762 // 21763-// $hash=04697e01edeb16ce60053867fa2b11d03dec3427$ 21764+// $hash=517e771ec058ffae390f595c0d6d0ff96a24a061$ 21765 // 21766 21767 #include "libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h" 21768diff --git a/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h 21769index b1d10766a0916..4a5292531f63a 21770--- a/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h 21771+++ b/src/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h 21772@@ -1,4 +1,4 @@ 21773-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21774+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21775 // reserved. Use of this source code is governed by a BSD-style license that 21776 // can be found in the LICENSE file. 21777 // 21778@@ -9,7 +9,7 @@ 21779 // implementations. See the translator.README.txt file in the tools directory 21780 // for more information. 21781 // 21782-// $hash=e494919a69c37ed2aa5dcd0f8ddfcbbdafba2ebb$ 21783+// $hash=4f9c4bb702d2824ee94dd334244cd9ba14609025$ 21784 // 21785 21786 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8ARRAY_BUFFER_RELEASE_CALLBACK_CTOCPP_H_ 21787diff --git a/src/cef/libcef_dll/ctocpp/v8context_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8context_ctocpp.cc 21788index d6f4bdc054623..476dddcbe9239 21789--- a/src/cef/libcef_dll/ctocpp/v8context_ctocpp.cc 21790+++ b/src/cef/libcef_dll/ctocpp/v8context_ctocpp.cc 21791@@ -1,4 +1,4 @@ 21792-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21793+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21794 // reserved. Use of this source code is governed by a BSD-style license that 21795 // can be found in the LICENSE file. 21796 // 21797@@ -9,7 +9,7 @@ 21798 // implementations. See the translator.README.txt file in the tools directory 21799 // for more information. 21800 // 21801-// $hash=8d8c4cf20f877a5eb60b47fb55d938940bb10c82$ 21802+// $hash=ff70a3aece6add8f9947070688135e60258a1f9c$ 21803 // 21804 21805 #include "libcef_dll/ctocpp/v8context_ctocpp.h" 21806diff --git a/src/cef/libcef_dll/ctocpp/v8context_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8context_ctocpp.h 21807index a261f66cd09c8..7ab4e0bc12a12 21808--- a/src/cef/libcef_dll/ctocpp/v8context_ctocpp.h 21809+++ b/src/cef/libcef_dll/ctocpp/v8context_ctocpp.h 21810@@ -1,4 +1,4 @@ 21811-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21812+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21813 // reserved. Use of this source code is governed by a BSD-style license that 21814 // can be found in the LICENSE file. 21815 // 21816@@ -9,7 +9,7 @@ 21817 // implementations. See the translator.README.txt file in the tools directory 21818 // for more information. 21819 // 21820-// $hash=b3339627f92d31a68d36574fdd7c85db0842ea63$ 21821+// $hash=c5159f67aa8d77aca23153cf6c35468af27dba14$ 21822 // 21823 21824 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ 21825diff --git a/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc 21826index 374d81edc7d04..6f5e2de514b56 21827--- a/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc 21828+++ b/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc 21829@@ -1,4 +1,4 @@ 21830-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21831+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21832 // reserved. Use of this source code is governed by a BSD-style license that 21833 // can be found in the LICENSE file. 21834 // 21835@@ -9,7 +9,7 @@ 21836 // implementations. See the translator.README.txt file in the tools directory 21837 // for more information. 21838 // 21839-// $hash=49589f2e4ad8e5598df9411f613dd717fe6a3852$ 21840+// $hash=d3a5834490a381e43d7e56469d850a0dd83b0876$ 21841 // 21842 21843 #include "libcef_dll/ctocpp/v8exception_ctocpp.h" 21844diff --git a/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.h 21845index 3ef82d9064a1f..0256b62f9ec62 21846--- a/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.h 21847+++ b/src/cef/libcef_dll/ctocpp/v8exception_ctocpp.h 21848@@ -1,4 +1,4 @@ 21849-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21850+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21851 // reserved. Use of this source code is governed by a BSD-style license that 21852 // can be found in the LICENSE file. 21853 // 21854@@ -9,7 +9,7 @@ 21855 // implementations. See the translator.README.txt file in the tools directory 21856 // for more information. 21857 // 21858-// $hash=4292e466b2740037ad1ce26147fef3138e8d34aa$ 21859+// $hash=ed15db160fa19964fe5c9902c279fa1b44bd0dbe$ 21860 // 21861 21862 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ 21863diff --git a/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc 21864index 47bc30d371f29..78c69c69396b6 21865--- a/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc 21866+++ b/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc 21867@@ -1,4 +1,4 @@ 21868-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21869+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21870 // reserved. Use of this source code is governed by a BSD-style license that 21871 // can be found in the LICENSE file. 21872 // 21873@@ -9,7 +9,7 @@ 21874 // implementations. See the translator.README.txt file in the tools directory 21875 // for more information. 21876 // 21877-// $hash=365e5e2b4e3ced4e615fa504a0cb68c66854fc37$ 21878+// $hash=da3489ef2967a060306d913e06e63759eb7e08d9$ 21879 // 21880 21881 #include "libcef_dll/ctocpp/v8handler_ctocpp.h" 21882diff --git a/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.h 21883index f4acf3ec35a26..cd5a0e42e0d35 21884--- a/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.h 21885+++ b/src/cef/libcef_dll/ctocpp/v8handler_ctocpp.h 21886@@ -1,4 +1,4 @@ 21887-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21888+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21889 // reserved. Use of this source code is governed by a BSD-style license that 21890 // can be found in the LICENSE file. 21891 // 21892@@ -9,7 +9,7 @@ 21893 // implementations. See the translator.README.txt file in the tools directory 21894 // for more information. 21895 // 21896-// $hash=0207510d301deece41373f5693eaed1a8fd185b8$ 21897+// $hash=442444a8b361b3ce3f599181fe8057d175e1cc20$ 21898 // 21899 21900 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_ 21901diff --git a/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc 21902index 32b52b1f71162..80a18f669acff 21903--- a/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc 21904+++ b/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc 21905@@ -1,4 +1,4 @@ 21906-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21907+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21908 // reserved. Use of this source code is governed by a BSD-style license that 21909 // can be found in the LICENSE file. 21910 // 21911@@ -9,7 +9,7 @@ 21912 // implementations. See the translator.README.txt file in the tools directory 21913 // for more information. 21914 // 21915-// $hash=d466cd3a17a35074eedcb222b9acd2063c297fe2$ 21916+// $hash=12c8d274bc607478d378c501c4c28d6bf61af93b$ 21917 // 21918 21919 #include "libcef_dll/ctocpp/v8interceptor_ctocpp.h" 21920diff --git a/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h 21921index f7e646274c0e7..de862c1d32d70 21922--- a/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h 21923+++ b/src/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h 21924@@ -1,4 +1,4 @@ 21925-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21926+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21927 // reserved. Use of this source code is governed by a BSD-style license that 21928 // can be found in the LICENSE file. 21929 // 21930@@ -9,7 +9,7 @@ 21931 // implementations. See the translator.README.txt file in the tools directory 21932 // for more information. 21933 // 21934-// $hash=301ccb6fb65513bc2e6197c7fa1712c5e33f2bcf$ 21935+// $hash=11fbbb5b1de3f96d332ec3653780826677ffcdf2$ 21936 // 21937 21938 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8INTERCEPTOR_CTOCPP_H_ 21939diff --git a/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc 21940index 009efe1a0814f..809f82da22f39 21941--- a/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc 21942+++ b/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc 21943@@ -1,4 +1,4 @@ 21944-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21945+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21946 // reserved. Use of this source code is governed by a BSD-style license that 21947 // can be found in the LICENSE file. 21948 // 21949@@ -9,7 +9,7 @@ 21950 // implementations. See the translator.README.txt file in the tools directory 21951 // for more information. 21952 // 21953-// $hash=5dad5940fbf85e63683112a937d47dbe52f1b64a$ 21954+// $hash=4b7b77ed27848ada4ef09c9a372d42972e179930$ 21955 // 21956 21957 #include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" 21958diff --git a/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h 21959index 0fb8ea2ca6658..474cd1ad6faee 21960--- a/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h 21961+++ b/src/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h 21962@@ -1,4 +1,4 @@ 21963-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21964+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21965 // reserved. Use of this source code is governed by a BSD-style license that 21966 // can be found in the LICENSE file. 21967 // 21968@@ -9,7 +9,7 @@ 21969 // implementations. See the translator.README.txt file in the tools directory 21970 // for more information. 21971 // 21972-// $hash=e088f626fec9b9848e532d704c34ceabb46df3be$ 21973+// $hash=366d110fdfaf3d241c26e9ec276f7c363ecd313f$ 21974 // 21975 21976 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ 21977diff --git a/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc 21978index d51002ad6bef9..b7c32ace04fe9 21979--- a/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc 21980+++ b/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc 21981@@ -1,4 +1,4 @@ 21982-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 21983+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 21984 // reserved. Use of this source code is governed by a BSD-style license that 21985 // can be found in the LICENSE file. 21986 // 21987@@ -9,7 +9,7 @@ 21988 // implementations. See the translator.README.txt file in the tools directory 21989 // for more information. 21990 // 21991-// $hash=bf78c133604e1535633ac8c93ca153bcefe2718d$ 21992+// $hash=2bd6f8998f43d4212da6b28ac4863763087310ce$ 21993 // 21994 21995 #include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" 21996diff --git a/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h 21997index c3b7269bf78ab..1e076ac1321fa 21998--- a/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h 21999+++ b/src/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h 22000@@ -1,4 +1,4 @@ 22001-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22002+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22003 // reserved. Use of this source code is governed by a BSD-style license that 22004 // can be found in the LICENSE file. 22005 // 22006@@ -9,7 +9,7 @@ 22007 // implementations. See the translator.README.txt file in the tools directory 22008 // for more information. 22009 // 22010-// $hash=f2f275b83841463cf102c60380e2b0561f3a749c$ 22011+// $hash=361eefa5a258faf92d09e28787293fa29bbed742$ 22012 // 22013 22014 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ 22015diff --git a/src/cef/libcef_dll/ctocpp/v8value_ctocpp.cc b/src/cef/libcef_dll/ctocpp/v8value_ctocpp.cc 22016index 02607cd3c79ba..b314e53f8ec1a 22017--- a/src/cef/libcef_dll/ctocpp/v8value_ctocpp.cc 22018+++ b/src/cef/libcef_dll/ctocpp/v8value_ctocpp.cc 22019@@ -1,4 +1,4 @@ 22020-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22021+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22022 // reserved. Use of this source code is governed by a BSD-style license that 22023 // can be found in the LICENSE file. 22024 // 22025@@ -9,7 +9,7 @@ 22026 // implementations. See the translator.README.txt file in the tools directory 22027 // for more information. 22028 // 22029-// $hash=7863f5701d466f8d5a5c91962e14b14b500315a3$ 22030+// $hash=44cb0b037d9dab3bf00531c0bd6e88feb41c6416$ 22031 // 22032 22033 #include "libcef_dll/ctocpp/v8value_ctocpp.h" 22034@@ -847,8 +847,8 @@ NO_SANITIZE("cfi-icall") int CefV8ValueCToCpp::GetArrayLength() { 22035 } 22036 22037 NO_SANITIZE("cfi-icall") 22038-CefRefPtr<CefV8ArrayBufferReleaseCallback> 22039-CefV8ValueCToCpp::GetArrayBufferReleaseCallback() { 22040+CefRefPtr<CefV8ArrayBufferReleaseCallback> CefV8ValueCToCpp:: 22041+ GetArrayBufferReleaseCallback() { 22042 cef_v8value_t* _struct = GetStruct(); 22043 if (CEF_MEMBER_MISSING(_struct, get_array_buffer_release_callback)) 22044 return nullptr; 22045diff --git a/src/cef/libcef_dll/ctocpp/v8value_ctocpp.h b/src/cef/libcef_dll/ctocpp/v8value_ctocpp.h 22046index c8363ea2bb463..c53337a865930 22047--- a/src/cef/libcef_dll/ctocpp/v8value_ctocpp.h 22048+++ b/src/cef/libcef_dll/ctocpp/v8value_ctocpp.h 22049@@ -1,4 +1,4 @@ 22050-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22051+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22052 // reserved. Use of this source code is governed by a BSD-style license that 22053 // can be found in the LICENSE file. 22054 // 22055@@ -9,7 +9,7 @@ 22056 // implementations. See the translator.README.txt file in the tools directory 22057 // for more information. 22058 // 22059-// $hash=c9725eb41d50cd0bdbe6f84280e0ed7b62012136$ 22060+// $hash=c8329f6a0ffd01d3e0e3fcb3e07913ac355a508d$ 22061 // 22062 22063 #ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ 22064diff --git a/src/cef/libcef_dll/ctocpp/value_ctocpp.cc b/src/cef/libcef_dll/ctocpp/value_ctocpp.cc 22065index 192c9cfc2eab6..27ca05c2e6b91 22066--- a/src/cef/libcef_dll/ctocpp/value_ctocpp.cc 22067+++ b/src/cef/libcef_dll/ctocpp/value_ctocpp.cc 22068@@ -1,4 +1,4 @@ 22069-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22070+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22071 // reserved. Use of this source code is governed by a BSD-style license that 22072 // can be found in the LICENSE file. 22073 // 22074@@ -9,7 +9,7 @@ 22075 // implementations. See the translator.README.txt file in the tools directory 22076 // for more information. 22077 // 22078-// $hash=9f75af2c3d5e4411027b6f26bcc0d31728baed34$ 22079+// $hash=8ef5da831e8fef358361365f434a5719a0829c08$ 22080 // 22081 22082 #include "libcef_dll/ctocpp/value_ctocpp.h" 22083diff --git a/src/cef/libcef_dll/ctocpp/value_ctocpp.h b/src/cef/libcef_dll/ctocpp/value_ctocpp.h 22084index b03df117330a6..9b31150c63294 22085--- a/src/cef/libcef_dll/ctocpp/value_ctocpp.h 22086+++ b/src/cef/libcef_dll/ctocpp/value_ctocpp.h 22087@@ -1,4 +1,4 @@ 22088-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22089+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22090 // reserved. Use of this source code is governed by a BSD-style license that 22091 // can be found in the LICENSE file. 22092 // 22093@@ -9,7 +9,7 @@ 22094 // implementations. See the translator.README.txt file in the tools directory 22095 // for more information. 22096 // 22097-// $hash=4fbbd168e0d26ec54abf2e46808ab98da1900f5c$ 22098+// $hash=80621c9fcd1e112984ddb490da40034e9731d530$ 22099 // 22100 22101 #ifndef CEF_LIBCEF_DLL_CTOCPP_VALUE_CTOCPP_H_ 22102diff --git a/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc 22103index b8787d66c02c0..8bb6ef9bd83cf 22104--- a/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc 22105+++ b/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc 22106@@ -1,4 +1,4 @@ 22107-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22108+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22109 // reserved. Use of this source code is governed by a BSD-style license that 22110 // can be found in the LICENSE file. 22111 // 22112@@ -9,7 +9,7 @@ 22113 // implementations. See the translator.README.txt file in the tools directory 22114 // for more information. 22115 // 22116-// $hash=40ce0ebcedcd5995a5a3147049e5b34c016b8519$ 22117+// $hash=af4061bbf8813e143420ebc4a45b81e43acc6803$ 22118 // 22119 22120 #include "libcef_dll/ctocpp/views/box_layout_ctocpp.h" 22121diff --git a/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h 22122index 82879c8cf1be4..6639e642f2cec 22123--- a/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h 22124+++ b/src/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h 22125@@ -1,4 +1,4 @@ 22126-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22127+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22128 // reserved. Use of this source code is governed by a BSD-style license that 22129 // can be found in the LICENSE file. 22130 // 22131@@ -9,7 +9,7 @@ 22132 // implementations. See the translator.README.txt file in the tools directory 22133 // for more information. 22134 // 22135-// $hash=0d208d785b4fa84ba2e9f8245911d1a47f5e206c$ 22136+// $hash=c14b6372ec4705cdcbcebc6d7367fe0c3c544001$ 22137 // 22138 22139 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BOX_LAYOUT_CTOCPP_H_ 22140diff --git a/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc 22141index 3657097b086a7..0df141ea86477 22142--- a/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc 22143+++ b/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc 22144@@ -1,4 +1,4 @@ 22145-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22146+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22147 // reserved. Use of this source code is governed by a BSD-style license that 22148 // can be found in the LICENSE file. 22149 // 22150@@ -9,7 +9,7 @@ 22151 // implementations. See the translator.README.txt file in the tools directory 22152 // for more information. 22153 // 22154-// $hash=d7787cf791b4b19620257f295112feb3d3c40f24$ 22155+// $hash=fcf1f54e5758c61ccbaea88fc133c88755915eaa$ 22156 // 22157 22158 #include "libcef_dll/ctocpp/views/browser_view_ctocpp.h" 22159diff --git a/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h 22160index 88599fe62488b..526b63fdf3480 22161--- a/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h 22162+++ b/src/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h 22163@@ -1,4 +1,4 @@ 22164-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22165+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22166 // reserved. Use of this source code is governed by a BSD-style license that 22167 // can be found in the LICENSE file. 22168 // 22169@@ -9,7 +9,7 @@ 22170 // implementations. See the translator.README.txt file in the tools directory 22171 // for more information. 22172 // 22173-// $hash=8744854c12c6ea110a5a6eb4f15ccd5b5867c1d1$ 22174+// $hash=3369ae36dfebd0283661566cf91fa57dbfec29e4$ 22175 // 22176 22177 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_ 22178diff --git a/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc 22179index 6d3dae0eb3d25..6ba31f51a0278 22180--- a/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc 22181+++ b/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc 22182@@ -1,4 +1,4 @@ 22183-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22184+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22185 // reserved. Use of this source code is governed by a BSD-style license that 22186 // can be found in the LICENSE file. 22187 // 22188@@ -9,7 +9,7 @@ 22189 // implementations. See the translator.README.txt file in the tools directory 22190 // for more information. 22191 // 22192-// $hash=379974b466cf5b511906b6492c7fa594a26e4d33$ 22193+// $hash=cef68f9f361591f91495436c08d0f5e07738a594$ 22194 // 22195 22196 #include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h" 22197@@ -75,12 +75,11 @@ void CefBrowserViewDelegateCToCpp::OnBrowserDestroyed( 22198 } 22199 22200 NO_SANITIZE("cfi-icall") 22201-CefRefPtr<CefBrowserViewDelegate> 22202-CefBrowserViewDelegateCToCpp::GetDelegateForPopupBrowserView( 22203- CefRefPtr<CefBrowserView> browser_view, 22204- const CefBrowserSettings& settings, 22205- CefRefPtr<CefClient> client, 22206- bool is_devtools) { 22207+CefRefPtr<CefBrowserViewDelegate> CefBrowserViewDelegateCToCpp:: 22208+ GetDelegateForPopupBrowserView(CefRefPtr<CefBrowserView> browser_view, 22209+ const CefBrowserSettings& settings, 22210+ CefRefPtr<CefClient> client, 22211+ bool is_devtools) { 22212 shutdown_checker::AssertNotShutdown(); 22213 22214 cef_browser_view_delegate_t* _struct = GetStruct(); 22215@@ -141,7 +140,7 @@ bool CefBrowserViewDelegateCToCpp::OnPopupBrowserViewCreated( 22216 22217 NO_SANITIZE("cfi-icall") 22218 CefBrowserViewDelegate::ChromeToolbarType 22219-CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { 22220+ CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { 22221 shutdown_checker::AssertNotShutdown(); 22222 22223 cef_browser_view_delegate_t* _struct = GetStruct(); 22224@@ -158,8 +157,8 @@ CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { 22225 } 22226 22227 NO_SANITIZE("cfi-icall") 22228-CefSize CefBrowserViewDelegateCToCpp::GetPreferredSize( 22229- CefRefPtr<CefView> view) { 22230+CefSize 22231+ CefBrowserViewDelegateCToCpp::GetPreferredSize(CefRefPtr<CefView> view) { 22232 shutdown_checker::AssertNotShutdown(); 22233 22234 cef_view_delegate_t* _struct = 22235diff --git a/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h 22236index 50666b217f1e4..bc1abf588bf87 22237--- a/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h 22238+++ b/src/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h 22239@@ -1,4 +1,4 @@ 22240-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22241+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22242 // reserved. Use of this source code is governed by a BSD-style license that 22243 // can be found in the LICENSE file. 22244 // 22245@@ -9,7 +9,7 @@ 22246 // implementations. See the translator.README.txt file in the tools directory 22247 // for more information. 22248 // 22249-// $hash=5aabb450064c183478e8cbcd7b96a9d308bc5c59$ 22250+// $hash=ae219b09b69d7a49f48878a5d2f94b25c9b4150b$ 22251 // 22252 22253 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_DELEGATE_CTOCPP_H_ 22254diff --git a/src/cef/libcef_dll/ctocpp/views/button_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/button_ctocpp.cc 22255index c373691ccefb1..ca0607677ad0f 22256--- a/src/cef/libcef_dll/ctocpp/views/button_ctocpp.cc 22257+++ b/src/cef/libcef_dll/ctocpp/views/button_ctocpp.cc 22258@@ -1,4 +1,4 @@ 22259-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22260+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22261 // reserved. Use of this source code is governed by a BSD-style license that 22262 // can be found in the LICENSE file. 22263 // 22264@@ -9,7 +9,7 @@ 22265 // implementations. See the translator.README.txt file in the tools directory 22266 // for more information. 22267 // 22268-// $hash=9b1509d1105e3075a13563aa5e892833abcda54a$ 22269+// $hash=b36bf494f49f9a3e0af4388a2c9121c6647b847e$ 22270 // 22271 22272 #include "libcef_dll/ctocpp/views/button_ctocpp.h" 22273diff --git a/src/cef/libcef_dll/ctocpp/views/button_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/button_ctocpp.h 22274index 452a6d8d9ce76..4f4362ee59448 22275--- a/src/cef/libcef_dll/ctocpp/views/button_ctocpp.h 22276+++ b/src/cef/libcef_dll/ctocpp/views/button_ctocpp.h 22277@@ -1,4 +1,4 @@ 22278-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22279+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22280 // reserved. Use of this source code is governed by a BSD-style license that 22281 // can be found in the LICENSE file. 22282 // 22283@@ -9,7 +9,7 @@ 22284 // implementations. See the translator.README.txt file in the tools directory 22285 // for more information. 22286 // 22287-// $hash=b09c6865b321dbc52440a306dabdf0357bf41a12$ 22288+// $hash=d6be48f8326ec9e541ace36d0b467cf6b1fbc065$ 22289 // 22290 22291 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_ 22292diff --git a/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc 22293index 1e977ec2f6b96..97d9c545e553f 22294--- a/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc 22295+++ b/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc 22296@@ -1,4 +1,4 @@ 22297-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22298+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22299 // reserved. Use of this source code is governed by a BSD-style license that 22300 // can be found in the LICENSE file. 22301 // 22302@@ -9,7 +9,7 @@ 22303 // implementations. See the translator.README.txt file in the tools directory 22304 // for more information. 22305 // 22306-// $hash=e7844e97f29fe0bcda8380932ceaa7581539d0e3$ 22307+// $hash=5466f1b16dbdad0fc520275d84d73310bf31e963$ 22308 // 22309 22310 #include "libcef_dll/ctocpp/views/button_delegate_ctocpp.h" 22311diff --git a/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h 22312index 386a3603d913b..a01a96bde6ba4 22313--- a/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h 22314+++ b/src/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h 22315@@ -1,4 +1,4 @@ 22316-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22317+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22318 // reserved. Use of this source code is governed by a BSD-style license that 22319 // can be found in the LICENSE file. 22320 // 22321@@ -9,7 +9,7 @@ 22322 // implementations. See the translator.README.txt file in the tools directory 22323 // for more information. 22324 // 22325-// $hash=3c5fbabd7adf7390101cc03058bdcac3077c26c8$ 22326+// $hash=13140a32b465eaf52f13693cd244a9b47eda5068$ 22327 // 22328 22329 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_DELEGATE_CTOCPP_H_ 22330diff --git a/src/cef/libcef_dll/ctocpp/views/display_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/display_ctocpp.cc 22331index 9a6477c2e217a..5c8b9ae115139 22332--- a/src/cef/libcef_dll/ctocpp/views/display_ctocpp.cc 22333+++ b/src/cef/libcef_dll/ctocpp/views/display_ctocpp.cc 22334@@ -1,4 +1,4 @@ 22335-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22336+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22337 // reserved. Use of this source code is governed by a BSD-style license that 22338 // can be found in the LICENSE file. 22339 // 22340@@ -9,7 +9,7 @@ 22341 // implementations. See the translator.README.txt file in the tools directory 22342 // for more information. 22343 // 22344-// $hash=ba41b36a0cdd335f2a964665576aaf50d8be9c55$ 22345+// $hash=accae5014ef5a4a426a88ae7bed580523b9f336c$ 22346 // 22347 22348 #include "libcef_dll/ctocpp/views/display_ctocpp.h" 22349diff --git a/src/cef/libcef_dll/ctocpp/views/display_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/display_ctocpp.h 22350index e3e5d5da67f09..5d12545d52d5f 22351--- a/src/cef/libcef_dll/ctocpp/views/display_ctocpp.h 22352+++ b/src/cef/libcef_dll/ctocpp/views/display_ctocpp.h 22353@@ -1,4 +1,4 @@ 22354-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22355+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22356 // reserved. Use of this source code is governed by a BSD-style license that 22357 // can be found in the LICENSE file. 22358 // 22359@@ -9,7 +9,7 @@ 22360 // implementations. See the translator.README.txt file in the tools directory 22361 // for more information. 22362 // 22363-// $hash=adc1770d93c4e52a56e98f105877cbad5c76194a$ 22364+// $hash=a05d5f989630c0c031cbe9cc04150a6e1e54c4d4$ 22365 // 22366 22367 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_DISPLAY_CTOCPP_H_ 22368diff --git a/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc 22369index b8de0a3a702fd..eca2fb2aa320c 22370--- a/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc 22371+++ b/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc 22372@@ -1,4 +1,4 @@ 22373-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22374+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22375 // reserved. Use of this source code is governed by a BSD-style license that 22376 // can be found in the LICENSE file. 22377 // 22378@@ -9,7 +9,7 @@ 22379 // implementations. See the translator.README.txt file in the tools directory 22380 // for more information. 22381 // 22382-// $hash=dafea3abdc32cc7dd8552bbdf5bd2bb32e816c5f$ 22383+// $hash=ef008b233715e98fdf22b4bf4ca1017f010eff85$ 22384 // 22385 22386 #include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h" 22387diff --git a/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h 22388index f2c36d784ce86..06b0380cf5dd5 22389--- a/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h 22390+++ b/src/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h 22391@@ -1,4 +1,4 @@ 22392-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22393+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22394 // reserved. Use of this source code is governed by a BSD-style license that 22395 // can be found in the LICENSE file. 22396 // 22397@@ -9,7 +9,7 @@ 22398 // implementations. See the translator.README.txt file in the tools directory 22399 // for more information. 22400 // 22401-// $hash=effe4fbabbcfadf905b0161c564956213ee435e5$ 22402+// $hash=5d52b0af136f7ac008cb89a29ce65942932b9f64$ 22403 // 22404 22405 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_FILL_LAYOUT_CTOCPP_H_ 22406diff --git a/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc 22407index b379353b661e3..003451772fa8f 22408--- a/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc 22409+++ b/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc 22410@@ -1,4 +1,4 @@ 22411-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22412+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22413 // reserved. Use of this source code is governed by a BSD-style license that 22414 // can be found in the LICENSE file. 22415 // 22416@@ -9,7 +9,7 @@ 22417 // implementations. See the translator.README.txt file in the tools directory 22418 // for more information. 22419 // 22420-// $hash=f9884f731b221f0c84234fd775cd480ab9ae9869$ 22421+// $hash=64550f9a864524533748f687a69fc0511096fc3a$ 22422 // 22423 22424 #include "libcef_dll/ctocpp/views/label_button_ctocpp.h" 22425diff --git a/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h 22426index 37078e9a31f8c..d7f20dcd4d445 22427--- a/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h 22428+++ b/src/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h 22429@@ -1,4 +1,4 @@ 22430-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22431+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22432 // reserved. Use of this source code is governed by a BSD-style license that 22433 // can be found in the LICENSE file. 22434 // 22435@@ -9,7 +9,7 @@ 22436 // implementations. See the translator.README.txt file in the tools directory 22437 // for more information. 22438 // 22439-// $hash=db354914ca0dfe61f4adcc196c25c38b2ad13239$ 22440+// $hash=e54619e16a7a8f21cdeeb4ddfcedf3504c258d35$ 22441 // 22442 22443 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_ 22444diff --git a/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc 22445index f33604442025e..50d2afb4cffe0 22446--- a/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc 22447+++ b/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc 22448@@ -1,4 +1,4 @@ 22449-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22450+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22451 // reserved. Use of this source code is governed by a BSD-style license that 22452 // can be found in the LICENSE file. 22453 // 22454@@ -9,7 +9,7 @@ 22455 // implementations. See the translator.README.txt file in the tools directory 22456 // for more information. 22457 // 22458-// $hash=6607a4c252dafd39ba695b5d4ecfb14286d70672$ 22459+// $hash=3d1194096844ca83c22e87918069ece5d50385ee$ 22460 // 22461 22462 #include "libcef_dll/ctocpp/views/layout_ctocpp.h" 22463diff --git a/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.h 22464index eeba37dfed67c..6ffa76d339831 22465--- a/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.h 22466+++ b/src/cef/libcef_dll/ctocpp/views/layout_ctocpp.h 22467@@ -1,4 +1,4 @@ 22468-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22469+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22470 // reserved. Use of this source code is governed by a BSD-style license that 22471 // can be found in the LICENSE file. 22472 // 22473@@ -9,7 +9,7 @@ 22474 // implementations. See the translator.README.txt file in the tools directory 22475 // for more information. 22476 // 22477-// $hash=383da9e4acb10aa03e8e250505cae2738bbe7fec$ 22478+// $hash=f50cae9c7f44f282497cff43e8b89fc76f60e51b$ 22479 // 22480 22481 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LAYOUT_CTOCPP_H_ 22482diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc 22483index 6070861fd57ac..90700bac26b88 22484--- a/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc 22485+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc 22486@@ -1,4 +1,4 @@ 22487-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22488+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22489 // reserved. Use of this source code is governed by a BSD-style license that 22490 // can be found in the LICENSE file. 22491 // 22492@@ -9,7 +9,7 @@ 22493 // implementations. See the translator.README.txt file in the tools directory 22494 // for more information. 22495 // 22496-// $hash=6821e9d7130f828fba356cd7a7980f638c8ecf3e$ 22497+// $hash=69ea7e37a9c8d66f5347571ae8064ccc15c20d2d$ 22498 // 22499 22500 #include "libcef_dll/ctocpp/views/menu_button_ctocpp.h" 22501diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h 22502index 8e7a98425313b..77293750d9b62 22503--- a/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h 22504+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h 22505@@ -1,4 +1,4 @@ 22506-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22507+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22508 // reserved. Use of this source code is governed by a BSD-style license that 22509 // can be found in the LICENSE file. 22510 // 22511@@ -9,7 +9,7 @@ 22512 // implementations. See the translator.README.txt file in the tools directory 22513 // for more information. 22514 // 22515-// $hash=41f123659afc521684bb6b273ab831944efc4611$ 22516+// $hash=0323c84d6099ab582a71a40f8065013cecc126cd$ 22517 // 22518 22519 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_ 22520diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc 22521index 96a1148784c8c..44bacb39825d2 22522--- a/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc 22523+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc 22524@@ -1,4 +1,4 @@ 22525-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22526+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22527 // reserved. Use of this source code is governed by a BSD-style license that 22528 // can be found in the LICENSE file. 22529 // 22530@@ -9,7 +9,7 @@ 22531 // implementations. See the translator.README.txt file in the tools directory 22532 // for more information. 22533 // 22534-// $hash=795437425153e56d1c82e30510922399fef0c673$ 22535+// $hash=0bf2d621b4aa5a6dbb14596ddded68005327afa7$ 22536 // 22537 22538 #include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h" 22539diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h 22540index c2d460af8e6fe..f89062917e7a2 22541--- a/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h 22542+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h 22543@@ -1,4 +1,4 @@ 22544-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22545+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22546 // reserved. Use of this source code is governed by a BSD-style license that 22547 // can be found in the LICENSE file. 22548 // 22549@@ -9,7 +9,7 @@ 22550 // implementations. See the translator.README.txt file in the tools directory 22551 // for more information. 22552 // 22553-// $hash=7f1b296579f263cdcb5ac00105e53c32e2d89f4c$ 22554+// $hash=962c2d2bc800670d19838fa2a34ab4faa8203531$ 22555 // 22556 22557 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_ 22558diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc 22559index 3d9127cafb57c..313832fd141f6 22560--- a/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc 22561+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc 22562@@ -1,4 +1,4 @@ 22563-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22564+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22565 // reserved. Use of this source code is governed by a BSD-style license that 22566 // can be found in the LICENSE file. 22567 // 22568@@ -9,7 +9,7 @@ 22569 // implementations. See the translator.README.txt file in the tools directory 22570 // for more information. 22571 // 22572-// $hash=684914b489c5d322b41d61d46f5d387675da2c30$ 22573+// $hash=52df98f1359e9a8e231ec9e2555bc883e1fa84b5$ 22574 // 22575 22576 #include "libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h" 22577diff --git a/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h 22578index fed9e9be2f36f..3a2ce082be0a5 22579--- a/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h 22580+++ b/src/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h 22581@@ -1,4 +1,4 @@ 22582-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22583+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22584 // reserved. Use of this source code is governed by a BSD-style license that 22585 // can be found in the LICENSE file. 22586 // 22587@@ -9,7 +9,7 @@ 22588 // implementations. See the translator.README.txt file in the tools directory 22589 // for more information. 22590 // 22591-// $hash=ea81c8b651b803c0d78b06a850c409da3e632b44$ 22592+// $hash=8c0bc19bcd5b9f53b0ee556fb0117e9a6115eb7f$ 22593 // 22594 22595 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_PRESSED_LOCK_CTOCPP_H_ 22596diff --git a/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc 22597index 0ad5892d95db4..a95a482be57b0 22598--- a/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc 22599+++ b/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.cc 22600@@ -1,4 +1,4 @@ 22601-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22602+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22603 // reserved. Use of this source code is governed by a BSD-style license that 22604 // can be found in the LICENSE file. 22605 // 22606@@ -9,7 +9,7 @@ 22607 // implementations. See the translator.README.txt file in the tools directory 22608 // for more information. 22609 // 22610-// $hash=60978f71bb9089d32a89bed17af584bd83a4678d$ 22611+// $hash=2c07307d7ad63e5a1bc7a223f8135f01d2d967a8$ 22612 // 22613 22614 #include "libcef_dll/ctocpp/views/overlay_controller_ctocpp.h" 22615diff --git a/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.h 22616index 2d974bee15e4c..e8c47e0c085ab 22617--- a/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.h 22618+++ b/src/cef/libcef_dll/ctocpp/views/overlay_controller_ctocpp.h 22619@@ -1,4 +1,4 @@ 22620-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22621+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22622 // reserved. Use of this source code is governed by a BSD-style license that 22623 // can be found in the LICENSE file. 22624 // 22625@@ -9,7 +9,7 @@ 22626 // implementations. See the translator.README.txt file in the tools directory 22627 // for more information. 22628 // 22629-// $hash=7e1c98d4417c831dc850f36bc6ac20d95cd03dab$ 22630+// $hash=a8dd9d8eb796f499231143866c2d8f45e9b25d0c$ 22631 // 22632 22633 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_OVERLAY_CONTROLLER_CTOCPP_H_ 22634diff --git a/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc 22635index b449a3ac83ba1..15191a6f097a6 22636--- a/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc 22637+++ b/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc 22638@@ -1,4 +1,4 @@ 22639-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22640+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22641 // reserved. Use of this source code is governed by a BSD-style license that 22642 // can be found in the LICENSE file. 22643 // 22644@@ -9,7 +9,7 @@ 22645 // implementations. See the translator.README.txt file in the tools directory 22646 // for more information. 22647 // 22648-// $hash=7989301b819a52e8c965774e5c073d5c480a599b$ 22649+// $hash=a96ee723ef03fc68ba5be2ca18eb9865ad7af01d$ 22650 // 22651 22652 #include "libcef_dll/ctocpp/views/panel_ctocpp.h" 22653diff --git a/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.h 22654index 399f001e8ddef..ee6410be3d7cf 22655--- a/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.h 22656+++ b/src/cef/libcef_dll/ctocpp/views/panel_ctocpp.h 22657@@ -1,4 +1,4 @@ 22658-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22659+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22660 // reserved. Use of this source code is governed by a BSD-style license that 22661 // can be found in the LICENSE file. 22662 // 22663@@ -9,7 +9,7 @@ 22664 // implementations. See the translator.README.txt file in the tools directory 22665 // for more information. 22666 // 22667-// $hash=409d4b16fb5d1dcc66c8553ed2fdd8b6465c8664$ 22668+// $hash=c0c4823d1084bd1ea4f2065e93b51a56718bed87$ 22669 // 22670 22671 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_ 22672diff --git a/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc 22673index 4805de5ec1467..9a81e49b56ce7 22674--- a/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc 22675+++ b/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc 22676@@ -1,4 +1,4 @@ 22677-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22678+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22679 // reserved. Use of this source code is governed by a BSD-style license that 22680 // can be found in the LICENSE file. 22681 // 22682@@ -9,7 +9,7 @@ 22683 // implementations. See the translator.README.txt file in the tools directory 22684 // for more information. 22685 // 22686-// $hash=ed477592fb540c789eef4309e7af5f40319bc4b9$ 22687+// $hash=fd199dc9e98a7880b1f5c057bb0f16934809223d$ 22688 // 22689 22690 #include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h" 22691diff --git a/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h 22692index b016340e0d2ff..62fd16d8a1c08 22693--- a/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h 22694+++ b/src/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h 22695@@ -1,4 +1,4 @@ 22696-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22697+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22698 // reserved. Use of this source code is governed by a BSD-style license that 22699 // can be found in the LICENSE file. 22700 // 22701@@ -9,7 +9,7 @@ 22702 // implementations. See the translator.README.txt file in the tools directory 22703 // for more information. 22704 // 22705-// $hash=0a0bf21c7be5169ab5ba891ba25b7b78b317e9aa$ 22706+// $hash=dcad633b9f91da4e5b08cfa8be122b6797211b46$ 22707 // 22708 22709 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_DELEGATE_CTOCPP_H_ 22710diff --git a/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc 22711index 08c91970b92f4..ef75880e7ef59 22712--- a/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc 22713+++ b/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc 22714@@ -1,4 +1,4 @@ 22715-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22716+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22717 // reserved. Use of this source code is governed by a BSD-style license that 22718 // can be found in the LICENSE file. 22719 // 22720@@ -9,7 +9,7 @@ 22721 // implementations. See the translator.README.txt file in the tools directory 22722 // for more information. 22723 // 22724-// $hash=177ae72af2cb2658ab48041dfefde9f492e4a5d5$ 22725+// $hash=0d4d7202f3053150bfee7380d3dbc9ef596683f9$ 22726 // 22727 22728 #include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h" 22729diff --git a/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h 22730index 2182ae958c388..5ceb93da79d1d 22731--- a/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h 22732+++ b/src/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h 22733@@ -1,4 +1,4 @@ 22734-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22735+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22736 // reserved. Use of this source code is governed by a BSD-style license that 22737 // can be found in the LICENSE file. 22738 // 22739@@ -9,7 +9,7 @@ 22740 // implementations. See the translator.README.txt file in the tools directory 22741 // for more information. 22742 // 22743-// $hash=6160a050b665423f41dfea54b38fade96dc2031f$ 22744+// $hash=3a3c2eee1765f8a1d86044eadc75eca9c6fae25f$ 22745 // 22746 22747 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_SCROLL_VIEW_CTOCPP_H_ 22748diff --git a/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc 22749index 0d8df0d31f1f6..9d5f7749d74cf 22750--- a/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc 22751+++ b/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc 22752@@ -1,4 +1,4 @@ 22753-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22754+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22755 // reserved. Use of this source code is governed by a BSD-style license that 22756 // can be found in the LICENSE file. 22757 // 22758@@ -9,7 +9,7 @@ 22759 // implementations. See the translator.README.txt file in the tools directory 22760 // for more information. 22761 // 22762-// $hash=3268a6e6475c3fbddcf6c83016ca3aae1d4a7c4c$ 22763+// $hash=be5f51e38820266a08248e602443902b3e2e3d78$ 22764 // 22765 22766 #include "libcef_dll/ctocpp/views/textfield_ctocpp.h" 22767diff --git a/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h 22768index 95445e66cf0d1..3325a22a06efe 22769--- a/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h 22770+++ b/src/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h 22771@@ -1,4 +1,4 @@ 22772-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22773+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22774 // reserved. Use of this source code is governed by a BSD-style license that 22775 // can be found in the LICENSE file. 22776 // 22777@@ -9,7 +9,7 @@ 22778 // implementations. See the translator.README.txt file in the tools directory 22779 // for more information. 22780 // 22781-// $hash=d96b3c829c698c7919bcaa4dd9b4f94d8800e6dc$ 22782+// $hash=cdc3237fbd889409f8e9aa2116689a3e1c1229c7$ 22783 // 22784 22785 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_ 22786diff --git a/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc 22787index 7e19121bf9d5e..58731eff3ecf4 22788--- a/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc 22789+++ b/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc 22790@@ -1,4 +1,4 @@ 22791-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22792+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22793 // reserved. Use of this source code is governed by a BSD-style license that 22794 // can be found in the LICENSE file. 22795 // 22796@@ -9,7 +9,7 @@ 22797 // implementations. See the translator.README.txt file in the tools directory 22798 // for more information. 22799 // 22800-// $hash=a7787d39e5f102f937542ace81de0277affab1a4$ 22801+// $hash=a449fb206fdd029cb72f6ad02b87b6285a5b8e1f$ 22802 // 22803 22804 #include "libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h" 22805diff --git a/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h 22806index 84a0e4d537958..76d15eee7b299 22807--- a/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h 22808+++ b/src/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h 22809@@ -1,4 +1,4 @@ 22810-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22811+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22812 // reserved. Use of this source code is governed by a BSD-style license that 22813 // can be found in the LICENSE file. 22814 // 22815@@ -9,7 +9,7 @@ 22816 // implementations. See the translator.README.txt file in the tools directory 22817 // for more information. 22818 // 22819-// $hash=63cc6f84be6ad62ccba2b91cc6159275e1cd7dd8$ 22820+// $hash=65dedd950d154a0125b094bb1488e787726545cb$ 22821 // 22822 22823 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_DELEGATE_CTOCPP_H_ 22824diff --git a/src/cef/libcef_dll/ctocpp/views/view_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/view_ctocpp.cc 22825index 5a552c592b7b8..8bd16caba8be8 22826--- a/src/cef/libcef_dll/ctocpp/views/view_ctocpp.cc 22827+++ b/src/cef/libcef_dll/ctocpp/views/view_ctocpp.cc 22828@@ -1,4 +1,4 @@ 22829-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22830+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22831 // reserved. Use of this source code is governed by a BSD-style license that 22832 // can be found in the LICENSE file. 22833 // 22834@@ -9,7 +9,7 @@ 22835 // implementations. See the translator.README.txt file in the tools directory 22836 // for more information. 22837 // 22838-// $hash=61c3b208f3a1907b483198a0a62ae9b45d9e56a3$ 22839+// $hash=b4edd50d32a796ff0b2eb2a735e2ce2c9ff6e147$ 22840 // 22841 22842 #include "libcef_dll/ctocpp/views/view_ctocpp.h" 22843diff --git a/src/cef/libcef_dll/ctocpp/views/view_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/view_ctocpp.h 22844index 9e658f064e8ad..65b2cc07dcb64 22845--- a/src/cef/libcef_dll/ctocpp/views/view_ctocpp.h 22846+++ b/src/cef/libcef_dll/ctocpp/views/view_ctocpp.h 22847@@ -1,4 +1,4 @@ 22848-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22849+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22850 // reserved. Use of this source code is governed by a BSD-style license that 22851 // can be found in the LICENSE file. 22852 // 22853@@ -9,7 +9,7 @@ 22854 // implementations. See the translator.README.txt file in the tools directory 22855 // for more information. 22856 // 22857-// $hash=8f99bf38ab96b2ffa22f43891d01c61f73aafaf3$ 22858+// $hash=5af9a065bd30e46fad816250442dd6b3d31834fd$ 22859 // 22860 22861 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_ 22862diff --git a/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc 22863index 3ea7e06109ba4..b54e3db41ab73 22864--- a/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc 22865+++ b/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc 22866@@ -1,4 +1,4 @@ 22867-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22868+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22869 // reserved. Use of this source code is governed by a BSD-style license that 22870 // can be found in the LICENSE file. 22871 // 22872@@ -9,7 +9,7 @@ 22873 // implementations. See the translator.README.txt file in the tools directory 22874 // for more information. 22875 // 22876-// $hash=394bf2a5f6f5898787c498b91bcf8375099eae47$ 22877+// $hash=9a731e4edfb8ed9c3a03fa56597f02cae87c1972$ 22878 // 22879 22880 #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h" 22881diff --git a/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h 22882index ee10966f6a77c..2a8024bf78e9f 22883--- a/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h 22884+++ b/src/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h 22885@@ -1,4 +1,4 @@ 22886-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22887+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22888 // reserved. Use of this source code is governed by a BSD-style license that 22889 // can be found in the LICENSE file. 22890 // 22891@@ -9,7 +9,7 @@ 22892 // implementations. See the translator.README.txt file in the tools directory 22893 // for more information. 22894 // 22895-// $hash=9202d1b2cd26906df4c5574f9f3a1c662ab2e82f$ 22896+// $hash=c433d8e9462e7a948338bfe9192f247fdc253614$ 22897 // 22898 22899 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_DELEGATE_CTOCPP_H_ 22900diff --git a/src/cef/libcef_dll/ctocpp/views/window_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/window_ctocpp.cc 22901index 145fa125d7709..6aa50b21161a8 22902--- a/src/cef/libcef_dll/ctocpp/views/window_ctocpp.cc 22903+++ b/src/cef/libcef_dll/ctocpp/views/window_ctocpp.cc 22904@@ -1,4 +1,4 @@ 22905-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22906+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22907 // reserved. Use of this source code is governed by a BSD-style license that 22908 // can be found in the LICENSE file. 22909 // 22910@@ -9,7 +9,7 @@ 22911 // implementations. See the translator.README.txt file in the tools directory 22912 // for more information. 22913 // 22914-// $hash=a71d84e671749331e5ad99c84ef790f09613b145$ 22915+// $hash=a4c6dd54b71d800640730d4bc5d643c4293d783d$ 22916 // 22917 22918 #include "libcef_dll/ctocpp/views/window_ctocpp.h" 22919diff --git a/src/cef/libcef_dll/ctocpp/views/window_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/window_ctocpp.h 22920index dfdc0c68677b5..58fd19e326d2e 22921--- a/src/cef/libcef_dll/ctocpp/views/window_ctocpp.h 22922+++ b/src/cef/libcef_dll/ctocpp/views/window_ctocpp.h 22923@@ -1,4 +1,4 @@ 22924-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22925+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22926 // reserved. Use of this source code is governed by a BSD-style license that 22927 // can be found in the LICENSE file. 22928 // 22929@@ -9,7 +9,7 @@ 22930 // implementations. See the translator.README.txt file in the tools directory 22931 // for more information. 22932 // 22933-// $hash=5afd032b23745d114bc95d45139cf5d92a82f89a$ 22934+// $hash=a16d73107ffbbcdb06153c0bfcc5e4ac43bbadb0$ 22935 // 22936 22937 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_ 22938diff --git a/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc 22939index 2e71f32ebad07..551ebe1abe203 22940--- a/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc 22941+++ b/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc 22942@@ -1,4 +1,4 @@ 22943-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22944+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22945 // reserved. Use of this source code is governed by a BSD-style license that 22946 // can be found in the LICENSE file. 22947 // 22948@@ -9,7 +9,7 @@ 22949 // implementations. See the translator.README.txt file in the tools directory 22950 // for more information. 22951 // 22952-// $hash=557b305c33b5975b197bf930cc223f76b3032288$ 22953+// $hash=675b3f340d14d93d1de6b340c862bdce4893a067$ 22954 // 22955 22956 #include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h" 22957@@ -128,8 +128,8 @@ CefRect CefWindowDelegateCToCpp::GetInitialBounds(CefRefPtr<CefWindow> window) { 22958 } 22959 22960 NO_SANITIZE("cfi-icall") 22961-cef_show_state_t CefWindowDelegateCToCpp::GetInitialShowState( 22962- CefRefPtr<CefWindow> window) { 22963+cef_show_state_t 22964+ CefWindowDelegateCToCpp::GetInitialShowState(CefRefPtr<CefWindow> window) { 22965 shutdown_checker::AssertNotShutdown(); 22966 22967 cef_window_delegate_t* _struct = GetStruct(); 22968diff --git a/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h b/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h 22969index 5071dea81ef78..a4ff6ff2f0fbc 22970--- a/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h 22971+++ b/src/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h 22972@@ -1,4 +1,4 @@ 22973-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22974+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22975 // reserved. Use of this source code is governed by a BSD-style license that 22976 // can be found in the LICENSE file. 22977 // 22978@@ -9,7 +9,7 @@ 22979 // implementations. See the translator.README.txt file in the tools directory 22980 // for more information. 22981 // 22982-// $hash=e61d67d8295c9fcc3e801bf61f4381434924940c$ 22983+// $hash=0cf526c263eb14e6cc17a0664ffe57ca476c4e81$ 22984 // 22985 22986 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_ 22987diff --git a/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc b/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc 22988index 175fe0601c11c..a447bf4318252 22989--- a/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc 22990+++ b/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc 22991@@ -1,4 +1,4 @@ 22992-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 22993+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 22994 // reserved. Use of this source code is governed by a BSD-style license that 22995 // can be found in the LICENSE file. 22996 // 22997@@ -9,7 +9,7 @@ 22998 // implementations. See the translator.README.txt file in the tools directory 22999 // for more information. 23000 // 23001-// $hash=4d16f6afcc06cee186ba3aa5752dc5933e6b57f4$ 23002+// $hash=f090fd5026cecf6e847f27909418f1dd76fec64f$ 23003 // 23004 23005 #include "libcef_dll/ctocpp/waitable_event_ctocpp.h" 23006diff --git a/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h b/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h 23007index 8b31f5406be6a..7cd6e03c78c0b 23008--- a/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h 23009+++ b/src/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h 23010@@ -1,4 +1,4 @@ 23011-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23012+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23013 // reserved. Use of this source code is governed by a BSD-style license that 23014 // can be found in the LICENSE file. 23015 // 23016@@ -9,7 +9,7 @@ 23017 // implementations. See the translator.README.txt file in the tools directory 23018 // for more information. 23019 // 23020-// $hash=519f7aab2913629ad5ac8ebcf228abd14b816ade$ 23021+// $hash=ea92b8c5871694e9c32c29a5d554774afe7aa3dd$ 23022 // 23023 23024 #ifndef CEF_LIBCEF_DLL_CTOCPP_WAITABLE_EVENT_CTOCPP_H_ 23025diff --git a/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.cc b/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.cc 23026new file mode 100644 23027index 0000000000000..79426527c8d80 23028--- /dev/null 23029+++ b/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.cc 23030@@ -0,0 +1,64 @@ 23031+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23032+// reserved. Use of this source code is governed by a BSD-style license that 23033+// can be found in the LICENSE file. 23034+// 23035+// --------------------------------------------------------------------------- 23036+// 23037+// This file was generated by the CEF translator tool. If making changes by 23038+// hand only do so within the body of existing method and function 23039+// implementations. See the translator.README.txt file in the tools directory 23040+// for more information. 23041+// 23042+// $hash=d9376a2376082b68ec98decd89eb8100fdf7093c$ 23043+// 23044+ 23045+#include "libcef_dll/ctocpp/web_message_receiver_ctocpp.h" 23046+#include "libcef_dll/cpptoc/value_cpptoc.h" 23047+#include "libcef_dll/shutdown_checker.h" 23048+ 23049+// VIRTUAL METHODS - Body may be edited by hand. 23050+ 23051+NO_SANITIZE("cfi-icall") 23052+void CefWebMessageReceiverCToCpp::OnMessage(CefRefPtr<CefValue> message) { 23053+ shutdown_checker::AssertNotShutdown(); 23054+ 23055+ cef_web_message_receiver_t* _struct = GetStruct(); 23056+ if (CEF_MEMBER_MISSING(_struct, on_message)) 23057+ return; 23058+ 23059+ // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23060+ 23061+ // Verify param: message; type: refptr_diff 23062+ DCHECK(message.get()); 23063+ if (!message.get()) 23064+ return; 23065+ 23066+ // Execute 23067+ _struct->on_message(_struct, CefValueCppToC::Wrap(message)); 23068+} 23069+ 23070+// CONSTRUCTOR - Do not edit by hand. 23071+ 23072+CefWebMessageReceiverCToCpp::CefWebMessageReceiverCToCpp() {} 23073+ 23074+// DESTRUCTOR - Do not edit by hand. 23075+ 23076+CefWebMessageReceiverCToCpp::~CefWebMessageReceiverCToCpp() { 23077+ shutdown_checker::AssertNotShutdown(); 23078+} 23079+ 23080+template <> 23081+cef_web_message_receiver_t* CefCToCppRefCounted< 23082+ CefWebMessageReceiverCToCpp, 23083+ CefWebMessageReceiver, 23084+ cef_web_message_receiver_t>::UnwrapDerived(CefWrapperType type, 23085+ CefWebMessageReceiver* c) { 23086+ NOTREACHED() << "Unexpected class type: " << type; 23087+ return nullptr; 23088+} 23089+ 23090+template <> 23091+CefWrapperType CefCToCppRefCounted<CefWebMessageReceiverCToCpp, 23092+ CefWebMessageReceiver, 23093+ cef_web_message_receiver_t>::kWrapperType = 23094+ WT_WEB_MESSAGE_RECEIVER; 23095diff --git a/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.h b/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.h 23096new file mode 100644 23097index 0000000000000..dc06b05f5f4a6 23098--- /dev/null 23099+++ b/src/cef/libcef_dll/ctocpp/web_message_receiver_ctocpp.h 23100@@ -0,0 +1,43 @@ 23101+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23102+// reserved. Use of this source code is governed by a BSD-style license that 23103+// can be found in the LICENSE file. 23104+// 23105+// --------------------------------------------------------------------------- 23106+// 23107+// This file was generated by the CEF translator tool. If making changes by 23108+// hand only do so within the body of existing method and function 23109+// implementations. See the translator.README.txt file in the tools directory 23110+// for more information. 23111+// 23112+// $hash=89209c202ff223f2f20cb3490518bfaceda224ca$ 23113+// 23114+ 23115+#ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_MESSAGE_RECEIVER_CTOCPP_H_ 23116+#define CEF_LIBCEF_DLL_CTOCPP_WEB_MESSAGE_RECEIVER_CTOCPP_H_ 23117+#pragma once 23118+ 23119+#if !defined(BUILDING_CEF_SHARED) 23120+#error This file can be included DLL-side only 23121+#endif 23122+ 23123+#include "include/capi/cef_browser_capi.h" 23124+#include "include/capi/cef_client_capi.h" 23125+#include "include/cef_browser.h" 23126+#include "include/cef_client.h" 23127+#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 23128+ 23129+// Wrap a C structure with a C++ class. 23130+// This class may be instantiated and accessed DLL-side only. 23131+class CefWebMessageReceiverCToCpp 23132+ : public CefCToCppRefCounted<CefWebMessageReceiverCToCpp, 23133+ CefWebMessageReceiver, 23134+ cef_web_message_receiver_t> { 23135+ public: 23136+ CefWebMessageReceiverCToCpp(); 23137+ virtual ~CefWebMessageReceiverCToCpp(); 23138+ 23139+ // CefWebMessageReceiver methods. 23140+ void OnMessage(CefRefPtr<CefValue> message) override; 23141+}; 23142+ 23143+#endif // CEF_LIBCEF_DLL_CTOCPP_WEB_MESSAGE_RECEIVER_CTOCPP_H_ 23144diff --git a/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.cc b/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.cc 23145index e7bb033dc83dd..3ba293ae3961b 23146--- a/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.cc 23147+++ b/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.cc 23148@@ -1,4 +1,4 @@ 23149-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23150+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23151 // reserved. Use of this source code is governed by a BSD-style license that 23152 // can be found in the LICENSE file. 23153 // 23154@@ -9,7 +9,7 @@ 23155 // implementations. See the translator.README.txt file in the tools directory 23156 // for more information. 23157 // 23158-// $hash=4b81eb5261e185b3360dd7de90e5f97dcb6aef86$ 23159+// $hash=c0cf10fdd538681da58a94edcfce6bc4e093df52$ 23160 // 23161 23162 #include "libcef_dll/ctocpp/web_storage_ctocpp.h" 23163diff --git a/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.h b/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.h 23164index a929a3b8ec4cd..9d6a97a364811 23165--- a/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.h 23166+++ b/src/cef/libcef_dll/ctocpp/web_storage_ctocpp.h 23167@@ -1,4 +1,4 @@ 23168-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23169+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23170 // reserved. Use of this source code is governed by a BSD-style license that 23171 // can be found in the LICENSE file. 23172 // 23173@@ -9,7 +9,7 @@ 23174 // implementations. See the translator.README.txt file in the tools directory 23175 // for more information. 23176 // 23177-// $hash=444c0aee423697f9d2747ae46d11d9f28ad01b3d$ 23178+// $hash=f01cdd91598d151bee833a80f50f550adda82d37$ 23179 // 23180 23181 #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_STORAGE_CTOCPP_H_ 23182diff --git a/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc b/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc 23183index 4efb2d1a7ccba..c25c75393e306 23184--- a/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc 23185+++ b/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc 23186@@ -1,4 +1,4 @@ 23187-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23188+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23189 // reserved. Use of this source code is governed by a BSD-style license that 23190 // can be found in the LICENSE file. 23191 // 23192@@ -9,7 +9,7 @@ 23193 // implementations. See the translator.README.txt file in the tools directory 23194 // for more information. 23195 // 23196-// $hash=728e5a2aa03b7884d5001f784dcf6bc6fb79254a$ 23197+// $hash=511240eb698a1c0d5f0f75884aaad8658e5a4987$ 23198 // 23199 23200 #include "libcef_dll/ctocpp/write_handler_ctocpp.h" 23201diff --git a/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.h b/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.h 23202index b302f19cdadf2..8d95983159c0f 23203--- a/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.h 23204+++ b/src/cef/libcef_dll/ctocpp/write_handler_ctocpp.h 23205@@ -1,4 +1,4 @@ 23206-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23207+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23208 // reserved. Use of this source code is governed by a BSD-style license that 23209 // can be found in the LICENSE file. 23210 // 23211@@ -9,7 +9,7 @@ 23212 // implementations. See the translator.README.txt file in the tools directory 23213 // for more information. 23214 // 23215-// $hash=f6c9ec7aa1916be4cc120149c9e174751fc3ea77$ 23216+// $hash=56728a12a3e14ab71d1dee991a7912d5d3c111f6$ 23217 // 23218 23219 #ifndef CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_ 23220diff --git a/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc b/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc 23221index 23a7bb776bc2e..fd860fb5878c1 23222--- a/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc 23223+++ b/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc 23224@@ -1,4 +1,4 @@ 23225-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23226+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23227 // reserved. Use of this source code is governed by a BSD-style license that 23228 // can be found in the LICENSE file. 23229 // 23230@@ -9,7 +9,7 @@ 23231 // implementations. See the translator.README.txt file in the tools directory 23232 // for more information. 23233 // 23234-// $hash=1799aec02f9d2491056fbf3042b4ba89498adaf4$ 23235+// $hash=43754e6fc947d6f008c9471a7a86218fafa84c82$ 23236 // 23237 23238 #include "libcef_dll/ctocpp/x509cert_principal_ctocpp.h" 23239diff --git a/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h b/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h 23240index c0c47d7efd9bd..ff05ec5fdddf0 23241--- a/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h 23242+++ b/src/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h 23243@@ -1,4 +1,4 @@ 23244-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23245+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23246 // reserved. Use of this source code is governed by a BSD-style license that 23247 // can be found in the LICENSE file. 23248 // 23249@@ -9,7 +9,7 @@ 23250 // implementations. See the translator.README.txt file in the tools directory 23251 // for more information. 23252 // 23253-// $hash=5462ba22f05a8e8a05aac6cac9d23004767049db$ 23254+// $hash=26c06425ee3d75470177631cff1348e5dc26f946$ 23255 // 23256 23257 #ifndef CEF_LIBCEF_DLL_CTOCPP_X509CERT_PRINCIPAL_CTOCPP_H_ 23258diff --git a/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc b/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc 23259index 5dc3e32e1127f..94927a4cb634f 23260--- a/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc 23261+++ b/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc 23262@@ -1,4 +1,4 @@ 23263-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23264+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23265 // reserved. Use of this source code is governed by a BSD-style license that 23266 // can be found in the LICENSE file. 23267 // 23268@@ -9,7 +9,7 @@ 23269 // implementations. See the translator.README.txt file in the tools directory 23270 // for more information. 23271 // 23272-// $hash=b5ab278c54b7ed9046b43a7f362a18ebc8bde146$ 23273+// $hash=db3bb173e77431908f255b12791ced7ecf80bd14$ 23274 // 23275 23276 #include "libcef_dll/ctocpp/x509certificate_ctocpp.h" 23277diff --git a/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h b/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h 23278index fd09946157b33..32d8e40eedb73 23279--- a/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h 23280+++ b/src/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h 23281@@ -1,4 +1,4 @@ 23282-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23283+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23284 // reserved. Use of this source code is governed by a BSD-style license that 23285 // can be found in the LICENSE file. 23286 // 23287@@ -9,7 +9,7 @@ 23288 // implementations. See the translator.README.txt file in the tools directory 23289 // for more information. 23290 // 23291-// $hash=eb95efa4bb7e2ca0696f86390fa32f269eedf9f3$ 23292+// $hash=b4c1192c28884415b9f175cde389237b9c8d33da$ 23293 // 23294 23295 #ifndef CEF_LIBCEF_DLL_CTOCPP_X509CERTIFICATE_CTOCPP_H_ 23296diff --git a/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc b/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc 23297index 617f05151baba..ab738e26c20a6 23298--- a/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc 23299+++ b/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc 23300@@ -1,4 +1,4 @@ 23301-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23302+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23303 // reserved. Use of this source code is governed by a BSD-style license that 23304 // can be found in the LICENSE file. 23305 // 23306@@ -9,7 +9,7 @@ 23307 // implementations. See the translator.README.txt file in the tools directory 23308 // for more information. 23309 // 23310-// $hash=9fc59c7d9a9acbf92fde0cfceda151c4936c136b$ 23311+// $hash=e5e2325d96c340e29a99e622df97eb792a5dd776$ 23312 // 23313 23314 #include "libcef_dll/ctocpp/xml_reader_ctocpp.h" 23315diff --git a/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h b/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h 23316index 8d60d09b45524..281018604842f 23317--- a/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h 23318+++ b/src/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h 23319@@ -1,4 +1,4 @@ 23320-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23321+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23322 // reserved. Use of this source code is governed by a BSD-style license that 23323 // can be found in the LICENSE file. 23324 // 23325@@ -9,7 +9,7 @@ 23326 // implementations. See the translator.README.txt file in the tools directory 23327 // for more information. 23328 // 23329-// $hash=1f6c29938591312a257cfe1b77de830c90b4a6c3$ 23330+// $hash=5f87c82093a6a16e03df00673d2ff20a9f0490d5$ 23331 // 23332 23333 #ifndef CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ 23334diff --git a/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc b/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc 23335index 381241d341798..7f45c50d2b5a6 23336--- a/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc 23337+++ b/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc 23338@@ -1,4 +1,4 @@ 23339-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23340+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23341 // reserved. Use of this source code is governed by a BSD-style license that 23342 // can be found in the LICENSE file. 23343 // 23344@@ -9,7 +9,7 @@ 23345 // implementations. See the translator.README.txt file in the tools directory 23346 // for more information. 23347 // 23348-// $hash=f01ac0e38723b8786f115a14dbca8d4d3d1a57bf$ 23349+// $hash=221ec55fd792b8af2ce239763e909b9c61584a5a$ 23350 // 23351 23352 #include "libcef_dll/ctocpp/zip_reader_ctocpp.h" 23353diff --git a/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h b/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h 23354index 5ba83082448f3..ae16c72dce20a 23355--- a/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h 23356+++ b/src/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h 23357@@ -1,4 +1,4 @@ 23358-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23359+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23360 // reserved. Use of this source code is governed by a BSD-style license that 23361 // can be found in the LICENSE file. 23362 // 23363@@ -9,7 +9,7 @@ 23364 // implementations. See the translator.README.txt file in the tools directory 23365 // for more information. 23366 // 23367-// $hash=995930b1262a99fb14a57dc0af908d292434e00b$ 23368+// $hash=ac375946e782fc0665bfd75850bd1f3ce388f186$ 23369 // 23370 23371 #ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ 23372diff --git a/src/cef/libcef_dll/libcef_dll.cc b/src/cef/libcef_dll/libcef_dll.cc 23373index 10519d315ecd4..74f9e4cd89e2a 23374--- a/src/cef/libcef_dll/libcef_dll.cc 23375+++ b/src/cef/libcef_dll/libcef_dll.cc 23376@@ -1,4 +1,4 @@ 23377-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23378+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23379 // reserved. Use of this source code is governed by a BSD-style license that 23380 // can be found in the LICENSE file. 23381 // 23382@@ -9,7 +9,7 @@ 23383 // implementations. See the translator.README.txt file in the tools directory 23384 // for more information. 23385 // 23386-// $hash=fa04fba704658b02675380bd63d91005c6757d4e$ 23387+// $hash=b4f718eaa15556b762af4f0e6dbc1b55c8e2d83f$ 23388 // 23389 23390 #include "include/capi/cef_app_capi.h" 23391@@ -25,7 +25,6 @@ 23392 #include "include/capi/cef_task_capi.h" 23393 #include "include/capi/cef_trace_capi.h" 23394 #include "include/capi/cef_v8_capi.h" 23395-#include "include/capi/cef_web_plugin_capi.h" 23396 #include "include/capi/test/cef_test_helpers_capi.h" 23397 #include "include/cef_app.h" 23398 #include "include/cef_crash_util.h" 23399@@ -40,7 +39,6 @@ 23400 #include "include/cef_task.h" 23401 #include "include/cef_trace.h" 23402 #include "include/cef_v8.h" 23403-#include "include/cef_web_plugin.h" 23404 #include "include/test/cef_test_helpers.h" 23405 #include "libcef_dll/cpptoc/binary_value_cpptoc.h" 23406 #include "libcef_dll/cpptoc/command_line_cpptoc.h" 23407@@ -52,8 +50,6 @@ 23408 #include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h" 23409 #include "libcef_dll/ctocpp/task_ctocpp.h" 23410 #include "libcef_dll/ctocpp/v8handler_ctocpp.h" 23411-#include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h" 23412-#include "libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h" 23413 #include "libcef_dll/shutdown_checker.h" 23414 #include "libcef_dll/transfer_util.h" 23415 23416@@ -840,69 +836,6 @@ CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, 23417 return _retval; 23418 } 23419 23420-CEF_EXPORT void cef_visit_web_plugin_info( 23421- struct _cef_web_plugin_info_visitor_t* visitor) { 23422- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23423- 23424- // Verify param: visitor; type: refptr_diff 23425- DCHECK(visitor); 23426- if (!visitor) 23427- return; 23428- 23429- // Execute 23430- CefVisitWebPluginInfo(CefWebPluginInfoVisitorCToCpp::Wrap(visitor)); 23431-} 23432- 23433-CEF_EXPORT void cef_refresh_web_plugins() { 23434- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23435- 23436- // Execute 23437- CefRefreshWebPlugins(); 23438-} 23439- 23440-CEF_EXPORT void cef_unregister_internal_web_plugin(const cef_string_t* path) { 23441- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23442- 23443- // Verify param: path; type: string_byref_const 23444- DCHECK(path); 23445- if (!path) 23446- return; 23447- 23448- // Execute 23449- CefUnregisterInternalWebPlugin(CefString(path)); 23450-} 23451- 23452-CEF_EXPORT void cef_register_web_plugin_crash(const cef_string_t* path) { 23453- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23454- 23455- // Verify param: path; type: string_byref_const 23456- DCHECK(path); 23457- if (!path) 23458- return; 23459- 23460- // Execute 23461- CefRegisterWebPluginCrash(CefString(path)); 23462-} 23463- 23464-CEF_EXPORT void cef_is_web_plugin_unstable( 23465- const cef_string_t* path, 23466- struct _cef_web_plugin_unstable_callback_t* callback) { 23467- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23468- 23469- // Verify param: path; type: string_byref_const 23470- DCHECK(path); 23471- if (!path) 23472- return; 23473- // Verify param: callback; type: refptr_diff 23474- DCHECK(callback); 23475- if (!callback) 23476- return; 23477- 23478- // Execute 23479- CefIsWebPluginUnstable(CefString(path), 23480- CefWebPluginUnstableCallbackCToCpp::Wrap(callback)); 23481-} 23482- 23483 CEF_EXPORT void cef_execute_java_script_with_user_gesture_for_tests( 23484 struct _cef_frame_t* frame, 23485 const cef_string_t* javascript) { 23486diff --git a/src/cef/libcef_dll/views_stub.cc b/src/cef/libcef_dll/views_stub.cc 23487index 5ebce32154fd5..729624165566b 23488--- a/src/cef/libcef_dll/views_stub.cc 23489+++ b/src/cef/libcef_dll/views_stub.cc 23490@@ -1,4 +1,4 @@ 23491-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23492+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23493 // reserved. Use of this source code is governed by a BSD-style license that 23494 // can be found in the LICENSE file. 23495 // 23496@@ -9,7 +9,7 @@ 23497 // implementations. See the translator.README.txt file in the tools directory 23498 // for more information. 23499 // 23500-// $hash=892496158fbb51c0534dfbdfd4597daef6b21da7$ 23501+// $hash=4e28ddb86e7157c4f04b43c02080c12b0001c6e0$ 23502 // 23503 23504 #include "include/views/cef_browser_view.h" 23505diff --git a/src/cef/libcef_dll/wrapper/libcef_dll_dylib.cc b/src/cef/libcef_dll/wrapper/libcef_dll_dylib.cc 23506index e6da9f1dd223b..b7c094e621fe4 23507--- a/src/cef/libcef_dll/wrapper/libcef_dll_dylib.cc 23508+++ b/src/cef/libcef_dll/wrapper/libcef_dll_dylib.cc 23509@@ -1,4 +1,4 @@ 23510-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23511+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23512 // reserved. Use of this source code is governed by a BSD-style license that 23513 // can be found in the LICENSE file. 23514 // 23515@@ -9,7 +9,7 @@ 23516 // implementations. See the translator.README.txt file in the tools directory 23517 // for more information. 23518 // 23519-// $hash=7185f14aad39a002663816fe05a4990f76d8ad6f$ 23520+// $hash=577c6334f41f1be591969c7789081b002e86b91c$ 23521 // 23522 23523 #include <dlfcn.h> 23524@@ -26,7 +26,6 @@ 23525 #include "include/capi/cef_file_util_capi.h" 23526 #include "include/capi/cef_i18n_util_capi.h" 23527 #include "include/capi/cef_image_capi.h" 23528-#include "include/capi/cef_media_router_capi.h" 23529 #include "include/capi/cef_menu_model_capi.h" 23530 #include "include/capi/cef_origin_whitelist_capi.h" 23531 #include "include/capi/cef_parser_capi.h" 23532@@ -49,7 +48,6 @@ 23533 #include "include/capi/cef_v8_capi.h" 23534 #include "include/capi/cef_values_capi.h" 23535 #include "include/capi/cef_waitable_event_capi.h" 23536-#include "include/capi/cef_web_plugin_capi.h" 23537 #include "include/capi/cef_web_storage_capi.h" 23538 #include "include/capi/cef_xml_reader_capi.h" 23539 #include "include/capi/cef_zip_reader_capi.h" 23540@@ -173,14 +171,6 @@ typedef int64 (*cef_now_from_system_trace_time_ptr)(); 23541 typedef int (*cef_register_extension_ptr)(const cef_string_t*, 23542 const cef_string_t*, 23543 struct _cef_v8handler_t*); 23544-typedef void (*cef_visit_web_plugin_info_ptr)( 23545- struct _cef_web_plugin_info_visitor_t*); 23546-typedef void (*cef_refresh_web_plugins_ptr)(); 23547-typedef void (*cef_unregister_internal_web_plugin_ptr)(const cef_string_t*); 23548-typedef void (*cef_register_web_plugin_crash_ptr)(const cef_string_t*); 23549-typedef void (*cef_is_web_plugin_unstable_ptr)( 23550- const cef_string_t*, 23551- struct _cef_web_plugin_unstable_callback_t*); 23552 typedef void (*cef_execute_java_script_with_user_gesture_for_tests_ptr)( 23553 struct _cef_frame_t*, 23554 const cef_string_t*); 23555@@ -209,8 +199,6 @@ typedef int (*cef_cookie_manager_create_cef_cookie_ptr)(const cef_string_t*, 23556 typedef struct _cef_data_base_t* (*cef_data_base_get_global_ptr)(); 23557 typedef struct _cef_drag_data_t* (*cef_drag_data_create_ptr)(); 23558 typedef struct _cef_image_t* (*cef_image_create_ptr)(); 23559-typedef struct _cef_media_router_t* (*cef_media_router_get_global_ptr)( 23560- struct _cef_completion_callback_t*); 23561 typedef struct _cef_menu_model_t* (*cef_menu_model_create_ptr)( 23562 struct _cef_menu_model_delegate_t*); 23563 typedef struct _cef_print_settings_t* (*cef_print_settings_create_ptr)(); 23564@@ -573,11 +561,6 @@ struct libcef_pointers { 23565 cef_end_tracing_ptr cef_end_tracing; 23566 cef_now_from_system_trace_time_ptr cef_now_from_system_trace_time; 23567 cef_register_extension_ptr cef_register_extension; 23568- cef_visit_web_plugin_info_ptr cef_visit_web_plugin_info; 23569- cef_refresh_web_plugins_ptr cef_refresh_web_plugins; 23570- cef_unregister_internal_web_plugin_ptr cef_unregister_internal_web_plugin; 23571- cef_register_web_plugin_crash_ptr cef_register_web_plugin_crash; 23572- cef_is_web_plugin_unstable_ptr cef_is_web_plugin_unstable; 23573 cef_execute_java_script_with_user_gesture_for_tests_ptr 23574 cef_execute_java_script_with_user_gesture_for_tests; 23575 cef_browser_host_create_browser_ptr cef_browser_host_create_browser; 23576@@ -590,7 +573,6 @@ struct libcef_pointers { 23577 cef_data_base_get_global_ptr cef_data_base_get_global; 23578 cef_drag_data_create_ptr cef_drag_data_create; 23579 cef_image_create_ptr cef_image_create; 23580- cef_media_router_get_global_ptr cef_media_router_get_global; 23581 cef_menu_model_create_ptr cef_menu_model_create; 23582 cef_print_settings_create_ptr cef_print_settings_create; 23583 cef_process_message_create_ptr cef_process_message_create; 23584@@ -793,11 +775,6 @@ int libcef_init_pointers(const char* path) { 23585 INIT_ENTRY(cef_end_tracing); 23586 INIT_ENTRY(cef_now_from_system_trace_time); 23587 INIT_ENTRY(cef_register_extension); 23588- INIT_ENTRY(cef_visit_web_plugin_info); 23589- INIT_ENTRY(cef_refresh_web_plugins); 23590- INIT_ENTRY(cef_unregister_internal_web_plugin); 23591- INIT_ENTRY(cef_register_web_plugin_crash); 23592- INIT_ENTRY(cef_is_web_plugin_unstable); 23593 INIT_ENTRY(cef_execute_java_script_with_user_gesture_for_tests); 23594 INIT_ENTRY(cef_browser_host_create_browser); 23595 INIT_ENTRY(cef_browser_host_create_browser_sync); 23596@@ -808,7 +785,6 @@ int libcef_init_pointers(const char* path) { 23597 INIT_ENTRY(cef_data_base_get_global); 23598 INIT_ENTRY(cef_drag_data_create); 23599 INIT_ENTRY(cef_image_create); 23600- INIT_ENTRY(cef_media_router_get_global); 23601 INIT_ENTRY(cef_menu_model_create); 23602 INIT_ENTRY(cef_print_settings_create); 23603 INIT_ENTRY(cef_process_message_create); 23604@@ -1112,8 +1088,8 @@ int cef_create_url(const struct _cef_urlparts_t* parts, cef_string_t* url) { 23605 } 23606 23607 NO_SANITIZE("cfi-icall") 23608-cef_string_userfree_t cef_format_url_for_security_display( 23609- const cef_string_t* origin_url) { 23610+cef_string_userfree_t 23611+ cef_format_url_for_security_display(const cef_string_t* origin_url) { 23612 return g_libcef_pointers.cef_format_url_for_security_display(origin_url); 23613 } 23614 23615@@ -1246,32 +1222,6 @@ int cef_register_extension(const cef_string_t* extension_name, 23616 javascript_code, handler); 23617 } 23618 23619-NO_SANITIZE("cfi-icall") 23620-void cef_visit_web_plugin_info(struct _cef_web_plugin_info_visitor_t* visitor) { 23621- g_libcef_pointers.cef_visit_web_plugin_info(visitor); 23622-} 23623- 23624-NO_SANITIZE("cfi-icall") void cef_refresh_web_plugins() { 23625- g_libcef_pointers.cef_refresh_web_plugins(); 23626-} 23627- 23628-NO_SANITIZE("cfi-icall") 23629-void cef_unregister_internal_web_plugin(const cef_string_t* path) { 23630- g_libcef_pointers.cef_unregister_internal_web_plugin(path); 23631-} 23632- 23633-NO_SANITIZE("cfi-icall") 23634-void cef_register_web_plugin_crash(const cef_string_t* path) { 23635- g_libcef_pointers.cef_register_web_plugin_crash(path); 23636-} 23637- 23638-NO_SANITIZE("cfi-icall") 23639-void cef_is_web_plugin_unstable( 23640- const cef_string_t* path, 23641- struct _cef_web_plugin_unstable_callback_t* callback) { 23642- g_libcef_pointers.cef_is_web_plugin_unstable(path, callback); 23643-} 23644- 23645 NO_SANITIZE("cfi-icall") 23646 void cef_execute_java_script_with_user_gesture_for_tests( 23647 struct _cef_frame_t* frame, 23648@@ -1339,12 +1289,6 @@ NO_SANITIZE("cfi-icall") struct _cef_image_t* cef_image_create() { 23649 return g_libcef_pointers.cef_image_create(); 23650 } 23651 23652-NO_SANITIZE("cfi-icall") 23653-struct _cef_media_router_t* cef_media_router_get_global( 23654- struct _cef_completion_callback_t* callback) { 23655- return g_libcef_pointers.cef_media_router_get_global(callback); 23656-} 23657- 23658 NO_SANITIZE("cfi-icall") 23659 struct _cef_menu_model_t* cef_menu_model_create( 23660 struct _cef_menu_model_delegate_t* delegate) { 23661@@ -1611,46 +1555,54 @@ struct _cef_translator_test_t* cef_translator_test_create() { 23662 } 23663 23664 NO_SANITIZE("cfi-icall") 23665-struct _cef_translator_test_ref_ptr_library_t* 23666-cef_translator_test_ref_ptr_library_create(int value) { 23667+struct 23668+ _cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create( 23669+ int value) { 23670 return g_libcef_pointers.cef_translator_test_ref_ptr_library_create(value); 23671 } 23672 23673 NO_SANITIZE("cfi-icall") 23674-struct _cef_translator_test_ref_ptr_library_child_t* 23675-cef_translator_test_ref_ptr_library_child_create(int value, int other_value) { 23676+struct 23677+ _cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create( 23678+ int value, 23679+ int other_value) { 23680 return g_libcef_pointers.cef_translator_test_ref_ptr_library_child_create( 23681 value, other_value); 23682 } 23683 23684 NO_SANITIZE("cfi-icall") 23685-struct _cef_translator_test_ref_ptr_library_child_child_t* 23686-cef_translator_test_ref_ptr_library_child_child_create(int value, 23687- int other_value, 23688- int other_other_value) { 23689+struct 23690+ _cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create( 23691+ int value, 23692+ int other_value, 23693+ int other_other_value) { 23694 return g_libcef_pointers 23695 .cef_translator_test_ref_ptr_library_child_child_create( 23696 value, other_value, other_other_value); 23697 } 23698 23699 NO_SANITIZE("cfi-icall") 23700-struct _cef_translator_test_scoped_library_t* 23701-cef_translator_test_scoped_library_create(int value) { 23702+struct 23703+ _cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create( 23704+ int value) { 23705 return g_libcef_pointers.cef_translator_test_scoped_library_create(value); 23706 } 23707 23708 NO_SANITIZE("cfi-icall") 23709-struct _cef_translator_test_scoped_library_child_t* 23710-cef_translator_test_scoped_library_child_create(int value, int other_value) { 23711+struct 23712+ _cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create( 23713+ int value, 23714+ int other_value) { 23715 return g_libcef_pointers.cef_translator_test_scoped_library_child_create( 23716 value, other_value); 23717 } 23718 23719 NO_SANITIZE("cfi-icall") 23720-struct _cef_translator_test_scoped_library_child_child_t* 23721-cef_translator_test_scoped_library_child_child_create(int value, 23722- int other_value, 23723- int other_other_value) { 23724+struct 23725+ _cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create( 23726+ int value, 23727+ int other_value, 23728+ int other_other_value) { 23729 return g_libcef_pointers 23730 .cef_translator_test_scoped_library_child_child_create(value, other_value, 23731 other_other_value); 23732diff --git a/src/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc b/src/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc 23733index e406eb7608ae8..4d71c68db6f8c 23734--- a/src/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc 23735+++ b/src/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc 23736@@ -1,4 +1,4 @@ 23737-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23738+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23739 // reserved. Use of this source code is governed by a BSD-style license that 23740 // can be found in the LICENSE file. 23741 // 23742@@ -9,7 +9,7 @@ 23743 // implementations. See the translator.README.txt file in the tools directory 23744 // for more information. 23745 // 23746-// $hash=180ca5b8f789625a725e004aa6768fd5046a3753$ 23747+// $hash=45e769535f300e227783606b108546a49d9aa953$ 23748 // 23749 23750 #include "include/capi/cef_app_capi.h" 23751@@ -25,7 +25,6 @@ 23752 #include "include/capi/cef_task_capi.h" 23753 #include "include/capi/cef_trace_capi.h" 23754 #include "include/capi/cef_v8_capi.h" 23755-#include "include/capi/cef_web_plugin_capi.h" 23756 #include "include/capi/test/cef_test_helpers_capi.h" 23757 #include "include/cef_api_hash.h" 23758 #include "include/cef_app.h" 23759@@ -41,7 +40,6 @@ 23760 #include "include/cef_task.h" 23761 #include "include/cef_trace.h" 23762 #include "include/cef_v8.h" 23763-#include "include/cef_web_plugin.h" 23764 #include "include/test/cef_test_helpers.h" 23765 #include "libcef_dll/cpptoc/app_cpptoc.h" 23766 #include "libcef_dll/cpptoc/completion_callback_cpptoc.h" 23767@@ -49,8 +47,6 @@ 23768 #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" 23769 #include "libcef_dll/cpptoc/task_cpptoc.h" 23770 #include "libcef_dll/cpptoc/v8handler_cpptoc.h" 23771-#include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" 23772-#include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" 23773 #include "libcef_dll/ctocpp/binary_value_ctocpp.h" 23774 #include "libcef_dll/ctocpp/command_line_ctocpp.h" 23775 #include "libcef_dll/ctocpp/frame_ctocpp.h" 23776@@ -168,7 +164,7 @@ NO_SANITIZE("cfi-icall") CEF_GLOBAL bool CefCrashReportingEnabled() { 23777 23778 NO_SANITIZE("cfi-icall") 23779 CEF_GLOBAL 23780-void CefSetCrashKeyValue(const CefString& key, const CefString& value) { 23781+ void CefSetCrashKeyValue(const CefString& key, const CefString& value) { 23782 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23783 23784 // Verify param: key; type: string_byref_const 23785@@ -323,10 +319,10 @@ NO_SANITIZE("cfi-icall") CEF_GLOBAL bool CefIsRTL() { 23786 23787 NO_SANITIZE("cfi-icall") 23788 CEF_GLOBAL 23789-bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, 23790- const CefString& target_protocol, 23791- const CefString& target_domain, 23792- bool allow_target_subdomains) { 23793+ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, 23794+ const CefString& target_protocol, 23795+ const CefString& target_domain, 23796+ bool allow_target_subdomains) { 23797 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23798 23799 // Verify param: source_origin; type: string_byref_const 23800@@ -350,10 +346,10 @@ bool CefAddCrossOriginWhitelistEntry(const CefString& source_origin, 23801 23802 NO_SANITIZE("cfi-icall") 23803 CEF_GLOBAL 23804-bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin, 23805- const CefString& target_protocol, 23806- const CefString& target_domain, 23807- bool allow_target_subdomains) { 23808+ bool CefRemoveCrossOriginWhitelistEntry(const CefString& source_origin, 23809+ const CefString& target_protocol, 23810+ const CefString& target_domain, 23811+ bool allow_target_subdomains) { 23812 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23813 23814 // Verify param: source_origin; type: string_byref_const 23815@@ -414,7 +410,7 @@ CEF_GLOBAL bool CefCreateURL(const CefURLParts& parts, CefString& url) { 23816 23817 NO_SANITIZE("cfi-icall") 23818 CEF_GLOBAL CefString 23819-CefFormatUrlForSecurityDisplay(const CefString& origin_url) { 23820+ CefFormatUrlForSecurityDisplay(const CefString& origin_url) { 23821 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23822 23823 // Verify param: origin_url; type: string_byref_const 23824@@ -452,8 +448,8 @@ CEF_GLOBAL CefString CefGetMimeType(const CefString& extension) { 23825 23826 NO_SANITIZE("cfi-icall") 23827 CEF_GLOBAL 23828-void CefGetExtensionsForMimeType(const CefString& mime_type, 23829- std::vector<CefString>& extensions) { 23830+ void CefGetExtensionsForMimeType(const CefString& mime_type, 23831+ std::vector<CefString>& extensions) { 23832 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23833 23834 // Verify param: mime_type; type: string_byref_const 23835@@ -607,8 +603,8 @@ CEF_GLOBAL CefRefPtr<CefValue> CefParseJSONAndReturnError( 23836 } 23837 23838 NO_SANITIZE("cfi-icall") 23839-CEF_GLOBAL CefString CefWriteJSON(CefRefPtr<CefValue> node, 23840- cef_json_writer_options_t options) { 23841+CEF_GLOBAL CefString 23842+ CefWriteJSON(CefRefPtr<CefValue> node, cef_json_writer_options_t options) { 23843 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23844 23845 // Verify param: node; type: refptr_same 23846@@ -806,73 +802,6 @@ CEF_GLOBAL bool CefRegisterExtension(const CefString& extension_name, 23847 return _retval ? true : false; 23848 } 23849 23850-NO_SANITIZE("cfi-icall") 23851-CEF_GLOBAL 23852-void CefVisitWebPluginInfo(CefRefPtr<CefWebPluginInfoVisitor> visitor) { 23853- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23854- 23855- // Verify param: visitor; type: refptr_diff 23856- DCHECK(visitor.get()); 23857- if (!visitor.get()) 23858- return; 23859- 23860- // Execute 23861- cef_visit_web_plugin_info(CefWebPluginInfoVisitorCppToC::Wrap(visitor)); 23862-} 23863- 23864-NO_SANITIZE("cfi-icall") CEF_GLOBAL void CefRefreshWebPlugins() { 23865- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23866- 23867- // Execute 23868- cef_refresh_web_plugins(); 23869-} 23870- 23871-NO_SANITIZE("cfi-icall") 23872-CEF_GLOBAL void CefUnregisterInternalWebPlugin(const CefString& path) { 23873- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23874- 23875- // Verify param: path; type: string_byref_const 23876- DCHECK(!path.empty()); 23877- if (path.empty()) 23878- return; 23879- 23880- // Execute 23881- cef_unregister_internal_web_plugin(path.GetStruct()); 23882-} 23883- 23884-NO_SANITIZE("cfi-icall") 23885-CEF_GLOBAL void CefRegisterWebPluginCrash(const CefString& path) { 23886- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23887- 23888- // Verify param: path; type: string_byref_const 23889- DCHECK(!path.empty()); 23890- if (path.empty()) 23891- return; 23892- 23893- // Execute 23894- cef_register_web_plugin_crash(path.GetStruct()); 23895-} 23896- 23897-NO_SANITIZE("cfi-icall") 23898-CEF_GLOBAL void CefIsWebPluginUnstable( 23899- const CefString& path, 23900- CefRefPtr<CefWebPluginUnstableCallback> callback) { 23901- // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING 23902- 23903- // Verify param: path; type: string_byref_const 23904- DCHECK(!path.empty()); 23905- if (path.empty()) 23906- return; 23907- // Verify param: callback; type: refptr_diff 23908- DCHECK(callback.get()); 23909- if (!callback.get()) 23910- return; 23911- 23912- // Execute 23913- cef_is_web_plugin_unstable( 23914- path.GetStruct(), CefWebPluginUnstableCallbackCppToC::Wrap(callback)); 23915-} 23916- 23917 NO_SANITIZE("cfi-icall") 23918 CEF_GLOBAL void CefExecuteJavaScriptWithUserGestureForTests( 23919 CefRefPtr<CefFrame> frame, 23920diff --git a/src/cef/libcef_dll/wrapper_types.h b/src/cef/libcef_dll/wrapper_types.h 23921index 0ee0abdacc054..1ed052157b775 23922--- a/src/cef/libcef_dll/wrapper_types.h 23923+++ b/src/cef/libcef_dll/wrapper_types.h 23924@@ -1,4 +1,4 @@ 23925-// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 23926+// Copyright (c) 2023 The Chromium Embedded Framework Authors. All rights 23927 // reserved. Use of this source code is governed by a BSD-style license that 23928 // can be found in the LICENSE file. 23929 // 23930@@ -9,7 +9,7 @@ 23931 // implementations. See the translator.README.txt file in the tools directory 23932 // for more information. 23933 // 23934-// $hash=6894c8a307f28f26de4baaf4f541637cef7c8d72$ 23935+// $hash=dfb6a82e093895922f6f06700eb74d9d64493c24$ 23936 // 23937 23938 #ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_ 23939@@ -84,13 +84,6 @@ enum CefWrapperType { 23940 WT_LIFE_SPAN_HANDLER, 23941 WT_LIST_VALUE, 23942 WT_LOAD_HANDLER, 23943- WT_MEDIA_OBSERVER, 23944- WT_MEDIA_ROUTE, 23945- WT_MEDIA_ROUTE_CREATE_CALLBACK, 23946- WT_MEDIA_ROUTER, 23947- WT_MEDIA_SINK, 23948- WT_MEDIA_SINK_DEVICE_INFO_CALLBACK, 23949- WT_MEDIA_SOURCE, 23950 WT_MENU_BUTTON, 23951 WT_MENU_BUTTON_DELEGATE, 23952 WT_MENU_BUTTON_PRESSED_LOCK, 23953@@ -136,6 +129,7 @@ enum CefWrapperType { 23954 WT_SCHEME_REGISTRAR, 23955 WT_SCROLL_VIEW, 23956 WT_SELECT_CLIENT_CERTIFICATE_CALLBACK, 23957+ WT_SELECT_POPUP_CALLBACK, 23958 WT_SERVER, 23959 WT_SERVER_HANDLER, 23960 WT_SET_COOKIE_CALLBACK, 23961@@ -174,9 +168,7 @@ enum CefWrapperType { 23962 WT_VIEW, 23963 WT_VIEW_DELEGATE, 23964 WT_WAITABLE_EVENT, 23965- WT_WEB_PLUGIN_INFO, 23966- WT_WEB_PLUGIN_INFO_VISITOR, 23967- WT_WEB_PLUGIN_UNSTABLE_CALLBACK, 23968+ WT_WEB_MESSAGE_RECEIVER, 23969 WT_WEB_STORAGE, 23970 WT_WINDOW, 23971 WT_WINDOW_DELEGATE, 23972diff --git a/src/cef/tools/cef_parser.py b/src/cef/tools/cef_parser.py 23973index d624358ad9ecb..743b663002dc1 23974--- a/src/cef/tools/cef_parser.py 23975+++ b/src/cef/tools/cef_parser.py 23976@@ -406,7 +406,8 @@ _simpletypes = { 23977 'CefDraggableRegion': ['cef_draggable_region_t', 'CefDraggableRegion()'], 23978 'CefThreadId': ['cef_thread_id_t', 'TID_UI'], 23979 'CefTime': ['cef_time_t', 'CefTime()'], 23980- 'CefAudioParameters': ['cef_audio_parameters_t', 'CefAudioParameters()'] 23981+ 'CefAudioParameters': ['cef_audio_parameters_t', 'CefAudioParameters()'], 23982+ 'CefSelectPopupItem': ['cef_select_popup_item_t', 'CefSelectPopupItem()'] 23983 } 23984 23985 23986diff --git a/src/chrome/app/chrome_command_ids.h b/src/chrome/app/chrome_command_ids.h 23987index a2c827a2bb86b..e0c20edd83d1f 23988--- a/src/chrome/app/chrome_command_ids.h 23989+++ b/src/chrome/app/chrome_command_ids.h 23990@@ -9,6 +9,10 @@ 23991 #include "build/build_config.h" 23992 #include "build/chromeos_buildflags.h" 23993 23994+#if BUILDFLAG(IS_OHOS) 23995+#include "media/media_buildflags.h" 23996+#endif 23997+ 23998 // This file lists all the command IDs understood by e.g. the browser. 23999 // It is used by Windows RC files, Mac NIB files, and other platforms too. 24000 24001@@ -105,7 +109,9 @@ 24002 #define IDC_SAVE_CREDIT_CARD_FOR_PAGE 35008 24003 #define IDC_TRANSLATE_PAGE 35009 24004 #define IDC_MANAGE_PASSWORDS_FOR_PAGE 35010 24005+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24006 #define IDC_ROUTE_MEDIA 35011 24007+#endif 24008 #define IDC_WINDOW_MUTE_SITE 35012 24009 #define IDC_WINDOW_PIN_TAB 35013 24010 #define IDC_WINDOW_GROUP_TAB 35014 24011diff --git a/src/chrome/browser/BUILD.gn b/src/chrome/browser/BUILD.gn 24012index 641f9531a6409..2c25dcbca6062 24013--- a/src/chrome/browser/BUILD.gn 24014+++ b/src/chrome/browser/BUILD.gn 24015@@ -2430,6 +2430,15 @@ static_library("browser") { 24016 "//ui/webui/resources/js/browser_command:mojo_bindings", 24017 ] 24018 24019+ if (is_ohos && !ohos_enable_media_router) { 24020+ allow_circular_includes_from -= [ "//chrome/browser/media/router" ] 24021+ deps -= [ 24022+ "//chrome/browser/media/router", 24023+ "//chrome/browser/media/router:media_router_feature", 24024+ "//chrome/browser/media/router/discovery/access_code:access_code_cast_feature", 24025+ ] 24026+ } 24027+ 24028 if (is_ohos && safe_browsing_mode == 0) { 24029 deps -= [ 24030 "//chrome/browser/safe_browsing", 24031@@ -4571,6 +4580,12 @@ static_library("browser") { 24032 "//chrome/browser/web_applications/app_service", 24033 ] 24034 24035+ if (is_ohos && !ohos_enable_media_router) { 24036+ allow_circular_includes_from -= 24037+ [ "//chrome/browser/media/router/discovery:discovery" ] 24038+ deps -= [ "//chrome/browser/media/router/discovery:discovery" ] 24039+ } 24040+ 24041 if (!is_chromeos_ash) { 24042 sources += [ 24043 "accessibility/soda_installer_impl.cc", 24044@@ -6215,7 +6230,7 @@ static_library("browser") { 24045 ] 24046 } 24047 24048- if (is_win || is_mac || is_linux || is_chromeos || is_fuchsia || is_ohos) { 24049+ if (is_win || is_mac || is_linux || is_chromeos || is_fuchsia) { 24050 sources += [ 24051 "media/cast_mirroring_service_host.cc", 24052 "media/cast_mirroring_service_host.h", 24053@@ -7986,7 +8001,7 @@ static_library("test_support") { 24054 } 24055 } 24056 24057-if (!is_android) { 24058+if (!is_android && !is_ohos) { 24059 static_library("test_support_ui") { 24060 testonly = true 24061 configs += [ "//build/config:precompiled_headers" ] 24062diff --git a/src/chrome/browser/about_flags.cc b/src/chrome/browser/about_flags.cc 24063index 2825190b68c3c..b953aa57be4a3 24064--- a/src/chrome/browser/about_flags.cc 24065+++ b/src/chrome/browser/about_flags.cc 24066@@ -224,7 +224,9 @@ 24067 #include "components/power_scheduler/power_scheduler_features.h" 24068 #include "components/webapps/browser/android/features.h" 24069 #else // BUILDFLAG(IS_ANDROID) 24070+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24071 #include "chrome/browser/media/router/media_router_feature.h" 24072+#endif 24073 #include "chrome/browser/web_applications/preinstalled_app_install_features.h" 24074 #endif // BUILDFLAG(IS_ANDROID) 24075 24076@@ -3776,6 +3778,7 @@ const FeatureEntry kFeatureEntries[] = { 24077 switches::kSyncServiceURL, 24078 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha")}, 24079 #if !BUILDFLAG(IS_ANDROID) 24080+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24081 {"media-router-cast-allow-all-ips", 24082 flag_descriptions::kMediaRouterCastAllowAllIPsName, 24083 flag_descriptions::kMediaRouterCastAllowAllIPsDescription, kOsDesktop, 24084@@ -3790,6 +3793,7 @@ const FeatureEntry kFeatureEntries[] = { 24085 flag_descriptions::kAllowAllSitesToInitiateMirroringDescription, 24086 kOsDesktop, 24087 FEATURE_VALUE_TYPE(media_router::kAllowAllSitesToInitiateMirroring)}, 24088+#endif 24089 {"enable-migrate-default-chrome-app-to-web-apps-gsuite", 24090 flag_descriptions::kEnableMigrateDefaultChromeAppToWebAppsGSuiteName, 24091 flag_descriptions:: 24092@@ -5111,11 +5115,13 @@ const FeatureEntry kFeatureEntries[] = { 24093 kEnableWebAuthenticationChromeOSAuthenticatorDescription, 24094 kOsCrOS, FEATURE_VALUE_TYPE(device::kWebAuthCrosPlatformAuthenticator)}, 24095 #endif 24096+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 24097 #if BUILDFLAG(ENABLE_PDF) 24098 {"accessible-pdf-form", flag_descriptions::kAccessiblePDFFormName, 24099 flag_descriptions::kAccessiblePDFFormDescription, kOsDesktop, 24100 FEATURE_VALUE_TYPE(chrome_pdf::features::kAccessiblePDFForm)}, 24101 #endif // BUILDFLAG(ENABLE_PDF) 24102+#endif 24103 24104 #if BUILDFLAG(ENABLE_PRINTING) 24105 #if BUILDFLAG(IS_MAC) 24106diff --git a/src/chrome/browser/apps/platform_apps/BUILD.gn b/src/chrome/browser/apps/platform_apps/BUILD.gn 24107index b3b61dc65cbb1..f16ba3217636b 24108--- a/src/chrome/browser/apps/platform_apps/BUILD.gn 24109+++ b/src/chrome/browser/apps/platform_apps/BUILD.gn 24110@@ -3,6 +3,9 @@ 24111 # found in the LICENSE file. 24112 24113 import("//extensions/buildflags/buildflags.gni") 24114+if (is_ohos) { 24115+ import("//media/media_options.gni") 24116+} 24117 24118 assert(enable_extensions) 24119 24120@@ -76,6 +79,10 @@ source_set("platform_apps") { 24121 "//ui/gfx", 24122 ] 24123 24124+ if (is_ohos && !ohos_enable_media_router) { 24125+ deps -= [ "//chrome/browser/media/router/discovery" ] 24126+ } 24127+ 24128 if (is_mac) { 24129 deps += [ "//chrome/browser/apps/app_shim" ] 24130 } 24131diff --git a/src/chrome/browser/cart/cart_handler.cc b/src/chrome/browser/cart/cart_handler.cc 24132index 0904477a5a2a2..d8cebbe267be8 24133--- a/src/chrome/browser/cart/cart_handler.cc 24134+++ b/src/chrome/browser/cart/cart_handler.cc 24135@@ -65,6 +65,11 @@ void CartHandler::RestoreRemovedCart(const GURL& cart_url, 24136 void CartHandler::GetCartDataCallback(GetMerchantCartsCallback callback, 24137 bool success, 24138 std::vector<CartDB::KeyAndValue> res) { 24139+ DCHECK(success); 24140+ if (!success) { 24141+ std::move(callback).Run({}); 24142+ return; 24143+ } 24144 std::vector<chrome_cart::mojom::MerchantCartPtr> carts; 24145 bool show_discount = cart_service_->IsCartDiscountEnabled(); 24146 for (CartDB::KeyAndValue proto_pair : res) { 24147diff --git a/src/chrome/browser/cart/cart_service.cc b/src/chrome/browser/cart/cart_service.cc 24148index 4c74929a3443a..c5d88aefcdf02 24149--- a/src/chrome/browser/cart/cart_service.cc 24150+++ b/src/chrome/browser/cart/cart_service.cc 24151@@ -679,6 +679,11 @@ bool CartService::ShouldSkip(const GURL& url) { 24152 void CartService::OnLoadCarts(CartDB::LoadCallback callback, 24153 bool success, 24154 std::vector<CartDB::KeyAndValue> proto_pairs) { 24155+ DCHECK(success); 24156+ if (!success) { 24157+ std::move(callback).Run(success, {}); 24158+ return; 24159+ } 24160 if (cart_features::IsFakeDataEnabled()) { 24161 std::sort(proto_pairs.begin(), proto_pairs.end(), 24162 CompareTimeStampForProtoPair); 24163diff --git a/src/chrome/browser/chrome_browser_interface_binders.cc b/src/chrome/browser/chrome_browser_interface_binders.cc 24164index 6f5c928372ba1..4a3a2cac19367 24165--- a/src/chrome/browser/chrome_browser_interface_binders.cc 24166+++ b/src/chrome/browser/chrome_browser_interface_binders.cc 24167@@ -128,8 +128,6 @@ 24168 #include "chrome/browser/speech/speech_recognition_client_browser_interface.h" 24169 #include "chrome/browser/speech/speech_recognition_client_browser_interface_factory.h" 24170 #include "chrome/browser/speech/speech_recognition_service.h" 24171-#include "chrome/browser/ui/webui/access_code_cast/access_code_cast.mojom.h" 24172-#include "chrome/browser/ui/webui/access_code_cast/access_code_cast_ui.h" 24173 #include "chrome/browser/ui/webui/app_service_internals/app_service_internals.mojom.h" 24174 #include "chrome/browser/ui/webui/app_service_internals/app_service_internals_ui.h" 24175 #include "chrome/browser/ui/webui/downloads/downloads.mojom.h" 24176@@ -285,6 +283,11 @@ 24177 #include "chrome/browser/ui/webui/chromeos/chromebox_for_meetings/network_settings_dialog.h" 24178 #endif 24179 24180+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24181+#include "chrome/browser/ui/webui/access_code_cast/access_code_cast.mojom.h" 24182+#include "chrome/browser/ui/webui/access_code_cast/access_code_cast_ui.h" 24183+#endif 24184+ 24185 namespace chrome { 24186 namespace internal { 24187 24188@@ -810,8 +813,10 @@ void PopulateChromeWebUIFrameBinders( 24189 ::mojom::app_service_internals::AppServiceInternalsPageHandler, 24190 AppServiceInternalsUI>(map); 24191 24192+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24193 RegisterWebUIControllerInterfaceBinder< 24194 access_code_cast::mojom::PageHandlerFactory, AccessCodeCastUI>(map); 24195+#endif 24196 #endif // BUILDFLAG(IS_ANDROID) 24197 24198 #if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) 24199diff --git a/src/chrome/browser/chrome_content_browser_client.cc b/src/chrome/browser/chrome_content_browser_client.cc 24200index 84df69449342c..01aaad5f9acf4 24201--- a/src/chrome/browser/chrome_content_browser_client.cc 24202+++ b/src/chrome/browser/chrome_content_browser_client.cc 24203@@ -65,7 +65,6 @@ 24204 #include "chrome/browser/lifetime/browser_shutdown.h" 24205 #include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h" 24206 #include "chrome/browser/media/audio_service_util.h" 24207-#include "chrome/browser/media/router/media_router_feature.h" 24208 #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h" 24209 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 24210 #include "chrome/browser/media/webrtc/webrtc_logging_controller.h" 24211@@ -199,8 +198,6 @@ 24212 #include "components/keep_alive_registry/scoped_keep_alive.h" 24213 #include "components/language/core/browser/pref_names.h" 24214 #include "components/live_caption/caption_util.h" 24215-#include "components/media_router/browser/presentation/presentation_service_delegate_impl.h" 24216-#include "components/media_router/browser/presentation/receiver_presentation_service_delegate_impl.h" 24217 #include "components/metrics/client_info.h" 24218 #include "components/metrics_services_manager/metrics_services_manager.h" 24219 #include "components/net_log/chrome_net_log.h" 24220@@ -617,6 +614,12 @@ 24221 #include "base/win/windows_h_disallowed.h" 24222 #endif // defined(_WINDOWS_) 24223 24224+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24225+#include "chrome/browser/media/router/media_router_feature.h" 24226+#include "components/media_router/browser/presentation/presentation_service_delegate_impl.h" 24227+#include "components/media_router/browser/presentation/receiver_presentation_service_delegate_impl.h" 24228+#endif 24229+ 24230 using blink::mojom::EffectiveConnectionType; 24231 using blink::web_pref::WebPreferences; 24232 using content::BrowserThread; 24233@@ -4090,16 +4093,19 @@ void ChromeContentBrowserClient::OpenURL( 24234 content::ControllerPresentationServiceDelegate* 24235 ChromeContentBrowserClient::GetControllerPresentationServiceDelegate( 24236 content::WebContents* web_contents) { 24237+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24238 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { 24239 return media_router::PresentationServiceDelegateImpl:: 24240 GetOrCreateForWebContents(web_contents); 24241 } 24242+#endif 24243 return nullptr; 24244 } 24245 24246 content::ReceiverPresentationServiceDelegate* 24247 ChromeContentBrowserClient::GetReceiverPresentationServiceDelegate( 24248 content::WebContents* web_contents) { 24249+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24250 if (media_router::MediaRouterEnabled(web_contents->GetBrowserContext())) { 24251 // ReceiverPresentationServiceDelegateImpl exists only for WebContents 24252 // created for offscreen presentations. The WebContents must belong to 24253@@ -4110,6 +4116,7 @@ ChromeContentBrowserClient::GetReceiverPresentationServiceDelegate( 24254 return impl; 24255 } 24256 } 24257+#endif 24258 return nullptr; 24259 } 24260 24261diff --git a/src/chrome/browser/devtools/BUILD.gn b/src/chrome/browser/devtools/BUILD.gn 24262index c2f6d9d299627..d030eaffeee05 24263--- a/src/chrome/browser/devtools/BUILD.gn 24264+++ b/src/chrome/browser/devtools/BUILD.gn 24265@@ -227,6 +227,10 @@ static_library("devtools") { 24266 "device/cast_device_provider.h", 24267 ] 24268 } 24269+ 24270+ if (is_ohos && !ohos_enable_media_router) { 24271+ deps -= [ "//chrome/browser/media/router:media_router_feature" ] 24272+ } 24273 } 24274 24275 if (is_mac) { 24276@@ -269,6 +273,17 @@ static_library("devtools") { 24277 deps += [ "//components/printing/browser/print_to_pdf" ] 24278 } 24279 sources += rebase_path(_protocol_generated, ".", target_gen_dir) 24280+ 24281+ if (is_ohos && !ohos_enable_media_router) { 24282+ sources -= [ 24283+ "protocol/cast_handler.cc", 24284+ "protocol/cast_handler.h", 24285+ ] 24286+ deps -= [ 24287+ "//components/media_router/browser", 24288+ "//components/media_router/common/mojom:media_router", 24289+ ] 24290+ } 24291 } 24292 24293 if (enable_extensions) { 24294diff --git a/src/chrome/browser/devtools/chrome_devtools_session.cc b/src/chrome/browser/devtools/chrome_devtools_session.cc 24295index f75c4555a98c1..cd491e6c63d23 24296--- a/src/chrome/browser/devtools/chrome_devtools_session.cc 24297+++ b/src/chrome/browser/devtools/chrome_devtools_session.cc 24298@@ -10,7 +10,6 @@ 24299 #include "base/strings/string_number_conversions.h" 24300 #include "build/chromeos_buildflags.h" 24301 #include "chrome/browser/devtools/protocol/browser_handler.h" 24302-#include "chrome/browser/devtools/protocol/cast_handler.h" 24303 #include "chrome/browser/devtools/protocol/page_handler.h" 24304 #include "chrome/browser/devtools/protocol/security_handler.h" 24305 #include "chrome/browser/devtools/protocol/target_handler.h" 24306@@ -24,6 +23,10 @@ 24307 #include "chrome/browser/devtools/protocol/window_manager_handler.h" 24308 #endif 24309 24310+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24311+#include "chrome/browser/devtools/protocol/cast_handler.h" 24312+#endif 24313+ 24314 ChromeDevToolsSession::ChromeDevToolsSession( 24315 content::DevToolsAgentHostClientChannel* channel) 24316 : dispatcher_(this), client_channel_(channel) { 24317@@ -34,10 +37,12 @@ ChromeDevToolsSession::ChromeDevToolsSession( 24318 agent_host, agent_host->GetWebContents(), &dispatcher_); 24319 security_handler_ = std::make_unique<SecurityHandler>( 24320 agent_host->GetWebContents(), &dispatcher_); 24321+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24322 if (channel->GetClient()->MayAttachToBrowser()) { 24323 cast_handler_ = std::make_unique<CastHandler>( 24324 agent_host->GetWebContents(), &dispatcher_); 24325 } 24326+#endif 24327 } 24328 target_handler_ = std::make_unique<TargetHandler>(&dispatcher_); 24329 if (channel->GetClient()->MayAttachToBrowser()) { 24330diff --git a/src/chrome/browser/devtools/chrome_devtools_session.h b/src/chrome/browser/devtools/chrome_devtools_session.h 24331index 756d84ed0f7fd..9f8059402345c 24332--- a/src/chrome/browser/devtools/chrome_devtools_session.h 24333+++ b/src/chrome/browser/devtools/chrome_devtools_session.h 24334@@ -14,6 +14,10 @@ 24335 #include "chrome/browser/devtools/protocol/protocol.h" 24336 #include "content/public/browser/devtools_manager_delegate.h" 24337 24338+#if BUILDFLAG(IS_OHOS) 24339+#include "media/media_buildflags.h" 24340+#endif 24341+ 24342 namespace content { 24343 class DevToolsAgentHostClientChannel; 24344 } // namespace content 24345@@ -58,7 +62,9 @@ class ChromeDevToolsSession : public protocol::FrontendChannel { 24346 24347 protocol::UberDispatcher dispatcher_; 24348 std::unique_ptr<BrowserHandler> browser_handler_; 24349+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24350 std::unique_ptr<CastHandler> cast_handler_; 24351+#endif 24352 std::unique_ptr<PageHandler> page_handler_; 24353 std::unique_ptr<SecurityHandler> security_handler_; 24354 std::unique_ptr<TargetHandler> target_handler_; 24355diff --git a/src/chrome/browser/devtools/devtools_browser_context_manager.cc b/src/chrome/browser/devtools/devtools_browser_context_manager.cc 24356index 1981efe98478f..70b604f64524a 24357--- a/src/chrome/browser/devtools/devtools_browser_context_manager.cc 24358+++ b/src/chrome/browser/devtools/devtools_browser_context_manager.cc 24359@@ -13,6 +13,12 @@ 24360 #include "chrome/browser/ui/browser_list.h" 24361 #include "chrome/browser/ui/browser_window.h" 24362 24363+namespace { 24364+ 24365+const int64_t kDestroyProfileTimeoutSeconds = 60; 24366+ 24367+} // namespace 24368+ 24369 DevToolsBrowserContextManager::DevToolsBrowserContextManager() {} 24370 24371 DevToolsBrowserContextManager::~DevToolsBrowserContextManager() = default; 24372@@ -87,7 +93,8 @@ void DevToolsBrowserContextManager::DisposeBrowserContext( 24373 if (!has_opened_browser) { 24374 otr_profiles_.erase(it); 24375 profile->RemoveObserver(this); 24376- ProfileDestroyer::DestroyProfileWhenAppropriate(profile); 24377+ ProfileDestroyer::DestroyProfileWhenAppropriateWithTimeout( 24378+ profile, base::Seconds(kDestroyProfileTimeoutSeconds)); 24379 std::move(callback).Run(true, ""); 24380 return; 24381 } 24382@@ -133,8 +140,10 @@ void DevToolsBrowserContextManager::OnBrowserRemoved(Browser* browser) { 24383 // during the browser tear-down process. 24384 base::ThreadTaskRunnerHandle::Get()->PostTask( 24385 FROM_HERE, 24386- base::BindOnce(&ProfileDestroyer::DestroyProfileWhenAppropriate, 24387- base::Unretained(otr_profile))); 24388+ base::BindOnce( 24389+ &ProfileDestroyer::DestroyProfileWhenAppropriateWithTimeout, 24390+ base::Unretained(otr_profile), 24391+ base::Seconds(kDestroyProfileTimeoutSeconds))); 24392 24393 std::move(pending_disposal->second).Run(true, ""); 24394 pending_context_disposals_.erase(pending_disposal); 24395diff --git a/src/chrome/browser/devtools/devtools_targets_ui.cc b/src/chrome/browser/devtools/devtools_targets_ui.cc 24396index bc4bc3b0a04b8..3bcad847bc1b3 24397--- a/src/chrome/browser/devtools/devtools_targets_ui.cc 24398+++ b/src/chrome/browser/devtools/devtools_targets_ui.cc 24399@@ -19,12 +19,18 @@ 24400 #include "chrome/browser/devtools/device/devtools_android_bridge.h" 24401 #include "chrome/browser/devtools/devtools_window.h" 24402 #include "chrome/browser/devtools/serialize_host_descriptions.h" 24403-#include "components/media_router/browser/presentation/local_presentation_manager.h" 24404-#include "components/media_router/browser/presentation/local_presentation_manager_factory.h" 24405 #include "content/public/browser/browser_thread.h" 24406 #include "content/public/browser/devtools_agent_host.h" 24407 #include "content/public/browser/devtools_agent_host_observer.h" 24408 24409+#if BUILDFLAG(IS_OHOS) 24410+#include "media/media_buildflags.h" 24411+#if BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24412+#include "components/media_router/browser/presentation/local_presentation_manager.h" 24413+#include "components/media_router/browser/presentation/local_presentation_manager_factory.h" 24414+#endif 24415+#endif 24416+ 24417 using content::BrowserThread; 24418 using content::DevToolsAgentHost; 24419 24420@@ -85,7 +91,9 @@ private: 24421 bool AllowDevToolsFor(DevToolsAgentHost* host); 24422 24423 Profile* profile_; 24424+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24425 media_router::LocalPresentationManager* local_presentation_manager_; 24426+#endif 24427 std::unique_ptr<base::OneShotTimer> timer_; 24428 base::WeakPtrFactory<LocalTargetsUIHandler> weak_factory_{this}; 24429 }; 24430@@ -93,10 +101,15 @@ private: 24431 LocalTargetsUIHandler::LocalTargetsUIHandler(const Callback& callback, 24432 Profile* profile) 24433 : DevToolsTargetsUIHandler(kTargetSourceLocal, callback), 24434- profile_(profile), 24435+ profile_(profile) 24436+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24437+ , 24438 local_presentation_manager_( 24439 media_router::LocalPresentationManagerFactory:: 24440 GetOrCreateForBrowserContext(profile_)) { 24441+#else 24442+ { 24443+#endif 24444 DevToolsAgentHost::AddObserver(this); 24445 UpdateTargets(); 24446 } 24447@@ -150,8 +163,12 @@ void LocalTargetsUIHandler::UpdateTargets() { 24448 } 24449 24450 bool LocalTargetsUIHandler::AllowDevToolsFor(DevToolsAgentHost* host) { 24451+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24452 return local_presentation_manager_->IsLocalPresentation( 24453 host->GetWebContents()) || 24454+#else 24455+ return 24456+#endif 24457 (Profile::FromBrowserContext(host->GetBrowserContext()) == profile_ && 24458 DevToolsWindow::AllowDevToolsFor(profile_, host->GetWebContents())); 24459 } 24460diff --git a/src/chrome/browser/downgrade/buildflags.gni b/src/chrome/browser/downgrade/buildflags.gni 24461index dfee39d9b02a4..1fc6d662d899e 24462--- a/src/chrome/browser/downgrade/buildflags.gni 24463+++ b/src/chrome/browser/downgrade/buildflags.gni 24464@@ -6,5 +6,5 @@ import("//build/config/chromeos/ui_mode.gni") 24465 import("//build/config/features.gni") 24466 24467 declare_args() { 24468- enable_downgrade_processing = !is_android && !is_chromeos_ash 24469+ enable_downgrade_processing = !is_android && !is_chromeos_ash && !is_ohos 24470 } 24471diff --git a/src/chrome/browser/download/download_target_determiner.cc b/src/chrome/browser/download/download_target_determiner.cc 24472index 17d5e00128633..d68922c9e5bdb 24473--- a/src/chrome/browser/download/download_target_determiner.cc 24474+++ b/src/chrome/browser/download/download_target_determiner.cc 24475@@ -11,6 +11,7 @@ 24476 #include "base/location.h" 24477 #include "base/rand_util.h" 24478 #include "base/strings/stringprintf.h" 24479+#include "base/strings/utf_string_conversions.h" 24480 #include "base/task/post_task.h" 24481 #include "base/task/single_thread_task_runner.h" 24482 #include "base/task/task_runner_util.h" 24483@@ -61,6 +62,7 @@ 24484 24485 #if BUILDFLAG(IS_WIN) 24486 #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" 24487+#include "ui/shell_dialogs/select_file_utils_win.h" 24488 #endif 24489 24490 using content::BrowserThread; 24491@@ -89,6 +91,21 @@ void VisitCountsToVisitedBefore(base::OnceCallback<void(bool)> callback, 24492 bool g_is_adobe_reader_up_to_date_ = false; 24493 #endif 24494 24495+// For the `new_path`, generates a new safe file name if needed. Keep its 24496+// extension if it is empty or matches that of the `old_extension`. Otherwise, 24497+// suggest a new safe extension. 24498+void GenerateSafeFileName(base::FilePath* new_path, 24499+ const base::FilePath::StringType& old_extension, 24500+ const std::string& mime_type) { 24501+ DCHECK(new_path); 24502+ if (new_path->Extension().empty() || new_path->Extension() == old_extension) { 24503+ net::GenerateSafeFileName(std::string() /*mime_type*/, 24504+ false /*ignore_extension*/, new_path); 24505+ } else { 24506+ net::GenerateSafeFileName(mime_type, true /*ignore_extension*/, new_path); 24507+ } 24508+} 24509+ 24510 } // namespace 24511 24512 DownloadTargetDeterminerDelegate::~DownloadTargetDeterminerDelegate() { 24513@@ -404,25 +421,22 @@ void DownloadTargetDeterminer::NotifyExtensionsDone( 24514 suggested_path).NormalizePathSeparators()); 24515 24516 // If this is a local file, don't allow extensions to override its 24517- // extension. 24518+ // name. 24519 if (download_->GetURL().SchemeIsFile()) { 24520 base::FilePath file_path; 24521 net::FileURLToFilePath(download_->GetURL(), &file_path); 24522- new_path = new_path.ReplaceExtension(file_path.Extension()); 24523+ base::FilePath file_name = file_path.BaseName(); 24524+ // Check if file name is a dir. 24525+ if (file_name.BaseName() != file_name.DirName()) 24526+ new_path = new_path.DirName().Append(file_name); 24527 } else { 24528 // If the (Chrome) extension does not suggest an file extension, or if the 24529 // suggested extension matches that of the |virtual_path_|, do not 24530 // pass a mime type to GenerateSafeFileName so that it does not force the 24531 // filename to have an extension or generate a different one. Otherwise, 24532 // correct the file extension in case it is wrongly given. 24533- if (new_path.Extension().empty() || 24534- new_path.Extension() == virtual_path_.Extension()) { 24535- net::GenerateSafeFileName(std::string() /*mime_type*/, 24536- false /*ignore_extension*/, &new_path); 24537- } else { 24538- net::GenerateSafeFileName(download_->GetMimeType(), 24539- true /*ignore_extension*/, &new_path); 24540- } 24541+ GenerateSafeFileName(&new_path, virtual_path_.Extension(), 24542+ download_->GetMimeType()); 24543 } 24544 virtual_path_ = new_path; 24545 create_target_directory_ = true; 24546@@ -534,8 +548,24 @@ DownloadTargetDeterminer::DoRequestConfirmation() { 24547 24548 // If there is a non-neutral confirmation reason, prompt the user. 24549 if (confirmation_reason_ != DownloadConfirmationReason::NONE) { 24550+ base::FilePath sanitized_path = virtual_path_; 24551+#if BUILDFLAG(IS_WIN) 24552+ // Windows prompt dialog will resolve all env variables in the file name, 24553+ // which may generate unexpected results. Remove env variables from the 24554+ // file name first. 24555+ std::wstring sanitized_name = ui::RemoveEnvVarFromFileName<wchar_t>( 24556+ virtual_path_.BaseName().value(), L"%"); 24557+ if (sanitized_name.empty()) { 24558+ sanitized_name = base::UTF8ToWide( 24559+ l10n_util::GetStringUTF8(IDS_DEFAULT_DOWNLOAD_FILENAME)); 24560+ } 24561+ sanitized_path = 24562+ virtual_path_.DirName().Append(base::FilePath(sanitized_name)); 24563+ GenerateSafeFileName(&sanitized_path, virtual_path_.Extension(), 24564+ download_->GetMimeType()); 24565+#endif // BUILDFLAG(IS_WIN) 24566 delegate_->RequestConfirmation( 24567- download_, virtual_path_, confirmation_reason_, 24568+ download_, sanitized_path, confirmation_reason_, 24569 base::BindRepeating( 24570 &DownloadTargetDeterminer::RequestConfirmationDone, 24571 weak_ptr_factory_.GetWeakPtr())); 24572diff --git a/src/chrome/browser/download/download_target_determiner_unittest.cc b/src/chrome/browser/download/download_target_determiner_unittest.cc 24573index 0e9fe15f421e7..46559bac29b9d 24574--- a/src/chrome/browser/download/download_target_determiner_unittest.cc 24575+++ b/src/chrome/browser/download/download_target_determiner_unittest.cc 24576@@ -1772,6 +1772,32 @@ TEST_F(DownloadTargetDeterminerTest, NotifyExtensionsDefaultPath) { 24577 RunTestCase(test_case, base::FilePath(), item.get()); 24578 } 24579 24580+// Test that relative paths returned by extensions are always relative to the 24581+// default downloads path. 24582+TEST_F(DownloadTargetDeterminerTest, NotifyExtensionsLocalFile) { 24583+ const DownloadTestCase kNotifyExtensionsTestCases[] = { 24584+ {AUTOMATIC, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 24585+ DownloadFileType::NOT_DANGEROUS, 24586+#if BUILDFLAG(IS_WIN) 24587+ "file:///usr/local/xyz", 24588+#else 24589+ "file:///c:/usr/local/xyz", 24590+#endif // BUILDFLAG(IS_WIN) 24591+ "text/plain", FILE_PATH_LITERAL(""), 24592+ 24593+ FILE_PATH_LITERAL("overridden/xyz"), 24594+ DownloadItem::TARGET_DISPOSITION_OVERWRITE, 24595+ 24596+ EXPECT_CRDOWNLOAD}}; 24597+ 24598+ base::FilePath overridden_path(FILE_PATH_LITERAL("overridden/foo.txt")); 24599+ EXPECT_CALL(*delegate(), NotifyExtensions_(_, _, _)) 24600+ .WillRepeatedly(WithArg<2>(ScheduleCallback2( 24601+ overridden_path, DownloadPathReservationTracker::UNIQUIFY))); 24602+ RunTestCasesWithActiveItem(kNotifyExtensionsTestCases, 24603+ std::size(kNotifyExtensionsTestCases)); 24604+} 24605+ 24606 TEST_F(DownloadTargetDeterminerTest, InitialVirtualPathUnsafe) { 24607 const base::FilePath::CharType* kInitialPath = 24608 FILE_PATH_LITERAL("some_path/bar.html"); 24609@@ -2433,6 +2459,43 @@ TEST_F(DownloadTargetDeterminerTest, TransientDownloadResumption) { 24610 histogram_tester.ExpectTotalCount(kTransientPathValidationHistogram, 1); 24611 } 24612 24613+#if BUILDFLAG(IS_WIN) 24614+// Test that env variables will be removed from file name before prompting Save 24615+// As dialog. 24616+TEST_F(DownloadTargetDeterminerTest, TestSanitizeEnvVariable) { 24617+ const DownloadTestCase kSaveEnvPathTestCases[] = { 24618+ {// 0: File name contains env var delimits. 24619+ SAVE_AS, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 24620+ DownloadFileType::NOT_DANGEROUS, "http://example.com/f%oo%.tx%xyz%t", 24621+ "text/plain", FILE_PATH_LITERAL(""), 24622+ 24623+ FILE_PATH_LITERAL("f.txt"), DownloadItem::TARGET_DISPOSITION_PROMPT, 24624+ 24625+ EXPECT_CRDOWNLOAD}, 24626+ 24627+ {// 1: File name contains dangerous extensions after removing env var. 24628+ SAVE_AS, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 24629+ DownloadFileType::NOT_DANGEROUS, "http://example.com/foo.ln%xyz%k", 24630+ "application/octet-stream", FILE_PATH_LITERAL(""), 24631+ 24632+ FILE_PATH_LITERAL("foo.download"), 24633+ DownloadItem::TARGET_DISPOSITION_PROMPT, 24634+ 24635+ EXPECT_CRDOWNLOAD}, 24636+ {// 2: File name is an env var. 24637+ SAVE_AS, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, 24638+ DownloadFileType::NOT_DANGEROUS, "http://example.com/%foo.txt%", 24639+ "text/plain", FILE_PATH_LITERAL(""), 24640+ 24641+ FILE_PATH_LITERAL("download"), DownloadItem::TARGET_DISPOSITION_PROMPT, 24642+ 24643+ EXPECT_CRDOWNLOAD}}; 24644+ 24645+ RunTestCasesWithActiveItem(kSaveEnvPathTestCases, 24646+ std::size(kSaveEnvPathTestCases)); 24647+} 24648+#endif // BUILDFLAG(IS_WIN) 24649+ 24650 #if BUILDFLAG(ENABLE_PLUGINS) 24651 24652 void DummyGetPluginsCallback( 24653diff --git a/src/chrome/browser/extensions/BUILD.gn b/src/chrome/browser/extensions/BUILD.gn 24654index d6da4e22e14b0..743fa2c3d71ae 24655--- a/src/chrome/browser/extensions/BUILD.gn 24656+++ b/src/chrome/browser/extensions/BUILD.gn 24657@@ -938,6 +938,14 @@ static_library("extensions") { 24658 "//url", 24659 ] 24660 24661+ if (is_ohos && !ohos_enable_media_router) { 24662+ deps -= [ 24663+ "//chrome/browser/media/router", 24664+ "//chrome/browser/media/router:media_router_feature", 24665+ "//chrome/browser/media/router/discovery", 24666+ ] 24667+ } 24668+ 24669 if (is_linux || is_mac || is_win) { 24670 sources += [ 24671 "api/system_indicator/system_indicator_api.cc", 24672diff --git a/src/chrome/browser/extensions/api/downloads/downloads_api.cc b/src/chrome/browser/extensions/api/downloads/downloads_api.cc 24673index 827aeada1989e..471a9d3799bb7 24674--- a/src/chrome/browser/extensions/api/downloads/downloads_api.cc 24675+++ b/src/chrome/browser/extensions/api/downloads/downloads_api.cc 24676@@ -1029,19 +1029,19 @@ ExtensionFunction::ResponseAction DownloadsDownloadFunction::Run() { 24677 download_params->set_prompt(*options.save_as); 24678 24679 if (options.headers.get()) { 24680- for (const downloads::HeaderNameValuePair& name_value : *options.headers) { 24681- if (!net::HttpUtil::IsValidHeaderName(name_value.name)) { 24682+ for (const downloads::HeaderNameValuePair& header : *options.headers) { 24683+ if (!net::HttpUtil::IsValidHeaderName(header.name)) { 24684 return RespondNow(Error(download_extension_errors::kInvalidHeaderName)); 24685 } 24686- if (!net::HttpUtil::IsSafeHeader(name_value.name)) { 24687+ if (!net::HttpUtil::IsSafeHeader(header.name, header.value)) { 24688 return RespondNow( 24689 Error(download_extension_errors::kInvalidHeaderUnsafe)); 24690 } 24691- if (!net::HttpUtil::IsValidHeaderValue(name_value.value)) { 24692+ if (!net::HttpUtil::IsValidHeaderValue(header.value)) { 24693 return RespondNow( 24694 Error(download_extension_errors::kInvalidHeaderValue)); 24695 } 24696- download_params->add_request_header(name_value.name, name_value.value); 24697+ download_params->add_request_header(header.name, header.value); 24698 } 24699 } 24700 24701diff --git a/src/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc b/src/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc 24702index 9511f8f5788d8..1ae2b73e33dbb 24703--- a/src/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc 24704+++ b/src/chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc 24705@@ -2337,7 +2337,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest, 24706 " \"filename\": {" 24707 " \"previous\": \"\"," 24708 " \"current\": \"%s\"}}]", 24709- result_id, GetFilename("file").c_str()))); 24710+ result_id, GetFilename("file.txt").c_str()))); 24711 ASSERT_TRUE(WaitFor(downloads::OnChanged::kEventName, 24712 base::StringPrintf( 24713 "[{\"id\": %d," 24714diff --git a/src/chrome/browser/pdf/pdf_extension_util.cc b/src/chrome/browser/pdf/pdf_extension_util.cc 24715index f72431f5bc7ba..e307e2b349e65 24716--- a/src/chrome/browser/pdf/pdf_extension_util.cc 24717+++ b/src/chrome/browser/pdf/pdf_extension_util.cc 24718@@ -28,6 +28,7 @@ namespace pdf_extension_util { 24719 24720 namespace { 24721 24722+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 24723 // Tags in the manifest to be replaced. 24724 const char kNameTag[] = "<NAME>"; 24725 24726@@ -160,10 +161,12 @@ void AddPdfViewerStrings(base::Value* dict) { 24727 webui::SetLoadTimeDataDefaults(g_browser_process->GetApplicationLocale(), 24728 static_cast<base::DictionaryValue*>(dict)); 24729 } 24730+#endif // BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 24731 24732 } // namespace 24733 24734 std::string GetManifest() { 24735+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 24736 std::string manifest_contents( 24737 ui::ResourceBundle::GetSharedInstance().GetRawDataResource( 24738 IDR_PDF_MANIFEST)); 24739@@ -173,9 +176,13 @@ std::string GetManifest() { 24740 ChromeContentClient::kPDFExtensionPluginName); 24741 24742 return manifest_contents; 24743+#else 24744+ return ""; 24745+#endif 24746 } 24747 24748 void AddStrings(PdfViewerContext context, base::Value* dict) { 24749+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 24750 AddCommonStrings(dict); 24751 if (context == PdfViewerContext::kPdfViewer || 24752 context == PdfViewerContext::kAll) { 24753@@ -185,6 +192,7 @@ void AddStrings(PdfViewerContext context, base::Value* dict) { 24754 context == PdfViewerContext::kAll) { 24755 // Nothing to do yet, since there are no PrintPreview-only strings. 24756 } 24757+#endif 24758 } 24759 24760 void AddAdditionalData(bool enable_annotations, base::Value* dict) { 24761diff --git a/src/chrome/browser/prefs/browser_prefs.cc b/src/chrome/browser/prefs/browser_prefs.cc 24762index d66d193121be5..90f21d784f98f 24763--- a/src/chrome/browser/prefs/browser_prefs.cc 24764+++ b/src/chrome/browser/prefs/browser_prefs.cc 24765@@ -1038,7 +1038,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) { 24766 #else // BUILDFLAG(IS_ANDROID) 24767 gcm::RegisterPrefs(registry); 24768 IntranetRedirectDetector::RegisterPrefs(registry); 24769+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24770 media_router::RegisterLocalStatePrefs(registry); 24771+#endif 24772 metrics::TabStatsTracker::RegisterPrefs(registry); 24773 RegisterBrowserPrefs(registry); 24774 speech::SodaInstaller::RegisterLocalStatePrefs(registry); 24775@@ -1352,8 +1354,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, 24776 gcm::RegisterProfilePrefs(registry); 24777 HatsService::RegisterProfilePrefs(registry); 24778 NtpCustomBackgroundService::RegisterProfilePrefs(registry); 24779+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24780 media_router::RegisterAccessCodeProfilePrefs(registry); 24781 media_router::RegisterProfilePrefs(registry); 24782+#endif 24783 NewTabPageHandler::RegisterProfilePrefs(registry); 24784 NewTabPageUI::RegisterProfilePrefs(registry); 24785 NewTabUI::RegisterProfilePrefs(registry); 24786diff --git a/src/chrome/browser/profiles/BUILD.gn b/src/chrome/browser/profiles/BUILD.gn 24787index 15f69bdb70c16..5d0e171e4e67b 24788--- a/src/chrome/browser/profiles/BUILD.gn 24789+++ b/src/chrome/browser/profiles/BUILD.gn 24790@@ -5,6 +5,10 @@ 24791 import("//build/config/chromeos/ui_mode.gni") 24792 import("//extensions/buildflags/buildflags.gni") 24793 24794+if (is_ohos) { 24795+ import("//media/media_options.gni") 24796+} 24797+ 24798 # This target should be the default place for adding public interface things 24799 # (ie, non-factory, non-impl). There will likely need to be a :factory or :impl 24800 # target (maybe both) for those eventually. 24801@@ -60,6 +64,10 @@ source_set("profile") { 24802 if (is_android) { 24803 deps += [ "//chrome/browser/profiles/android:jni_headers" ] 24804 } 24805+ 24806+ if (is_ohos && !ohos_enable_media_router) { 24807+ deps -= [ "//components/media_router/common" ] 24808+ } 24809 } 24810 24811 if (is_android) { 24812diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profiles/profile.cc 24813index 032300a4c4a0b..1edb5bcfe39b9 24814--- a/src/chrome/browser/profiles/profile.cc 24815+++ b/src/chrome/browser/profiles/profile.cc 24816@@ -256,6 +256,10 @@ Profile* Profile::FromWebUI(content::WebUI* web_ui) { 24817 } 24818 24819 void Profile::AddObserver(ProfileObserver* observer) { 24820+ // Instrumentation for https://crbug.com/1359689. 24821+ CHECK(observer); 24822+ CHECK(!observers_.HasObserver(observer)); 24823+ 24824 observers_.AddObserver(observer); 24825 } 24826 24827@@ -364,7 +368,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 24828 std::string()); 24829 #endif 24830 24831-#if !BUILDFLAG(IS_ANDROID) 24832+#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 24833 registry->RegisterBooleanPref( 24834 media_router::prefs::kMediaRouterCloudServicesPrefSet, false, 24835 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 24836@@ -461,13 +465,19 @@ void Profile::MaybeSendDestroyedNotification() { 24837 TRACE_EVENT1("shutdown", "Profile::MaybeSendDestroyedNotification", "profile", 24838 this); 24839 24840- if (!sent_destroyed_notification_) { 24841- sent_destroyed_notification_ = true; 24842+ if (sent_destroyed_notification_) 24843+ return; 24844+ sent_destroyed_notification_ = true; 24845+ 24846+ // Instrumentation for https://crbug.com/1359689, 24847+ auto weak_this = GetWeakPtr(); 24848 24849- NotifyWillBeDestroyed(); 24850+ NotifyWillBeDestroyed(); 24851+ CHECK(weak_this); 24852 24853- for (auto& observer : observers_) 24854- observer.OnProfileWillBeDestroyed(this); 24855+ for (auto& observer : observers_) { 24856+ observer.OnProfileWillBeDestroyed(this); 24857+ CHECK(weak_this); 24858 } 24859 } 24860 24861@@ -543,3 +553,7 @@ variations::VariationsClient* Profile::GetVariationsClient() { 24862 content::ResourceContext* Profile::GetResourceContext() { 24863 return resource_context_.get(); 24864 } 24865+ 24866+base::WeakPtr<Profile> Profile::GetWeakPtr() { 24867+ return weak_factory_.GetWeakPtr(); 24868+} 24869diff --git a/src/chrome/browser/profiles/profile.h b/src/chrome/browser/profiles/profile.h 24870index febd52df6c971..8053e9909922f 24871--- a/src/chrome/browser/profiles/profile.h 24872+++ b/src/chrome/browser/profiles/profile.h 24873@@ -12,6 +12,7 @@ 24874 #include <vector> 24875 24876 #include "base/memory/scoped_refptr.h" 24877+#include "base/memory/weak_ptr.h" 24878 #include "base/observer_list.h" 24879 #include "build/build_config.h" 24880 #include "build/chromeos_buildflags.h" 24881@@ -501,6 +502,10 @@ class Profile : public content::BrowserContext { 24882 virtual bool IsSignedIn() = 0; 24883 24884 private: 24885+ friend class ProfileDestroyer; 24886+ 24887+ base::WeakPtr<Profile> GetWeakPtr(); 24888+ 24889 // Created on the UI thread, and returned by GetResourceContext(), but 24890 // otherwise lives on and is destroyed on the IO thread. 24891 // 24892@@ -523,6 +528,8 @@ class Profile : public content::BrowserContext { 24893 24894 class ChromeVariationsClient; 24895 std::unique_ptr<variations::VariationsClient> chrome_variations_client_; 24896+ 24897+ base::WeakPtrFactory<Profile> weak_factory_{this}; 24898 }; 24899 24900 // The comparator for profile pointers as key in a map. 24901diff --git a/src/chrome/browser/profiles/profile_destroyer.cc b/src/chrome/browser/profiles/profile_destroyer.cc 24902index cf578009f2a50..70a70f952378a 24903--- a/src/chrome/browser/profiles/profile_destroyer.cc 24904+++ b/src/chrome/browser/profiles/profile_destroyer.cc 24905@@ -44,7 +44,15 @@ enum class ProfileDestructionType { 24906 ProfileDestroyer::DestroyerSet* ProfileDestroyer::pending_destroyers_ = nullptr; 24907 24908 // static 24909-void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) { 24910+void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* profile) { 24911+ DestroyProfileWhenAppropriateWithTimeout(profile, 24912+ base::Seconds(kTimerDelaySeconds)); 24913+} 24914+ 24915+// static 24916+void ProfileDestroyer::DestroyProfileWhenAppropriateWithTimeout( 24917+ Profile* profile, 24918+ base::TimeDelta timeout) { 24919 TRACE_EVENT("shutdown", "ProfileDestroyer::DestroyProfileWhenAppropriate", 24920 [&](perfetto::EventContext ctx) { 24921 auto* proto = 24922@@ -73,11 +81,11 @@ void ProfileDestroyer::DestroyProfileWhenAppropriate(Profile* const profile) { 24923 24924 // The instance will destroy itself once all (non-spare) render process 24925 // hosts referring to it are properly terminated. 24926- new ProfileDestroyer(profile, &profile_hosts); 24927+ new ProfileDestroyer(profile, &profile_hosts, timeout); 24928 } 24929 24930 // static 24931-void ProfileDestroyer::DestroyOffTheRecordProfileNow(Profile* const profile) { 24932+void ProfileDestroyer::DestroyOffTheRecordProfileNow(Profile* profile) { 24933 DCHECK(profile); 24934 DCHECK(profile->IsOffTheRecord()); 24935 TRACE_EVENT( 24936@@ -88,12 +96,6 @@ void ProfileDestroyer::DestroyOffTheRecordProfileNow(Profile* const profile) { 24937 proto->set_profile_ptr(reinterpret_cast<uint64_t>(profile)); 24938 proto->set_otr_profile_id(profile->GetOTRProfileID().ToString()); 24939 }); 24940- if (ResetPendingDestroyers(profile)) { 24941- // We want to signal this in debug builds so that we don't lose sight of 24942- // these potential leaks, but we handle it in release so that we don't 24943- // crash or corrupt profile data on disk. 24944- NOTREACHED() << "A render process host wasn't destroyed early enough."; 24945- } 24946 DCHECK(profile->GetOriginalProfile()); 24947 profile->GetOriginalProfile()->DestroyOffTheRecordProfile(profile); 24948 UMA_HISTOGRAM_ENUMERATION("Profile.Destroyer.OffTheRecord", 24949@@ -101,7 +103,7 @@ void ProfileDestroyer::DestroyOffTheRecordProfileNow(Profile* const profile) { 24950 } 24951 24952 // static 24953-void ProfileDestroyer::DestroyOriginalProfileNow(Profile* const profile) { 24954+void ProfileDestroyer::DestroyOriginalProfileNow(Profile* profile) { 24955 DCHECK(profile); 24956 DCHECK(!profile->IsOffTheRecord()); 24957 TRACE_EVENT("shutdown", "ProfileDestroyer::DestroyOriginalProfileNow", 24958@@ -158,22 +160,11 @@ void ProfileDestroyer::DestroyOriginalProfileNow(Profile* const profile) { 24959 #endif // DCHECK_IS_ON() 24960 } 24961 24962-bool ProfileDestroyer::ResetPendingDestroyers(Profile* const profile) { 24963- DCHECK(profile); 24964- bool found = false; 24965- if (pending_destroyers_) { 24966- for (auto* i : *pending_destroyers_) { 24967- if (i->profile_ == profile) { 24968- i->profile_ = nullptr; 24969- found = true; 24970- } 24971- } 24972- } 24973- return found; 24974-} 24975- 24976-ProfileDestroyer::ProfileDestroyer(Profile* const profile, HostSet* hosts) 24977- : profile_(profile) { 24978+ProfileDestroyer::ProfileDestroyer(Profile* profile, 24979+ HostSet* hosts, 24980+ base::TimeDelta timeout) 24981+ : profile_(profile->GetWeakPtr()), 24982+ timeout_(timeout) { 24983 TRACE_EVENT("shutdown", "ProfileDestroyer::ProfileDestroyer", 24984 [&](perfetto::EventContext ctx) { 24985 auto* proto = 24986@@ -190,7 +181,7 @@ ProfileDestroyer::ProfileDestroyer(Profile* const profile, HostSet* hosts) 24987 // If we are going to wait for render process hosts, we don't want to do it 24988 // for longer than kTimerDelaySeconds. 24989 if (observations_.IsObservingAnySource()) { 24990- timer_.Start(FROM_HERE, base::Seconds(kTimerDelaySeconds), 24991+ timer_.Start(FROM_HERE, timeout, 24992 base::BindOnce(&ProfileDestroyer::DestroyProfile, 24993 weak_ptr_factory_.GetWeakPtr())); 24994 } 24995@@ -202,7 +193,7 @@ ProfileDestroyer::~ProfileDestroyer() { 24996 auto* proto = 24997 ctx.event<perfetto::protos::pbzero::ChromeTrackEvent>() 24998 ->set_chrome_profile_destroyer(); 24999- proto->set_profile_ptr(reinterpret_cast<uint64_t>(profile_)); 25000+ proto->set_profile_ptr(reinterpret_cast<uint64_t>(profile_.get())); 25001 proto->set_host_count_at_destruction( 25002 observations_.GetSourcesCount()); 25003 }); 25004@@ -210,7 +201,7 @@ ProfileDestroyer::~ProfileDestroyer() { 25005 // Check again, in case other render hosts were added while we were 25006 // waiting for the previous ones to go away... 25007 if (profile_) 25008- DestroyProfileWhenAppropriate(profile_); 25009+ DestroyProfileWhenAppropriateWithTimeout(profile_.get(), timeout_); 25010 25011 // Don't wait for pending registrations, if any, these hosts are buggy. 25012 // Note: this can happen, but if so, it's better to crash here than wait 25013@@ -240,7 +231,7 @@ void ProfileDestroyer::RenderProcessHostDestroyed( 25014 [&](perfetto::EventContext ctx) { 25015 auto* proto = ctx.event<perfetto::protos::pbzero::ChromeTrackEvent>() 25016 ->set_chrome_profile_destroyer(); 25017- proto->set_profile_ptr(reinterpret_cast<uint64_t>(profile_)); 25018+ proto->set_profile_ptr(reinterpret_cast<uint64_t>(profile_.get())); 25019 proto->set_render_process_host_ptr(reinterpret_cast<uint64_t>(host)); 25020 }); 25021 observations_.RemoveObservation(host); 25022@@ -262,7 +253,7 @@ void ProfileDestroyer::DestroyProfile() { 25023 25024 DCHECK(profile_->IsOffTheRecord()); 25025 DCHECK(profile_->GetOriginalProfile()); 25026- profile_->GetOriginalProfile()->DestroyOffTheRecordProfile(profile_); 25027+ profile_->GetOriginalProfile()->DestroyOffTheRecordProfile(profile_.get()); 25028 25029 #if BUILDFLAG(IS_ANDROID) 25030 // It is possible on Android platform that more than one destroyer 25031@@ -281,7 +272,7 @@ void ProfileDestroyer::DestroyProfile() { 25032 25033 // static 25034 ProfileDestroyer::HostSet ProfileDestroyer::GetHostsForProfile( 25035- void* const profile_ptr, 25036+ void* profile_ptr, 25037 bool include_spare_rph) { 25038 HostSet hosts; 25039 for (content::RenderProcessHost::iterator iter( 25040diff --git a/src/chrome/browser/profiles/profile_destroyer.h b/src/chrome/browser/profiles/profile_destroyer.h 25041index 2492ccadf9bb3..444fcfe2b1d0d 25042--- a/src/chrome/browser/profiles/profile_destroyer.h 25043+++ b/src/chrome/browser/profiles/profile_destroyer.h 25044@@ -15,6 +15,7 @@ 25045 #include "content/public/browser/render_process_host.h" 25046 #include "content/public/browser/render_process_host_observer.h" 25047 25048+class DevToolsBrowserContextManager; 25049 class Profile; 25050 class ProfileImpl; 25051 25052@@ -26,7 +27,7 @@ class ProfileDestroyer : public content::RenderProcessHostObserver { 25053 // for dependent renderer process hosts to destroy. 25054 // Ownership of the profile is passed to profile destroyer and the profile 25055 // should not be used after this call. 25056- static void DestroyProfileWhenAppropriate(Profile* const profile); 25057+ static void DestroyProfileWhenAppropriate(Profile* profile); 25058 ProfileDestroyer(const ProfileDestroyer&) = delete; 25059 ProfileDestroyer& operator=(const ProfileDestroyer&) = delete; 25060 25061@@ -37,7 +38,18 @@ class ProfileDestroyer : public content::RenderProcessHostObserver { 25062 25063 friend class base::RefCounted<ProfileDestroyer>; 25064 25065- ProfileDestroyer(Profile* const profile, HostSet* hosts); 25066+ // For custom timeout, see DestroyProfileWhenAppropriateWithTimeout. 25067+ friend class DevToolsBrowserContextManager; 25068+ 25069+ // Same as DestroyProfileWhenAppropriate, but configures how long to wait 25070+ // for render process hosts to be destroyed. Intended for testing/automation 25071+ // scenarios, where default timeout is too short. 25072+ static void DestroyProfileWhenAppropriateWithTimeout(Profile* profile, 25073+ base::TimeDelta timeout); 25074+ 25075+ ProfileDestroyer(Profile* profile, 25076+ HostSet* hosts, 25077+ base::TimeDelta timeout); 25078 ~ProfileDestroyer() override; 25079 25080 // content::RenderProcessHostObserver override. 25081@@ -52,20 +64,15 @@ class ProfileDestroyer : public content::RenderProcessHostObserver { 25082 // 25083 // If |include_spare_rph| is true, include spare render process hosts in the 25084 // output. 25085- static HostSet GetHostsForProfile(void* const profile_ptr, 25086+ static HostSet GetHostsForProfile(void* profile_ptr, 25087 bool include_spare_rph = false); 25088 25089 // Destroys an Original (non-off-the-record) profile immediately. 25090- static void DestroyOriginalProfileNow(Profile* const profile); 25091+ static void DestroyOriginalProfileNow(Profile* profile); 25092 25093 // Destroys an OffTheRecord profile immediately and removes it from all 25094 // pending destroyers. 25095- static void DestroyOffTheRecordProfileNow(Profile* const profile); 25096- 25097- // Reset pending destroyers whose target profile matches the given one 25098- // to make it stop attempting to destroy it. Returns true if any object 25099- // object was found to match and get reset. 25100- static bool ResetPendingDestroyers(Profile* const profile); 25101+ static void DestroyOffTheRecordProfileNow(Profile* profile); 25102 25103 // We need access to all pending destroyers so we can cancel them. 25104 static DestroyerSet* pending_destroyers_; 25105@@ -77,9 +84,27 @@ class ProfileDestroyer : public content::RenderProcessHostObserver { 25106 content::RenderProcessHostObserver> 25107 observations_{this}; 25108 25109- // The profile being destroyed. If it is set to NULL, it is a signal from 25110- // another instance of ProfileDestroyer that this instance is canceled. 25111- Profile* profile_; 25112+ // The profile being destroyed. 25113+ // 25114+ // Note: Ownership model of the Profile is not consistent. As a result, this 25115+ // variable sometimes represent ownership over the Profile, but sometimes 25116+ // this is just a weak reference, and the Profile might be destroyed outside 25117+ // of the ProfileDestroyer. 25118+ // 25119+ // [Regular profile] 25120+ // Owned by the ProfileManager. Ownership is transferred. 25121+ // 25122+ // [OTR profile] 25123+ // Owned by the original profile. Owner is NOT transferred. This is a weak 25124+ // pointer. Deleting the original Profile will delete its OTR profile under 25125+ // the hood. 25126+ // 25127+ // [Independent profile] 25128+ // It depends on the component. Most likely, the ownership is transferred. 25129+ base::WeakPtr<Profile> profile_; 25130+ 25131+ // Force-destruction timeout. 25132+ const base::TimeDelta timeout_; 25133 25134 base::WeakPtrFactory<ProfileDestroyer> weak_ptr_factory_{this}; 25135 }; 25136diff --git a/src/chrome/browser/profiles/profile_destroyer_unittest.cc b/src/chrome/browser/profiles/profile_destroyer_unittest.cc 25137index 25885bcb42fde..5bee467a8cb68 25138--- a/src/chrome/browser/profiles/profile_destroyer_unittest.cc 25139+++ b/src/chrome/browser/profiles/profile_destroyer_unittest.cc 25140@@ -115,6 +115,33 @@ TEST_P(ProfileDestroyerTest, DelayedOTRProfileDestruction) { 25141 EXPECT_TRUE(IsOTRProfileDestroyed()); 25142 } 25143 25144+TEST_P(ProfileDestroyerTest, RenderProcessAddedAfterDestroyRequested) { 25145+ if (!IsScopedProfileKeepAliveSupported()) 25146+ return; 25147+ CreateOriginalProfile(); 25148+ 25149+ content::RenderProcessHost* render_process_host_1 = 25150+ CreatedRendererProcessHost(original_profile()); 25151+ StopKeepingAliveOriginalProfile(); 25152+ 25153+ ProfileDestroyer::DestroyProfileWhenAppropriate(original_profile()); 25154+ 25155+ EXPECT_TRUE(original_profile()); 25156+ content::RenderProcessHost* render_process_host_2 = 25157+ CreatedRendererProcessHost(original_profile()); 25158+ 25159+ base::RunLoop().RunUntilIdle(); 25160+ EXPECT_TRUE(original_profile()); // Waiting for 2 processes to be released 25161+ 25162+ render_process_host_1->Cleanup(); 25163+ base::RunLoop().RunUntilIdle(); 25164+ EXPECT_TRUE(original_profile()); // Waiting for 1 process to be released. 25165+ 25166+ render_process_host_2->Cleanup(); 25167+ base::RunLoop().RunUntilIdle(); 25168+ EXPECT_FALSE(original_profile()); // Destroyed. 25169+} 25170+ 25171 INSTANTIATE_TEST_SUITE_P(AllOTRProfileTypes, 25172 ProfileDestroyerTest, 25173 /*is_primary_otr=*/testing::Bool()); 25174diff --git a/src/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/src/chrome/browser/renderer_context_menu/render_view_context_menu.cc 25175index ca285d877f557..bf81be4f66fde 25176--- a/src/chrome/browser/renderer_context_menu/render_view_context_menu.cc 25177+++ b/src/chrome/browser/renderer_context_menu/render_view_context_menu.cc 25178@@ -118,8 +118,6 @@ 25179 #include "components/guest_view/browser/guest_view_base.h" 25180 #include "components/language/core/browser/language_model_manager.h" 25181 #include "components/lens/lens_features.h" 25182-#include "components/media_router/browser/media_router_dialog_controller.h" 25183-#include "components/media_router/browser/media_router_metrics.h" 25184 #include "components/omnibox/browser/autocomplete_classifier.h" 25185 #include "components/omnibox/browser/autocomplete_match.h" 25186 #include "components/password_manager/content/browser/content_password_manager_driver.h" 25187@@ -265,6 +263,11 @@ 25188 #include "ui/aura/window.h" 25189 #endif 25190 25191+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25192+#include "components/media_router/browser/media_router_dialog_controller.h" 25193+#include "components/media_router/browser/media_router_metrics.h" 25194+#endif 25195+ 25196 using base::UserMetricsAction; 25197 using blink::ContextMenuData; 25198 using blink::ContextMenuDataEditFlags; 25199@@ -377,7 +380,9 @@ const std::map<int, int>& GetIdcToUmaMap(UmaEnumIdLookupType type) { 25200 {IDC_WRITING_DIRECTION_LTR, 64}, 25201 {IDC_WRITING_DIRECTION_RTL, 65}, 25202 {IDC_CONTENT_CONTEXT_LOAD_IMAGE, 66}, 25203+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25204 {IDC_ROUTE_MEDIA, 68}, 25205+#endif 25206 {IDC_CONTENT_CONTEXT_COPYLINKTEXT, 69}, 25207 {IDC_CONTENT_CONTEXT_OPENLINKINPROFILE, 70}, 25208 {IDC_OPEN_LINK_IN_PROFILE_FIRST, 71}, 25209@@ -1820,10 +1825,12 @@ void RenderViewContextMenu::AppendPrintItem() { 25210 } 25211 25212 void RenderViewContextMenu::AppendMediaRouterItem() { 25213+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25214 if (media_router::MediaRouterEnabled(browser_context_)) { 25215 menu_model_.AddItemWithStringId(IDC_ROUTE_MEDIA, 25216 IDS_MEDIA_ROUTER_MENU_ITEM_TITLE); 25217 } 25218+#endif 25219 } 25220 25221 void RenderViewContextMenu::AppendRotationItems() { 25222@@ -2392,8 +2399,10 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const { 25223 case IDC_CONTENT_CONTEXT_SHOWALLSAVEDPASSWORDS: 25224 return true; 25225 25226+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25227 case IDC_ROUTE_MEDIA: 25228 return IsRouteMediaEnabled(); 25229+#endif 25230 25231 case IDC_CONTENT_CONTEXT_EXIT_FULLSCREEN: 25232 return true; 25233@@ -2653,9 +2662,11 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) { 25234 ExecPrint(); 25235 break; 25236 25237+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25238 case IDC_ROUTE_MEDIA: 25239 ExecRouteMedia(); 25240 break; 25241+#endif 25242 25243 case IDC_CONTENT_CONTEXT_EXIT_FULLSCREEN: 25244 ExecExitFullscreen(); 25245@@ -3152,6 +3163,7 @@ RenderViewContextMenu::CreateDataEndpoint(bool notify_if_restricted) const { 25246 return nullptr; 25247 } 25248 25249+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25250 bool RenderViewContextMenu::IsRouteMediaEnabled() const { 25251 if (!media_router::MediaRouterEnabled(browser_context_)) 25252 return false; 25253@@ -3173,6 +3185,7 @@ bool RenderViewContextMenu::IsRouteMediaEnabled() const { 25254 web_modal::WebContentsModalDialogManager::FromWebContents(web_contents); 25255 return !manager || !manager->IsDialogActive(); 25256 } 25257+#endif 25258 25259 bool RenderViewContextMenu::IsOpenLinkOTREnabled() const { 25260 if (browser_context_->IsOffTheRecord() || !params_.link_url.is_valid()) 25261@@ -3492,6 +3505,7 @@ void RenderViewContextMenu::ExecPrint() { 25262 #endif // BUILDFLAG(ENABLE_PRINTING) 25263 } 25264 25265+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25266 void RenderViewContextMenu::ExecRouteMedia() { 25267 media_router::MediaRouterDialogController* dialog_controller = 25268 media_router::MediaRouterDialogController::GetOrCreateForWebContents( 25269@@ -3504,6 +3518,7 @@ void RenderViewContextMenu::ExecRouteMedia() { 25270 media_router::MediaRouterMetrics::RecordMediaRouterDialogOrigin( 25271 media_router::MediaRouterDialogOpenOrigin::CONTEXTUAL_MENU); 25272 } 25273+#endif 25274 25275 void RenderViewContextMenu::ExecTranslate() { 25276 ChromeTranslateClient* chrome_translate_client = 25277diff --git a/src/chrome/browser/renderer_context_menu/render_view_context_menu.h b/src/chrome/browser/renderer_context_menu/render_view_context_menu.h 25278index c97a1ecb08579..ff70715bdfa69 25279--- a/src/chrome/browser/renderer_context_menu/render_view_context_menu.h 25280+++ b/src/chrome/browser/renderer_context_menu/render_view_context_menu.h 25281@@ -43,6 +43,10 @@ 25282 #include "chrome/browser/extensions/menu_manager.h" 25283 #endif 25284 25285+#if BUILDFLAG(IS_OHOS) 25286+#include "media/media_buildflags.h" 25287+#endif 25288+ 25289 class AccessibilityLabelsMenuObserver; 25290 class ClickToCallContextMenuObserver; 25291 class LinkToTextMenuObserver; 25292@@ -265,7 +269,9 @@ class RenderViewContextMenu 25293 bool IsPasteAndMatchStyleEnabled() const; 25294 bool IsPrintPreviewEnabled() const; 25295 bool IsQRCodeGeneratorEnabled() const; 25296+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25297 bool IsRouteMediaEnabled() const; 25298+#endif 25299 bool IsOpenLinkOTREnabled() const; 25300 bool IsSearchWebForEnabled() const; 25301 bool IsRegionSearchEnabled() const; 25302@@ -295,7 +301,9 @@ class RenderViewContextMenu 25303 void ExecReloadPackagedApp(); 25304 void ExecRestartPackagedApp(); 25305 void ExecPrint(); 25306+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25307 void ExecRouteMedia(); 25308+#endif 25309 void ExecTranslate(); 25310 void ExecLanguageSettings(int event_flags); 25311 void ExecProtocolHandlerSettings(int event_flags); 25312diff --git a/src/chrome/browser/renderer_preferences_util.cc b/src/chrome/browser/renderer_preferences_util.cc 25313index 0162bd7c17b75..1443ff32fe341 25314--- a/src/chrome/browser/renderer_preferences_util.cc 25315+++ b/src/chrome/browser/renderer_preferences_util.cc 25316@@ -189,7 +189,7 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs, 25317 #endif 25318 25319 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ 25320- BUILDFLAG(IS_WIN) 25321+ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OHOS) 25322 content::UpdateFontRendererPreferencesFromSystemSettings(prefs); 25323 #endif 25324 25325diff --git a/src/chrome/browser/resources_integrity.cc b/src/chrome/browser/resources_integrity.cc 25326index 8120999d71990..4d85649e98cd4 25327--- a/src/chrome/browser/resources_integrity.cc 25328+++ b/src/chrome/browser/resources_integrity.cc 25329@@ -28,6 +28,10 @@ 25330 #include "chrome/app/packed_resources_integrity.h" // nogncheck 25331 #endif 25332 25333+#if BUILDFLAG(IS_OHOS) 25334+#include "ui/base/buildflags.h" 25335+#endif 25336+ 25337 namespace { 25338 25339 bool CheckResourceIntegrityInternal( 25340@@ -109,8 +113,10 @@ void CheckPakFileIntegrity() { 25341 kSha256_resources_pak; 25342 base::span<const uint8_t, crypto::kSHA256Length> chrome_100_hash = 25343 kSha256_chrome_100_percent_pak; 25344+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_HIDPI) 25345 base::span<const uint8_t, crypto::kSHA256Length> chrome_200_hash = 25346 kSha256_chrome_200_percent_pak; 25347+#endif 25348 #endif // BUILDFLAG(IS_WIN) 25349 25350 scoped_refptr<base::SequencedTaskRunner> task_runner = 25351@@ -126,9 +132,11 @@ void CheckPakFileIntegrity() { 25352 chrome_100_hash, task_runner, 25353 base::BindOnce(&ReportPakIntegrity, 25354 "SafeBrowsing.PakIntegrity.Chrome100")); 25355+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_HIDPI) 25356 CheckResourceIntegrity( 25357 resources_pack_path.DirName().AppendASCII("chrome_200_percent.pak"), 25358 chrome_200_hash, task_runner, 25359 base::BindOnce(&ReportPakIntegrity, 25360 "SafeBrowsing.PakIntegrity.Chrome200")); 25361+#endif 25362 } 25363diff --git a/src/chrome/browser/sharing_hub/sharing_hub_model.cc b/src/chrome/browser/sharing_hub/sharing_hub_model.cc 25364index 3e116f24acc80..c3b3359d72874 25365--- a/src/chrome/browser/sharing_hub/sharing_hub_model.cc 25366+++ b/src/chrome/browser/sharing_hub/sharing_hub_model.cc 25367@@ -180,6 +180,7 @@ void SharingHubModel::PopulateFirstPartyActions() { 25368 &kQrcodeGeneratorIcon, true, gfx::ImageSkia(), 25369 "SharingHubDesktop.QRCodeSelected"}); 25370 25371+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25372 if (media_router::MediaRouterEnabled(context_)) { 25373 first_party_action_list_.push_back( 25374 {IDC_ROUTE_MEDIA, 25375@@ -187,6 +188,7 @@ void SharingHubModel::PopulateFirstPartyActions() { 25376 &vector_icons::kMediaRouterIdleIcon, true, gfx::ImageSkia(), 25377 "SharingHubDesktop.CastSelected"}); 25378 } 25379+#endif 25380 25381 first_party_action_list_.push_back( 25382 {IDC_SAVE_PAGE, 25383diff --git a/src/chrome/browser/speech/speech_recognition_client_browser_interface.cc b/src/chrome/browser/speech/speech_recognition_client_browser_interface.cc 25384index ad3c36877ac38..5f038360aa0d5 25385--- a/src/chrome/browser/speech/speech_recognition_client_browser_interface.cc 25386+++ b/src/chrome/browser/speech/speech_recognition_client_browser_interface.cc 25387@@ -6,6 +6,7 @@ 25388 25389 #include <memory> 25390 25391+#include "base/feature_list.h" 25392 #include "chrome/browser/profiles/profile.h" 25393 #include "components/live_caption/pref_names.h" 25394 #include "components/prefs/pref_change_registrar.h" 25395@@ -60,6 +61,10 @@ void SpeechRecognitionClientBrowserInterface:: 25396 25397 void SpeechRecognitionClientBrowserInterface::OnSodaInstalled() { 25398 NotifyObservers(profile_prefs_->GetBoolean(prefs::kLiveCaptionEnabled)); 25399+ 25400+ if (base::FeatureList::IsEnabled(media::kLiveCaptionMultiLanguage)) { 25401+ OnSpeechRecognitionLanguageChanged(); 25402+ } 25403 } 25404 25405 void SpeechRecognitionClientBrowserInterface:: 25406diff --git a/src/chrome/browser/speech/speech_recognition_service_browsertest.cc b/src/chrome/browser/speech/speech_recognition_service_browsertest.cc 25407index 98e0bb8fa321f..b1b2c7bf2887c 25408--- a/src/chrome/browser/speech/speech_recognition_service_browsertest.cc 25409+++ b/src/chrome/browser/speech/speech_recognition_service_browsertest.cc 25410@@ -5,11 +5,13 @@ 25411 #include <algorithm> 25412 25413 #include "base/files/file_util.h" 25414+#include "base/files/scoped_temp_dir.h" 25415 #include "base/notreached.h" 25416 #include "base/path_service.h" 25417 #include "base/sync_socket.h" 25418 #include "base/test/metrics/histogram_tester.h" 25419 #include "base/test/scoped_feature_list.h" 25420+#include "base/threading/thread_restrictions.h" 25421 #include "base/timer/timer.h" 25422 #include "build/build_config.h" 25423 #include "chrome/browser/browser_process.h" 25424@@ -264,7 +266,7 @@ void SpeechRecognitionServiceTest::LaunchService() { 25425 speech_recognition_client_receiver_.BindNewPipeAndPassRemote(), 25426 media::mojom::SpeechRecognitionOptions::New( 25427 media::mojom::SpeechRecognitionMode::kCaption, 25428- /*enable_formatting=*/true, "en-US"), 25429+ /*enable_formatting=*/true, kUsEnglishLocale), 25430 base::BindOnce( 25431 [](bool* p_is_multichannel_supported, base::RunLoop* run_loop, 25432 bool is_multichannel_supported) { 25433@@ -296,7 +298,7 @@ void SpeechRecognitionServiceTest::LaunchServiceWithAudioSourceFetcher() { 25434 speech_recognition_client_receiver_.BindNewPipeAndPassRemote(), 25435 media::mojom::SpeechRecognitionOptions::New( 25436 media::mojom::SpeechRecognitionMode::kIme, 25437- /*enable_formatting=*/false, "en-US"), 25438+ /*enable_formatting=*/false, kUsEnglishLocale), 25439 base::BindOnce( 25440 [](bool* p_is_multichannel_supported, base::RunLoop* run_loop, 25441 bool is_multichannel_supported) { 25442@@ -502,4 +504,51 @@ IN_PROC_BROWSER_TEST_F(SpeechRecognitionServiceTest, CreateAudioSourceFetcher) { 25443 base::RunLoop().RunUntilIdle(); 25444 } 25445 25446+IN_PROC_BROWSER_TEST_F(SpeechRecognitionServiceTest, CompromisedRenderer) { 25447+ // Create temporary SODA files. 25448+ SetUpPrefs(); 25449+ base::ScopedAllowBlockingForTesting allow_blocking; 25450+ base::FilePath config_dir = 25451+ GetSodaLanguagePacksDirectory() 25452+ .AppendASCII(kUsEnglishLocale) 25453+ .Append("1.1.1") 25454+ .Append(kSodaLanguagePackDirectoryRelativePath); 25455+ base::CreateDirectory(config_dir); 25456+ ASSERT_TRUE(base::PathExists(config_dir)); 25457+ base::FilePath config_file_path = config_dir.Append("config_file"); 25458+ ASSERT_EQ(base::WriteFile(config_file_path, nullptr, 0), 0); 25459+ ASSERT_TRUE(base::PathExists(config_file_path)); 25460+ g_browser_process->local_state()->SetFilePath(prefs::kSodaEnUsConfigPath, 25461+ config_file_path); 25462+ 25463+ // Launch the Speech Recognition service. 25464+ auto* browser_context = 25465+ static_cast<content::BrowserContext*>(browser()->profile()); 25466+ auto* service = new ChromeSpeechRecognitionService(browser_context); 25467+ service->BindSpeechRecognitionContext( 25468+ speech_recognition_context_.BindNewPipeAndPassReceiver()); 25469+ 25470+ // Bind the recognizer pipes used to send audio and receive results. 25471+ auto run_loop = std::make_unique<base::RunLoop>(); 25472+ speech_recognition_context_->BindRecognizer( 25473+ speech_recognition_recognizer_.BindNewPipeAndPassReceiver(), 25474+ speech_recognition_client_receiver_.BindNewPipeAndPassRemote(), 25475+ media::mojom::SpeechRecognitionOptions::New( 25476+ media::mojom::SpeechRecognitionMode::kCaption, 25477+ /*enable_formatting=*/true, kUsEnglishLocale, 25478+ /*is_server_based=*/false, 25479+ media::mojom::RecognizerClientType::kLiveCaption), 25480+ base::BindOnce([](base::RunLoop* run_loop, 25481+ bool is_multichannel_supported) { run_loop->Quit(); }, 25482+ run_loop.get())); 25483+ run_loop->Run(); 25484+ 25485+ // Simulate a compromised renderer by changing the language and immediately 25486+ // resetting the recognizer and verify that the subsequent callbacks do not 25487+ // cause any crashes. 25488+ speech_recognition_recognizer_->OnLanguageChanged(kUsEnglishLocale); 25489+ speech_recognition_recognizer_.reset(); 25490+ base::RunLoop().RunUntilIdle(); 25491+} 25492+ 25493 } // namespace speech 25494diff --git a/src/chrome/browser/sync/test/integration/sync_integration_tests_sources.gni b/src/chrome/browser/sync/test/integration/sync_integration_tests_sources.gni 25495index 2133f32e032f0..87adf4f305c40 25496--- a/src/chrome/browser/sync/test/integration/sync_integration_tests_sources.gni 25497+++ b/src/chrome/browser/sync/test/integration/sync_integration_tests_sources.gni 25498@@ -14,7 +14,7 @@ sync_integration_tests_sources = [ 25499 "../browser/sync/test/integration/sync_exponential_backoff_test.cc", 25500 ] 25501 25502-if (!is_android) { 25503+if (!is_android && !is_ohos) { 25504 sync_integration_tests_sources += [ 25505 "../browser/sync/test/integration/enable_disable_test.cc", 25506 "../browser/sync/test/integration/local_sync_test.cc", 25507diff --git a/src/chrome/browser/ui/BUILD.gn b/src/chrome/browser/ui/BUILD.gn 25508index fc40fde277432..ed82927f6ed13 25509--- a/src/chrome/browser/ui/BUILD.gn 25510+++ b/src/chrome/browser/ui/BUILD.gn 25511@@ -667,6 +667,14 @@ static_library("ui") { 25512 "//v8:v8_version", 25513 ] 25514 25515+ if (is_ohos && !ohos_enable_media_router) { 25516+ deps -= [ 25517+ "//chrome/browser/media/router:media_router_feature", 25518+ "//chrome/browser/media/router/discovery/access_code:access_code_cast_feature", 25519+ "//chrome/browser/media/router/discovery/access_code:discovery_resources_proto", 25520+ ] 25521+ } 25522+ 25523 if (is_ohos && safe_browsing_mode == 0) { 25524 deps -= 25525 [ "//components/safe_browsing/content/browser:client_side_detection" ] 25526@@ -1690,6 +1698,80 @@ static_library("ui") { 25527 ] 25528 } 25529 25530+ if (is_ohos && !ohos_enable_media_router) { 25531+ sources -= [ 25532+ "media_router/cast_dialog_controller.h", 25533+ "media_router/cast_dialog_model.cc", 25534+ "media_router/cast_dialog_model.h", 25535+ "media_router/cast_modes_with_media_sources.cc", 25536+ "media_router/cast_modes_with_media_sources.h", 25537+ "media_router/cloud_services_dialog.h", 25538+ "media_router/media_cast_mode.cc", 25539+ "media_router/media_cast_mode.h", 25540+ "media_router/media_router_ui.cc", 25541+ "media_router/media_router_ui.h", 25542+ "media_router/media_router_ui_helper.cc", 25543+ "media_router/media_router_ui_helper.h", 25544+ "media_router/media_router_ui_service.cc", 25545+ "media_router/media_router_ui_service.h", 25546+ "media_router/media_router_ui_service_factory.cc", 25547+ "media_router/media_router_ui_service_factory.h", 25548+ "media_router/media_sink_with_cast_modes.cc", 25549+ "media_router/media_sink_with_cast_modes.h", 25550+ "media_router/presentation_receiver_window.h", 25551+ "media_router/presentation_receiver_window_controller.cc", 25552+ "media_router/presentation_receiver_window_controller.h", 25553+ "media_router/presentation_receiver_window_delegate.h", 25554+ "media_router/query_result_manager.cc", 25555+ "media_router/query_result_manager.h", 25556+ "media_router/ui_media_sink.cc", 25557+ "media_router/ui_media_sink.h", 25558+ "toolbar/media_router_action_controller.cc", 25559+ "toolbar/media_router_action_controller.h", 25560+ "toolbar/media_router_contextual_menu.cc", 25561+ "toolbar/media_router_contextual_menu.h", 25562+ "webui/access_code_cast/access_code_cast_handler.cc", 25563+ "webui/access_code_cast/access_code_cast_handler.h", 25564+ "webui/access_code_cast/access_code_cast_ui.cc", 25565+ "webui/access_code_cast/access_code_cast_ui.h", 25566+ "webui/media_router/media_router_internals_ui.cc", 25567+ "webui/media_router/media_router_internals_ui.h", 25568+ "webui/media_router/media_router_internals_webui_message_handler.cc", 25569+ "webui/media_router/media_router_internals_webui_message_handler.h", 25570+ "webui/media_router/web_contents_display_observer.h", 25571+ ] 25572+ } 25573+ 25574+ if (is_ohos) { 25575+ sources -= [ 25576+ "global_media_controls/cast_media_notification_item.cc", 25577+ "global_media_controls/cast_media_notification_item.h", 25578+ "global_media_controls/cast_media_notification_producer.cc", 25579+ "global_media_controls/cast_media_notification_producer.h", 25580+ "global_media_controls/cast_media_session_controller.cc", 25581+ "global_media_controls/cast_media_session_controller.h", 25582+ "global_media_controls/media_item_ui_device_selector_delegate.h", 25583+ "global_media_controls/media_notification_device_monitor.cc", 25584+ "global_media_controls/media_notification_device_monitor.h", 25585+ "global_media_controls/media_notification_device_provider.h", 25586+ "global_media_controls/media_notification_device_provider_impl.cc", 25587+ "global_media_controls/media_notification_device_provider_impl.h", 25588+ "global_media_controls/media_notification_service.cc", 25589+ "global_media_controls/media_notification_service.h", 25590+ "global_media_controls/media_notification_service_factory.cc", 25591+ "global_media_controls/media_notification_service_factory.h", 25592+ "global_media_controls/media_toolbar_button_controller.cc", 25593+ "global_media_controls/media_toolbar_button_controller.h", 25594+ "global_media_controls/media_toolbar_button_controller_delegate.cc", 25595+ "global_media_controls/media_toolbar_button_controller_delegate.h", 25596+ "global_media_controls/media_toolbar_button_observer.h", 25597+ "global_media_controls/presentation_request_notification_item.cc", 25598+ "global_media_controls/presentation_request_notification_item.h", 25599+ "global_media_controls/presentation_request_notification_producer.cc", 25600+ "global_media_controls/presentation_request_notification_producer.h", 25601+ ] 25602+ } 25603+ 25604 deps += [ 25605 "//base", 25606 "//build:chromeos_buildflags", 25607@@ -1770,6 +1852,16 @@ static_library("ui") { 25608 25609 allow_circular_includes_from += [ "//chrome/browser/media/router" ] 25610 25611+ if (is_ohos && !ohos_enable_media_router) { 25612+ deps -= [ 25613+ "//chrome/browser/media/router", 25614+ "//chrome/browser/media/router/discovery:discovery", 25615+ "//chrome/browser/ui/webui/access_code_cast:mojo_bindings", 25616+ "//components/media_router/common/mojom:media_router", 25617+ ] 25618+ allow_circular_includes_from -= [ "//chrome/browser/media/router" ] 25619+ } 25620+ 25621 if (use_ozone && !is_chromeos_ash) { 25622 deps += [ 25623 "//ui/base:features", 25624@@ -4862,6 +4954,58 @@ static_library("ui") { 25625 25626 allow_circular_includes_from += [ "//chrome/browser/ui/views" ] 25627 25628+ if (is_ohos && !ohos_enable_media_router) { 25629+ sources -= [ 25630+ "views/media_router/cast_dialog_access_code_cast_button.cc", 25631+ "views/media_router/cast_dialog_access_code_cast_button.h", 25632+ "views/media_router/cast_dialog_helper.cc", 25633+ "views/media_router/cast_dialog_helper.h", 25634+ "views/media_router/cast_dialog_metrics.cc", 25635+ "views/media_router/cast_dialog_metrics.h", 25636+ "views/media_router/cast_dialog_no_sinks_view.cc", 25637+ "views/media_router/cast_dialog_no_sinks_view.h", 25638+ "views/media_router/cast_dialog_sink_button.cc", 25639+ "views/media_router/cast_dialog_sink_button.h", 25640+ "views/media_router/cast_dialog_view.cc", 25641+ "views/media_router/cast_dialog_view.h", 25642+ "views/media_router/cast_toolbar_button.cc", 25643+ "views/media_router/cast_toolbar_button.h", 25644+ "views/media_router/media_remoting_dialog_view.cc", 25645+ "views/media_router/media_remoting_dialog_view.h", 25646+ "views/media_router/media_router_dialog_controller_views.cc", 25647+ "views/media_router/media_router_dialog_controller_views.h", 25648+ "views/media_router/presentation_receiver_window_factory.cc", 25649+ "views/media_router/presentation_receiver_window_frame.cc", 25650+ "views/media_router/presentation_receiver_window_frame.h", 25651+ "views/media_router/presentation_receiver_window_view.cc", 25652+ "views/media_router/presentation_receiver_window_view.h", 25653+ "views/media_router/web_contents_display_observer_view.cc", 25654+ "views/media_router/web_contents_display_observer_view.h", 25655+ ] 25656+ } 25657+ 25658+ if (is_ohos) { 25659+ sources -= [ 25660+ "views/global_media_controls/media_dialog_view.cc", 25661+ "views/global_media_controls/media_dialog_view.h", 25662+ "views/global_media_controls/media_dialog_view_observer.h", 25663+ "views/global_media_controls/media_item_ui_device_selector_observer.h", 25664+ "views/global_media_controls/media_item_ui_device_selector_view.cc", 25665+ "views/global_media_controls/media_item_ui_device_selector_view.h", 25666+ "views/global_media_controls/media_item_ui_footer_view.cc", 25667+ "views/global_media_controls/media_item_ui_footer_view.h", 25668+ "views/global_media_controls/media_item_ui_legacy_cast_footer_view.cc", 25669+ "views/global_media_controls/media_item_ui_legacy_cast_footer_view.h", 25670+ "views/global_media_controls/media_notification_device_entry_ui.cc", 25671+ "views/global_media_controls/media_notification_device_entry_ui.h", 25672+ "views/global_media_controls/media_toolbar_button_contextual_menu.cc", 25673+ "views/global_media_controls/media_toolbar_button_contextual_menu.h", 25674+ "views/global_media_controls/media_toolbar_button_view.cc", 25675+ "views/global_media_controls/media_toolbar_button_view.h", 25676+ ] 25677+ deps -= [ "//components/global_media_controls" ] 25678+ } 25679+ 25680 if (is_linux || is_chromeos_lacros || is_ohos) { 25681 sources += [ 25682 "views/chrome_views_delegate_linux.cc", 25683@@ -5118,8 +5262,6 @@ static_library("ui") { 25684 "extensions/extension_message_bubble_bridge.h", 25685 "extensions/extension_message_bubble_factory.cc", 25686 "extensions/extension_message_bubble_factory.h", 25687- "extensions/extension_removal_watcher.cc", 25688- "extensions/extension_removal_watcher.h", 25689 "extensions/extension_settings_overridden_dialog.cc", 25690 "extensions/extension_settings_overridden_dialog.h", 25691 "extensions/extensions_container.h", 25692@@ -5481,7 +5623,7 @@ static_library("test_support") { 25693 } 25694 } 25695 25696- if (!is_android) { 25697+ if (!is_android && !is_ohos) { 25698 sources += [ 25699 "exclusive_access/exclusive_access_test.cc", 25700 "exclusive_access/exclusive_access_test.h", 25701diff --git a/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.cc b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.cc 25702index 1beca9af2ca1f..049a85ab09a53 25703--- a/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.cc 25704+++ b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.cc 25705@@ -19,6 +19,7 @@ 25706 #include "chrome/browser/ssl/security_state_tab_helper.h" 25707 #include "chrome/browser/vr/vr_tab_helper.h" 25708 #include "chrome/common/url_constants.h" 25709+#include "components/permissions/permission_util.h" 25710 #include "components/security_state/core/security_state.h" 25711 #include "components/url_formatter/elide_url.h" 25712 #include "content/public/browser/render_frame_host.h" 25713@@ -27,11 +28,44 @@ 25714 #include "ui/android/window_android.h" 25715 #include "url/gurl.h" 25716 25717+namespace { 25718+ 25719+UsbChooserDialogAndroid::CreateJavaDialogCallback 25720+GetCreateJavaUsbChooserDialogCallback() { 25721+ return base::BindOnce(&Java_UsbChooserDialog_create); 25722+} 25723+ 25724+} // namespace 25725+ 25726 // static 25727 std::unique_ptr<UsbChooserDialogAndroid> UsbChooserDialogAndroid::Create( 25728 content::RenderFrameHost* render_frame_host, 25729 std::unique_ptr<permissions::ChooserController> controller, 25730 base::OnceClosure on_close) { 25731+ return CreateInternal(render_frame_host, std::move(controller), 25732+ std::move(on_close), 25733+ GetCreateJavaUsbChooserDialogCallback()); 25734+} 25735+ 25736+// static 25737+std::unique_ptr<UsbChooserDialogAndroid> 25738+UsbChooserDialogAndroid::CreateForTesting( 25739+ content::RenderFrameHost* render_frame_host, 25740+ std::unique_ptr<permissions::ChooserController> controller, 25741+ base::OnceClosure on_close, 25742+ CreateJavaDialogCallback create_java_dialog_callback) { 25743+ return CreateInternal(render_frame_host, std::move(controller), 25744+ std::move(on_close), 25745+ std::move(create_java_dialog_callback)); 25746+} 25747+ 25748+// static 25749+std::unique_ptr<UsbChooserDialogAndroid> 25750+UsbChooserDialogAndroid::CreateInternal( 25751+ content::RenderFrameHost* render_frame_host, 25752+ std::unique_ptr<permissions::ChooserController> controller, 25753+ base::OnceClosure on_close, 25754+ CreateJavaDialogCallback create_java_dialog_callback) { 25755 content::WebContents* web_contents = 25756 content::WebContents::FromRenderFrameHost(render_frame_host); 25757 25758@@ -46,10 +80,14 @@ std::unique_ptr<UsbChooserDialogAndroid> UsbChooserDialogAndroid::Create( 25759 base::android::ScopedJavaLocalRef<jobject> window_android = 25760 web_contents->GetNativeView()->GetWindowAndroid()->GetJavaObject(); 25761 JNIEnv* env = base::android::AttachCurrentThread(); 25762+ // Permission delegation means the permission request should be 25763+ // attributed to the main frame. 25764+ const auto origin = url::Origin::Create( 25765+ permissions::PermissionUtil::GetLastCommittedOriginAsURL( 25766+ render_frame_host->GetMainFrame())); 25767 base::android::ScopedJavaLocalRef<jstring> origin_string = 25768 base::android::ConvertUTF16ToJavaString( 25769- env, url_formatter::FormatOriginForSecurityDisplay( 25770- render_frame_host->GetLastCommittedOrigin())); 25771+ env, url_formatter::FormatOriginForSecurityDisplay(origin)); 25772 SecurityStateTabHelper* helper = 25773 SecurityStateTabHelper::FromWebContents(web_contents); 25774 DCHECK(helper); 25775@@ -64,9 +102,11 @@ std::unique_ptr<UsbChooserDialogAndroid> UsbChooserDialogAndroid::Create( 25776 25777 auto dialog = std::make_unique<UsbChooserDialogAndroid>(std::move(controller), 25778 std::move(on_close)); 25779- dialog->java_dialog_.Reset(Java_UsbChooserDialog_create( 25780- env, window_android, origin_string, helper->GetSecurityLevel(), 25781- j_profile_android, reinterpret_cast<intptr_t>(dialog.get()))); 25782+ 25783+ dialog->java_dialog_.Reset( 25784+ std::move(create_java_dialog_callback) 25785+ .Run(env, window_android, origin_string, helper->GetSecurityLevel(), 25786+ j_profile_android, reinterpret_cast<intptr_t>(dialog.get()))); 25787 if (dialog->java_dialog_.is_null()) 25788 return nullptr; 25789 25790diff --git a/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.h b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.h 25791index a76c71f651c19..d2aa1f641f7be 25792--- a/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.h 25793+++ b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.h 25794@@ -9,6 +9,9 @@ 25795 #include <string> 25796 #include <vector> 25797 25798+#include "base/android/jni_android.h" 25799+#include "base/android/jni_int_wrapper.h" 25800+#include "base/android/jni_string.h" 25801 #include "base/android/scoped_java_ref.h" 25802 #include "base/callback.h" 25803 #include "components/permissions/chooser_controller.h" 25804@@ -21,6 +24,16 @@ class RenderFrameHost; 25805 // options. 25806 class UsbChooserDialogAndroid : public permissions::ChooserController::View { 25807 public: 25808+ // The callback type for creating the java dialog object. 25809+ using CreateJavaDialogCallback = 25810+ base::OnceCallback<base::android::ScopedJavaLocalRef<jobject>( 25811+ JNIEnv*, 25812+ const base::android::JavaRef<jobject>&, 25813+ const base::android::JavaRef<jstring>&, 25814+ JniIntWrapper, 25815+ const base::android::JavaRef<jobject>&, 25816+ jlong)>; 25817+ 25818 // Creates and shows the dialog. Will return nullptr if the dialog was not 25819 // displayed. Otherwise |on_close| will be called when the user closes the 25820 // dialog. 25821@@ -29,6 +42,13 @@ class UsbChooserDialogAndroid : public permissions::ChooserController::View { 25822 std::unique_ptr<permissions::ChooserController> controller, 25823 base::OnceClosure on_close); 25824 25825+ static std::unique_ptr<UsbChooserDialogAndroid> CreateForTesting( 25826+ content::RenderFrameHost* render_frame_host, 25827+ std::unique_ptr<permissions::ChooserController> controller, 25828+ base::OnceClosure on_close, 25829+ UsbChooserDialogAndroid::CreateJavaDialogCallback 25830+ create_java_dialog_callback); 25831+ 25832 explicit UsbChooserDialogAndroid( 25833 std::unique_ptr<permissions::ChooserController> controller, 25834 base::OnceClosure on_close); 25835@@ -56,6 +76,13 @@ class UsbChooserDialogAndroid : public permissions::ChooserController::View { 25836 // Called when the chooser dialog is closed. 25837 void Cancel(); 25838 25839+ static std::unique_ptr<UsbChooserDialogAndroid> CreateInternal( 25840+ content::RenderFrameHost* render_frame_host, 25841+ std::unique_ptr<permissions::ChooserController> controller, 25842+ base::OnceClosure on_close, 25843+ UsbChooserDialogAndroid::CreateJavaDialogCallback 25844+ create_java_dialog_callback); 25845+ 25846 std::unique_ptr<permissions::ChooserController> controller_; 25847 base::OnceClosure on_close_; 25848 25849diff --git a/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android_unittest.cc b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android_unittest.cc 25850new file mode 100644 25851index 0000000000000..c7aed7a2b370a 25852--- /dev/null 25853+++ b/src/chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android_unittest.cc 25854@@ -0,0 +1,63 @@ 25855+// Copyright 2022 The Chromium Authors 25856+// Use of this source code is governed by a BSD-style license that can be 25857+// found in the LICENSE file. 25858+ 25859+#include "chrome/browser/ui/android/device_dialog/usb_chooser_dialog_android.h" 25860+ 25861+#include <string> 25862+ 25863+#include "base/test/bind.h" 25864+#include "base/test/mock_callback.h" 25865+#include "chrome/browser/ssl/security_state_tab_helper.h" 25866+#include "chrome/browser/usb/usb_chooser_controller.h" 25867+#include "chrome/test/base/chrome_render_view_host_test_harness.h" 25868+#include "content/public/browser/web_contents.h" 25869+#include "content/public/test/navigation_simulator.h" 25870+#include "services/device/public/mojom/usb_enumeration_options.mojom.h" 25871+#include "testing/gmock/include/gmock/gmock.h" 25872+#include "testing/gtest/include/gtest/gtest.h" 25873+#include "ui/android/window_android.h" 25874+ 25875+namespace { 25876+ 25877+using UsbChooserDialogAndroidTest = ChromeRenderViewHostTestHarness; 25878+using testing::_; 25879+ 25880+TEST_F(UsbChooserDialogAndroidTest, FrameTree) { 25881+ NavigateAndCommit(GURL("https://main-frame.com")); 25882+ content::RenderFrameHost* subframe = 25883+ content::NavigationSimulator::NavigateAndCommitFromDocument( 25884+ GURL("https://sub-frame.com"), 25885+ content::RenderFrameHostTester::For(main_rfh()) 25886+ ->AppendChild("subframe")); 25887+ 25888+ auto controller = std::make_unique<UsbChooserController>( 25889+ main_rfh(), std::vector<device::mojom::UsbDeviceFilterPtr>(), 25890+ base::BindLambdaForTesting( 25891+ [](device::mojom::UsbDeviceInfoPtr usb_device_info) {})); 25892+ 25893+ content::WebContents* web_contents = 25894+ content::WebContents::FromRenderFrameHost(main_rfh()); 25895+ std::unique_ptr<ui::WindowAndroid::ScopedWindowAndroidForTesting> window = 25896+ ui::WindowAndroid::CreateForTesting(); 25897+ window.get()->get()->AddChild(web_contents->GetNativeView()); 25898+ SecurityStateTabHelper::CreateForWebContents(web_contents); 25899+ 25900+ base::MockCallback<UsbChooserDialogAndroid::CreateJavaDialogCallback> 25901+ mock_callback; 25902+ auto origin_predicate = 25903+ [&](const base::android::JavaRef<jstring>& java_string) { 25904+ return base::android::ConvertJavaStringToUTF16( 25905+ base::android::AttachCurrentThread(), java_string) == 25906+ u"https://main-frame.com"; 25907+ }; 25908+ EXPECT_CALL(mock_callback, Run(/*env=*/_, /*window_android=*/_, 25909+ testing::Truly(origin_predicate), 25910+ /*security_level=*/_, /*profile=*/_, 25911+ /*native_usb_chooser_dialog_ptr=*/_)); 25912+ UsbChooserDialogAndroid::CreateForTesting(subframe, std::move(controller), 25913+ base::BindLambdaForTesting([]() {}), 25914+ mock_callback.Get()); 25915+} 25916+ 25917+} // namespace 25918diff --git a/src/chrome/browser/ui/browser.cc b/src/chrome/browser/ui/browser.cc 25919index f2d36a884b278..79952ed2d9c32 25920--- a/src/chrome/browser/ui/browser.cc 25921+++ b/src/chrome/browser/ui/browser.cc 25922@@ -3044,6 +3044,7 @@ bool Browser::ShouldCreateBackgroundContents( 25923 content::SiteInstance* source_site_instance, 25924 const GURL& opener_url, 25925 const std::string& frame_name) { 25926+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_BACKGROUND_CONTENTS) 25927 extensions::ExtensionSystem* extension_system = 25928 extensions::ExtensionSystem::Get(profile_); 25929 25930@@ -3076,6 +3077,9 @@ bool Browser::ShouldCreateBackgroundContents( 25931 } 25932 25933 return true; 25934+#else 25935+ return false; 25936+#endif 25937 } 25938 25939 BackgroundContents* Browser::CreateBackgroundContents( 25940@@ -3087,6 +3091,7 @@ BackgroundContents* Browser::CreateBackgroundContents( 25941 const GURL& target_url, 25942 const content::StoragePartitionId& partition_id, 25943 content::SessionStorageNamespace* session_storage_namespace) { 25944+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_BACKGROUND_CONTENTS) 25945 BackgroundContentsService* service = 25946 BackgroundContentsServiceFactory::GetForProfile(profile_); 25947 const Extension* extension = extensions::ExtensionRegistry::Get(profile_) 25948@@ -3130,4 +3135,7 @@ BackgroundContents* Browser::CreateBackgroundContents( 25949 std::string()); // No extra headers. 25950 25951 return contents; 25952+#else 25953+ return nullptr; 25954+#endif 25955 } 25956diff --git a/src/chrome/browser/ui/browser_command_controller.cc b/src/chrome/browser/ui/browser_command_controller.cc 25957index cc53da3a0b32e..914b3d8092382 25958--- a/src/chrome/browser/ui/browser_command_controller.cc 25959+++ b/src/chrome/browser/ui/browser_command_controller.cc 25960@@ -815,9 +815,11 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( 25961 case IDC_DISTILL_PAGE: 25962 ToggleDistilledView(browser_); 25963 break; 25964+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25965 case IDC_ROUTE_MEDIA: 25966 RouteMediaInvokedFromAppMenu(browser_); 25967 break; 25968+#endif 25969 case IDC_WINDOW_MUTE_SITE: 25970 MuteSite(browser_); 25971 break; 25972@@ -1595,8 +1597,10 @@ void BrowserCommandController::UpdateCommandsForMediaRouter() { 25973 if (is_locked_fullscreen_) 25974 return; 25975 25976+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 25977 command_updater_.UpdateCommandEnabled(IDC_ROUTE_MEDIA, 25978 CanRouteMedia(browser_)); 25979+#endif 25980 } 25981 25982 void BrowserCommandController::UpdateCommandsForTabKeyboardFocus( 25983diff --git a/src/chrome/browser/ui/browser_commands.cc b/src/chrome/browser/ui/browser_commands.cc 25984index 6a314d34c2c90..4c7158dd052ec 25985--- a/src/chrome/browser/ui/browser_commands.cc 25986+++ b/src/chrome/browser/ui/browser_commands.cc 25987@@ -31,7 +31,6 @@ 25988 #include "chrome/browser/download/download_prefs.h" 25989 #include "chrome/browser/favicon/favicon_utils.h" 25990 #include "chrome/browser/lifetime/application_lifetime.h" 25991-#include "chrome/browser/media/router/media_router_feature.h" 25992 #include "chrome/browser/prefs/incognito_mode_prefs.h" 25993 #include "chrome/browser/profiles/profile.h" 25994 #include "chrome/browser/sessions/session_service.h" 25995@@ -105,8 +104,6 @@ 25996 #include "components/find_in_page/find_tab_helper.h" 25997 #include "components/find_in_page/find_types.h" 25998 #include "components/google/core/common/google_util.h" 25999-#include "components/media_router/browser/media_router_dialog_controller.h" // nogncheck 26000-#include "components/media_router/browser/media_router_metrics.h" 26001 #include "components/omnibox/browser/omnibox_prefs.h" 26002 #include "components/prefs/pref_service.h" 26003 #include "components/reading_list/core/reading_list_entry.h" 26004@@ -175,6 +172,12 @@ 26005 #include "chromeos/lacros/lacros_service.h" 26006 #endif 26007 26008+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26009+#include "chrome/browser/media/router/media_router_feature.h" 26010+#include "components/media_router/browser/media_router_dialog_controller.h" // nogncheck 26011+#include "components/media_router/browser/media_router_metrics.h" 26012+#endif 26013+ 26014 namespace { 26015 26016 const char kOsOverrideForTabletSite[] = "Linux; Android 9; Chrome tablet"; 26017@@ -1402,13 +1405,18 @@ bool CanBasicPrint(Browser* browser) { 26018 #endif // BUILDFLAG(ENABLE_PRINTING) 26019 26020 bool CanRouteMedia(Browser* browser) { 26021+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26022 // Do not allow user to open Media Router dialog when there is already an 26023 // active modal dialog. This avoids overlapping dialogs. 26024 return media_router::MediaRouterEnabled(browser->profile()) && 26025 !IsShowingWebContentsModalDialog(browser); 26026+#else 26027+ return false; 26028+#endif 26029 } 26030 26031 void RouteMediaInvokedFromAppMenu(Browser* browser) { 26032+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26033 DCHECK(CanRouteMedia(browser)); 26034 26035 media_router::MediaRouterDialogController* dialog_controller = 26036@@ -1419,6 +1427,7 @@ void RouteMediaInvokedFromAppMenu(Browser* browser) { 26037 26038 dialog_controller->ShowMediaRouterDialog( 26039 media_router::MediaRouterDialogOpenOrigin::APP_MENU); 26040+#endif 26041 } 26042 26043 void CutCopyPaste(Browser* browser, int command_id) { 26044diff --git a/src/chrome/browser/ui/browser_dialogs.h b/src/chrome/browser/ui/browser_dialogs.h 26045index 4ffe538bc96f2..0811352da29f7 26046--- a/src/chrome/browser/ui/browser_dialogs.h 26047+++ b/src/chrome/browser/ui/browser_dialogs.h 26048@@ -496,7 +496,7 @@ void ShowExtensionInstallFrictionDialog( 26049 // Returns a OnceClosure that client code can call to close the device chooser. 26050 // This OnceClosure references the actual dialog as a WeakPtr, so it's safe to 26051 // call at any point. 26052-#if defined(TOOLKIT_VIEWS) 26053+#if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_OHOS) 26054 base::OnceClosure ShowDeviceChooserDialog( 26055 content::RenderFrameHost* owner, 26056 std::unique_ptr<permissions::ChooserController> controller); 26057diff --git a/src/chrome/browser/ui/extensions/extension_installed_waiter.cc b/src/chrome/browser/ui/extensions/extension_installed_waiter.cc 26058index 6e11b9036b1d8..8d70116a9b0ed 26059--- a/src/chrome/browser/ui/extensions/extension_installed_waiter.cc 26060+++ b/src/chrome/browser/ui/extensions/extension_installed_waiter.cc 26061@@ -40,15 +40,13 @@ ExtensionInstalledWaiter::ExtensionInstalledWaiter( 26062 done_callback_(std::move(done_callback)) { 26063 extension_registry_observation_.Observe( 26064 extensions::ExtensionRegistry::Get(browser->profile())); 26065- removal_watcher_ = std::make_unique<ExtensionRemovalWatcher>( 26066- browser, extension, 26067- base::BindOnce(&ExtensionInstalledWaiter::OnExtensionRemoved, 26068- weak_factory_.GetWeakPtr())); 26069+ BrowserList::AddObserver(this); 26070 } 26071 26072 ExtensionInstalledWaiter::~ExtensionInstalledWaiter() { 26073 if (done_callback_ && g_giving_up_callback) 26074 g_giving_up_callback->Run(); 26075+ BrowserList::RemoveObserver(this); 26076 } 26077 26078 void ExtensionInstalledWaiter::RunCallbackIfExtensionInstalled() { 26079@@ -79,6 +77,15 @@ void ExtensionInstalledWaiter::OnExtensionLoaded( 26080 weak_factory_.GetWeakPtr())); 26081 } 26082 26083-void ExtensionInstalledWaiter::OnExtensionRemoved() { 26084- delete this; 26085+void ExtensionInstalledWaiter::OnExtensionUnloaded( 26086+ content::BrowserContext* browser_context, 26087+ const extensions::Extension* extension, 26088+ extensions::UnloadedExtensionReason reason) { 26089+ if (extension == extension_.get()) 26090+ delete this; 26091+} 26092+ 26093+void ExtensionInstalledWaiter::OnBrowserClosing(Browser* browser) { 26094+ if (browser == browser_) 26095+ delete this; 26096 } 26097diff --git a/src/chrome/browser/ui/extensions/extension_installed_waiter.h b/src/chrome/browser/ui/extensions/extension_installed_waiter.h 26098index 880c832c18451..9dbb2c88c839b 26099--- a/src/chrome/browser/ui/extensions/extension_installed_waiter.h 26100+++ b/src/chrome/browser/ui/extensions/extension_installed_waiter.h 26101@@ -9,7 +9,7 @@ 26102 #include "base/memory/raw_ptr.h" 26103 #include "base/memory/weak_ptr.h" 26104 #include "base/scoped_observation.h" 26105-#include "chrome/browser/ui/extensions/extension_removal_watcher.h" 26106+#include "chrome/browser/ui/browser_list_observer.h" 26107 #include "extensions/browser/extension_registry.h" 26108 #include "extensions/browser/extension_registry_observer.h" 26109 26110@@ -17,7 +17,8 @@ class Browser; 26111 26112 // ExtensionInstalledWaiter is used to wait for a given extension to be 26113 // installed in a given browser's profile. 26114-class ExtensionInstalledWaiter : public extensions::ExtensionRegistryObserver { 26115+class ExtensionInstalledWaiter : public extensions::ExtensionRegistryObserver, 26116+ public BrowserListObserver { 26117 public: 26118 // Wait until both: 26119 // 1. |extension| is installed into |browser| 26120@@ -57,8 +58,12 @@ class ExtensionInstalledWaiter : public extensions::ExtensionRegistryObserver { 26121 // ExtensionRegistryObserver: 26122 void OnExtensionLoaded(content::BrowserContext* browser_context, 26123 const extensions::Extension* extension) override; 26124+ void OnExtensionUnloaded(content::BrowserContext* browser_context, 26125+ const extensions::Extension* extension, 26126+ extensions::UnloadedExtensionReason reason) override; 26127 26128- void OnExtensionRemoved(); 26129+ // BrowserListObserver: 26130+ void OnBrowserClosing(Browser* browser) override; 26131 26132 const scoped_refptr<const extensions::Extension> extension_; 26133 const raw_ptr<const Browser> browser_; 26134@@ -68,8 +73,6 @@ class ExtensionInstalledWaiter : public extensions::ExtensionRegistryObserver { 26135 extensions::ExtensionRegistryObserver> 26136 extension_registry_observation_{this}; 26137 26138- std::unique_ptr<ExtensionRemovalWatcher> removal_watcher_; 26139- 26140 base::WeakPtrFactory<ExtensionInstalledWaiter> weak_factory_{this}; 26141 }; 26142 26143diff --git a/src/chrome/browser/ui/extensions/extension_removal_watcher.cc b/src/chrome/browser/ui/extensions/extension_removal_watcher.cc 26144deleted file mode 100644 26145index 4ef1045c2dce7..0000000000000 26146--- a/src/chrome/browser/ui/extensions/extension_removal_watcher.cc 26147+++ /dev/null 26148@@ -1,36 +0,0 @@ 26149-// Copyright 2019 The Chromium Authors. All rights reserved. 26150-// Use of this source code is governed by a BSD-style license that can be 26151-// found in the LICENSE file. 26152- 26153-#include "chrome/browser/ui/extensions/extension_removal_watcher.h" 26154- 26155-#include "chrome/browser/profiles/profile.h" 26156-#include "chrome/browser/ui/browser.h" 26157-#include "chrome/browser/ui/browser_list.h" 26158- 26159-ExtensionRemovalWatcher::ExtensionRemovalWatcher( 26160- Browser* browser, 26161- scoped_refptr<const extensions::Extension> extension, 26162- base::OnceClosure callback) 26163- : browser_(browser), extension_(extension), callback_(std::move(callback)) { 26164- extension_registry_observation_.Observe( 26165- extensions::ExtensionRegistry::Get(browser->profile())); 26166- BrowserList::AddObserver(this); 26167-} 26168- 26169-ExtensionRemovalWatcher::~ExtensionRemovalWatcher() { 26170- BrowserList::RemoveObserver(this); 26171-} 26172- 26173-void ExtensionRemovalWatcher::OnBrowserClosing(Browser* browser) { 26174- if (browser == browser_ && callback_) 26175- std::move(callback_).Run(); 26176-} 26177- 26178-void ExtensionRemovalWatcher::OnExtensionUnloaded( 26179- content::BrowserContext* browser_context, 26180- const extensions::Extension* extension, 26181- extensions::UnloadedExtensionReason reason) { 26182- if (extension == extension_.get() && callback_) 26183- std::move(callback_).Run(); 26184-} 26185diff --git a/src/chrome/browser/ui/extensions/extension_removal_watcher.h b/src/chrome/browser/ui/extensions/extension_removal_watcher.h 26186deleted file mode 100644 26187index 5e75053387f49..0000000000000 26188--- a/src/chrome/browser/ui/extensions/extension_removal_watcher.h 26189+++ /dev/null 26190@@ -1,46 +0,0 @@ 26191-// Copyright 2019 The Chromium Authors. All rights reserved. 26192-// Use of this source code is governed by a BSD-style license that can be 26193-// found in the LICENSE file. 26194- 26195-#ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_REMOVAL_WATCHER_H_ 26196-#define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_REMOVAL_WATCHER_H_ 26197- 26198-#include "base/callback.h" 26199-#include "base/memory/raw_ptr.h" 26200-#include "base/memory/weak_ptr.h" 26201-#include "base/scoped_observation.h" 26202-#include "chrome/browser/ui/browser_list_observer.h" 26203-#include "extensions/browser/extension_registry.h" 26204-#include "extensions/browser/extension_registry_observer.h" 26205- 26206-// ExtensionRemovalWatcher watches a browser and an extension for either: 26207-// 1) The browser being closed, or 26208-// 2) The extension being uninstalled from the browser's profile 26209-// and in either case, invokes the provided callback. 26210-class ExtensionRemovalWatcher : public BrowserListObserver, 26211- public extensions::ExtensionRegistryObserver { 26212- public: 26213- ExtensionRemovalWatcher(Browser* browser, 26214- scoped_refptr<const extensions::Extension> extension, 26215- base::OnceClosure callback); 26216- ~ExtensionRemovalWatcher() override; 26217- 26218- private: 26219- // ExtensionRegistryObserver: 26220- void OnExtensionUnloaded(content::BrowserContext* browser_context, 26221- const extensions::Extension* extension, 26222- extensions::UnloadedExtensionReason reason) override; 26223- 26224- // BrowserListObserver: 26225- void OnBrowserClosing(Browser* browser) override; 26226- 26227- raw_ptr<const Browser> browser_; 26228- const scoped_refptr<const extensions::Extension> extension_; 26229- base::OnceClosure callback_; 26230- 26231- base::ScopedObservation<extensions::ExtensionRegistry, 26232- extensions::ExtensionRegistryObserver> 26233- extension_registry_observation_{this}; 26234-}; 26235- 26236-#endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_REMOVAL_WATCHER_H_ 26237diff --git a/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.cc b/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.cc 26238index ffca56c51d2d9..f8a525304e2ca 26239--- a/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.cc 26240+++ b/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.cc 26241@@ -135,13 +135,11 @@ WellKnownChangePasswordNavigationThrottle::WillProcessResponse() { 26242 // PostTask because the Throttle needs to be deferred before the status code 26243 // is set. After setting the status code Resume() can be called synchronous 26244 // and thereby before the throttle is deferred. This would result in a crash. 26245- // Unretained is safe because the NavigationThrottle is deferred and can only 26246- // be continued after the callback finished. 26247 base::SequencedTaskRunnerHandle::Get()->PostTask( 26248 FROM_HERE, 26249 base::BindOnce( 26250 &WellKnownChangePasswordState::SetChangePasswordResponseCode, 26251- base::Unretained(&well_known_change_password_state_), 26252+ weak_ptr_factory_.GetWeakPtr(), 26253 navigation_handle()->GetResponseHeaders()->response_code())); 26254 return NavigationThrottle::DEFER; 26255 } 26256diff --git a/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.h b/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.h 26257index 10817f7efee69..d5727c6c442c1 26258--- a/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.h 26259+++ b/src/chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.h 26260@@ -66,6 +66,8 @@ class WellKnownChangePasswordNavigationThrottle 26261 well_known_change_password_state_{this}; 26262 ukm::SourceId source_id_ = ukm::kInvalidSourceId; 26263 raw_ptr<password_manager::AffiliationService> affiliation_service_ = nullptr; 26264+ base::WeakPtrFactory<password_manager::WellKnownChangePasswordState> 26265+ weak_ptr_factory_{&well_known_change_password_state_}; 26266 }; 26267 26268 #endif // CHROME_BROWSER_UI_PASSWORDS_WELL_KNOWN_CHANGE_PASSWORD_NAVIGATION_THROTTLE_H_ 26269diff --git a/src/chrome/browser/ui/toolbar/app_menu_model.cc b/src/chrome/browser/ui/toolbar/app_menu_model.cc 26270index 1ce8183547bb2..a54f7f372e53a 26271--- a/src/chrome/browser/ui/toolbar/app_menu_model.cc 26272+++ b/src/chrome/browser/ui/toolbar/app_menu_model.cc 26273@@ -60,7 +60,6 @@ 26274 #include "components/dom_distiller/content/browser/uma_helper.h" 26275 #include "components/dom_distiller/core/dom_distiller_features.h" 26276 #include "components/dom_distiller/core/url_utils.h" 26277-#include "components/media_router/browser/media_router_metrics.h" 26278 #include "components/prefs/pref_service.h" 26279 #include "components/profile_metrics/browser_profile_type.h" 26280 #include "components/signin/public/base/signin_metrics.h" 26281@@ -104,6 +103,10 @@ 26282 #include "content/public/browser/gpu_data_manager.h" 26283 #endif 26284 26285+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26286+#include "components/media_router/browser/media_router_metrics.h" 26287+#endif 26288+ 26289 using base::UserMetricsAction; 26290 using content::WebContents; 26291 26292@@ -483,6 +486,7 @@ void AppMenuModel::LogMenuMetrics(int command_id) { 26293 LogMenuAction(MENU_ACTION_PRINT); 26294 break; 26295 26296+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26297 case IDC_ROUTE_MEDIA: 26298 if (!uma_action_recorded_) 26299 UMA_HISTOGRAM_MEDIUM_TIMES("WrenchMenu.TimeToAction.Cast", delta); 26300@@ -492,6 +496,7 @@ void AppMenuModel::LogMenuMetrics(int command_id) { 26301 media_router::MediaRouterMetrics::RecordMediaRouterDialogOrigin( 26302 media_router::MediaRouterDialogOpenOrigin::APP_MENU); 26303 break; 26304+#endif 26305 26306 // Edit menu. 26307 case IDC_CUT: 26308@@ -826,8 +831,10 @@ void AppMenuModel::Build() { 26309 26310 AddItemWithStringId(IDC_PRINT, IDS_PRINT); 26311 26312+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26313 if (media_router::MediaRouterEnabled(browser()->profile())) 26314 AddItemWithStringId(IDC_ROUTE_MEDIA, IDS_MEDIA_ROUTER_MENU_ITEM_TITLE); 26315+#endif 26316 26317 AddItemWithStringId(IDC_FIND, IDS_FIND); 26318 26319diff --git a/src/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/src/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc 26320index dab357db218ba..366c1d7373c6f 26321--- a/src/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc 26322+++ b/src/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc 26323@@ -16,11 +16,9 @@ 26324 #include "chrome/browser/ui/views/chrome_layout_provider.h" 26325 #include "chrome/browser/ui/views/chrome_views_delegate.h" 26326 #include "chrome/browser/ui/views/devtools_process_observer.h" 26327-#include "chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h" 26328 #include "chrome/browser/ui/views/relaunch_notification/relaunch_notification_controller.h" 26329 #include "chrome/common/chrome_paths.h" 26330 #include "components/constrained_window/constrained_window_views.h" 26331-#include "components/media_router/browser/media_router_dialog_controller.h" 26332 #include "components/ui_devtools/connector_delegate.h" 26333 #include "components/ui_devtools/switches.h" 26334 #include "components/ui_devtools/views/devtools_server_util.h" 26335@@ -53,6 +51,11 @@ 26336 #include "ui/base/l10n/l10n_util.h" 26337 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) 26338 26339+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26340+#include "chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h" 26341+#include "components/media_router/browser/media_router_dialog_controller.h" 26342+#endif 26343+ 26344 namespace { 26345 26346 // Owned by ChromeBrowserMainParts. 26347@@ -121,6 +124,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit() { 26348 CreateUiDevTools(); 26349 } 26350 26351+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26352 media_router::MediaRouterDialogController::SetGetOrCreate( 26353 base::BindRepeating([](content::WebContents* web_contents) { 26354 DCHECK(web_contents); 26355@@ -133,6 +137,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit() { 26356 web_contents); 26357 return controller; 26358 })); 26359+#endif 26360 26361 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch 26362 // of lacros-chrome is complete. 26363diff --git a/src/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.h b/src/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.h 26364index ad96a6657884c..0766b94173ce6 26365--- a/src/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.h 26366+++ b/src/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.h 26367@@ -11,10 +11,16 @@ 26368 #include <vector> 26369 26370 #include "base/memory/raw_ptr.h" 26371-#include "chrome/browser/ui/media_router/cast_dialog_controller.h" 26372 #include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble_view.h" 26373 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h" 26374 26375+#if BUILDFLAG(IS_OHOS) 26376+#include "media/media_buildflags.h" 26377+#if BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26378+#include "chrome/browser/ui/media_router/cast_dialog_controller.h" 26379+#endif 26380+#endif 26381+ 26382 namespace content { 26383 class WebContents; 26384 } // namespace content 26385diff --git a/src/chrome/browser/ui/views/toolbar/toolbar_view.cc b/src/chrome/browser/ui/views/toolbar/toolbar_view.cc 26386index 4a3121cedf083..41b6d132fdcc9 26387--- a/src/chrome/browser/ui/views/toolbar/toolbar_view.cc 26388+++ b/src/chrome/browser/ui/views/toolbar/toolbar_view.cc 26389@@ -47,10 +47,7 @@ 26390 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 26391 #include "chrome/browser/ui/views/frame/browser_view.h" 26392 #include "chrome/browser/ui/views/frame/top_container_background.h" 26393-#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu.h" 26394-#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h" 26395 #include "chrome/browser/ui/views/location_bar/star_view.h" 26396-#include "chrome/browser/ui/views/media_router/cast_toolbar_button.h" 26397 #include "chrome/browser/ui/views/page_action/page_action_icon_container.h" 26398 #include "chrome/browser/ui/views/page_action/page_action_icon_controller.h" 26399 #include "chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_toolbar_icon_view.h" 26400@@ -130,6 +127,12 @@ 26401 #include "chrome/browser/ui/views/side_search/side_search_browser_controller.h" 26402 #endif // BUILDFLAG(ENABLE_SIDE_SEARCH) 26403 26404+#if !BUILDFLAG(IS_OHOS) 26405+#include "chrome/browser/ui/views/media_router/cast_toolbar_button.h" 26406+#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_contextual_menu.h" 26407+#include "chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h" 26408+#endif 26409+ 26410 using base::UserMetricsAction; 26411 using content::WebContents; 26412 26413@@ -255,6 +258,7 @@ void ToolbarView::Init() { 26414 extensions_container = 26415 std::make_unique<ExtensionsToolbarContainer>(browser_); 26416 } 26417+#if !BUILDFLAG(IS_OHOS) 26418 std::unique_ptr<media_router::CastToolbarButton> cast; 26419 if (media_router::MediaRouterEnabled(browser_->profile())) 26420 cast = media_router::CastToolbarButton::Create(browser_); 26421@@ -264,6 +268,7 @@ void ToolbarView::Init() { 26422 media_button = std::make_unique<MediaToolbarButtonView>( 26423 browser_view_, MediaToolbarButtonContextualMenu::Create(browser_)); 26424 } 26425+#endif 26426 26427 std::unique_ptr<DownloadToolbarButtonView> download_button; 26428 if (base::FeatureList::IsEnabled(features::kDownloadBubble)) { 26429@@ -345,11 +350,13 @@ void ToolbarView::Init() { 26430 } 26431 } 26432 26433+#if !BUILDFLAG(IS_OHOS) 26434 if (cast) 26435 cast_ = AddChildView(std::move(cast)); 26436 26437 if (media_button) 26438 media_button_ = AddChildView(std::move(media_button)); 26439+#endif 26440 26441 if (download_button) 26442 download_button_ = AddChildView(std::move(download_button)); 26443diff --git a/src/chrome/browser/ui/web_applications/web_app_menu_model.cc b/src/chrome/browser/ui/web_applications/web_app_menu_model.cc 26444index 29e159f5d7fba..9818769d99528 26445--- a/src/chrome/browser/ui/web_applications/web_app_menu_model.cc 26446+++ b/src/chrome/browser/ui/web_applications/web_app_menu_model.cc 26447@@ -144,8 +144,10 @@ void WebAppMenuModel::Build() { 26448 AddSeparator(ui::UPPER_SEPARATOR); 26449 AddItemWithStringId(IDC_PRINT, IDS_PRINT); 26450 AddItemWithStringId(IDC_FIND, IDS_FIND); 26451+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26452 if (media_router::MediaRouterEnabled(browser()->profile())) 26453 AddItemWithStringId(IDC_ROUTE_MEDIA, IDS_MEDIA_ROUTER_MENU_ITEM_TITLE); 26454+#endif 26455 AddSeparator(ui::LOWER_SEPARATOR); 26456 CreateCutCopyPasteMenu(); 26457 } 26458diff --git a/src/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/src/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc 26459index 63b3cd6439765..33e2a3c8cc7bc 26460--- a/src/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc 26461+++ b/src/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc 26462@@ -120,9 +120,7 @@ 26463 #include "components/feed/buildflags.h" 26464 #include "components/feed/feed_feature_list.h" 26465 #else // BUILDFLAG(IS_ANDROID) 26466-#include "chrome/browser/media/router/media_router_feature.h" 26467 #include "chrome/browser/ui/ui_features.h" 26468-#include "chrome/browser/ui/webui/access_code_cast/access_code_cast_ui.h" 26469 #include "chrome/browser/ui/webui/app_service_internals/app_service_internals_ui.h" 26470 #include "chrome/browser/ui/webui/bookmarks/bookmarks_ui.h" 26471 #include "chrome/browser/ui/webui/commander/commander_ui.h" 26472@@ -135,7 +133,6 @@ 26473 #include "chrome/browser/ui/webui/image_editor/image_editor_ui.h" 26474 #include "chrome/browser/ui/webui/inspect_ui.h" 26475 #include "chrome/browser/ui/webui/management/management_ui.h" 26476-#include "chrome/browser/ui/webui/media_router/media_router_internals_ui.h" 26477 #include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h" 26478 #include "chrome/browser/ui/webui/new_tab_page_third_party/new_tab_page_third_party_ui.h" 26479 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 26480@@ -368,6 +365,12 @@ 26481 #include "chrome/browser/ui/webui/chromeos/chromebox_for_meetings/network_settings_dialog.h" 26482 #endif // BUILDFLAG(PLATFORM_CFM) 26483 26484+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26485+#include "chrome/browser/media/router/media_router_feature.h" 26486+#include "chrome/browser/ui/webui/access_code_cast/access_code_cast_ui.h" 26487+#include "chrome/browser/ui/webui/media_router/media_router_internals_ui.h" 26488+#endif 26489+ 26490 using content::WebUI; 26491 using content::WebUIController; 26492 using ui::WebDialogUI; 26493@@ -791,10 +794,12 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, 26494 return &NewWebUI<SyncFileSystemInternalsUI>; 26495 if (url.host_piece() == chrome::kChromeUISystemInfoHost) 26496 return &NewWebUI<SystemInfoUI>; 26497+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26498 if (base::FeatureList::IsEnabled(features::kAccessCodeCastUI)) { 26499 if (url.host_piece() == chrome::kChromeUIAccessCodeCastHost) 26500 return &NewWebUI<AccessCodeCastUI>; 26501 } 26502+#endif 26503 if (base::FeatureList::IsEnabled(features::kSupportTool) && 26504 url.host_piece() == chrome::kChromeUISupportToolHost) 26505 return &NewWebUI<SupportToolUI>; 26506@@ -1126,11 +1131,13 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, 26507 base::FeatureList::IsEnabled(features::kChromeWhatsNewUI)) { 26508 return &NewWebUI<WhatsNewUI>; 26509 } 26510+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(OHOS_ENABLE_MEDIA_ROUTER) 26511 if (url.host_piece() == chrome::kChromeUIMediaRouterInternalsHost && 26512 media_router::MediaRouterEnabled(profile)) { 26513 return &NewWebUI<media_router::MediaRouterInternalsUI>; 26514 } 26515 #endif 26516+#endif 26517 #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ 26518 BUILDFLAG(IS_ANDROID) 26519 if (url.host_piece() == chrome::kChromeUISandboxHost) { 26520diff --git a/src/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/src/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc 26521index 6da1ddc58bbeb..862b04e73138e 26522--- a/src/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc 26523+++ b/src/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc 26524@@ -421,11 +421,13 @@ void InlineSigninHelper::OnClientOAuthSuccessAndBrowserOpened( 26525 // Display a confirmation dialog to the user. 26526 base::RecordAction( 26527 base::UserMetricsAction("Signin_Show_UntrustedSigninPrompt")); 26528+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) 26529 Browser* browser = chrome::FindLastActiveWithProfile(profile_); 26530 browser->window()->ShowOneClickSigninConfirmation( 26531 base::UTF8ToUTF16(email_), 26532 base::BindOnce(&InlineSigninHelper::UntrustedSigninConfirmed, 26533 base::Unretained(this), result.refresh_token)); 26534+#endif 26535 return; 26536 } 26537 CreateSyncStarter(result.refresh_token); 26538diff --git a/src/chrome/browser/ui/webui/webui_util.cc b/src/chrome/browser/ui/webui/webui_util.cc 26539index 3298b3d3c809f..90f3088dca459 26540--- a/src/chrome/browser/ui/webui/webui_util.cc 26541+++ b/src/chrome/browser/ui/webui/webui_util.cc 26542@@ -21,7 +21,7 @@ 26543 #include "base/enterprise_util.h" 26544 #endif 26545 26546-#if defined(TOOLKIT_VIEWS) 26547+#if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_OHOS) 26548 #include "chrome/browser/ui/browser.h" 26549 #include "chrome/browser/ui/browser_finder.h" 26550 #include "chrome/browser/ui/browser_window.h" 26551@@ -66,7 +66,7 @@ bool IsEnterpriseManaged() { 26552 #endif 26553 } 26554 26555-#if defined(TOOLKIT_VIEWS) 26556+#if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_OHOS) 26557 ui::NativeTheme* GetNativeTheme(content::WebContents* web_contents) { 26558 ui::NativeTheme* native_theme = nullptr; 26559 26560diff --git a/src/chrome/browser/ui/webui/webui_util.h b/src/chrome/browser/ui/webui/webui_util.h 26561index afa3e78ed2834..c0778ec6cd453 26562--- a/src/chrome/browser/ui/webui/webui_util.h 26563+++ b/src/chrome/browser/ui/webui/webui_util.h 26564@@ -39,7 +39,7 @@ void SetupWebUIDataSource(content::WebUIDataSource* source, 26565 // false. 26566 bool IsEnterpriseManaged(); 26567 26568-#if defined(TOOLKIT_VIEWS) 26569+#if defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_OHOS) 26570 // Returns whether WebContents should use dark mode colors depending on the 26571 // theme. 26572 ui::NativeTheme* GetNativeTheme(content::WebContents* web_contents); 26573diff --git a/src/chrome/chrome_paks.gni b/src/chrome/chrome_paks.gni 26574index 8a56f21945249..38e26e4a14994 26575--- a/src/chrome/chrome_paks.gni 26576+++ b/src/chrome/chrome_paks.gni 26577@@ -58,7 +58,7 @@ template("chrome_repack_percent") { 26578 deps += invoker.deps 26579 } 26580 26581- if (toolkit_views || is_ohos) { 26582+ if (toolkit_views) { 26583 sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ] 26584 deps += [ "//ui/views/resources" ] 26585 } 26586@@ -143,7 +143,7 @@ template("chrome_extra_paks") { 26587 deps += [ "//ohos_nweb_ex/overrides/ui/resources" ] 26588 } 26589 26590- if (!is_android) { 26591+ if (!is_android && !is_ohos) { 26592 # New paks should be added here by default. 26593 sources += [ 26594 "$root_gen_dir/chrome/access_code_cast_resources.pak", 26595@@ -326,7 +326,7 @@ template("chrome_extra_paks") { 26596 sources += [ "$root_gen_dir/chrome/webui_js_error_resources.pak" ] 26597 deps += [ "//chrome/browser/resources/webui_js_error:resources" ] 26598 } 26599- if (!is_android && !is_chromeos_ash) { 26600+ if (!is_android && !is_chromeos_ash && !is_ohos) { 26601 sources += [ 26602 "$root_gen_dir/chrome/apps_resources.pak", 26603 "$root_gen_dir/chrome/profile_picker_resources.pak", 26604diff --git a/src/chrome/common/BUILD.gn b/src/chrome/common/BUILD.gn 26605index 140e1b3256b95..78e10e95bdae8 26606--- a/src/chrome/common/BUILD.gn 26607+++ b/src/chrome/common/BUILD.gn 26608@@ -249,6 +249,10 @@ static_library("common") { 26609 "//components/page_load_metrics/common:common", 26610 ] 26611 26612+ if (is_ohos && !ohos_enable_media_router) { 26613+ public_deps -= [ "//components/cast_certificate" ] 26614+ } 26615+ 26616 if (enable_pdf) { 26617 deps += [ "//components/pdf/common" ] 26618 } 26619diff --git a/src/chrome/common/features.gni b/src/chrome/common/features.gni 26620index c453fe0c0d203..9d69a1f9b2ccb 26621--- a/src/chrome/common/features.gni 26622+++ b/src/chrome/common/features.gni 26623@@ -33,8 +33,9 @@ declare_args() { 26624 builtin_cert_verifier_policy_supported = is_mac 26625 26626 # Enables support for background apps. 26627- enable_background_contents = !is_android && !is_chromecast 26628- enable_background_mode = !is_android && !is_chromecast && !is_chromeos 26629+ enable_background_contents = !is_android && !is_chromecast && !is_ohos 26630+ enable_background_mode = 26631+ !is_android && !is_chromecast && !is_chromeos && !is_ohos 26632 26633 # Enable the printing system dialog for platforms that support printing 26634 # and have a system dialog. 26635@@ -53,7 +54,7 @@ declare_args() { 26636 enable_one_click_signin = is_win || is_mac || is_fuchsia || 26637 ((is_linux || is_chromeos_lacros) && !is_chromecast) 26638 26639- enable_service_discovery = (enable_mdns && !is_android) || is_mac 26640+ enable_service_discovery = (enable_mdns && !is_android && !is_ohos) || is_mac 26641 26642 # Enables use of the session service, which is enabled by default. 26643 # Android stores them separately on the Java side. 26644diff --git a/src/chrome/services/speech/speech_recognition_recognizer_impl.cc b/src/chrome/services/speech/speech_recognition_recognizer_impl.cc 26645index db205242046fb..14026f5c8f820 26646--- a/src/chrome/services/speech/speech_recognition_recognizer_impl.cc 26647+++ b/src/chrome/services/speech/speech_recognition_recognizer_impl.cc 26648@@ -12,6 +12,9 @@ 26649 #include "base/files/file_path.h" 26650 #include "base/files/file_util.h" 26651 #include "base/metrics/histogram_functions.h" 26652+#include "base/task/task_runner.h" 26653+#include "base/task/task_traits.h" 26654+#include "base/task/thread_pool.h" 26655 #include "build/build_config.h" 26656 #include "build/chromeos_buildflags.h" 26657 #include "chrome/services/speech/soda/proto/soda_api.pb.h" 26658@@ -190,7 +193,6 @@ SpeechRecognitionRecognizerImpl::SpeechRecognitionRecognizerImpl( 26659 &SpeechRecognitionRecognizerImpl::OnRecognitionStoppedCallback, 26660 weak_factory_.GetWeakPtr())); 26661 26662- // Unretained is safe because |this| owns the mojo::Remote. 26663 client_remote_.set_disconnect_handler( 26664 base::BindOnce(&SpeechRecognitionRecognizerImpl::OnClientHostDisconnected, 26665 weak_factory_.GetWeakPtr())); 26666@@ -300,13 +302,40 @@ void SpeechRecognitionRecognizerImpl::OnLanguageChanged( 26667 if (language_code == language_ || language_code == LanguageCode::kNone) 26668 return; 26669 26670- language_ = language_component_config.value().language_code; 26671- base::FilePath config_path = GetLatestSodaLanguagePackDirectory(language); 26672- if (base::PathExists(config_path)) { 26673+ if (!task_runner_) { 26674+ task_runner_ = base::ThreadPool::CreateSequencedTaskRunner( 26675+ {base::MayBlock(), base::TaskPriority::BEST_EFFORT, 26676+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); 26677+ } 26678+ 26679+ // Changing the language requires a blocking call to check if the language 26680+ // pack exists on the device. 26681+ scoped_refptr<base::SequencedTaskRunner> current_task_runner = 26682+ base::SequencedTaskRunnerHandle::Get(); 26683+ 26684+ base::FilePath config_file_path = 26685+ GetLatestSodaLanguagePackDirectory(language); 26686+ 26687+ task_runner_->PostTaskAndReplyWithResult( 26688+ FROM_HERE, 26689+ base::BindOnce( 26690+ [](base::FilePath config_path) { 26691+ return base::PathExists(config_path); 26692+ }, 26693+ config_file_path), 26694+ base::BindOnce(&SpeechRecognitionRecognizerImpl::ResetSodaWithNewLanguage, 26695+ weak_factory_.GetWeakPtr(), config_file_path, 26696+ language_code)); 26697+} 26698+ 26699+void SpeechRecognitionRecognizerImpl::ResetSodaWithNewLanguage( 26700+ base::FilePath config_path, 26701+ speech::LanguageCode language_code, 26702+ bool config_exists) { 26703+ if (config_exists) { 26704 config_path_ = config_path; 26705+ language_ = language_code; 26706 ResetSoda(); 26707- } else { 26708- NOTREACHED(); 26709 } 26710 } 26711 26712diff --git a/src/chrome/services/speech/speech_recognition_recognizer_impl.h b/src/chrome/services/speech/speech_recognition_recognizer_impl.h 26713index c3eea81ba6765..8855af66632ba 26714--- a/src/chrome/services/speech/speech_recognition_recognizer_impl.h 26715+++ b/src/chrome/services/speech/speech_recognition_recognizer_impl.h 26716@@ -106,6 +106,9 @@ class SpeechRecognitionRecognizerImpl 26717 private: 26718 void OnLanguageChanged(const std::string& language) final; 26719 26720+ void ResetSodaWithNewLanguage(base::FilePath config_path, 26721+ speech::LanguageCode language_code, 26722+ bool config_exists); 26723 void RecordDuration(); 26724 26725 // Called as a response to sending a SpeechRecognitionEvent to the client 26726@@ -145,6 +148,8 @@ class SpeechRecognitionRecognizerImpl 26727 // Whether the client is still requesting speech recognition. 26728 bool is_client_requesting_speech_recognition_ = true; 26729 26730+ scoped_refptr<base::SequencedTaskRunner> task_runner_; 26731+ 26732 base::WeakPtrFactory<SpeechRecognitionRecognizerImpl> weak_factory_{this}; 26733 }; 26734 26735diff --git a/src/chrome/test/BUILD.gn b/src/chrome/test/BUILD.gn 26736index 5203504a20461..52e28622b8f98 26737--- a/src/chrome/test/BUILD.gn 26738+++ b/src/chrome/test/BUILD.gn 26739@@ -4958,6 +4958,7 @@ test("unit_tests") { 26740 "../browser/search/contextual_search_policy_handler_android_unittest.cc", 26741 "../browser/translate/android/translate_bridge_unittest.cc", 26742 "../browser/ui/android/autofill/save_card_message_controller_android_unittest.cc", 26743+ "../browser/ui/android/device_dialog/usb_chooser_dialog_android_unittest.cc", 26744 "../browser/ui/android/tab_model/tab_model_list_unittest.cc", 26745 "../browser/ui/android/toolbar/location_bar_model_android_unittest.cc", 26746 ] 26747@@ -5875,6 +5876,7 @@ test("unit_tests") { 26748 "//components/webapk:proto", 26749 "//components/webapps/browser", 26750 "//content/public/android:content_java", 26751+ "//ui/android", 26752 "//ui/events/devices:test_support", 26753 ] 26754 if (use_v8_context_snapshot) { 26755@@ -8007,7 +8009,11 @@ static_library("test_support_unit") { 26756 } 26757 } 26758 26759-if (!is_android) { 26760+if (is_ohos) { 26761+ group("test_support_ui") {} 26762+} 26763+ 26764+if (!is_android && !is_ohos) { 26765 static_library("test_support_ui") { 26766 defines = [] 26767 testonly = true 26768diff --git a/src/chrome/test/data/extensions/api_test/socket/api/multicast.js b/src/chrome/test/data/extensions/api_test/socket/api/multicast.js 26769index 2447a82ebf4eb..3e86952e5b2b0 26770--- a/src/chrome/test/data/extensions/api_test/socket/api/multicast.js 26771+++ b/src/chrome/test/data/extensions/api_test/socket/api/multicast.js 26772@@ -163,8 +163,7 @@ function testMulticast() { 26773 var canceller = waitForMessage(serverSocketId, function (cancelled) { 26774 clearTimeout(recvTimeout); 26775 if (cancelled) { 26776- socket.destroy(serverSocketId); 26777- chrome.test.succeed(); 26778+ leaveGroupAndDisconnect(serverSocketId); 26779 } else { 26780 chrome.test.fail("Received message after leaving the group"); 26781 socket.destroy(serverSocketId); 26782@@ -173,9 +172,20 @@ function testMulticast() { 26783 testSendMessage(request); 26784 recvTimeout = setTimeout(function () { 26785 canceller(); 26786+ }, 2000); 26787+ }); 26788+ } 26789+ 26790+ function leaveGroupAndDisconnect(serverSocketId) { 26791+ socket.joinGroup(serverSocketId, kMulticastAddress, function (result) { 26792+ chrome.test.assertNoLastError(); 26793+ chrome.test.assertEq(0, result, "Join group failed."); 26794+ socket.leaveGroup(serverSocketId, kMulticastAddress, () => { 26795+ chrome.test.assertEq(0, result, "Leave group failed."); 26796 socket.destroy(serverSocketId); 26797 chrome.test.succeed(); 26798- }, 2000); 26799+ }); 26800+ socket.disconnect(serverSocketId); 26801 }); 26802 } 26803 26804@@ -195,4 +205,4 @@ function testMulticast() { 26805 } 26806 26807 testMulticastSettings(); 26808-} 26809\ No newline at end of file 26810+} 26811diff --git a/src/components/feedback/feedback_data.cc b/src/components/feedback/feedback_data.cc 26812index 89e262835f095..5c14825e15a71 26813--- a/src/components/feedback/feedback_data.cc 26814+++ b/src/components/feedback/feedback_data.cc 26815@@ -34,7 +34,14 @@ const char kHistogramsAttachmentName[] = "histograms.zip"; 26816 26817 FeedbackData::FeedbackData(base::WeakPtr<feedback::FeedbackUploader> uploader, 26818 TracingManager* tracing_manager) 26819- : uploader_(std::move(uploader)), tracing_manager_(tracing_manager) {} 26820+ : uploader_(std::move(uploader)) { 26821+ // If tracing is enabled, the tracing manager should have been created before 26822+ // sending the report. If it is created after this point, then the tracing is 26823+ // not relevant to this report. 26824+ if (tracing_manager) { 26825+ tracing_manager_ = base::AsWeakPtr(tracing_manager); 26826+ } 26827+} 26828 26829 FeedbackData::~FeedbackData() = default; 26830 26831diff --git a/src/components/feedback/feedback_data.h b/src/components/feedback/feedback_data.h 26832index 72e0ba52a1b0a..5332def682812 26833--- a/src/components/feedback/feedback_data.h 26834+++ b/src/components/feedback/feedback_data.h 26835@@ -124,7 +124,7 @@ class FeedbackData : public FeedbackCommon { 26836 std::string attached_file_uuid_ GUARDED_BY_CONTEXT(sequence_checker_); 26837 std::string screenshot_uuid_ GUARDED_BY_CONTEXT(sequence_checker_); 26838 26839- const raw_ptr<TracingManager> tracing_manager_ = nullptr; // Not owned. 26840+ base::WeakPtr<TracingManager> tracing_manager_; 26841 int trace_id_ GUARDED_BY_CONTEXT(sequence_checker_) = 0; 26842 26843 int pending_op_count_ GUARDED_BY_CONTEXT(sequence_checker_) = 1; 26844diff --git a/src/components/feedback/tracing_manager.h b/src/components/feedback/tracing_manager.h 26845index 8cfce38f088b0..548ff25b307bf 26846--- a/src/components/feedback/tracing_manager.h 26847+++ b/src/components/feedback/tracing_manager.h 26848@@ -7,6 +7,7 @@ 26849 26850 #include "base/callback.h" 26851 #include "base/memory/scoped_refptr.h" 26852+#include "base/memory/weak_ptr.h" 26853 26854 namespace base { 26855 class RefCountedString; 26856@@ -24,7 +25,7 @@ using TraceDataCallback = 26857 // of the performance data. That data can then be requested via GetTraceData(). 26858 // When the data is no longer needed, it should be discarded via 26859 // DiscardTraceData(). 26860-class TracingManager { 26861+class TracingManager : public base::SupportsWeakPtr<TracingManager> { 26862 public: 26863 virtual ~TracingManager(); 26864 26865diff --git a/src/components/nacl/features.gni b/src/components/nacl/features.gni 26866index a2547a2cd6d70..8e3a1c6cd99f0 26867--- a/src/components/nacl/features.gni 26868+++ b/src/components/nacl/features.gni 26869@@ -14,7 +14,7 @@ declare_args() { 26870 checkout_nacl && target_os != "ios" && !is_android && !is_fuchsia && 26871 !is_chromecast && current_cpu != "mipsel" && current_cpu != "mips64el" && 26872 target_cpu != "arm64" && !(is_win && host_os != "win") && 26873- !(is_mac && (host_os != "mac" || target_cpu != "x64")) 26874+ !(is_mac && (host_os != "mac" || target_cpu != "x64")) && !is_ohos 26875 } 26876 26877 assert(!(is_win && host_os != "win") || !enable_nacl, 26878diff --git a/src/components/offline_pages/buildflags/features.gni b/src/components/offline_pages/buildflags/features.gni 26879index 09b6a0e609e98..2c8c75b1f4f50 26880--- a/src/components/offline_pages/buildflags/features.gni 26881+++ b/src/components/offline_pages/buildflags/features.gni 26882@@ -5,7 +5,7 @@ 26883 declare_args() { 26884 # Whether to enable OfflinePages support. Currently user-visible features 26885 # are Android-only. 26886- enable_offline_pages = is_android || is_ohos 26887+ enable_offline_pages = is_android 26888 26889 # This enables test API for locally-built harness which is used for quality 26890 # evaluations. Requires setting this variable manually at local environment. 26891diff --git a/src/components/optimization_guide/features.gni b/src/components/optimization_guide/features.gni 26892index e8b4ffc271710..01821481f82b6 26893--- a/src/components/optimization_guide/features.gni 26894+++ b/src/components/optimization_guide/features.gni 26895@@ -8,7 +8,7 @@ declare_args() { 26896 # This enables build with TFLite library. 26897 # Currently only available for Desktop and Android. 26898 build_with_tflite_lib = is_android || (is_win && target_cpu != "arm64") || 26899- is_linux || is_mac || is_chromeos || is_fuchsia || is_ohos 26900+ is_linux || is_mac || is_chromeos || is_fuchsia 26901 26902 # You can set the variable 'build_with_internal_optimization_guide' to true 26903 # even in a developer build in args.gn. Setting this variable explicitly to true will 26904@@ -25,5 +25,5 @@ declare_args() { 26905 # Android and iOS should just work but are not included in the set we release for, so we do 26906 # not needlessly increase the binary. 26907 build_with_internal_optimization_guide = 26908- is_chrome_branded && !is_android && !is_ios && !is_fuchsia 26909+ is_chrome_branded && !is_android && !is_ios && !is_fuchsia && !is_ohos 26910 } 26911diff --git a/src/components/pdf/renderer/pdf_accessibility_tree.cc b/src/components/pdf/renderer/pdf_accessibility_tree.cc 26912index da26cbc03503a..a1acc80c53ea6 26913--- a/src/components/pdf/renderer/pdf_accessibility_tree.cc 26914+++ b/src/components/pdf/renderer/pdf_accessibility_tree.cc 26915@@ -665,9 +665,11 @@ class PdfAccessibilityTreeBuilder { 26916 ax::mojom::Role::kPdfActionableHighlight, 26917 ax::mojom::Restriction::kReadOnly, render_accessibility_, nodes_); 26918 26919+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26920 highlight_node->AddStringAttribute( 26921 ax::mojom::StringAttribute::kRoleDescription, 26922 l10n_util::GetStringUTF8(IDS_AX_ROLE_DESCRIPTION_PDF_HIGHLIGHT)); 26923+#endif 26924 highlight_node->AddStringAttribute(ax::mojom::StringAttribute::kName, 26925 std::string()); 26926 highlight_node->relative_bounds.bounds = highlight.bounds; 26927@@ -683,9 +685,11 @@ class PdfAccessibilityTreeBuilder { 26928 CreateNode(ax::mojom::Role::kNote, ax::mojom::Restriction::kReadOnly, 26929 render_accessibility_, nodes_); 26930 26931+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26932 popup_note_node->AddStringAttribute( 26933 ax::mojom::StringAttribute::kRoleDescription, 26934 l10n_util::GetStringUTF8(IDS_AX_ROLE_DESCRIPTION_PDF_POPUP_NOTE)); 26935+#endif 26936 popup_note_node->relative_bounds.bounds = highlight.bounds; 26937 26938 ui::AXNodeData* static_popup_note_text_node = CreateNode( 26939@@ -1330,9 +1334,11 @@ void PdfAccessibilityTree::SetAccessibilityDocInfo( 26940 doc_node_ = 26941 CreateNode(ax::mojom::Role::kPdfRoot, ax::mojom::Restriction::kReadOnly, 26942 render_accessibility, &nodes_); 26943+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26944 doc_node_->AddStringAttribute(ax::mojom::StringAttribute::kName, 26945 l10n_util::GetPluralStringFUTF8( 26946 IDS_PDF_DOCUMENT_PAGE_COUNT, page_count_)); 26947+#endif 26948 26949 // Because all of the coordinates are expressed relative to the 26950 // doc's coordinates, the origin of the doc must be (0, 0). Its 26951@@ -1371,9 +1377,11 @@ void PdfAccessibilityTree::SetAccessibilityPageInfo( 26952 ui::AXNodeData* page_node = 26953 CreateNode(ax::mojom::Role::kRegion, ax::mojom::Restriction::kReadOnly, 26954 render_accessibility, &nodes_); 26955+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26956 page_node->AddStringAttribute( 26957 ax::mojom::StringAttribute::kName, 26958 l10n_util::GetPluralStringFUTF8(IDS_PDF_PAGE_INDEX, page_index + 1)); 26959+#endif 26960 page_node->AddBoolAttribute(ax::mojom::BoolAttribute::kIsPageBreakingObject, 26961 true); 26962 26963diff --git a/src/components/pdf/renderer/pepper_pdf_host.cc b/src/components/pdf/renderer/pepper_pdf_host.cc 26964index c76d903481aca..32582622ef95a 26965--- a/src/components/pdf/renderer/pepper_pdf_host.cc 26966+++ b/src/components/pdf/renderer/pepper_pdf_host.cc 26967@@ -123,7 +123,9 @@ int32_t PepperPDFHost::OnHostMsgDidStartLoading( 26968 if (!render_frame) 26969 return PP_ERROR_FAILED; 26970 26971+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26972 render_frame->PluginDidStartLoading(); 26973+#endif 26974 return PP_OK; 26975 } 26976 26977@@ -133,7 +135,9 @@ int32_t PepperPDFHost::OnHostMsgDidStopLoading( 26978 if (!render_frame) 26979 return PP_ERROR_FAILED; 26980 26981+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 26982 render_frame->PluginDidStopLoading(); 26983+#endif 26984 return PP_OK; 26985 } 26986 26987diff --git a/src/components/permissions/BUILD.gn b/src/components/permissions/BUILD.gn 26988index 8cbc3d9fbf84e..6f78734a9f607 26989--- a/src/components/permissions/BUILD.gn 26990+++ b/src/components/permissions/BUILD.gn 26991@@ -258,7 +258,11 @@ source_set("unit_tests") { 26992 ] 26993 } 26994 if (is_android) { 26995- sources += [ "android/permission_dialog_delegate_unittest.cc" ] 26996+ sources += [ 26997+ "android/bluetooth_chooser_android_unittest.cc", 26998+ "android/bluetooth_scanning_prompt_android_unittest.cc", 26999+ "android/permission_dialog_delegate_unittest.cc" 27000+ ] 27001 } 27002 deps = [ 27003 ":permissions", 27004@@ -271,6 +275,7 @@ source_set("unit_tests") { 27005 "//components/content_settings/core/browser", 27006 "//components/keyed_service/content", 27007 "//components/prefs:test_support", 27008+ "//components/security_state/core", 27009 "//components/strings:components_strings_grit", 27010 "//components/ukm:test_support", 27011 "//components/ukm/content", 27012@@ -289,6 +294,7 @@ source_set("unit_tests") { 27013 "//components/location/android:location_settings_dialog_enums_java", 27014 "//components/location/android:test_support", 27015 "//components/permissions/android:test_support", 27016+ "//ui/android", 27017 ] 27018 } 27019 } 27020diff --git a/src/components/permissions/android/bluetooth_chooser_android.cc b/src/components/permissions/android/bluetooth_chooser_android.cc 27021index 3ed0cbeccca6d..95d2580846d51 27022--- a/src/components/permissions/android/bluetooth_chooser_android.cc 27023+++ b/src/components/permissions/android/bluetooth_chooser_android.cc 27024@@ -6,10 +6,12 @@ 27025 27026 #include "base/android/jni_android.h" 27027 #include "base/android/jni_string.h" 27028+#include "base/functional/bind.h" 27029 #include "base/strings/utf_string_conversions.h" 27030 #include "components/permissions/android/bluetooth_chooser_android_delegate.h" 27031 #include "components/permissions/android/jni_headers/BluetoothChooserDialog_jni.h" 27032 #include "components/permissions/constants.h" 27033+#include "components/permissions/permission_util.h" 27034 #include "components/url_formatter/elide_url.h" 27035 #include "content/public/browser/render_frame_host.h" 27036 #include "ui/android/window_android.h" 27037@@ -22,14 +24,28 @@ using base::android::ScopedJavaLocalRef; 27038 27039 namespace permissions { 27040 27041+namespace { 27042+ 27043+BluetoothChooserAndroid::CreateJavaDialogCallback 27044+GetCreateJavaBluetoothChooserDialogCallback() { 27045+ return base::BindOnce(&Java_BluetoothChooserDialog_create); 27046+} 27047+ 27048+} // namespace 27049+ 27050 BluetoothChooserAndroid::BluetoothChooserAndroid( 27051 content::RenderFrameHost* frame, 27052 const EventHandler& event_handler, 27053- std::unique_ptr<BluetoothChooserAndroidDelegate> delegate) 27054+ std::unique_ptr<BluetoothChooserAndroidDelegate> delegate, 27055+ CreateJavaDialogCallback create_java_dialog_callback) 27056 : web_contents_(content::WebContents::FromRenderFrameHost(frame)), 27057 event_handler_(event_handler), 27058 delegate_(std::move(delegate)) { 27059- const url::Origin origin = frame->GetLastCommittedOrigin(); 27060+ // Permission delegation means the permission request should be attributed to 27061+ // the main frame. 27062+ const url::Origin origin = url::Origin::Create( 27063+ permissions::PermissionUtil::GetLastCommittedOriginAsURL( 27064+ frame->GetMainFrame())); 27065 DCHECK(!origin.opaque()); 27066 27067 ScopedJavaLocalRef<jobject> window_android = 27068@@ -40,12 +56,22 @@ BluetoothChooserAndroid::BluetoothChooserAndroid( 27069 ScopedJavaLocalRef<jstring> origin_string = 27070 base::android::ConvertUTF16ToJavaString( 27071 env, url_formatter::FormatOriginForSecurityDisplay(origin)); 27072- java_dialog_.Reset(Java_BluetoothChooserDialog_create( 27073- env, window_android, origin_string, 27074- delegate_->GetSecurityLevel(web_contents_), delegate_->GetJavaObject(), 27075- reinterpret_cast<intptr_t>(this))); 27076+ java_dialog_.Reset(std::move(create_java_dialog_callback) 27077+ .Run(env, window_android, origin_string, 27078+ delegate_->GetSecurityLevel(web_contents_), 27079+ delegate_->GetJavaObject(), 27080+ reinterpret_cast<intptr_t>(this))); 27081 } 27082 27083+BluetoothChooserAndroid::BluetoothChooserAndroid( 27084+ content::RenderFrameHost* frame, 27085+ const EventHandler& event_handler, 27086+ std::unique_ptr<BluetoothChooserAndroidDelegate> delegate) 27087+ : BluetoothChooserAndroid(frame, 27088+ event_handler, 27089+ std::move(delegate), 27090+ GetCreateJavaBluetoothChooserDialogCallback()) {} 27091+ 27092 BluetoothChooserAndroid::~BluetoothChooserAndroid() { 27093 if (!java_dialog_.is_null()) { 27094 Java_BluetoothChooserDialog_closeDialog(AttachCurrentThread(), 27095diff --git a/src/components/permissions/android/bluetooth_chooser_android.h b/src/components/permissions/android/bluetooth_chooser_android.h 27096index 687c9501fd78d..1c3250d673275 27097--- a/src/components/permissions/android/bluetooth_chooser_android.h 27098+++ b/src/components/permissions/android/bluetooth_chooser_android.h 27099@@ -7,7 +7,11 @@ 27100 27101 #include <memory> 27102 27103+#include "base/android/jni_android.h" 27104+#include "base/android/jni_int_wrapper.h" 27105+#include "base/android/jni_string.h" 27106 #include "base/android/scoped_java_ref.h" 27107+#include "base/memory/ptr_util.h" 27108 #include "base/memory/raw_ptr.h" 27109 #include "content/public/browser/bluetooth_chooser.h" 27110 #include "content/public/browser/web_contents.h" 27111@@ -20,6 +24,16 @@ class BluetoothChooserAndroidDelegate; 27112 // options. 27113 class BluetoothChooserAndroid : public content::BluetoothChooser { 27114 public: 27115+ // The callback type for creating the java dialog object. 27116+ using CreateJavaDialogCallback = 27117+ base::OnceCallback<base::android::ScopedJavaLocalRef<jobject>( 27118+ JNIEnv*, 27119+ const base::android::JavaRef<jobject>&, 27120+ const base::android::JavaRef<jstring>&, 27121+ JniIntWrapper, 27122+ const base::android::JavaRef<jobject>&, 27123+ jlong)>; 27124+ 27125 // Both frame and event_handler must outlive the BluetoothChooserAndroid. 27126 BluetoothChooserAndroid( 27127 content::RenderFrameHost* frame, 27128@@ -52,8 +66,26 @@ class BluetoothChooserAndroid : public content::BluetoothChooser { 27129 void ShowBluetoothAdapterOffLink(JNIEnv* env); 27130 void ShowNeedLocationPermissionLink(JNIEnv* env); 27131 27132+ static std::unique_ptr<BluetoothChooserAndroid> CreateForTesting( 27133+ content::RenderFrameHost* frame, 27134+ const EventHandler& event_handler, 27135+ std::unique_ptr<BluetoothChooserAndroidDelegate> delegate, 27136+ CreateJavaDialogCallback create_java_dialog_callback) { 27137+ // Using `new` to access a non-public constructor. 27138+ return base::WrapUnique( 27139+ new BluetoothChooserAndroid(frame, event_handler, std::move(delegate), 27140+ std::move(create_java_dialog_callback))); 27141+ } 27142+ 27143 private: 27144+ BluetoothChooserAndroid( 27145+ content::RenderFrameHost* frame, 27146+ const EventHandler& event_handler, 27147+ std::unique_ptr<BluetoothChooserAndroidDelegate> delegate, 27148+ CreateJavaDialogCallback create_java_dialog_callback); 27149+ 27150 void OpenURL(const char* url); 27151+ 27152 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; 27153 27154 raw_ptr<content::WebContents> web_contents_; 27155diff --git a/src/components/permissions/android/bluetooth_chooser_android_unittest.cc b/src/components/permissions/android/bluetooth_chooser_android_unittest.cc 27156new file mode 100644 27157index 0000000000000..4eb6b6fe92048 27158--- /dev/null 27159+++ b/src/components/permissions/android/bluetooth_chooser_android_unittest.cc 27160@@ -0,0 +1,75 @@ 27161+// Copyright 2022 The Chromium Authors 27162+// Use of this source code is governed by a BSD-style license that can be 27163+// found in the LICENSE file. 27164+ 27165+#include "components/permissions/android/bluetooth_chooser_android.h" 27166+ 27167+#include <string> 27168+ 27169+#include "base/test/bind.h" 27170+#include "base/test/mock_callback.h" 27171+#include "components/permissions/android/bluetooth_chooser_android_delegate.h" 27172+#include "components/security_state/core/security_state.h" 27173+#include "content/public/browser/web_contents.h" 27174+#include "content/public/test/navigation_simulator.h" 27175+#include "content/public/test/test_renderer_host.h" 27176+#include "testing/gmock/include/gmock/gmock.h" 27177+#include "testing/gtest/include/gtest/gtest.h" 27178+#include "ui/android/window_android.h" 27179+ 27180+namespace permissions { 27181+ 27182+namespace { 27183+ 27184+using BluetoothChooserAndroidTest = content::RenderViewHostTestHarness; 27185+using testing::_; 27186+ 27187+class FakeBluetoothChooserAndroidDelegate 27188+ : public BluetoothChooserAndroidDelegate { 27189+ base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override { 27190+ return base::android::ScopedJavaLocalRef<jobject>(); 27191+ } 27192+ security_state::SecurityLevel GetSecurityLevel( 27193+ content::WebContents* web_contents) override { 27194+ return security_state::NONE; 27195+ } 27196+}; 27197+ 27198+TEST_F(BluetoothChooserAndroidTest, FrameTree) { 27199+ NavigateAndCommit(GURL("https://main-frame.com")); 27200+ content::RenderFrameHost* subframe = 27201+ content::NavigationSimulator::NavigateAndCommitFromDocument( 27202+ GURL("https://sub-frame.com"), 27203+ content::RenderFrameHostTester::For(main_rfh()) 27204+ ->AppendChild("subframe")); 27205+ 27206+ content::WebContents* web_contents = 27207+ content::WebContents::FromRenderFrameHost(main_rfh()); 27208+ std::unique_ptr<ui::WindowAndroid::ScopedWindowAndroidForTesting> window = 27209+ ui::WindowAndroid::CreateForTesting(); 27210+ window.get()->get()->AddChild(web_contents->GetNativeView()); 27211+ 27212+ base::MockCallback<BluetoothChooserAndroid::CreateJavaDialogCallback> 27213+ mock_callback; 27214+ auto origin_predicate = 27215+ [&](const base::android::JavaRef<jstring>& java_string) { 27216+ return base::android::ConvertJavaStringToUTF16( 27217+ base::android::AttachCurrentThread(), java_string) == 27218+ u"https://main-frame.com"; 27219+ }; 27220+ EXPECT_CALL(mock_callback, Run(/*env=*/_, /*window_android=*/_, 27221+ testing::Truly(origin_predicate), 27222+ /*security_level=*/_, /*delegate=*/_, 27223+ /*native_bluetooth_chooser_dialog_ptr=*/_)); 27224+ 27225+ BluetoothChooserAndroid::CreateForTesting( 27226+ subframe, 27227+ base::BindLambdaForTesting([](content::BluetoothChooserEvent evt, 27228+ const std::string& opt_device_id) {}), 27229+ std::make_unique<FakeBluetoothChooserAndroidDelegate>(), 27230+ mock_callback.Get()); 27231+} 27232+ 27233+} // namespace 27234+ 27235+} // namespace permissions 27236diff --git a/src/components/permissions/android/bluetooth_scanning_prompt_android.cc b/src/components/permissions/android/bluetooth_scanning_prompt_android.cc 27237index 2a40064829da5..66d1ba0505c58 27238--- a/src/components/permissions/android/bluetooth_scanning_prompt_android.cc 27239+++ b/src/components/permissions/android/bluetooth_scanning_prompt_android.cc 27240@@ -9,6 +9,7 @@ 27241 #include "base/strings/utf_string_conversions.h" 27242 #include "components/permissions/android/bluetooth_scanning_prompt_android_delegate.h" 27243 #include "components/permissions/android/jni_headers/BluetoothScanningPermissionDialog_jni.h" 27244+#include "components/permissions/permission_util.h" 27245 #include "components/url_formatter/elide_url.h" 27246 #include "content/public/browser/render_frame_host.h" 27247 #include "ui/android/window_android.h" 27248@@ -22,14 +23,28 @@ using base::android::ScopedJavaLocalRef; 27249 27250 namespace permissions { 27251 27252+namespace { 27253+ 27254+BluetoothScanningPromptAndroid::CreateJavaDialogCallback 27255+GetCreateJavaBluetoothScanningPromptCallback() { 27256+ return base::BindOnce(&Java_BluetoothScanningPermissionDialog_create); 27257+} 27258+ 27259+} // namespace 27260+ 27261 BluetoothScanningPromptAndroid::BluetoothScanningPromptAndroid( 27262 content::RenderFrameHost* frame, 27263 const content::BluetoothScanningPrompt::EventHandler& event_handler, 27264- std::unique_ptr<BluetoothScanningPromptAndroidDelegate> delegate) 27265+ std::unique_ptr<BluetoothScanningPromptAndroidDelegate> delegate, 27266+ CreateJavaDialogCallback create_java_dialog_callback) 27267 : web_contents_(content::WebContents::FromRenderFrameHost(frame)), 27268 event_handler_(event_handler), 27269 delegate_(std::move(delegate)) { 27270- const url::Origin origin = frame->GetLastCommittedOrigin(); 27271+ // Permission delegation means the permission request should be attributed to 27272+ // the main frame. 27273+ const url::Origin origin = url::Origin::Create( 27274+ permissions::PermissionUtil::GetLastCommittedOriginAsURL( 27275+ frame->GetMainFrame())); 27276 DCHECK(!origin.opaque()); 27277 27278 ScopedJavaLocalRef<jobject> window_android = 27279@@ -39,12 +54,23 @@ BluetoothScanningPromptAndroid::BluetoothScanningPromptAndroid( 27280 JNIEnv* env = AttachCurrentThread(); 27281 ScopedJavaLocalRef<jstring> origin_string = ConvertUTF16ToJavaString( 27282 env, url_formatter::FormatUrlForSecurityDisplay(origin.GetURL())); 27283- java_dialog_.Reset(Java_BluetoothScanningPermissionDialog_create( 27284- env, window_android, origin_string, 27285- delegate_->GetSecurityLevel(web_contents_), delegate_->GetJavaObject(), 27286- reinterpret_cast<intptr_t>(this))); 27287+ java_dialog_.Reset(std::move(create_java_dialog_callback) 27288+ .Run(env, window_android, origin_string, 27289+ delegate_->GetSecurityLevel(web_contents_), 27290+ delegate_->GetJavaObject(), 27291+ reinterpret_cast<intptr_t>(this))); 27292 } 27293 27294+BluetoothScanningPromptAndroid::BluetoothScanningPromptAndroid( 27295+ content::RenderFrameHost* frame, 27296+ const content::BluetoothScanningPrompt::EventHandler& event_handler, 27297+ std::unique_ptr<BluetoothScanningPromptAndroidDelegate> delegate) 27298+ : BluetoothScanningPromptAndroid( 27299+ frame, 27300+ event_handler, 27301+ std::move(delegate), 27302+ GetCreateJavaBluetoothScanningPromptCallback()) {} 27303+ 27304 BluetoothScanningPromptAndroid::~BluetoothScanningPromptAndroid() { 27305 if (!java_dialog_.is_null()) { 27306 Java_BluetoothScanningPermissionDialog_closeDialog(AttachCurrentThread(), 27307diff --git a/src/components/permissions/android/bluetooth_scanning_prompt_android.h b/src/components/permissions/android/bluetooth_scanning_prompt_android.h 27308index 0e3ff03a8239f..1c5ba073da63c 27309--- a/src/components/permissions/android/bluetooth_scanning_prompt_android.h 27310+++ b/src/components/permissions/android/bluetooth_scanning_prompt_android.h 27311@@ -5,6 +5,9 @@ 27312 #ifndef COMPONENTS_PERMISSIONS_ANDROID_BLUETOOTH_SCANNING_PROMPT_ANDROID_H_ 27313 #define COMPONENTS_PERMISSIONS_ANDROID_BLUETOOTH_SCANNING_PROMPT_ANDROID_H_ 27314 27315+#include "base/android/jni_android.h" 27316+#include "base/android/jni_int_wrapper.h" 27317+#include "base/android/jni_string.h" 27318 #include "base/android/scoped_java_ref.h" 27319 #include "base/memory/raw_ptr.h" 27320 #include "content/public/browser/bluetooth_scanning_prompt.h" 27321@@ -19,6 +22,16 @@ class BluetoothScanningPromptAndroidDelegate; 27322 // devices. This implementation is for Android. 27323 class BluetoothScanningPromptAndroid : public content::BluetoothScanningPrompt { 27324 public: 27325+ // The callback type for creating the java dialog object. 27326+ using CreateJavaDialogCallback = 27327+ base::OnceCallback<base::android::ScopedJavaLocalRef<jobject>( 27328+ JNIEnv*, 27329+ const base::android::JavaRef<jobject>&, 27330+ const base::android::JavaRef<jstring>&, 27331+ JniIntWrapper, 27332+ const base::android::JavaRef<jobject>&, 27333+ jlong)>; 27334+ 27335 BluetoothScanningPromptAndroid( 27336 content::RenderFrameHost* frame, 27337 const content::BluetoothScanningPrompt::EventHandler& event_handler, 27338@@ -39,7 +52,24 @@ class BluetoothScanningPromptAndroid : public content::BluetoothScanningPrompt { 27339 // Report the dialog's result. 27340 void OnDialogFinished(JNIEnv* env, jint event_type); 27341 27342+ static std::unique_ptr<BluetoothScanningPromptAndroid> CreateForTesting( 27343+ content::RenderFrameHost* frame, 27344+ const EventHandler& event_handler, 27345+ std::unique_ptr<BluetoothScanningPromptAndroidDelegate> delegate, 27346+ CreateJavaDialogCallback create_java_dialog_callback) { 27347+ // Using `new` to access a non-public constructor. 27348+ return base::WrapUnique(new BluetoothScanningPromptAndroid( 27349+ frame, event_handler, std::move(delegate), 27350+ std::move(create_java_dialog_callback))); 27351+ } 27352+ 27353 private: 27354+ BluetoothScanningPromptAndroid( 27355+ content::RenderFrameHost* frame, 27356+ const content::BluetoothScanningPrompt::EventHandler& event_handler, 27357+ std::unique_ptr<BluetoothScanningPromptAndroidDelegate> delegate, 27358+ CreateJavaDialogCallback create_java_dialog_callback); 27359+ 27360 base::android::ScopedJavaGlobalRef<jobject> java_dialog_; 27361 27362 raw_ptr<content::WebContents> web_contents_; 27363diff --git a/src/components/permissions/android/bluetooth_scanning_prompt_android_unittest.cc b/src/components/permissions/android/bluetooth_scanning_prompt_android_unittest.cc 27364new file mode 100644 27365index 0000000000000..9e2c645b890d8 27366--- /dev/null 27367+++ b/src/components/permissions/android/bluetooth_scanning_prompt_android_unittest.cc 27368@@ -0,0 +1,77 @@ 27369+// Copyright 2022 The Chromium Authors 27370+// Use of this source code is governed by a BSD-style license that can be 27371+// found in the LICENSE file. 27372+ 27373+#include "components/permissions/android/bluetooth_scanning_prompt_android.h" 27374+ 27375+#include <string> 27376+ 27377+#include "base/test/bind.h" 27378+#include "base/test/mock_callback.h" 27379+#include "components/permissions/android/bluetooth_scanning_prompt_android_delegate.h" 27380+#include "components/security_state/core/security_state.h" 27381+#include "content/public/browser/bluetooth_scanning_prompt.h" 27382+#include "content/public/browser/web_contents.h" 27383+#include "content/public/test/navigation_simulator.h" 27384+#include "content/public/test/test_renderer_host.h" 27385+#include "testing/gmock/include/gmock/gmock.h" 27386+#include "testing/gtest/include/gtest/gtest.h" 27387+#include "ui/android/window_android.h" 27388+ 27389+namespace permissions { 27390+ 27391+namespace { 27392+ 27393+using BluetoothScanningPromptAndroidTest = content::RenderViewHostTestHarness; 27394+using testing::_; 27395+ 27396+class FakeBluetoothChooserAndroidDelegate 27397+ : public BluetoothScanningPromptAndroidDelegate { 27398+ base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override { 27399+ return base::android::ScopedJavaLocalRef<jobject>(); 27400+ } 27401+ security_state::SecurityLevel GetSecurityLevel( 27402+ content::WebContents* web_contents) override { 27403+ return security_state::NONE; 27404+ } 27405+}; 27406+ 27407+TEST_F(BluetoothScanningPromptAndroidTest, FrameTree) { 27408+ NavigateAndCommit(GURL("https://main-frame.com")); 27409+ content::RenderFrameHost* subframe = 27410+ content::NavigationSimulator::NavigateAndCommitFromDocument( 27411+ GURL("https://sub-frame.com"), 27412+ content::RenderFrameHostTester::For(main_rfh()) 27413+ ->AppendChild("subframe")); 27414+ 27415+ content::WebContents* web_contents = 27416+ content::WebContents::FromRenderFrameHost(main_rfh()); 27417+ std::unique_ptr<ui::WindowAndroid::ScopedWindowAndroidForTesting> window = 27418+ ui::WindowAndroid::CreateForTesting(); 27419+ window.get()->get()->AddChild(web_contents->GetNativeView()); 27420+ 27421+ base::MockCallback<BluetoothScanningPromptAndroid::CreateJavaDialogCallback> 27422+ mock_callback; 27423+ auto origin_predicate = 27424+ [&](const base::android::JavaRef<jstring>& java_string) { 27425+ return base::android::ConvertJavaStringToUTF16( 27426+ base::android::AttachCurrentThread(), java_string) == 27427+ u"https://main-frame.com"; 27428+ }; 27429+ EXPECT_CALL( 27430+ mock_callback, 27431+ Run(/*env=*/_, /*window_android=*/_, testing::Truly(origin_predicate), 27432+ /*security_level=*/_, /*delegate=*/_, 27433+ /*native_bluetooth_scanning_prompt_dialog_ptr=*/_)); 27434+ 27435+ BluetoothScanningPromptAndroid::CreateForTesting( 27436+ subframe, 27437+ base::BindLambdaForTesting( 27438+ [](content::BluetoothScanningPrompt::Event evt) {}), 27439+ std::make_unique<FakeBluetoothChooserAndroidDelegate>(), 27440+ mock_callback.Get()); 27441+} 27442+ 27443+} // namespace 27444+ 27445+} // namespace permissions 27446diff --git a/src/content/app/content_main_runner_impl.cc b/src/content/app/content_main_runner_impl.cc 27447index 7cd3565f08e99..4c81b8037ef2a 27448--- a/src/content/app/content_main_runner_impl.cc 27449+++ b/src/content/app/content_main_runner_impl.cc 27450@@ -95,6 +95,7 @@ 27451 #include "media/media_buildflags.h" 27452 #include "mojo/core/embedder/embedder.h" 27453 #include "mojo/public/cpp/bindings/self_owned_receiver.h" 27454+#include "mojo/public/cpp/bindings/sync_call_restrictions.h" 27455 #include "mojo/public/cpp/platform/platform_channel.h" 27456 #include "mojo/public/cpp/system/dynamic_library_support.h" 27457 #include "mojo/public/cpp/system/invitation.h" 27458@@ -1043,6 +1044,11 @@ int ContentMainRunnerImpl::RunBrowser(MainFunctionParams main_params, 27459 if (is_browser_main_loop_started_) 27460 return -1; 27461 27462+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 27463+ switches::kSingleProcess)) { 27464+ mojo::SyncCallRestrictions::DisableSyncCallInterrupts(); 27465+ } 27466+ 27467 bool should_start_minimal_browser = start_minimal_browser; 27468 if (!mojo_ipc_support_) { 27469 if (delegate_->ShouldCreateFeatureList()) { 27470diff --git a/src/content/browser/BUILD.gn b/src/content/browser/BUILD.gn 27471index 01159a5247e86..81479f4fb3688 27472--- a/src/content/browser/BUILD.gn 27473+++ b/src/content/browser/BUILD.gn 27474@@ -1573,6 +1573,8 @@ source_set("browser") { 27475 "renderer_host/navigation_entry_impl.h", 27476 "renderer_host/navigation_entry_restore_context_impl.cc", 27477 "renderer_host/navigation_entry_restore_context_impl.h", 27478+ "renderer_host/navigation_policy_container_builder.cc", 27479+ "renderer_host/navigation_policy_container_builder.h", 27480 "renderer_host/navigation_request.cc", 27481 "renderer_host/navigation_request.h", 27482 "renderer_host/navigation_request_info.cc", 27483@@ -1598,8 +1600,6 @@ source_set("browser") { 27484 "renderer_host/page_lifecycle_state_manager.h", 27485 "renderer_host/policy_container_host.cc", 27486 "renderer_host/policy_container_host.h", 27487- "renderer_host/policy_container_navigation_bundle.cc", 27488- "renderer_host/policy_container_navigation_bundle.h", 27489 "renderer_host/private_network_access_util.cc", 27490 "renderer_host/private_network_access_util.h", 27491 "renderer_host/recently_destroyed_hosts.cc", 27492@@ -2928,6 +2928,17 @@ source_set("browser") { 27493 27494 if (is_ohos) { 27495 sources -= [ "media/session/audio_focus_delegate_default.cc" ] 27496+ sources += [ 27497+ "font_unique_name_lookup/font_unique_name_lookup.cc", 27498+ "font_unique_name_lookup/font_unique_name_lookup.h", 27499+ "font_unique_name_lookup/font_unique_name_lookup_service.cc", 27500+ "font_unique_name_lookup/font_unique_name_lookup_service.h", 27501+ ] 27502+ 27503+ deps += [ 27504+ "//build/config/freetype", 27505+ "//third_party/blink/public/common:font_unique_name_table_proto", 27506+ ] 27507 } 27508 27509 deps += [ 27510diff --git a/src/content/browser/browser_main_loop.cc b/src/content/browser/browser_main_loop.cc 27511index 6e779e2475886..a522662120ec9 27512--- a/src/content/browser/browser_main_loop.cc 27513+++ b/src/content/browser/browser_main_loop.cc 27514@@ -172,6 +172,10 @@ 27515 #include "ui/gl/gl_surface.h" 27516 #endif 27517 27518+#if BUILDFLAG(IS_OHOS) 27519+#include "content/browser/font_unique_name_lookup/font_unique_name_lookup.h" 27520+#endif 27521+ 27522 #if BUILDFLAG(IS_MAC) 27523 #include "base/mac/scoped_nsautorelease_pool.h" 27524 #include "content/browser/renderer_host/browser_compositor_view_mac.h" 27525@@ -1409,6 +1413,12 @@ void BrowserMainLoop::PostCreateThreadsImpl() { 27526 } 27527 #endif 27528 27529+#if BUILDFLAG(IS_OHOS) 27530+ if (base::FeatureList::IsEnabled(features::kFontSrcLocalMatching)) { 27531+ FontUniqueNameLookup::GetInstance(); 27532+ } 27533+#endif 27534+ 27535 #if defined(ENABLE_IPC_FUZZER) 27536 SetFileUrlPathAliasForIpcFuzzer(); 27537 #endif 27538diff --git a/src/content/browser/browser_url_handler_impl.cc b/src/content/browser/browser_url_handler_impl.cc 27539index 90aa546acd198..68a16b1ba229d 27540--- a/src/content/browser/browser_url_handler_impl.cc 27541+++ b/src/content/browser/browser_url_handler_impl.cc 27542@@ -33,7 +33,12 @@ static bool HandleViewSource(GURL* url, BrowserContext* browser_context) { 27543 url::kHttpsScheme, 27544 kChromeUIScheme, 27545 url::kFileScheme, 27546+ #if BUILDFLAG(IS_OHOS) 27547+ url::kFileSystemScheme, 27548+ url::kResourcesScheme 27549+ #else 27550 url::kFileSystemScheme 27551+ #endif 27552 }; 27553 27554 // Merge all the schemes for which view-source is allowed by default, with 27555diff --git a/src/content/browser/file_system_access/file_system_access_directory_handle_impl.cc b/src/content/browser/file_system_access/file_system_access_directory_handle_impl.cc 27556index 1775dc49414ca..a7503d4b64c53 27557--- a/src/content/browser/file_system_access/file_system_access_directory_handle_impl.cc 27558+++ b/src/content/browser/file_system_access/file_system_access_directory_handle_impl.cc 27559@@ -438,10 +438,16 @@ namespace { 27560 bool IsShellIntegratedExtension(const base::FilePath::StringType& extension) { 27561 base::FilePath::StringType extension_lower = base::ToLowerASCII(extension); 27562 27563- // .lnk files may be used to execute arbitrary code (see 27564- // https://nvd.nist.gov/vuln/detail/CVE-2010-2568). 27565- if (extension_lower == FILE_PATH_LITERAL("lnk")) 27566+ // .lnk and .scf files may be used to execute arbitrary code (see 27567+ // https://nvd.nist.gov/vuln/detail/CVE-2010-2568 and 27568+ // https://crbug.com/1227995, respectively). '.url' files can be used to read 27569+ // arbitrary files (see https://crbug.com/1307930 and 27570+ // https://crbug.com/1354518). 27571+ if (extension_lower == FILE_PATH_LITERAL("lnk") || 27572+ extension_lower == FILE_PATH_LITERAL("scf") || 27573+ extension_lower == FILE_PATH_LITERAL("url")) { 27574 return true; 27575+ } 27576 27577 // Setting a file's extension to a CLSID may conceal its actual file type on 27578 // some Windows versions (see https://nvd.nist.gov/vuln/detail/CVE-2004-0420). 27579diff --git a/src/content/browser/file_system_access/file_system_access_directory_handle_impl_unittest.cc b/src/content/browser/file_system_access/file_system_access_directory_handle_impl_unittest.cc 27580index aeeb3d84b0b78..0804886d4140d 27581--- a/src/content/browser/file_system_access/file_system_access_directory_handle_impl_unittest.cc 27582+++ b/src/content/browser/file_system_access/file_system_access_directory_handle_impl_unittest.cc 27583@@ -140,6 +140,7 @@ TEST_F(FileSystemAccessDirectoryHandleImplTest, IsSafePathComponent) { 27584 "My Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}", 27585 "a\\a", 27586 "a.lnk", 27587+ "a.url", 27588 "a/a", 27589 "C:\\", 27590 "C:/", 27591@@ -195,8 +196,8 @@ TEST_F(FileSystemAccessDirectoryHandleImplTest, GetEntries) { 27592 constexpr const char* kSafeNames[] = {"a", "a.txt", "My Computer", "lnk.txt", 27593 "a.local"}; 27594 constexpr const char* kUnsafeNames[] = { 27595- "con", "con.zip", "NUL", "a.", 27596- "a\"a", "a . .", "a.lnk", "My Computer.{a}", 27597+ "con", "con.zip", "NUL", "a.", "a\"a", "a . .", 27598+ "a.lnk", "My Computer.{a}", "a.url", 27599 }; 27600 for (const char* name : kSafeNames) { 27601 ASSERT_TRUE(base::WriteFile(dir_.GetPath().AppendASCII(name), "data")) 27602diff --git a/src/content/browser/font_unique_name_lookup/font_unique_name_lookup.cc b/src/content/browser/font_unique_name_lookup/font_unique_name_lookup.cc 27603index 078ab88405614..c1914e9d800e5 27604--- a/src/content/browser/font_unique_name_lookup/font_unique_name_lookup.cc 27605+++ b/src/content/browser/font_unique_name_lookup/font_unique_name_lookup.cc 27606@@ -34,8 +34,14 @@ namespace { 27607 // counting up after the dash "-1", "-2", etc. 27608 const char kFingerprintSuffixForceUpdateCache[] = "-1"; 27609 const char kProtobufFilename[] = "font_unique_name_table.pb"; 27610+#if BUILDFLAG(IS_OHOS) 27611+// This may be add continue. 27612+static const char* const kOhosFontPaths[] = { 27613+ "/system/fonts"}; 27614+#else 27615 static const char* const kAndroidFontPaths[] = { 27616 "/system/fonts", "/vendor/fonts", "/product/fonts"}; 27617+#endif 27618 27619 bool IsRelevantNameRecord(const FT_SfntName& sfnt_name) { 27620 if (sfnt_name.name_id != TT_NAME_ID_FULL_NAME && 27621@@ -316,18 +322,27 @@ base::FilePath FontUniqueNameLookup::TableCacheFilePath() { 27622 } 27623 27624 std::string FontUniqueNameLookup::GetAndroidBuildFingerprint() const { 27625+#if BUILDFLAG(IS_OHOS) 27626+ // Here temporary return kFingerprintSuffixForceUpdateCache. 27627+ return std::string(kFingerprintSuffixForceUpdateCache); 27628+#else 27629 return android_build_fingerprint_for_testing_.size() 27630 ? android_build_fingerprint_for_testing_ 27631 : std::string(base::android::BuildInfo::GetInstance() 27632 ->android_build_fp()) + 27633 std::string(kFingerprintSuffixForceUpdateCache); 27634+#endif 27635 } 27636 27637 std::vector<std::string> FontUniqueNameLookup::GetFontFilePaths() const { 27638 if (font_file_paths_for_testing_.size()) 27639 return font_file_paths_for_testing_; 27640 std::vector<std::string> font_files; 27641+#if BUILDFLAG(IS_OHOS) 27642+ for (const char* font_dir_path : kOhosFontPaths) { 27643+#else 27644 for (const char* font_dir_path : kAndroidFontPaths) { 27645+#endif 27646 base::FileEnumerator files_enumerator( 27647 base::MakeAbsoluteFilePath(base::FilePath(font_dir_path)), true, 27648 base::FileEnumerator::FILES); 27649diff --git a/src/content/browser/loader/file_url_loader_factory.cc b/src/content/browser/loader/file_url_loader_factory.cc 27650index 60e2fbd563708..700ecae500997 27651--- a/src/content/browser/loader/file_url_loader_factory.cc 27652+++ b/src/content/browser/loader/file_url_loader_factory.cc 27653@@ -64,6 +64,10 @@ 27654 #include "base/win/shortcut.h" 27655 #endif 27656 27657+#if BUILDFLAG(IS_OHOS) 27658+#include "ohos_adapter_helper.h" 27659+#endif 27660+ 27661 namespace content { 27662 namespace { 27663 27664@@ -773,6 +777,261 @@ class FileURLLoader : public network::mojom::URLLoader { 27665 uint64_t total_bytes_written_ = 0; 27666 }; 27667 27668+#if BUILDFLAG(IS_OHOS) 27669+class ResourceURLLoader : public network::mojom::URLLoader { 27670+ public: 27671+ static void CreateAndStart( 27672+ const base::FilePath& profile_path, 27673+ const network::ResourceRequest& request, 27674+ network::mojom::FetchResponseType response_type, 27675+ mojo::PendingReceiver<network::mojom::URLLoader> loader, 27676+ mojo::PendingRemote<network::mojom::URLLoaderClient> client_remote, 27677+ std::unique_ptr<FileURLLoaderObserver> observer, 27678+ scoped_refptr<net::HttpResponseHeaders> extra_response_headers) { 27679+ auto* resource_url_loader = new ResourceURLLoader; 27680+ resource_url_loader->Start(profile_path, request, response_type, 27681+ std::move(loader), std::move(client_remote), 27682+ std::move(observer), 27683+ std::move(extra_response_headers)); 27684+ } 27685+ 27686+ ResourceURLLoader(const ResourceURLLoader&) = delete; 27687+ ResourceURLLoader& operator=(const ResourceURLLoader&) = delete; 27688+ 27689+ // network::mojom::URLLoader: 27690+ void FollowRedirect( 27691+ const std::vector<std::string>& removed_headers, 27692+ const net::HttpRequestHeaders& modified_headers, 27693+ const net::HttpRequestHeaders& modified_cors_exempt_headers, 27694+ const absl::optional<GURL>& new_url) override {} 27695+ void SetPriority(net::RequestPriority priority, 27696+ int32_t intra_priority_value) override {} 27697+ void PauseReadingBodyFromNet() override {} 27698+ void ResumeReadingBodyFromNet() override {} 27699+ 27700+ private: 27701+ ResourceURLLoader() = default; 27702+ ~ResourceURLLoader() override = default; 27703+ 27704+ void Start(const base::FilePath& profile_path, 27705+ const network::ResourceRequest& request, 27706+ network::mojom::FetchResponseType response_type, 27707+ mojo::PendingReceiver<network::mojom::URLLoader> loader, 27708+ mojo::PendingRemote<network::mojom::URLLoaderClient> client_remote, 27709+ std::unique_ptr<FileURLLoaderObserver> observer, 27710+ scoped_refptr<net::HttpResponseHeaders> extra_response_headers) { 27711+ auto head = network::mojom::URLResponseHead::New(); 27712+ head->request_start = base::TimeTicks::Now(); 27713+ head->response_start = base::TimeTicks::Now(); 27714+ head->response_type = response_type; 27715+ head->headers = extra_response_headers; 27716+ receiver_.Bind(std::move(loader)); 27717+ receiver_.set_disconnect_handler(base::BindOnce( 27718+ &ResourceURLLoader::OnMojoDisconnect, base::Unretained(this))); 27719+ client_.Bind(std::move(client_remote)); 27720+ 27721+ if (!request.url.SchemeIs(url::kResourcesScheme) || 27722+ !base::CommandLine::ForCurrentProcess()->HasSwitch( 27723+ switches::kOhosHapPath)) { 27724+ LOG(ERROR) << "url scheme error or kOhosHapPath not exist"; 27725+ OnClientComplete(net::ERR_FAILED, std::move(observer)); 27726+ return; 27727+ } 27728+ std::string hapPath = 27729+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 27730+ switches::kOhosHapPath); 27731+ std::string resourcesPath = "resources/"; 27732+ resourcesPath = resourcesPath + request.url.host() + request.url.path(); 27733+ LOG(INFO) << "ResourceURLLoader url: " << request.url.spec() 27734+ << ", path: " << resourcesPath; 27735+ mojo::ScopedDataPipeProducerHandle producer_handle; 27736+ mojo::ScopedDataPipeConsumerHandle consumer_handle; 27737+ if (mojo::CreateDataPipe(kDefaultFileUrlPipeSize, producer_handle, 27738+ consumer_handle) != MOJO_RESULT_OK) { 27739+ OnClientComplete(net::ERR_FAILED, std::move(observer)); 27740+ return; 27741+ } 27742+ if (observer) 27743+ observer->OnStart(); 27744+ size_t length = 0; 27745+ std::unique_ptr<uint8_t[]> data; 27746+ auto resourceInstance = 27747+ OHOS::NWeb::OhosAdapterHelper::GetInstance().GetResourceAdapter( 27748+ hapPath); 27749+ mojo::DataPipeProducer::DataSource::ReadResult read_result; 27750+ if (!resourceInstance->GetRawFileData(resourcesPath, length, data, false)) { 27751+ LOG(ERROR) << "ResourceURLLoader GetRawFileData failed"; 27752+ read_result.result = MOJO_RESULT_NOT_FOUND; 27753+ if (observer) { 27754+ observer->OnRead(base::span<char>(), &read_result); 27755+ observer->OnDone(); 27756+ } 27757+ client_->OnComplete(network::URLLoaderCompletionStatus( 27758+ ConvertMojoResultToNetError(read_result.result))); 27759+ client_.reset(); 27760+ MaybeDeleteSelf(); 27761+ return; 27762+ } 27763+ LOG(INFO) << "GetRawFileData length: " << length; 27764+ read_result.result = MOJO_RESULT_OK; 27765+ read_result.bytes_read = 27766+ length > net::kMaxBytesToSniff ? net::kMaxBytesToSniff : length; 27767+ std::vector<char> initial_read_buffer; 27768+ char* dataPtr = reinterpret_cast<char*>(data.get()); 27769+ initial_read_buffer.insert(initial_read_buffer.end(), dataPtr, 27770+ dataPtr + length); 27771+ if (observer) 27772+ observer->OnRead(base::span<char>(initial_read_buffer), &read_result); 27773+ 27774+ uint64_t initial_read_size = read_result.bytes_read; 27775+ std::string range_header; 27776+ net::HttpByteRange byte_range; 27777+ if (request.headers.GetHeader(net::HttpRequestHeaders::kRange, 27778+ &range_header)) { 27779+ // Handle a simple Range header for a single range. 27780+ std::vector<net::HttpByteRange> ranges; 27781+ bool fail = false; 27782+ if (net::HttpUtil::ParseRangeHeader(range_header, &ranges) && 27783+ ranges.size() == 1) { 27784+ byte_range = ranges[0]; 27785+ if (!byte_range.ComputeBounds(length)) { 27786+ fail = true; 27787+ } 27788+ } else { 27789+ fail = true; 27790+ } 27791+ if (fail) { 27792+ OnClientComplete(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE, 27793+ std::move(observer)); 27794+ return; 27795+ } 27796+ } 27797+ uint64_t first_byte_to_send = 0; 27798+ uint64_t total_bytes_to_send = length; 27799+ if (byte_range.IsValid()) { 27800+ first_byte_to_send = byte_range.first_byte_position(); 27801+ total_bytes_to_send = 27802+ byte_range.last_byte_position() - first_byte_to_send + 1; 27803+ } 27804+ total_bytes_written_ = total_bytes_to_send; 27805+ head->content_length = base::saturated_cast<int64_t>(total_bytes_to_send); 27806+ 27807+ if (first_byte_to_send < initial_read_size) { 27808+ uint32_t write_size = std::min( 27809+ static_cast<uint32_t>(initial_read_size - first_byte_to_send), 27810+ static_cast<uint32_t>(total_bytes_to_send)); 27811+ const uint32_t expected_write_size = write_size; 27812+ MojoResult result = 27813+ producer_handle->WriteData(&initial_read_buffer[first_byte_to_send], 27814+ &write_size, MOJO_WRITE_DATA_FLAG_NONE); 27815+ if (result != MOJO_RESULT_OK || write_size != expected_write_size) { 27816+ OnFileWritten(std::move(observer), nullptr, result); 27817+ LOG(ERROR) << "ResourceURLLoader WriteData failed"; 27818+ return; 27819+ } 27820+ // Discount the bytes we just sent from the total range. 27821+ first_byte_to_send = initial_read_size; 27822+ total_bytes_to_send -= write_size; 27823+ } 27824+ const base::FilePath::CharType* resource_file_path = 27825+ FILE_PATH_LITERAL(resourcesPath.c_str()); 27826+ if (!net::GetMimeTypeFromFile(base::FilePath(resource_file_path), 27827+ &head->mime_type)) { 27828+ std::string new_type; 27829+ net::SniffMimeType( 27830+ base::StringPiece(initial_read_buffer.data(), read_result.bytes_read), 27831+ request.url, head->mime_type, 27832+ GetContentClient()->browser()->ForceSniffingFileUrlsForHtml() 27833+ ? net::ForceSniffFileUrlsForHtml::kEnabled 27834+ : net::ForceSniffFileUrlsForHtml::kDisabled, 27835+ &new_type); 27836+ head->mime_type.assign(new_type); 27837+ head->did_mime_sniff = true; 27838+ } 27839+ if (!head->headers) { 27840+ head->headers = 27841+ base::MakeRefCounted<net::HttpResponseHeaders>("HTTP/1.1 200 OK"); 27842+ } 27843+ LOG(INFO) << "ResourceURLLoader AddHeader mime_type " << head->mime_type; 27844+ head->headers->AddHeader(net::HttpRequestHeaders::kContentType, 27845+ head->mime_type); 27846+ client_->OnReceiveResponse(std::move(head), 27847+ mojo::ScopedDataPipeConsumerHandle()); 27848+ client_->OnStartLoadingResponseBody(std::move(consumer_handle)); 27849+ LOG(INFO) << "total_bytes_to_send: " << total_bytes_to_send; 27850+ if (total_bytes_to_send == 0) { 27851+ // There's definitely no more data, so we're already done. 27852+ OnFileWritten(std::move(observer), nullptr, MOJO_RESULT_OK); 27853+ return; 27854+ } 27855+ if (observer) 27856+ observer->OnSeekComplete(first_byte_to_send); 27857+ data_producer_ = 27858+ std::make_unique<mojo::DataPipeProducer>(std::move(producer_handle)); 27859+ base::StringPiece string_piece((char*)data.get() + first_byte_to_send, 27860+ total_bytes_to_send); 27861+ data_producer_->Write( 27862+ std::make_unique<mojo::StringDataSource>( 27863+ string_piece, mojo::StringDataSource::AsyncWritingMode:: 27864+ STRING_STAYS_VALID_UNTIL_COMPLETION), 27865+ base::BindOnce(&ResourceURLLoader::OnFileWritten, 27866+ base::Unretained(this), nullptr, std::move(data))); 27867+ } 27868+ 27869+ void OnMojoDisconnect() { 27870+ data_producer_.reset(); 27871+ receiver_.reset(); 27872+ client_.reset(); 27873+ MaybeDeleteSelf(); 27874+ } 27875+ 27876+ void OnClientComplete(net::Error net_error, 27877+ std::unique_ptr<FileURLLoaderObserver> observer) { 27878+ client_->OnComplete(network::URLLoaderCompletionStatus(net_error)); 27879+ client_.reset(); 27880+ if (observer) { 27881+ if (net_error != net::OK) { 27882+ mojo::DataPipeProducer::DataSource::ReadResult result; 27883+ result.result = ConvertNetErrorToMojoResult(net_error); 27884+ observer->OnRead(base::span<char>(), &result); 27885+ } 27886+ observer->OnDone(); 27887+ } 27888+ MaybeDeleteSelf(); 27889+ } 27890+ 27891+ void MaybeDeleteSelf() { 27892+ if (!receiver_.is_bound() && !client_.is_bound()) 27893+ delete this; 27894+ } 27895+ 27896+ void OnFileWritten(std::unique_ptr<FileURLLoaderObserver> observer, 27897+ std::unique_ptr<uint8_t[]> write_data, 27898+ MojoResult result) { 27899+ data_producer_.reset(); 27900+ if (observer) 27901+ observer->OnDone(); 27902+ 27903+ if (result == MOJO_RESULT_OK) { 27904+ network::URLLoaderCompletionStatus status(net::OK); 27905+ status.encoded_data_length = total_bytes_written_; 27906+ status.encoded_body_length = total_bytes_written_; 27907+ status.decoded_body_length = total_bytes_written_; 27908+ client_->OnComplete(status); 27909+ } else { 27910+ client_->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED)); 27911+ } 27912+ client_.reset(); 27913+ MaybeDeleteSelf(); 27914+ } 27915+ 27916+ std::unique_ptr<mojo::DataPipeProducer> data_producer_; 27917+ mojo::Receiver<network::mojom::URLLoader> receiver_{this}; 27918+ mojo::Remote<network::mojom::URLLoaderClient> client_; 27919+ 27920+ uint64_t total_bytes_written_ = 0; 27921+}; 27922+#endif 27923 } // namespace 27924 27925 FileURLLoaderFactory::FileURLLoaderFactory( 27926@@ -857,6 +1116,17 @@ void FileURLLoaderFactory::CreateLoaderAndStartInternal( 27927 return; 27928 } 27929 27930+#if BUILDFLAG(IS_OHOS) 27931+ if (request.url.SchemeIs(url::kResourcesScheme)) { 27932+ task_runner_->PostTask( 27933+ FROM_HERE, base::BindOnce(&ResourceURLLoader::CreateAndStart, 27934+ profile_path_, request, response_type, 27935+ std::move(loader), std::move(client), 27936+ std::unique_ptr<FileURLLoaderObserver>(), 27937+ nullptr /* extra_response_headers */)); 27938+ return; 27939+ } 27940+#endif 27941 // Check file path just after all CORS flag checks are handled. 27942 base::FilePath file_path; 27943 if (!net::FileURLToFilePath(request.url, &file_path)) { 27944diff --git a/src/content/browser/loader/navigation_url_loader_impl.cc b/src/content/browser/loader/navigation_url_loader_impl.cc 27945index 868661c86c39a..e1a8bf0382fb2 27946--- a/src/content/browser/loader/navigation_url_loader_impl.cc 27947+++ b/src/content/browser/loader/navigation_url_loader_impl.cc 27948@@ -1350,6 +1350,13 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( 27949 browser_context_->GetPath(), 27950 browser_context_->GetSharedCorsOriginAccessList(), 27951 file_factory_priority)); 27952+#if BUILDFLAG(IS_OHOS) 27953+ non_network_url_loader_factories_.emplace( 27954+ url::kResourcesScheme, FileURLLoaderFactory::Create( 27955+ browser_context_->GetPath(), 27956+ browser_context_->GetSharedCorsOriginAccessList(), 27957+ file_factory_priority)); 27958+#endif 27959 27960 #if BUILDFLAG(IS_ANDROID) 27961 non_network_url_loader_factories_.emplace(url::kContentScheme, 27962@@ -1550,6 +1557,7 @@ void NavigationURLLoaderImpl::BindNonNetworkURLLoaderFactoryReceiver( 27963 mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver) { 27964 auto it = non_network_url_loader_factories_.find(url.scheme()); 27965 if (it != non_network_url_loader_factories_.end()) { 27966+ LOG(INFO) << "BindNonNetworkURLLoaderFactoryReceiver scheme: " << url.scheme(); 27967 mojo::Remote<network::mojom::URLLoaderFactory> remote( 27968 std::move(it->second)); 27969 remote->Clone(std::move(factory_receiver)); 27970@@ -1586,7 +1594,11 @@ void NavigationURLLoaderImpl:: 27971 // non-http factory that allows DevTools intereception. For comparison all 27972 // non-WebUI cases in RFHI::CommitNavigation allow DevTools 27973 // interception. Let's try to be more consistent / less ad-hoc. 27974+#if BUILDFLAG(IS_OHOS) 27975+ if (url.SchemeIs(url::kFileScheme) || url.SchemeIs(url::kResourcesScheme)) { 27976+#else 27977 if (url.SchemeIs(url::kFileScheme)) { 27978+#endif 27979 if (frame_tree_node) { // May be nullptr in some unit tests. 27980 devtools_instrumentation::WillCreateURLLoaderFactory( 27981 frame, /*is_navigation=*/true, /*is_download=*/false, 27982diff --git a/src/content/browser/log_console_message.cc b/src/content/browser/log_console_message.cc 27983index 8b9c6c2b48357..ebb548c9f74b5 27984--- a/src/content/browser/log_console_message.cc 27985+++ b/src/content/browser/log_console_message.cc 27986@@ -35,9 +35,11 @@ void LogConsoleMessage(blink::mojom::ConsoleMessageLevel log_level, 27987 if (!base::FeatureList::IsEnabled(features::kLogJsConsoleMessages)) 27988 return; 27989 27990+#if !BUILDFLAG(IS_OHOS) 27991 logging::LogMessage("CONSOLE", line_number, resolved_level).stream() 27992 << "\"" << message << "\", source: " << source_id << " (" << line_number 27993 << ")"; 27994+#endif 27995 } 27996 27997 } // namespace content 27998diff --git a/src/content/browser/media/session/audio_focus_delegate_ohos.cc b/src/content/browser/media/session/audio_focus_delegate_ohos.cc 27999index fefdd09118293..e490242c76b98 28000--- a/src/content/browser/media/session/audio_focus_delegate_ohos.cc 28001+++ b/src/content/browser/media/session/audio_focus_delegate_ohos.cc 28002@@ -7,6 +7,7 @@ 28003 #include "audio_renderer_adapter.h" 28004 #include "audio_system_manager_adapter.h" 28005 #include "content/browser/media/session/media_session_impl.h" 28006+#include "content/public/common/content_switches.h" 28007 #include "media/base/media_switches.h" 28008 #include "ohos_adapter_helper.h" 28009 28010@@ -43,6 +44,12 @@ AudioFocusDelegateOHOS::~AudioFocusDelegateOHOS() {} 28011 28012 AudioFocusDelegate::AudioFocusResult AudioFocusDelegateOHOS::RequestAudioFocus( 28013 media_session::mojom::AudioFocusType audio_focus_type) { 28014+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 28015+ bool hasEnhanceFlag = command_line->HasSwitch(::switches::kOhosHanceSurface); 28016+ if (hasEnhanceFlag) { 28017+ LOG(ERROR) << "audio focus is not support in enhance"; 28018+ return AudioFocusDelegate::AudioFocusResult::kSuccess; 28019+ } 28020 int32_t ret = OhosAdapterHelper::GetInstance() 28021 .GetAudioSystemManager() 28022 .RequestAudioFocus(kAudioInterrupt); 28023diff --git a/src/content/browser/renderer_host/input/input_router_impl.cc b/src/content/browser/renderer_host/input/input_router_impl.cc 28024index 610c8e7c92f15..5edac43d07f0d 28025--- a/src/content/browser/renderer_host/input/input_router_impl.cc 28026+++ b/src/content/browser/renderer_host/input/input_router_impl.cc 28027@@ -143,7 +143,12 @@ void InputRouterImpl::SendGestureEvent( 28028 #if BUILDFLAG(IS_OHOS) 28029 if (gesture_event.event.GetType() == 28030 WebInputEvent::Type::kGestureFlingStart) { 28031- client_->GetWidgetInputHandler()->StartFling(); 28032+ LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureFlingStart"; 28033+ client_->GetWidgetInputHandler()->TryStartFling(); 28034+ } else if (gesture_event.event.GetType() == 28035+ WebInputEvent::Type::kGestureScrollEnd) { 28036+ LOG(INFO) << "InputRouterImpl::SendGestureEvent type=kGestureScrollEnd"; 28037+ client_->GetWidgetInputHandler()->TryFinishFling(); 28038 } 28039 #endif 28040 if (gesture_event_queue_.PassToFlingController(gesture_event)) { 28041diff --git a/src/content/browser/renderer_host/policy_container_navigation_bundle.cc b/src/content/browser/renderer_host/navigation_policy_container_builder.cc 28042similarity index 69% 28043rename from src/content/browser/renderer_host/policy_container_navigation_bundle.cc 28044rename to src/content/browser/renderer_host/navigation_policy_container_builder.cc 28045index ec600e3f2ccfe..dca936c7c4baa 28046--- a/src/content/browser/renderer_host/policy_container_navigation_bundle.cc 28047+++ b/src/content/browser/renderer_host/navigation_policy_container_builder.cc 28048@@ -2,7 +2,7 @@ 28049 // Use of this source code is governed by a BSD-style license that can be 28050 // found in the LICENSE file. 28051 28052-#include "content/browser/renderer_host/policy_container_navigation_bundle.h" 28053+#include "content/browser/renderer_host/navigation_policy_container_builder.h" 28054 28055 #include <utility> 28056 28057@@ -75,7 +75,7 @@ std::unique_ptr<PolicyContainerPolicies> GetHistoryPolicies( 28058 28059 } // namespace 28060 28061-PolicyContainerNavigationBundle::PolicyContainerNavigationBundle( 28062+NavigationPolicyContainerBuilder::NavigationPolicyContainerBuilder( 28063 RenderFrameHostImpl* parent, 28064 const blink::LocalFrameToken* initiator_frame_token, 28065 const FrameNavigationEntry* history_entry) 28066@@ -84,36 +84,36 @@ PolicyContainerNavigationBundle::PolicyContainerNavigationBundle( 28067 history_policies_(GetHistoryPolicies(history_entry)), 28068 delivered_policies_(std::make_unique<PolicyContainerPolicies>()) {} 28069 28070-PolicyContainerNavigationBundle::~PolicyContainerNavigationBundle() = default; 28071+NavigationPolicyContainerBuilder::~NavigationPolicyContainerBuilder() = default; 28072 28073 const PolicyContainerPolicies* 28074-PolicyContainerNavigationBundle::InitiatorPolicies() const { 28075+NavigationPolicyContainerBuilder::InitiatorPolicies() const { 28076 return initiator_policies_.get(); 28077 } 28078 28079-const PolicyContainerPolicies* PolicyContainerNavigationBundle::ParentPolicies() 28080+const PolicyContainerPolicies* NavigationPolicyContainerBuilder::ParentPolicies() 28081 const { 28082 return parent_policies_.get(); 28083 } 28084 28085 const PolicyContainerPolicies* 28086-PolicyContainerNavigationBundle::HistoryPolicies() const { 28087+NavigationPolicyContainerBuilder::HistoryPolicies() const { 28088 return history_policies_.get(); 28089 } 28090 28091-void PolicyContainerNavigationBundle::SetIPAddressSpace( 28092+void NavigationPolicyContainerBuilder::SetIPAddressSpace( 28093 network::mojom::IPAddressSpace address_space) { 28094 DCHECK(!HasComputedPolicies()); 28095 delivered_policies_->ip_address_space = address_space; 28096 } 28097 28098-void PolicyContainerNavigationBundle::SetIsOriginPotentiallyTrustworthy( 28099+void NavigationPolicyContainerBuilder::SetIsOriginPotentiallyTrustworthy( 28100 bool value) { 28101 DCHECK(!HasComputedPolicies()); 28102 delivered_policies_->is_web_secure_context = value; 28103 } 28104 28105-void PolicyContainerNavigationBundle::AddContentSecurityPolicy( 28106+void NavigationPolicyContainerBuilder::AddContentSecurityPolicy( 28107 network::mojom::ContentSecurityPolicyPtr policy) { 28108 DCHECK(!HasComputedPolicies()); 28109 DCHECK(policy); 28110@@ -121,21 +121,21 @@ void PolicyContainerNavigationBundle::AddContentSecurityPolicy( 28111 delivered_policies_->content_security_policies.push_back(std::move(policy)); 28112 } 28113 28114-void PolicyContainerNavigationBundle::AddContentSecurityPolicies( 28115+void NavigationPolicyContainerBuilder::AddContentSecurityPolicies( 28116 std::vector<network::mojom::ContentSecurityPolicyPtr> policies) { 28117 DCHECK(!HasComputedPolicies()); 28118 28119 delivered_policies_->AddContentSecurityPolicies(std::move(policies)); 28120 } 28121 28122-void PolicyContainerNavigationBundle::SetCrossOriginOpenerPolicy( 28123+void NavigationPolicyContainerBuilder::SetCrossOriginOpenerPolicy( 28124 network::CrossOriginOpenerPolicy coop) { 28125 DCHECK(!HasComputedPolicies()); 28126 28127 delivered_policies_->cross_origin_opener_policy = coop; 28128 } 28129 28130-void PolicyContainerNavigationBundle::SetCrossOriginEmbedderPolicy( 28131+void NavigationPolicyContainerBuilder::SetCrossOriginEmbedderPolicy( 28132 network::CrossOriginEmbedderPolicy coep) { 28133 DCHECK(!HasComputedPolicies()); 28134 28135@@ -143,13 +143,13 @@ void PolicyContainerNavigationBundle::SetCrossOriginEmbedderPolicy( 28136 } 28137 28138 const PolicyContainerPolicies& 28139-PolicyContainerNavigationBundle::DeliveredPoliciesForTesting() const { 28140+NavigationPolicyContainerBuilder::DeliveredPoliciesForTesting() const { 28141 DCHECK(!HasComputedPolicies()); 28142 28143 return *delivered_policies_; 28144 } 28145 28146-void PolicyContainerNavigationBundle::ComputePoliciesForError() { 28147+void NavigationPolicyContainerBuilder::ComputePoliciesForError() { 28148 // The decision to commit an error page can happen after receiving the 28149 // response for a regular document. It overrides any previous attempt to 28150 // |ComputePolicies()|. 28151@@ -172,7 +172,7 @@ void PolicyContainerNavigationBundle::ComputePoliciesForError() { 28152 DCHECK(HasComputedPolicies()); 28153 } 28154 28155-void PolicyContainerNavigationBundle::ComputeIsWebSecureContext() { 28156+void NavigationPolicyContainerBuilder::ComputeIsWebSecureContext() { 28157 DCHECK(!HasComputedPolicies()); 28158 28159 if (!parent_policies_) { 28160@@ -186,7 +186,7 @@ void PolicyContainerNavigationBundle::ComputeIsWebSecureContext() { 28161 } 28162 28163 std::unique_ptr<PolicyContainerPolicies> 28164-PolicyContainerNavigationBundle::IncorporateDeliveredPolicies( 28165+NavigationPolicyContainerBuilder::IncorporateDeliveredPolicies( 28166 const GURL& url, 28167 std::unique_ptr<PolicyContainerPolicies> policies) { 28168 // Delivered content security policies must be appended. 28169@@ -203,7 +203,7 @@ PolicyContainerNavigationBundle::IncorporateDeliveredPolicies( 28170 } 28171 28172 std::unique_ptr<PolicyContainerPolicies> 28173-PolicyContainerNavigationBundle::ComputeInheritedPolicies(const GURL& url) { 28174+NavigationPolicyContainerBuilder::ComputeInheritedPolicies(const GURL& url) { 28175 DCHECK(HasLocalScheme(url)) << "No inheritance allowed for non-local schemes"; 28176 28177 if (url.IsAboutSrcdoc()) { 28178@@ -220,42 +220,59 @@ PolicyContainerNavigationBundle::ComputeInheritedPolicies(const GURL& url) { 28179 } 28180 28181 std::unique_ptr<PolicyContainerPolicies> 28182-PolicyContainerNavigationBundle::ComputeFinalPolicies(const GURL& url) { 28183+NavigationPolicyContainerBuilder::ComputeFinalPolicies(const GURL& url) { 28184+ std::unique_ptr<PolicyContainerPolicies> policies; 28185 // Policies are either inherited from another document for local scheme, or 28186 // directly set from the delivered response. 28187- if (!HasLocalScheme(url)) 28188- return delivered_policies_->Clone(); 28189- 28190- // For a local scheme, history policies should not incorporate delivered ones 28191- // as this may lead to duplication of some policies already stored in history. 28192- // For example, consider the following HTML: 28193- // <iframe src="about:blank" csp="something"> 28194- // This will store CSP: something in history. The next time we have a history 28195- // navigation we will have CSP: something twice. 28196- if (history_policies_) 28197- return history_policies_->Clone(); 28198- 28199- return IncorporateDeliveredPolicies(url, ComputeInheritedPolicies(url)); 28200+ if (!HasLocalScheme(url)) { 28201+ policies = delivered_policies_->Clone(); 28202+ } else if (history_policies_) { 28203+ // For a local scheme, history policies should not incorporate delivered 28204+ // ones as this may lead to duplication of some policies already stored in 28205+ // history. For example, consider the following HTML: 28206+ // <iframe src="about:blank" csp="something"> 28207+ // This will store CSP: something in history. The next time we have a 28208+ // history navigation we will have CSP: something twice. 28209+ policies = history_policies_->Clone(); 28210+ } else { 28211+ policies = IncorporateDeliveredPolicies(url, ComputeInheritedPolicies(url)); 28212+ } 28213+ 28214+ // `can_navigate_top_without_user_gesture` is inherited from the parent. 28215+ // Later in `NavigationRequest::CommitNavigation()` it will either be made 28216+ // less strict for same-origin navigations, or stricter for cross-origin 28217+ // navigations that do not explicitly allow top-level navigation without user 28218+ // gesture. 28219+ policies->can_navigate_top_without_user_gesture = 28220+ parent_policies_ ? parent_policies_->can_navigate_top_without_user_gesture 28221+ : true; 28222+ 28223+ return policies; 28224 } 28225 28226-void PolicyContainerNavigationBundle::ComputePolicies(const GURL& url) { 28227+void NavigationPolicyContainerBuilder::ComputePolicies(const GURL& url) { 28228 DCHECK(!HasComputedPolicies()); 28229 ComputeIsWebSecureContext(); 28230 SetFinalPolicies(ComputeFinalPolicies(url)); 28231 } 28232 28233-bool PolicyContainerNavigationBundle::HasComputedPolicies() const { 28234+bool NavigationPolicyContainerBuilder::HasComputedPolicies() const { 28235 return host_ != nullptr; 28236 } 28237 28238-void PolicyContainerNavigationBundle::SetFinalPolicies( 28239+void NavigationPolicyContainerBuilder::SetAllowTopNavigationWithoutUserGesture( 28240+ bool allow_top) { 28241+ host_->SetCanNavigateTopWithoutUserGesture(allow_top); 28242+} 28243+ 28244+void NavigationPolicyContainerBuilder::SetFinalPolicies( 28245 std::unique_ptr<PolicyContainerPolicies> policies) { 28246 DCHECK(!HasComputedPolicies()); 28247 28248 host_ = base::MakeRefCounted<PolicyContainerHost>(std::move(policies)); 28249 } 28250 28251-const PolicyContainerPolicies& PolicyContainerNavigationBundle::FinalPolicies() 28252+const PolicyContainerPolicies& NavigationPolicyContainerBuilder::FinalPolicies() 28253 const { 28254 DCHECK(HasComputedPolicies()); 28255 28256@@ -263,20 +280,20 @@ const PolicyContainerPolicies& PolicyContainerNavigationBundle::FinalPolicies() 28257 } 28258 28259 blink::mojom::PolicyContainerPtr 28260-PolicyContainerNavigationBundle::CreatePolicyContainerForBlink() { 28261+NavigationPolicyContainerBuilder::CreatePolicyContainerForBlink() { 28262 DCHECK(HasComputedPolicies()); 28263 28264 return host_->CreatePolicyContainerForBlink(); 28265 } 28266 28267 scoped_refptr<PolicyContainerHost> 28268-PolicyContainerNavigationBundle::TakePolicyContainerHost() && { 28269+NavigationPolicyContainerBuilder::TakePolicyContainerHost() && { 28270 DCHECK(HasComputedPolicies()); 28271 28272 return std::move(host_); 28273 } 28274 28275-void PolicyContainerNavigationBundle::ResetForCrossDocumentRestart() { 28276+void NavigationPolicyContainerBuilder::ResetForCrossDocumentRestart() { 28277 host_ = nullptr; 28278 delivered_policies_ = std::make_unique<PolicyContainerPolicies>(); 28279 } 28280diff --git a/src/content/browser/renderer_host/policy_container_navigation_bundle.h b/src/content/browser/renderer_host/navigation_policy_container_builder.h 28281similarity index 52% 28282rename from src/content/browser/renderer_host/policy_container_navigation_bundle.h 28283rename to src/content/browser/renderer_host/navigation_policy_container_builder.h 28284index adc2e28f5eed3..014e9e3d1d7d7 28285--- a/src/content/browser/renderer_host/policy_container_navigation_bundle.h 28286+++ b/src/content/browser/renderer_host/navigation_policy_container_builder.h 28287@@ -2,8 +2,8 @@ 28288 // Use of this source code is governed by a BSD-style license that can be 28289 // found in the LICENSE file. 28290 28291-#ifndef CONTENT_BROWSER_RENDERER_HOST_POLICY_CONTAINER_NAVIGATION_BUNDLE_H_ 28292-#define CONTENT_BROWSER_RENDERER_HOST_POLICY_CONTAINER_NAVIGATION_BUNDLE_H_ 28293+#ifndef CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_POLICY_CONTAINER_BUILDER_H_ 28294+#define CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_POLICY_CONTAINER_BUILDER_H_ 28295 28296 #include <memory> 28297 28298@@ -21,50 +21,51 @@ namespace content { 28299 class FrameNavigationEntry; 28300 class RenderFrameHostImpl; 28301 28302-// Helper for NavigationRequest. Keeps track of a few important sets of policies 28303-// (that of the parent document, of the navigation initiator, etc.) and computes 28304-// the policies of the new document being navigated to. 28305+// Keeps track of a few important sets of policies during a navigation: those of 28306+// the parent document, of the navigation initiator, etc. Computes the policies 28307+// of the new document being navigated to, and creates the new document's 28308+// `PolicyContainerHost`. 28309 // 28310-// Instances of this class live in NavigationRequest. They are instantiated when 28311-// the NavigationRequest is constructed, and destroyed at commit time. 28312+// Instances of this class live in `NavigationRequest`. They are instantiated 28313+// when the `NavigationRequest` is constructed and destroyed at commit time. 28314 // 28315 // Setters can be called as the navigation progresses to record interesting 28316 // properties for later. 28317 // 28318-// When the potential response to commit is known, |ComputePolicies()| can be 28319+// When the potential response to commit is known, `ComputePolicies()` can be 28320 // called to set the final polices of the new document and create a new policy 28321 // container host. 28322-// For error documents, |ComputePoliciesForError()| should be used instead. It 28323-// can also be called after |ComputePolicies()| in some cases when the error is 28324-// only detected after receiving a response 28325+// For error documents, `ComputePoliciesForError()` should be used instead. It 28326+// can also be called after `ComputePolicies()` in some cases when the error is 28327+// only detected after receiving a response. 28328 // 28329-// At commit time, |TakePolicyContainerHost()| can be called to transfer 28330-// ownership of the policy container host to the target RenderFrameHostImpl. 28331-class CONTENT_EXPORT PolicyContainerNavigationBundle { 28332+// At commit time, `TakePolicyContainerHost()` can be called to transfer 28333+// ownership of the policy container host to the target `RenderFrameHostImpl`. 28334+class CONTENT_EXPORT NavigationPolicyContainerBuilder { 28335 public: 28336 // All arguments may be nullptr and need only outlive this call. 28337 // 28338- // If |parent| is not nullptr, its policies are copied. 28339- // If |initiator_frame_token| is not nullptr and maps to a 28340- // PolicyContainerHost, then its policies are copied. 28341- // If |history_entry| is not nullptr and contains policies, those are copied. 28342+ // If `parent` is not nullptr, its policies are copied. 28343+ // If `initiator_frame_token` is not nullptr and maps to a 28344+ // `PolicyContainerHost`, then its policies are copied. 28345+ // If `history_entry` is not nullptr and contains policies, those are copied. 28346 // 28347 // This must only be called on the browser's UI thread. 28348- PolicyContainerNavigationBundle( 28349+ NavigationPolicyContainerBuilder( 28350 RenderFrameHostImpl* parent, 28351 const blink::LocalFrameToken* initiator_frame_token, 28352 const FrameNavigationEntry* history_entry); 28353 28354- ~PolicyContainerNavigationBundle(); 28355+ ~NavigationPolicyContainerBuilder(); 28356 28357 // Instances of this class are neither copyable nor movable. 28358- PolicyContainerNavigationBundle(const PolicyContainerNavigationBundle&) = 28359+ NavigationPolicyContainerBuilder(const NavigationPolicyContainerBuilder&) = 28360 delete; 28361- PolicyContainerNavigationBundle& operator=( 28362- const PolicyContainerNavigationBundle&) = delete; 28363- PolicyContainerNavigationBundle(PolicyContainerNavigationBundle&&) = delete; 28364- PolicyContainerNavigationBundle& operator=( 28365- PolicyContainerNavigationBundle&&) = delete; 28366+ NavigationPolicyContainerBuilder& operator=( 28367+ const NavigationPolicyContainerBuilder&) = delete; 28368+ NavigationPolicyContainerBuilder(NavigationPolicyContainerBuilder&&) = delete; 28369+ NavigationPolicyContainerBuilder& operator=( 28370+ NavigationPolicyContainerBuilder&&) = delete; 28371 28372 // Returns a pointer to a snapshot of the parent's policies captured at 28373 // construction time. Returns nullptr if there was no parent. 28374@@ -81,99 +82,127 @@ class CONTENT_EXPORT PolicyContainerNavigationBundle { 28375 28376 // Sets the cross origin opener policy of the new document. 28377 // 28378- // This must be called before |ComputePolicies()|. 28379+ // This must be called before `ComputePolicies()`. 28380 void SetCrossOriginOpenerPolicy(network::CrossOriginOpenerPolicy coop); 28381 28382 // Sets the cross origin embedder policy of the new document. 28383 // 28384- // This must be called before |ComputePolicies()|. 28385+ // This must be called before `ComputePolicies()`. 28386 void SetCrossOriginEmbedderPolicy(network::CrossOriginEmbedderPolicy coep); 28387 28388 // Sets the IP address space of the delivered policies of the new document. 28389 // 28390- // This must be called before |ComputePolicies()|. 28391+ // This must be called before `ComputePolicies()`. 28392 void SetIPAddressSpace(network::mojom::IPAddressSpace address_space); 28393 28394 // Sets whether the origin of the document being navigated to is 28395 // potentially-trustworthy, as defined in: 28396 // https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy. 28397 // 28398- // This must be called before |ComputePolicies()|. 28399+ // This must be called before `ComputePolicies()`. 28400 void SetIsOriginPotentiallyTrustworthy(bool value); 28401 28402 // Records an additional Content Security Policy that will apply to the new 28403- // document. |policy| must not be null. Policies added this way are ignored 28404+ // document. `policy` must not be null. Policies added this way are ignored 28405 // for failed navigations and history navigations. 28406 void AddContentSecurityPolicy( 28407 network::mojom::ContentSecurityPolicyPtr policy); 28408 28409- // Same as `AddContentSecurityPolicy` above, but takes a vector of policies. 28410+ // Same as calling `AddContentSecurityPolicy()` on each item in `policies`. 28411 void AddContentSecurityPolicies( 28412 std::vector<network::mojom::ContentSecurityPolicyPtr> policies); 28413 28414 // Returns the delivered policies, as set so far by: 28415 // 28416- // - |SetIPAddressSpace()| for |ip_address_space| 28417- // - |SetIsOriginPotentiallyTrustworthy()| and |ComputePolicies()| for 28418- // |is_web_secure_context| 28419+ // - `SetIPAddressSpace()` for `ip_address_space` 28420+ // - `SetIsOriginPotentiallyTrustworthy()` and `ComputePolicies()` for 28421+ // `is_web_secure_context` 28422 const PolicyContainerPolicies& DeliveredPoliciesForTesting() const; 28423 28424 // Sets final policies to defaults suitable for error pages, and builds a 28425 // policy container host. 28426 // 28427+ // `is_inside_mhtml` specifies whether the navigation loads an MHTML document 28428+ // or a subframe of an MHTML document. This influences computed sandbox flags. 28429+ // `frame_sandbox_flags` represents the frame's sandbox flags. 28430+ // 28431 // This method must only be called once. However it can be called after 28432- // |ComputePolicies()|. 28433+ // `ComputePolicies()`. 28434 void ComputePoliciesForError(); 28435 28436 // Sets final policies to their correct values and builds a policy container 28437 // host. 28438 // 28439- // |url| should designate the URL of the document after all redirects have 28440+ // `url` should designate the URL of the document after all redirects have 28441 // been followed. 28442+ // `is_inside_mhtml` specifies whether the navigation loads an MHTML document 28443+ // or a subframe of an MHTML document. This influences computed sandbox flags. 28444+ // `frame_sandbox_flags` represents the frame's sandbox flags. 28445 // 28446- // Also sets |DeliveredPolicies().is_web_secure_context| to its final value. 28447+ // Also sets `DeliveredPoliciesForTesting().is_web_secure_context` to its 28448+ // final value. 28449 // 28450- // This method must only be called once. |ComputePoliciesForError()| may be 28451- // called later and this override the final policies. 28452+ // This method must only be called once. `ComputePoliciesForError()` may be 28453+ // called later, in which case it overrides the final policies. 28454 void ComputePolicies(const GURL& url); 28455 28456 // Returns a reference to the policies of the new document, i.e. the policies 28457 // in the policy container host to be committed. 28458 // 28459- // |ComputePolicies()| or |ComputePoliciesForError()| must have been called 28460+ // `ComputePolicies()` or `ComputePoliciesForError()` must have been called 28461 // previously. 28462 const PolicyContainerPolicies& FinalPolicies() const; 28463 28464- // Creates a PolicyContainer connected to this bundle's PolicyContainerHost. 28465+ // Creates a PolicyContainer linked to this builder's `PolicyContainerHost`. 28466 // 28467- // Should only be called once. |ComputePolicies()| or 28468- // |ComputePoliciesForError()| must have been called previously. 28469+ // Should only be called once. `ComputePolicies()` or 28470+ // `ComputePoliciesForError()` must have been called previously. 28471 blink::mojom::PolicyContainerPtr CreatePolicyContainerForBlink(); 28472 28473- // Moves the PolicyContainerHost out of this bundle. The returned host 28474- // contains the same policies as |FinalPolicies()|. 28475+ // Moves the `PolicyContainerHost` out of this builder. The returned host 28476+ // contains the same policies as `FinalPolicies()`. 28477 // 28478- // |ComputePolicies()| or |ComputePoliciesForError()| must have been called 28479+ // `ComputePolicies()` or `ComputePoliciesForError()` must have been called 28480 // previously. 28481 scoped_refptr<PolicyContainerHost> TakePolicyContainerHost() &&; 28482 28483+ // Resets this instance to its freshly-constructed state. 28484+ // 28485 // Called by same-document navigation requests that need to be restarted as 28486 // cross-document navigations. This happens when a same-document commit fails 28487- // due to another navigation committing in the meantime. This resets the 28488- // PolicyContainerNavigationBundle to the state when it was first created. 28489+ // due to another navigation committing in the meantime. 28490 void ResetForCrossDocumentRestart(); 28491 28492+ // Modifies the bit that would allow top-level navigation without sticky 28493+ // user activation. 28494+ void SetAllowTopNavigationWithoutUserGesture(bool allow_top); 28495+ 28496 private: 28497- // Whether either of |ComputePolicies()| or |ComputePoliciesForError()| has 28498+ // Whether either of `ComputePolicies()` or `ComputePoliciesForError()` has 28499 // been called yet. 28500 bool HasComputedPolicies() const; 28501 28502- // Sets |delivered_policies_.is_web_secure_context| to its final value. 28503+ // Sets `delivered_policies_.is_web_secure_context` to its final value. 28504 // 28505- // Helper for |ComputePolicies()|. 28506+ // Helper for `ComputePolicies()`. 28507 void ComputeIsWebSecureContext(); 28508 28509- // Sets |host_|. 28510+ // Sets `policies.sandbox_flags` to its final value. This merges the CSP 28511+ // sandbox flags with the frame's sandbox flag. 28512+ // 28513+ // `is_inside_mhtml` Whether the navigation loads an MHTML document or a 28514+ // subframe of an MHTML document. When true, this forces all sandbox flags on 28515+ // the document except popups and popups-to-escape-sandbox. 28516+ // `frame_sandbox_flags` The frame's sandbox flags. 28517+ // `policies` The policies computed for the document except for the sandbox 28518+ // flags. 28519+ // 28520+ // Helper for `ComputePolicies()` and `ComputePoliciesForError()`. 28521+ void ComputeSandboxFlags(bool is_inside_mhtml, 28522+ network::mojom::WebSandboxFlags frame_sandbox_flags, 28523+ PolicyContainerPolicies* policies); 28524+ 28525+ // Sets `host_`. 28526 void SetFinalPolicies(std::unique_ptr<PolicyContainerPolicies> policies); 28527 28528 // Helper for `FinalizePolicies()`. Appends the delivered Content Security 28529@@ -189,8 +218,7 @@ class CONTENT_EXPORT PolicyContainerNavigationBundle { 28530 28531 // Helper for `FinalizePolicies()`. Returns, depending on `url`, the final 28532 // policies for the document that is going to be committed. 28533- std::unique_ptr<PolicyContainerPolicies> ComputeFinalPolicies( 28534- const GURL& url); 28535+ std::unique_ptr<PolicyContainerPolicies> ComputeFinalPolicies(const GURL& url); 28536 28537 // The policies of the parent document, if any. 28538 const std::unique_ptr<PolicyContainerPolicies> parent_policies_; 28539@@ -203,15 +231,15 @@ class CONTENT_EXPORT PolicyContainerNavigationBundle { 28540 28541 // The policies extracted from the response as it is loaded. 28542 // 28543- // See the comment on |SetIsOriginPotentiallyTrustworthy()| regarding this 28544- // member's |is_web_secure_context| field. 28545+ // See the comment on `SetIsOriginPotentiallyTrustworthy()` regarding this 28546+ // member's `is_web_secure_context` field. 28547 std::unique_ptr<PolicyContainerPolicies> delivered_policies_; 28548 28549- // Nullptr until |ComputePolicies()| or |ComputePoliciesForError()| is 28550- // called, then moved from by |TakePolicyContainerHost()|. 28551+ // Nullptr until `ComputePolicies()` or `ComputePoliciesForError()` is 28552+ // called, then moved from by `TakePolicyContainerHost()`. 28553 scoped_refptr<PolicyContainerHost> host_; 28554 }; 28555 28556 } // namespace content 28557 28558-#endif // CONTENT_BROWSER_RENDERER_HOST_POLICY_CONTAINER_NAVIGATION_BUNDLE_H_ 28559+#endif // CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_POLICY_CONTAINER_BUILDER_H_ 28560diff --git a/src/content/browser/renderer_host/policy_container_navigation_bundle_browsertest.cc b/src/content/browser/renderer_host/navigation_policy_container_builder_browsertest.cc 28561similarity index 80% 28562rename from src/content/browser/renderer_host/policy_container_navigation_bundle_browsertest.cc 28563rename to src/content/browser/renderer_host/navigation_policy_container_builder_browsertest.cc 28564index 47f6f31d8d845..4030227fbb057 28565--- a/src/content/browser/renderer_host/policy_container_navigation_bundle_browsertest.cc 28566+++ b/src/content/browser/renderer_host/navigation_policy_container_builder_browsertest.cc 28567@@ -2,11 +2,11 @@ 28568 // Use of this source code is governed by a BSD-style license that can be 28569 // found in the LICENSE file. 28570 28571-#include "content/browser/renderer_host/policy_container_host.h" 28572-#include "content/browser/renderer_host/policy_container_navigation_bundle.h" 28573+#include "content/browser/renderer_host/navigation_policy_container_builder.h" 28574 28575 #include "content/browser/renderer_host/frame_tree_node.h" 28576 #include "content/browser/renderer_host/navigation_entry_impl.h" 28577+#include "content/browser/renderer_host/policy_container_host.h" 28578 #include "content/browser/renderer_host/render_frame_host_impl.h" 28579 #include "content/public/test/back_forward_cache_util.h" 28580 #include "content/public/test/browser_test.h" 28581@@ -53,12 +53,12 @@ network::mojom::ContentSecurityPolicyPtr MakeTestCSP() { 28582 return csp; 28583 } 28584 28585-// See also the unit tests for PolicyContainerNavigationBundle, which exercise 28586+// See also the unit tests for NavigationPolicyContainerBuilder, which exercise 28587 // simpler parts of the API. We use browser tests to exercise behavior in the 28588 // presence of navigation history in particular. 28589-class PolicyContainerNavigationBundleBrowserTest : public ContentBrowserTest { 28590+class NavigationPolicyContainerBuilderBrowserTest: public ContentBrowserTest { 28591 protected: 28592- explicit PolicyContainerNavigationBundleBrowserTest() { StartServer(); } 28593+ explicit NavigationPolicyContainerBuilderBrowserTest() { StartServer(); } 28594 28595 // Returns a pointer to the current root RenderFrameHostImpl. 28596 RenderFrameHostImpl* root_frame_host() { 28597@@ -98,15 +98,15 @@ class PolicyContainerNavigationBundleBrowserTest : public ContentBrowserTest { 28598 // 28599 // Even though this could be a unit test, we define this here so as to keep all 28600 // tests of HistoryPolicies() in the same place. 28601-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28602+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28603 HistoryPoliciesWithoutEntry) { 28604- EXPECT_THAT(PolicyContainerNavigationBundle(nullptr, nullptr, nullptr) 28605+ EXPECT_THAT(NavigationPolicyContainerBuilder(nullptr, nullptr, nullptr) 28606 .HistoryPolicies(), 28607 IsNull()); 28608 } 28609 28610 // Verifies that HistoryPolicies() returns non-null during history navigation. 28611-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28612+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28613 HistoryPoliciesForNetworkScheme) { 28614 // Navigate to a document with a network scheme. Its history entry should have 28615 // its policies initialized from the network response. 28616@@ -116,15 +116,15 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28617 EXPECT_EQ(root_policies.ip_address_space, 28618 network::mojom::IPAddressSpace::kLocal); 28619 28620- PolicyContainerNavigationBundle bundle( 28621+ NavigationPolicyContainerBuilder builder( 28622 nullptr, nullptr, GetLastCommittedFrameNavigationEntry()); 28623 28624- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28625+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28626 } 28627 28628 // Verifies that SetFrameNavigationEntry() copies the policies during history 28629 // navigation, if any, or resets those policies when given nullptr. 28630-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28631+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28632 HistoryPoliciesForBlankUrl) { 28633 RenderFrameHostImpl* root = root_frame_host(); 28634 28635@@ -142,15 +142,15 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28636 28637 // Now that we have set up a navigation entry with non-default policies, we 28638 // can run the test itself. 28639- PolicyContainerNavigationBundle bundle( 28640+ NavigationPolicyContainerBuilder builder( 28641 nullptr, nullptr, GetLastCommittedFrameNavigationEntry()); 28642 28643- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28644+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28645 } 28646 28647 // Verifies that HistoryPolicies() returns non-null even when associated with 28648 // a non-current FrameNavigationEntry. 28649-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28650+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28651 HistoryPoliciesForNonCurentEntry) { 28652 // Navigate to a document with a network scheme. Its history entry should have 28653 // its policies initialized from the network response. 28654@@ -161,45 +161,45 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28655 network::mojom::IPAddressSpace::kLocal); 28656 28657 FrameNavigationEntry* entry = GetLastCommittedFrameNavigationEntry(); 28658- PolicyContainerNavigationBundle bundle(nullptr, nullptr, entry); 28659+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, entry); 28660 28661 // Verify the state is correct before navigating away. 28662- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28663+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28664 28665 EXPECT_TRUE(NavigateToURL(shell()->web_contents(), PublicUrl())); 28666 28667 // Now that the FrameNavigationEntry is non-current, verify that it still has 28668- // the bundle. 28669+ // the builder. 28670 EXPECT_NE(entry, GetLastCommittedFrameNavigationEntry()); 28671- PolicyContainerNavigationBundle bundle2(nullptr, nullptr, entry); 28672- EXPECT_THAT(bundle2.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28673+ NavigationPolicyContainerBuilder builder2(nullptr, nullptr, entry); 28674+ EXPECT_THAT(builder2.HistoryPolicies(), Pointee(Eq(ByRef(root_policies)))); 28675 } 28676 28677 // Verifies that CreatePolicyContainerForBlink() returns a policy container 28678-// containing a copy of the bundle's final policies. 28679-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28680+// containing a copy of the builder's final policies. 28681+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28682 CreatePolicyContainerForBlink) { 28683- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 28684- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 28685+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 28686+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 28687 28688- bundle.ComputePolicies(GURL()); 28689+ builder.ComputePolicies(GURL()); 28690 28691 // This must be called on a task runner, hence the need for this test to be 28692 // a browser test and not a simple unit test. 28693 blink::mojom::PolicyContainerPtr container = 28694- bundle.CreatePolicyContainerForBlink(); 28695+ builder.CreatePolicyContainerForBlink(); 28696 ASSERT_FALSE(container.is_null()); 28697 ASSERT_FALSE(container->policies.is_null()); 28698 28699 const blink::mojom::PolicyContainerPolicies& policies = *container->policies; 28700- EXPECT_EQ(policies.referrer_policy, bundle.FinalPolicies().referrer_policy); 28701- EXPECT_EQ(policies.ip_address_space, bundle.FinalPolicies().ip_address_space); 28702+ EXPECT_EQ(policies.referrer_policy, builder.FinalPolicies().referrer_policy); 28703+ EXPECT_EQ(policies.ip_address_space, builder.FinalPolicies().ip_address_space); 28704 } 28705 28706 // Verifies that when the URL of the document to commit is `about:blank`, and 28707 // when a navigation entry with policies is given, then the navigation 28708 // initiator's policies are ignored in favor of the policies from the entry. 28709-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28710+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28711 FinalPoliciesAboutBlankWithInitiatorAndHistory) { 28712 RenderFrameHostImpl* root = root_frame_host(); 28713 28714@@ -219,28 +219,28 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28715 base::MakeRefCounted<PolicyContainerHost>(std::move(initiator_policies)); 28716 initiator_host->AssociateWithFrameToken(token); 28717 28718- PolicyContainerNavigationBundle bundle( 28719+ NavigationPolicyContainerBuilder builder( 28720 nullptr, &token, GetLastCommittedFrameNavigationEntry()); 28721 28722- EXPECT_NE(*bundle.HistoryPolicies(), *bundle.InitiatorPolicies()); 28723+ EXPECT_NE(*builder.HistoryPolicies(), *builder.InitiatorPolicies()); 28724 28725 std::unique_ptr<PolicyContainerPolicies> history_policies = 28726- bundle.HistoryPolicies()->Clone(); 28727+ builder.HistoryPolicies()->Clone(); 28728 28729 // Deliver a Content Security Policy via `AddContentSecurityPolicy`. This 28730- // policy should not be incorporated in the final policies, since the bundle 28731+ // policy should not be incorporated in the final policies, since the builder 28732 // is using the history policies. 28733- bundle.AddContentSecurityPolicy(MakeTestCSP()); 28734+ builder.AddContentSecurityPolicy(MakeTestCSP()); 28735 28736- bundle.ComputePolicies(AboutBlankUrl()); 28737+ builder.ComputePolicies(AboutBlankUrl()); 28738 28739- EXPECT_EQ(bundle.FinalPolicies(), *history_policies); 28740+ EXPECT_EQ(builder.FinalPolicies(), *history_policies); 28741 } 28742 28743 // Verifies that when the URL of the document to commit is `about:srcdoc`, and 28744 // when a navigation entry with policies is given, then the parent's policies 28745 // are ignored in favor of the policies from the entry. 28746-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28747+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28748 FinalPoliciesAboutSrcDocWithParentAndHistory) { 28749 // First navigate to a local scheme with non-default policies. To do that, we 28750 // first navigate to a document with a public address space, then have that 28751@@ -263,26 +263,26 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28752 EXPECT_EQ(true, EvalJs(root, JsReplace(script_template, LocalUrl()))); 28753 28754 RenderFrameHostImpl* parent = root->child_at(0)->current_frame_host(); 28755- PolicyContainerNavigationBundle bundle( 28756+ NavigationPolicyContainerBuilder builder( 28757 parent, nullptr, GetLastCommittedFrameNavigationEntry()); 28758 28759- EXPECT_NE(*bundle.HistoryPolicies(), *bundle.ParentPolicies()); 28760+ EXPECT_NE(*builder.HistoryPolicies(), *builder.ParentPolicies()); 28761 28762 std::unique_ptr<PolicyContainerPolicies> history_policies = 28763- bundle.HistoryPolicies()->Clone(); 28764+ builder.HistoryPolicies()->Clone(); 28765 28766 // Deliver a Content Security Policy via `AddContentSecurityPolicy`. This 28767- // policy should not be incorporated in the final policies, since the bundle 28768+ // policy should not be incorporated in the final policies, since the builder 28769 // is using the history policies. 28770- bundle.AddContentSecurityPolicy(MakeTestCSP()); 28771+ builder.AddContentSecurityPolicy(MakeTestCSP()); 28772 28773- bundle.ComputePolicies(AboutSrcdocUrl()); 28774+ builder.ComputePolicies(AboutSrcdocUrl()); 28775 28776- EXPECT_EQ(bundle.FinalPolicies(), *history_policies); 28777+ EXPECT_EQ(builder.FinalPolicies(), *history_policies); 28778 } 28779 28780 // Verifies that history policies are ignored in the case of error pages. 28781-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28782+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28783 FinalPoliciesErrorPageWithHistory) { 28784 // First navigate to a local scheme with non-default policies. To do that, we 28785 // first navigate to a document with a public address space, then have that 28786@@ -292,18 +292,18 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28787 EXPECT_TRUE(NavigateToURL(shell()->web_contents(), PublicUrl())); 28788 EXPECT_TRUE(NavigateToURLFromRenderer(root_frame_host(), AboutBlankUrl())); 28789 28790- PolicyContainerNavigationBundle bundle( 28791+ NavigationPolicyContainerBuilder builder( 28792 nullptr, nullptr, GetLastCommittedFrameNavigationEntry()); 28793 28794- bundle.ComputePoliciesForError(); 28795+ builder.ComputePoliciesForError(); 28796 28797 // Error pages commit with default policies, ignoring the history policies. 28798- EXPECT_EQ(bundle.FinalPolicies(), PolicyContainerPolicies()); 28799+ EXPECT_EQ(builder.FinalPolicies(), PolicyContainerPolicies()); 28800 } 28801 28802 // After |ComputePolicies()| or |ComputePoliciesForError()|, the history 28803 // policies are still accessible. 28804-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28805+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28806 AccessHistoryAfterComputingPolicies) { 28807 // First navigate to a local scheme with non-default policies. To do that, we 28808 // first navigate to a document with a public address space, then have that 28809@@ -313,22 +313,22 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28810 EXPECT_TRUE(NavigateToURL(shell()->web_contents(), PublicUrl())); 28811 EXPECT_TRUE(NavigateToURLFromRenderer(root_frame_host(), AboutBlankUrl())); 28812 28813- PolicyContainerNavigationBundle bundle( 28814+ NavigationPolicyContainerBuilder builder( 28815 nullptr, nullptr, GetLastCommittedFrameNavigationEntry()); 28816 28817 std::unique_ptr<PolicyContainerPolicies> history_policies = 28818- bundle.HistoryPolicies()->Clone(); 28819+ builder.HistoryPolicies()->Clone(); 28820 28821- bundle.ComputePolicies(AboutBlankUrl()); 28822- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28823+ builder.ComputePolicies(AboutBlankUrl()); 28824+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28825 28826- bundle.ComputePoliciesForError(); 28827- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28828+ builder.ComputePoliciesForError(); 28829+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28830 } 28831 28832 // Verifies that history policies from a reused navigation entry aren't used for 28833 // non-local navigations. 28834-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28835+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28836 NoHistoryPoliciesInheritedForNonLocalUrlsOnReload) { 28837 // Navigate to some non-local url first. 28838 WebContents* tab = shell()->web_contents(); 28839@@ -353,7 +353,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28840 28841 // Verifies that history policies from a restored navigation entry are 28842 // overwritten if the policies have changed. 28843-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28844+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28845 NoHistoryPoliciesInheritedForNetworkUrlsOnBack) { 28846 DisableBackForwardCacheForTesting(shell()->web_contents(), 28847 BackForwardCache::TEST_REQUIRES_NO_CACHING); 28848@@ -396,7 +396,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28849 28850 // Verifies that the history policies are preserved on 28851 // ResetForCrossDocumentRestart. 28852-IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28853+IN_PROC_BROWSER_TEST_F(NavigationPolicyContainerBuilderBrowserTest, 28854 ResetForCrossDocumentRestartHistoryPolicies) { 28855 RenderFrameHostImpl* root = root_frame_host(); 28856 28857@@ -408,22 +408,22 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerNavigationBundleBrowserTest, 28858 EXPECT_TRUE(NavigateToURL(shell()->web_contents(), PublicUrl())); 28859 EXPECT_TRUE(NavigateToURLFromRenderer(root, AboutBlankUrl())); 28860 28861- PolicyContainerNavigationBundle bundle( 28862+ NavigationPolicyContainerBuilder builder( 28863 nullptr, nullptr, GetLastCommittedFrameNavigationEntry()); 28864 28865 std::unique_ptr<PolicyContainerPolicies> history_policies = 28866- bundle.HistoryPolicies()->Clone(); 28867+ builder.HistoryPolicies()->Clone(); 28868 28869- bundle.ComputePolicies(GURL("http://foo.test")); 28870+ builder.ComputePolicies(GURL("http://foo.test")); 28871 28872- EXPECT_EQ(bundle.FinalPolicies(), PolicyContainerPolicies()); 28873+ EXPECT_EQ(builder.FinalPolicies(), PolicyContainerPolicies()); 28874 28875- bundle.ResetForCrossDocumentRestart(); 28876- EXPECT_THAT(bundle.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28877+ builder.ResetForCrossDocumentRestart(); 28878+ EXPECT_THAT(builder.HistoryPolicies(), Pointee(Eq(ByRef(*history_policies)))); 28879 28880- bundle.ComputePolicies(AboutBlankUrl()); 28881+ builder.ComputePolicies(AboutBlankUrl()); 28882 28883- EXPECT_EQ(bundle.FinalPolicies(), *history_policies); 28884+ EXPECT_EQ(builder.FinalPolicies(), *history_policies); 28885 } 28886 28887 } // namespace 28888diff --git a/src/content/browser/renderer_host/policy_container_navigation_bundle_unittest.cc b/src/content/browser/renderer_host/navigation_policy_container_builder_unittest.cc 28889similarity index 57% 28890rename from src/content/browser/renderer_host/policy_container_navigation_bundle_unittest.cc 28891rename to src/content/browser/renderer_host/navigation_policy_container_builder_unittest.cc 28892index cef83381b4c67..479b769fc78cd 28893--- a/src/content/browser/renderer_host/policy_container_navigation_bundle_unittest.cc 28894+++ b/src/content/browser/renderer_host/navigation_policy_container_builder_unittest.cc 28895@@ -2,7 +2,7 @@ 28896 // Use of this source code is governed by a BSD-style license that can be 28897 // found in the LICENSE file. 28898 28899-#include "content/browser/renderer_host/policy_container_navigation_bundle.h" 28900+#include "content/browser/renderer_host/navigation_policy_container_builder.h" 28901 28902 #include <iosfwd> 28903 #include <utility> 28904@@ -46,7 +46,8 @@ std::unique_ptr<PolicyContainerPolicies> MakeTestPolicies() { 28905 network::mojom::ReferrerPolicy::kAlways, 28906 network::mojom::IPAddressSpace::kPublic, 28907 /*is_web_secure_context=*/true, std::move(csp_list), 28908- network::CrossOriginOpenerPolicy(), network::CrossOriginEmbedderPolicy()); 28909+ network::CrossOriginOpenerPolicy(), network::CrossOriginEmbedderPolicy(), 28910+ /*can_navigate_top_without_user_gesture=*/true); 28911 } 28912 28913 // Shorthand. 28914@@ -70,7 +71,7 @@ GURL AboutSrcdocUrl() { 28915 // 28916 // This test fixture is moderately expensive to set up (~100ms overhead per 28917 // test), but still an order of magnitude faster than browser tests. 28918-class PolicyContainerNavigationBundleTest 28919+class NavigationPolicyContainerBuilderTest 28920 : public RenderViewHostImplTestHarness { 28921 protected: 28922 void SetUp() override { 28923@@ -80,45 +81,46 @@ class PolicyContainerNavigationBundleTest 28924 }; 28925 28926 // Verifies that the initial delivered policies are default-constructed. 28927-TEST_F(PolicyContainerNavigationBundleTest, DefaultDeliveredPolicies) { 28928- EXPECT_EQ(PolicyContainerNavigationBundle(nullptr, nullptr, nullptr) 28929+TEST_F(NavigationPolicyContainerBuilderTest, DefaultDeliveredPolicies) { 28930+ EXPECT_EQ(NavigationPolicyContainerBuilder(nullptr, nullptr, nullptr) 28931 .DeliveredPoliciesForTesting(), 28932 PolicyContainerPolicies()); 28933 } 28934 28935-// Verifies that SetIPAddressSpace sets the address space in the bundle's 28936+// Verifies that SetIPAddressSpace sets the address space in the builder's 28937 // delivered policies. 28938-TEST_F(PolicyContainerNavigationBundleTest, SetIPAddressSpace) { 28939- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 28940- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 28941+TEST_F(NavigationPolicyContainerBuilderTest, SetIPAddressSpace) { 28942+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 28943+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 28944 28945 PolicyContainerPolicies expected_policies; 28946 expected_policies.ip_address_space = network::mojom::IPAddressSpace::kPublic; 28947 28948- EXPECT_EQ(bundle.DeliveredPoliciesForTesting(), expected_policies); 28949+ EXPECT_EQ(builder.DeliveredPoliciesForTesting(), expected_policies); 28950 } 28951 28952 // Verifies that SetIsOriginPotentiallyTrustworthy sets the secure context bit 28953-// in the bundle's delivered policies. 28954-TEST_F(PolicyContainerNavigationBundleTest, SetIsOriginPotentiallyTrustworthy) { 28955- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 28956- bundle.SetIsOriginPotentiallyTrustworthy(true); 28957+// in the builder's delivered policies. 28958+TEST_F(NavigationPolicyContainerBuilderTest, 28959+ SetIsOriginPotentiallyTrustworthy) { 28960+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 28961+ builder.SetIsOriginPotentiallyTrustworthy(true); 28962 28963 PolicyContainerPolicies expected_policies; 28964 expected_policies.is_web_secure_context = true; 28965 28966- EXPECT_EQ(bundle.DeliveredPoliciesForTesting(), expected_policies); 28967+ EXPECT_EQ(builder.DeliveredPoliciesForTesting(), expected_policies); 28968 28969- bundle.SetIsOriginPotentiallyTrustworthy(false); 28970+ builder.SetIsOriginPotentiallyTrustworthy(false); 28971 28972 expected_policies.is_web_secure_context = false; 28973- EXPECT_EQ(bundle.DeliveredPoliciesForTesting(), expected_policies); 28974+ EXPECT_EQ(builder.DeliveredPoliciesForTesting(), expected_policies); 28975 } 28976 28977 // Verifies that SetCrossOriginOpenerPolicy sets the cross-origin-opener-policy 28978-// in the bundle's delivered policies. 28979-TEST_F(PolicyContainerNavigationBundleTest, SetCrossOriginOpenerPolicy) { 28980- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 28981+// in the builder's delivered policies. 28982+TEST_F(NavigationPolicyContainerBuilderTest, SetCrossOriginOpenerPolicy) { 28983+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 28984 28985 network::CrossOriginOpenerPolicy coop; 28986 coop.value = network::mojom::CrossOriginOpenerPolicyValue::kSameOrigin; 28987@@ -127,140 +129,143 @@ TEST_F(PolicyContainerNavigationBundleTest, SetCrossOriginOpenerPolicy) { 28988 coop.reporting_endpoint = "A"; 28989 coop.report_only_reporting_endpoint = "B"; 28990 28991- bundle.SetCrossOriginOpenerPolicy(coop); 28992+ builder.SetCrossOriginOpenerPolicy(coop); 28993 28994 PolicyContainerPolicies expected_policies; 28995 expected_policies.cross_origin_opener_policy = coop; 28996 28997- EXPECT_EQ(bundle.DeliveredPoliciesForTesting(), expected_policies); 28998+ EXPECT_EQ(builder.DeliveredPoliciesForTesting(), expected_policies); 28999 } 29000 29001-// Verifies that the default final policies of a bundle are default-constructed, 29002-// and are equal to the policies of the bundle's policy container host. 29003-TEST_F(PolicyContainerNavigationBundleTest, DefaultFinalPolicies) { 29004- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29005- bundle.ComputePolicies(GURL()); 29006+// Verifies that the default final policies of a builder are 29007+// default-constructed, and are equal to the policies of the builder's policy 29008+// container host. 29009+TEST_F(NavigationPolicyContainerBuilderTest, DefaultFinalPolicies) { 29010+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29011+ builder.ComputePolicies(GURL()); 29012 29013 PolicyContainerPolicies expected_policies; 29014- EXPECT_EQ(bundle.FinalPolicies(), expected_policies); 29015+ EXPECT_EQ(builder.FinalPolicies(), expected_policies); 29016 29017 scoped_refptr<PolicyContainerHost> host = 29018- std::move(bundle).TakePolicyContainerHost(); 29019+ std::move(builder).TakePolicyContainerHost(); 29020 ASSERT_THAT(host, NotNull()); 29021 EXPECT_EQ(host->policies(), expected_policies); 29022 } 29023 29024 // Verifies that when the URL of the document to commit does not have a local 29025 // scheme, then the final policies are copied from the delivered policies. 29026-TEST_F(PolicyContainerNavigationBundleTest, FinalPoliciesNormalUrl) { 29027- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29028+TEST_F(NavigationPolicyContainerBuilderTest, FinalPoliciesNormalUrl) { 29029+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29030 29031- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29032- bundle.AddContentSecurityPolicy(MakeTestCSP()); 29033+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29034+ builder.AddContentSecurityPolicy(MakeTestCSP()); 29035 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29036- bundle.DeliveredPoliciesForTesting().Clone(); 29037- bundle.ComputePolicies(GURL("https://foo.test")); 29038+ builder.DeliveredPoliciesForTesting().Clone(); 29039+ builder.ComputePolicies(GURL("https://foo.test")); 29040 29041- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29042+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29043 } 29044 29045 // Verifies the final policies when the URL of the document to commit is 29046 // `about:blank` but there is no initiator. 29047-TEST_F(PolicyContainerNavigationBundleTest, 29048+TEST_F(NavigationPolicyContainerBuilderTest, 29049 FinalPoliciesAboutBlankWithoutInitiator) { 29050- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29051- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29052+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29053+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29054 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29055- bundle.DeliveredPoliciesForTesting().Clone(); 29056- bundle.ComputePolicies(AboutBlankUrl()); 29057+ builder.DeliveredPoliciesForTesting().Clone(); 29058+ builder.ComputePolicies(AboutBlankUrl()); 29059 29060- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29061+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29062 } 29063 29064 // Verifies the final policies when the URL of the document to commit is 29065 // `about:blank` but there is no initiator, and we have some additional CSPs. 29066-TEST_F(PolicyContainerNavigationBundleTest, 29067+TEST_F(NavigationPolicyContainerBuilderTest, 29068 FinalPoliciesAboutBlankWithoutInitiatorAdditionalCSP) { 29069- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29070- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29071- bundle.AddContentSecurityPolicy(MakeTestCSP()); 29072+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29073+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29074+ builder.AddContentSecurityPolicy(MakeTestCSP()); 29075 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29076- bundle.DeliveredPoliciesForTesting().Clone(); 29077- bundle.ComputePolicies(AboutBlankUrl()); 29078+ builder.DeliveredPoliciesForTesting().Clone(); 29079+ builder.ComputePolicies(AboutBlankUrl()); 29080 29081- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29082+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29083 } 29084 29085 // This test verifies the default final policies on error pages. 29086-TEST_F(PolicyContainerNavigationBundleTest, DefaultFinalPoliciesForErrorPage) { 29087- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29088+TEST_F(NavigationPolicyContainerBuilderTest, DefaultFinalPoliciesForErrorPage) { 29089+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29090 29091- bundle.ComputePoliciesForError(); 29092+ builder.ComputePoliciesForError(); 29093 29094 // Error pages commit with default policies, mostly ignoring the delivered 29095 // policies and the document's URL. 29096- EXPECT_EQ(bundle.FinalPolicies(), PolicyContainerPolicies()); 29097+ EXPECT_EQ(builder.FinalPolicies(), PolicyContainerPolicies()); 29098 } 29099 29100 // This test verifies that error pages commit in the same IP address space as 29101 // the underlying page would have, had it not failed to load. 29102-TEST_F(PolicyContainerNavigationBundleTest, ErrorPageIPAddressSpace) { 29103- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29104+TEST_F(NavigationPolicyContainerBuilderTest, ErrorPageIPAddressSpace) { 29105+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29106 29107- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29108- bundle.ComputePoliciesForError(); 29109+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPublic); 29110+ builder.ComputePoliciesForError(); 29111 29112 PolicyContainerPolicies expected_policies; 29113 expected_policies.ip_address_space = network::mojom::IPAddressSpace::kPublic; 29114- EXPECT_EQ(bundle.FinalPolicies(), expected_policies); 29115+ EXPECT_EQ(builder.FinalPolicies(), expected_policies); 29116 } 29117 29118-// Variation of: PolicyContainerNavigationBundleTest.ErrorPageIPAddressSpace 29119+// Variation of: NavigationPolicyContainerBuilderTest.ErrorPageIPAddressSpace 29120 // The decision to commit an error happens after receiving the response. 29121-TEST_F(PolicyContainerNavigationBundleTest, 29122+TEST_F(NavigationPolicyContainerBuilderTest, 29123 ErrorPageIPAddressSpaceAfterResponse) { 29124- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29125+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29126 29127- bundle.SetIPAddressSpace(network::mojom::IPAddressSpace::kPrivate); 29128+ builder.SetIPAddressSpace(network::mojom::IPAddressSpace::kPrivate); 29129 PolicyContainerPolicies expected_policies; 29130 expected_policies.ip_address_space = network::mojom::IPAddressSpace::kPrivate; 29131 29132- bundle.ComputePolicies(GURL("https://foo.test")); 29133- EXPECT_EQ(bundle.FinalPolicies(), expected_policies); 29134+ builder.ComputePolicies(GURL("https://foo.test")); 29135+ EXPECT_EQ(builder.FinalPolicies(), expected_policies); 29136 29137- bundle.ComputePoliciesForError(); 29138- EXPECT_EQ(bundle.FinalPolicies(), expected_policies); 29139+ builder.ComputePoliciesForError(); 29140+ EXPECT_EQ(builder.FinalPolicies(), expected_policies); 29141 } 29142 29143 // CSP delivered by the HTTP response are ignored for error document. 29144-TEST_F(PolicyContainerNavigationBundleTest, 29145+TEST_F(NavigationPolicyContainerBuilderTest, 29146 DeliveredCSPIgnoredForErrorDocument) { 29147- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29148- bundle.AddContentSecurityPolicy(network::mojom::ContentSecurityPolicy::New()); 29149+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29150+ builder.AddContentSecurityPolicy( 29151+ network::mojom::ContentSecurityPolicy::New()); 29152 29153- bundle.ComputePolicies(GURL("https://foo.test")); 29154- EXPECT_THAT(bundle.FinalPolicies().content_security_policies, SizeIs(1)); 29155+ builder.ComputePolicies(GURL("https://foo.test")); 29156+ EXPECT_THAT(builder.FinalPolicies().content_security_policies, SizeIs(1)); 29157 29158- bundle.ComputePoliciesForError(); 29159- EXPECT_THAT(bundle.FinalPolicies().content_security_policies, SizeIs(0)); 29160+ builder.ComputePoliciesForError(); 29161+ EXPECT_THAT(builder.FinalPolicies().content_security_policies, SizeIs(0)); 29162 } 29163 29164 // Verifies that InitiatorPolicies() returns nullptr in the absence of an 29165 // initiator frame token. 29166-TEST_F(PolicyContainerNavigationBundleTest, InitiatorPoliciesWithoutInitiator) { 29167- EXPECT_THAT(PolicyContainerNavigationBundle(nullptr, nullptr, nullptr) 29168+TEST_F(NavigationPolicyContainerBuilderTest, 29169+ InitiatorPoliciesWithoutInitiator) { 29170+ EXPECT_THAT(NavigationPolicyContainerBuilder(nullptr, nullptr, nullptr) 29171 .InitiatorPolicies(), 29172 IsNull()); 29173 } 29174 29175-// It would be nice to verify that when given a wrong token, the bundle just 29176+// It would be nice to verify that when given a wrong token, the builder just 29177 // ignores it and InitiatorPolicies() returns nullptr. However that path is 29178 // guarded by a DCHECK() so we cannot test it. 29179 29180 // Verifies that SetInitiator() copies the policies of the policy container host 29181 // associated to the given frame token, or resets those policies when given 29182 // nullptr. 29183-TEST_F(PolicyContainerNavigationBundleTest, InitiatorPoliciesWithInitiator) { 29184+TEST_F(NavigationPolicyContainerBuilderTest, InitiatorPoliciesWithInitiator) { 29185 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29186 MakeTestPolicies(); 29187 29188@@ -269,15 +274,15 @@ TEST_F(PolicyContainerNavigationBundleTest, InitiatorPoliciesWithInitiator) { 29189 29190 // Force implicit conversion from LocalFrameToken to UnguessableToken. 29191 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29192- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29193+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29194 29195- EXPECT_THAT(bundle.InitiatorPolicies(), 29196+ EXPECT_THAT(builder.InitiatorPolicies(), 29197 Pointee(Eq(ByRef(*initiator_policies)))); 29198 } 29199 29200 // Verifies that when the URL of the document to commit is `about:blank`, the 29201-// bundle's final policies are copied from the initiator. 29202-TEST_F(PolicyContainerNavigationBundleTest, 29203+// builder's final policies are copied from the initiator. 29204+TEST_F(NavigationPolicyContainerBuilderTest, 29205 FinalPoliciesAboutBlankWithInitiator) { 29206 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29207 MakeTestPolicies(); 29208@@ -287,15 +292,15 @@ TEST_F(PolicyContainerNavigationBundleTest, 29209 29210 // Force implicit conversion from LocalFrameToken to UnguessableToken. 29211 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29212- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29213- bundle.ComputePolicies(AboutBlankUrl()); 29214+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29215+ builder.ComputePolicies(AboutBlankUrl()); 29216 29217- EXPECT_EQ(bundle.FinalPolicies(), *initiator_policies); 29218+ EXPECT_EQ(builder.FinalPolicies(), *initiator_policies); 29219 } 29220 29221 // Verifies that when the URL of the document to commit is `blob:.*`, the 29222-// bundle's final policies are copied from the initiator. 29223-TEST_F(PolicyContainerNavigationBundleTest, FinalPoliciesBlobWithInitiator) { 29224+// builder's final policies are copied from the initiator. 29225+TEST_F(NavigationPolicyContainerBuilderTest, FinalPoliciesBlobWithInitiator) { 29226 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29227 MakeTestPolicies(); 29228 TestRenderFrameHost* initiator = contents()->GetMainFrame(); 29229@@ -303,18 +308,18 @@ TEST_F(PolicyContainerNavigationBundleTest, FinalPoliciesBlobWithInitiator) { 29230 29231 // Force implicit conversion from LocalFrameToken to UnguessableToken. 29232 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29233- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29234+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29235 29236- bundle.ComputePolicies( 29237+ builder.ComputePolicies( 29238 GURL("blob:https://example.com/016ece86-b7f9-4b07-88c2-a0e36b7f1dd6")); 29239 29240- EXPECT_EQ(bundle.FinalPolicies(), *initiator_policies); 29241+ EXPECT_EQ(builder.FinalPolicies(), *initiator_policies); 29242 } 29243 29244 // Verifies that when the URL of the document to commit is `about:blank`, the 29245-// bundle's final policies are copied from the initiator, and additional 29246+// builder's final policies are copied from the initiator, and additional 29247 // delivered policies are merged. 29248-TEST_F(PolicyContainerNavigationBundleTest, 29249+TEST_F(NavigationPolicyContainerBuilderTest, 29250 FinalPoliciesAboutBlankWithInitiatorAndAdditionalCSP) { 29251 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29252 MakeTestPolicies(); 29253@@ -324,91 +329,91 @@ TEST_F(PolicyContainerNavigationBundleTest, 29254 29255 // Force implicit conversion from LocalFrameToken to UnguessableToken. 29256 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29257- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29258+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29259 29260 // Add some CSP. 29261 network::mojom::ContentSecurityPolicyPtr test_csp = MakeTestCSP(); 29262- bundle.AddContentSecurityPolicy(test_csp.Clone()); 29263- bundle.ComputePolicies(AboutBlankUrl()); 29264+ builder.AddContentSecurityPolicy(test_csp.Clone()); 29265+ builder.ComputePolicies(AboutBlankUrl()); 29266 29267 // Append the CPS to the `initiator_policies` just for testing equality 29268 // later. 29269 initiator_policies->content_security_policies.push_back(std::move(test_csp)); 29270- EXPECT_EQ(bundle.FinalPolicies(), *initiator_policies); 29271+ EXPECT_EQ(builder.FinalPolicies(), *initiator_policies); 29272 } 29273 29274 // Verifies that ParentPolicies returns nullptr in the absence of a parent. 29275-TEST_F(PolicyContainerNavigationBundleTest, ParentPoliciesWithoutParent) { 29276- EXPECT_THAT(PolicyContainerNavigationBundle(nullptr, nullptr, nullptr) 29277+TEST_F(NavigationPolicyContainerBuilderTest, ParentPoliciesWithoutParent) { 29278+ EXPECT_THAT(NavigationPolicyContainerBuilder(nullptr, nullptr, nullptr) 29279 .ParentPolicies(), 29280 IsNull()); 29281 } 29282 29283 // Verifies that ParentPolicies returns a pointer to a copy of the parent's 29284 // policies. 29285-TEST_F(PolicyContainerNavigationBundleTest, ParentPoliciesWithParent) { 29286+TEST_F(NavigationPolicyContainerBuilderTest, ParentPoliciesWithParent) { 29287 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29288 29289 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29290 parent->SetPolicyContainerHost(NewHost(parent_policies->Clone())); 29291 29292- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29293+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29294 29295- EXPECT_THAT(bundle.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29296+ EXPECT_THAT(builder.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29297 } 29298 29299 // Verifies that when the the URL of the document to commit is `about:srcdoc`, 29300-// the bundle's final policies are copied from the parent. 29301-TEST_F(PolicyContainerNavigationBundleTest, 29302+// the builder's final policies are copied from the parent. 29303+TEST_F(NavigationPolicyContainerBuilderTest, 29304 FinalPoliciesAboutSrcdocWithParent) { 29305 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29306 29307 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29308 parent->SetPolicyContainerHost(NewHost(parent_policies->Clone())); 29309 29310- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29311- bundle.ComputePolicies(AboutSrcdocUrl()); 29312+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29313+ builder.ComputePolicies(AboutSrcdocUrl()); 29314 29315- EXPECT_EQ(bundle.FinalPolicies(), *parent_policies); 29316+ EXPECT_EQ(builder.FinalPolicies(), *parent_policies); 29317 } 29318 29319 // Verifies that when a document has a potentially-trustworthy origin and no 29320 // parent, then it is a secure context. 29321-TEST_F(PolicyContainerNavigationBundleTest, 29322+TEST_F(NavigationPolicyContainerBuilderTest, 29323 IsWebSecureContextTrustworthyOriginNoParent) { 29324- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29325+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29326 29327- bundle.SetIsOriginPotentiallyTrustworthy(true); 29328+ builder.SetIsOriginPotentiallyTrustworthy(true); 29329 29330 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29331- bundle.DeliveredPoliciesForTesting().Clone(); 29332+ builder.DeliveredPoliciesForTesting().Clone(); 29333 EXPECT_TRUE(delivered_policies->is_web_secure_context); 29334 29335- bundle.ComputePolicies(GURL()); 29336+ builder.ComputePolicies(GURL()); 29337 29338- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29339+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29340 } 29341 29342 // Verifies that when a document has a non-potentially-trustworthy origin and no 29343 // parent, then it is not a secure context. 29344-TEST_F(PolicyContainerNavigationBundleTest, 29345+TEST_F(NavigationPolicyContainerBuilderTest, 29346 IsWebSecureContextNonTrustworthyOriginNoParent) { 29347- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29348+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29349 29350- bundle.SetIsOriginPotentiallyTrustworthy(false); 29351+ builder.SetIsOriginPotentiallyTrustworthy(false); 29352 29353 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29354- bundle.DeliveredPoliciesForTesting().Clone(); 29355+ builder.DeliveredPoliciesForTesting().Clone(); 29356 EXPECT_FALSE(delivered_policies->is_web_secure_context); 29357 29358- bundle.ComputePolicies(GURL()); 29359+ builder.ComputePolicies(GURL()); 29360 29361- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29362+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29363 } 29364 29365 // Verifies that when a document has a potentially-trustworthy origin and a 29366 // parent that is not a secure context, then it is not a secure context. 29367-TEST_F(PolicyContainerNavigationBundleTest, 29368+TEST_F(NavigationPolicyContainerBuilderTest, 29369 IsWebSecureContextTrustworthyOriginNonSecureParent) { 29370 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29371 parent_policies->is_web_secure_context = false; 29372@@ -416,18 +421,18 @@ TEST_F(PolicyContainerNavigationBundleTest, 29373 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29374 parent->SetPolicyContainerHost(NewHost(std::move(parent_policies))); 29375 29376- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29377+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29378 29379- bundle.SetIsOriginPotentiallyTrustworthy(true); 29380+ builder.SetIsOriginPotentiallyTrustworthy(true); 29381 29382- bundle.ComputePolicies(GURL("https://foo.test")); 29383+ builder.ComputePolicies(GURL("https://foo.test")); 29384 29385- EXPECT_FALSE(bundle.FinalPolicies().is_web_secure_context); 29386+ EXPECT_FALSE(builder.FinalPolicies().is_web_secure_context); 29387 } 29388 29389 // Verifies that when a document has a non-potentially-trustworthy origin and a 29390 // parent that is a secure context, then it is not a secure context. 29391-TEST_F(PolicyContainerNavigationBundleTest, 29392+TEST_F(NavigationPolicyContainerBuilderTest, 29393 IsWebSecureContextNonTrustworthyOriginSecureParent) { 29394 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29395 parent_policies->is_web_secure_context = true; 29396@@ -435,22 +440,22 @@ TEST_F(PolicyContainerNavigationBundleTest, 29397 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29398 parent->SetPolicyContainerHost(NewHost(std::move(parent_policies))); 29399 29400- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29401+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29402 29403- bundle.SetIsOriginPotentiallyTrustworthy(false); 29404+ builder.SetIsOriginPotentiallyTrustworthy(false); 29405 29406 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29407- bundle.DeliveredPoliciesForTesting().Clone(); 29408+ builder.DeliveredPoliciesForTesting().Clone(); 29409 EXPECT_FALSE(delivered_policies->is_web_secure_context); 29410 29411- bundle.ComputePolicies(GURL("http://foo.test")); 29412+ builder.ComputePolicies(GURL("http://foo.test")); 29413 29414- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29415+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29416 } 29417 29418 // Verifies that when a document has a potentially-trustworthy origin and a 29419 // parent that is a secure context, then it is a secure context. 29420-TEST_F(PolicyContainerNavigationBundleTest, 29421+TEST_F(NavigationPolicyContainerBuilderTest, 29422 IsWebSecureContextTrustworthyOriginSecureParent) { 29423 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29424 parent_policies->is_web_secure_context = true; 29425@@ -458,61 +463,60 @@ TEST_F(PolicyContainerNavigationBundleTest, 29426 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29427 parent->SetPolicyContainerHost(NewHost(std::move(parent_policies))); 29428 29429- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29430+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29431 29432- bundle.SetIsOriginPotentiallyTrustworthy(true); 29433+ builder.SetIsOriginPotentiallyTrustworthy(true); 29434 29435 std::unique_ptr<PolicyContainerPolicies> delivered_policies = 29436- bundle.DeliveredPoliciesForTesting().Clone(); 29437+ builder.DeliveredPoliciesForTesting().Clone(); 29438 EXPECT_TRUE(delivered_policies->is_web_secure_context); 29439 29440- bundle.ComputePolicies(GURL("https://foo.test")); 29441+ builder.ComputePolicies(GURL("https://foo.test")); 29442 29443- EXPECT_EQ(bundle.FinalPolicies(), *delivered_policies); 29444+ EXPECT_EQ(builder.FinalPolicies(), *delivered_policies); 29445 } 29446 29447 // Verifies that when the the URL of the document to commit is `about:srcdoc`, 29448-// the bundle's final policies are copied from the parent, and additional 29449+// the builder's final policies are copied from the parent, and additional 29450 // delivered policies are merged. 29451-TEST_F(PolicyContainerNavigationBundleTest, 29452+TEST_F(NavigationPolicyContainerBuilderTest, 29453 FinalPoliciesAboutSrcdocWithParentAndAdditionalCSP) { 29454 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29455 29456 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29457 parent->SetPolicyContainerHost(NewHost(parent_policies->Clone())); 29458 29459- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29460+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29461 29462 // Add some CSP. 29463 network::mojom::ContentSecurityPolicyPtr test_csp = MakeTestCSP(); 29464- bundle.AddContentSecurityPolicy(test_csp.Clone()); 29465- bundle.ComputePolicies(AboutSrcdocUrl()); 29466+ builder.AddContentSecurityPolicy(test_csp.Clone()); 29467+ builder.ComputePolicies(AboutSrcdocUrl()); 29468 29469 // Append the CPS to the `parent_policies` just for testing equality 29470 // later. 29471 parent_policies->content_security_policies.push_back(std::move(test_csp)); 29472- EXPECT_EQ(bundle.FinalPolicies(), *parent_policies); 29473+ EXPECT_EQ(builder.FinalPolicies(), *parent_policies); 29474 } 29475 29476 // Calling ComputePolicies() twice triggers a DCHECK. 29477-TEST_F(PolicyContainerNavigationBundleTest, ComputePoliciesTwiceDCHECK) { 29478- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29479+TEST_F(NavigationPolicyContainerBuilderTest, ComputePoliciesTwiceDCHECK) { 29480+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29481 GURL url("https://foo.test"); 29482- bundle.ComputePolicies(url); 29483- EXPECT_DCHECK_DEATH(bundle.ComputePolicies(url)); 29484+ builder.ComputePolicies(url); 29485+ EXPECT_DCHECK_DEATH(builder.ComputePolicies(url)); 29486 } 29487 29488-// Calling ComputePolicies() followed by ComputePoliciesForError() is 29489-// supported. 29490-TEST_F(PolicyContainerNavigationBundleTest, ComputePoliciesThenError) { 29491- PolicyContainerNavigationBundle bundle(nullptr, nullptr, nullptr); 29492- bundle.ComputePolicies(GURL("https://foo.test")); 29493- bundle.ComputePoliciesForError(); 29494+// Calling ComputePolicies() followed by ComputePoliciesForError() is supported. 29495+TEST_F(NavigationPolicyContainerBuilderTest, ComputePoliciesThenError) { 29496+ NavigationPolicyContainerBuilder builder(nullptr, nullptr, nullptr); 29497+ builder.ComputePolicies(GURL("https://foo.test")); 29498+ builder.ComputePoliciesForError(); 29499 } 29500 29501-// After ComputePolicies() or ComputePoliciesForError(), the initiator 29502-// policies are still accessible. 29503-TEST_F(PolicyContainerNavigationBundleTest, 29504+// After ComputePolicies() or ComputePoliciesForError(), the initiator policies 29505+// are still accessible. 29506+TEST_F(NavigationPolicyContainerBuilderTest, 29507 AccessInitiatorAfterComputingPolicies) { 29508 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29509 MakeTestPolicies(); 29510@@ -520,60 +524,60 @@ TEST_F(PolicyContainerNavigationBundleTest, 29511 initiator->SetPolicyContainerHost(NewHost(initiator_policies->Clone())); 29512 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29513 29514- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29515- EXPECT_THAT(bundle.InitiatorPolicies(), 29516+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29517+ EXPECT_THAT(builder.InitiatorPolicies(), 29518 Pointee(Eq(ByRef(*initiator_policies)))); 29519 29520- bundle.ComputePolicies(GURL("https://foo.test")); 29521- EXPECT_THAT(bundle.InitiatorPolicies(), 29522+ builder.ComputePolicies(GURL("https://foo.test")); 29523+ EXPECT_THAT(builder.InitiatorPolicies(), 29524 Pointee(Eq(ByRef(*initiator_policies)))); 29525 29526- bundle.ComputePoliciesForError(); 29527- EXPECT_THAT(bundle.InitiatorPolicies(), 29528+ builder.ComputePoliciesForError(); 29529+ EXPECT_THAT(builder.InitiatorPolicies(), 29530 Pointee(Eq(ByRef(*initiator_policies)))); 29531 } 29532 29533 // After ComputePolicies() or ComputePoliciesForError(), the parent 29534 // policies are still accessible. 29535-TEST_F(PolicyContainerNavigationBundleTest, 29536+TEST_F(NavigationPolicyContainerBuilderTest, 29537 AccessParentAfterComputingPolicies) { 29538 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29539 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29540 parent->SetPolicyContainerHost(NewHost(parent_policies->Clone())); 29541 29542- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29543- EXPECT_THAT(bundle.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29544+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29545+ EXPECT_THAT(builder.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29546 29547- bundle.ComputePolicies(GURL("https://foo.test")); 29548- EXPECT_THAT(bundle.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29549+ builder.ComputePolicies(GURL("https://foo.test")); 29550+ EXPECT_THAT(builder.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29551 29552- bundle.ComputePoliciesForError(); 29553- EXPECT_THAT(bundle.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29554+ builder.ComputePoliciesForError(); 29555+ EXPECT_THAT(builder.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29556 } 29557 29558 // Verifies that the parent policies are preserved on 29559 // ResetForCrossDocumentRestart. 29560-TEST_F(PolicyContainerNavigationBundleTest, 29561+TEST_F(NavigationPolicyContainerBuilderTest, 29562 ResetForCrossDocumentRestartParentPolicies) { 29563 std::unique_ptr<PolicyContainerPolicies> parent_policies = MakeTestPolicies(); 29564 29565 TestRenderFrameHost* parent = contents()->GetMainFrame(); 29566 parent->SetPolicyContainerHost(NewHost(parent_policies->Clone())); 29567 29568- PolicyContainerNavigationBundle bundle(parent, nullptr, nullptr); 29569- bundle.ComputePolicies(GURL("https://foo.test")); 29570- EXPECT_EQ(bundle.FinalPolicies(), PolicyContainerPolicies()); 29571+ NavigationPolicyContainerBuilder builder(parent, nullptr, nullptr); 29572+ builder.ComputePolicies(GURL("https://foo.test")); 29573+ EXPECT_EQ(builder.FinalPolicies(), PolicyContainerPolicies()); 29574 29575- bundle.ResetForCrossDocumentRestart(); 29576- EXPECT_THAT(bundle.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29577- bundle.ComputePolicies(AboutSrcdocUrl()); 29578+ builder.ResetForCrossDocumentRestart(); 29579+ EXPECT_THAT(builder.ParentPolicies(), Pointee(Eq(ByRef(*parent_policies)))); 29580+ builder.ComputePolicies(AboutSrcdocUrl()); 29581 29582- EXPECT_EQ(bundle.FinalPolicies(), *parent_policies); 29583+ EXPECT_EQ(builder.FinalPolicies(), *parent_policies); 29584 } 29585 29586 // Verifies that the initiator policies are preserved on 29587 // ResetForCrossDocumentRestart. 29588-TEST_F(PolicyContainerNavigationBundleTest, 29589+TEST_F(NavigationPolicyContainerBuilderTest, 29590 ResetForCrossDocumentRestartInitiatorPolicies) { 29591 std::unique_ptr<PolicyContainerPolicies> initiator_policies = 29592 MakeTestPolicies(); 29593@@ -583,17 +587,17 @@ TEST_F(PolicyContainerNavigationBundleTest, 29594 29595 // Force implicit conversion from LocalFrameToken to UnguessableToken. 29596 const blink::LocalFrameToken& token = initiator->GetFrameToken(); 29597- PolicyContainerNavigationBundle bundle(nullptr, &token, nullptr); 29598+ NavigationPolicyContainerBuilder builder(nullptr, &token, nullptr); 29599 29600- bundle.ComputePolicies(GURL("https://foo.test")); 29601- EXPECT_EQ(bundle.FinalPolicies(), PolicyContainerPolicies()); 29602+ builder.ComputePolicies(GURL("https://foo.test")); 29603+ EXPECT_EQ(builder.FinalPolicies(), PolicyContainerPolicies()); 29604 29605- bundle.ResetForCrossDocumentRestart(); 29606- EXPECT_THAT(bundle.InitiatorPolicies(), 29607+ builder.ResetForCrossDocumentRestart(); 29608+ EXPECT_THAT(builder.InitiatorPolicies(), 29609 Pointee(Eq(ByRef(*initiator_policies)))); 29610- bundle.ComputePolicies(AboutBlankUrl()); 29611+ builder.ComputePolicies(AboutBlankUrl()); 29612 29613- EXPECT_EQ(bundle.FinalPolicies(), *initiator_policies); 29614+ EXPECT_EQ(builder.FinalPolicies(), *initiator_policies); 29615 } 29616 29617 } // namespace 29618diff --git a/src/content/browser/renderer_host/navigation_request.cc b/src/content/browser/renderer_host/navigation_request.cc 29619index 32c7890a69379..93dafabc7a0be 29620--- a/src/content/browser/renderer_host/navigation_request.cc 29621+++ b/src/content/browser/renderer_host/navigation_request.cc 29622@@ -230,6 +230,9 @@ NavigationURLScheme GetScheme(const GURL& url) { 29623 {url::kFtpScheme, NavigationURLScheme::FTP}, 29624 {url::kHttpScheme, NavigationURLScheme::HTTP}, 29625 {url::kHttpsScheme, NavigationURLScheme::HTTPS}, 29626+ #if BUILDFLAG(IS_OHOS) 29627+ {url::kResourcesScheme, NavigationURLScheme::FILE}, 29628+ #endif 29629 }); 29630 auto it = kSchemeMap->find(url.scheme()); 29631 if (it != kSchemeMap->end()) 29632@@ -1440,7 +1443,7 @@ NavigationRequest::NavigationRequest( 29633 initiator_document_ = initiator_rfh->GetWeakDocumentPtr(); 29634 } 29635 29636- policy_container_navigation_bundle_.emplace( 29637+ policy_container_builder_.emplace( 29638 GetParentFrame(), 29639 initiator_frame_token_.has_value() ? &*initiator_frame_token_ : nullptr, 29640 frame_entry); 29641@@ -2066,7 +2069,7 @@ void NavigationRequest::BeginNavigationImpl() { 29642 // MHTML iframe, before selecting the RenderFrameHost. 29643 const url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this); 29644 coop_status_.EnforceCOOP( 29645- policy_container_navigation_bundle_->FinalPolicies() 29646+ policy_container_builder_->FinalPolicies() 29647 .cross_origin_opener_policy, 29648 origin, net::NetworkIsolationKey(origin, origin)); 29649 29650@@ -2309,7 +2312,7 @@ void NavigationRequest::ResetForCrossDocumentRestart() { 29651 // Reset navigation handle timings. 29652 navigation_handle_timing_ = NavigationHandleTiming(); 29653 29654- policy_container_navigation_bundle_->ResetForCrossDocumentRestart(); 29655+ policy_container_builder_->ResetForCrossDocumentRestart(); 29656 } 29657 29658 void NavigationRequest::ResetStateForSiteInstanceChange() { 29659@@ -2380,21 +2383,21 @@ network::mojom::ContentSecurityPolicyPtr NavigationRequest::TakeRequiredCSP() { 29660 29661 const PolicyContainerPolicies* 29662 NavigationRequest::GetInitiatorPolicyContainerPolicies() const { 29663- return policy_container_navigation_bundle_->InitiatorPolicies(); 29664+ return policy_container_builder_->InitiatorPolicies(); 29665 } 29666 29667 const PolicyContainerPolicies& NavigationRequest::GetPolicyContainerPolicies() 29668 const { 29669 DCHECK_GE(state_, READY_TO_COMMIT); 29670 29671- return policy_container_navigation_bundle_->FinalPolicies(); 29672+ return policy_container_builder_->FinalPolicies(); 29673 } 29674 29675 blink::mojom::PolicyContainerPtr 29676 NavigationRequest::CreatePolicyContainerForBlink() { 29677 DCHECK_GE(state_, READY_TO_COMMIT); 29678 29679- return policy_container_navigation_bundle_->CreatePolicyContainerForBlink(); 29680+ return policy_container_builder_->CreatePolicyContainerForBlink(); 29681 } 29682 29683 scoped_refptr<PolicyContainerHost> 29684@@ -2402,10 +2405,10 @@ NavigationRequest::TakePolicyContainerHost() { 29685 DCHECK_GE(state_, READY_TO_COMMIT); 29686 29687 // Move the host out of the data member, then reset the member. This ensures 29688- // we do not use the bundle after we moved its contents. 29689+ // we do not use the helper after we moved its contents. 29690 scoped_refptr<PolicyContainerHost> host = 29691- std::move(*policy_container_navigation_bundle_).TakePolicyContainerHost(); 29692- policy_container_navigation_bundle_ = absl::nullopt; 29693+ std::move(*policy_container_builder_).TakePolicyContainerHost(); 29694+ policy_container_builder_ = absl::nullopt; 29695 29696 return host; 29697 } 29698@@ -2415,7 +2418,7 @@ void NavigationRequest::CreateCoepReporter( 29699 DCHECK(!isolation_info_for_subresources_.IsEmpty()); 29700 29701 const PolicyContainerPolicies& policies = 29702- policy_container_navigation_bundle_->FinalPolicies(); 29703+ policy_container_builder_->FinalPolicies(); 29704 coep_reporter_ = std::make_unique<CrossOriginEmbedderPolicyReporter>( 29705 static_cast<StoragePartitionImpl*>(storage_partition)->GetWeakPtr(), 29706 common_params_->url, 29707@@ -3086,7 +3089,7 @@ void NavigationRequest::OnResponseStarted( 29708 // OnRequestFailedInternal has destroyed the NavigationRequest. 29709 return; 29710 } 29711- policy_container_navigation_bundle_->SetCrossOriginOpenerPolicy( 29712+ policy_container_builder_->SetCrossOriginOpenerPolicy( 29713 response_head_->parsed_headers->cross_origin_opener_policy); 29714 } 29715 29716@@ -3099,7 +3102,7 @@ void NavigationRequest::OnResponseStarted( 29717 GetOriginForURLLoaderFactoryWithoutFinalFrameHost( 29718 sandbox_flags_to_commit_.value()); 29719 const PolicyContainerPolicies& policies = 29720- policy_container_navigation_bundle_->FinalPolicies(); 29721+ policy_container_builder_->FinalPolicies(); 29722 coop_status_.EnforceCOOP(policies.cross_origin_opener_policy, origin, 29723 network_isolation_key); 29724 } 29725@@ -3582,7 +3585,7 @@ void NavigationRequest::OnRequestFailedInternal( 29726 // define our own flags, preferably the strictest ones instead. 29727 ComputePoliciesToCommitForError(); 29728 29729- coop_status_.EnforceCOOP(policy_container_navigation_bundle_->FinalPolicies() 29730+ coop_status_.EnforceCOOP(policy_container_builder_->FinalPolicies() 29731 .cross_origin_opener_policy, 29732 url::Origin(), 29733 net::NetworkIsolationKey::CreateTransient()); 29734@@ -4471,7 +4474,7 @@ void NavigationRequest::CommitNavigation() { 29735 // about to go. 29736 service_worker_handle_->OnBeginNavigationCommit( 29737 render_frame_host_->GetGlobalId(), 29738- policy_container_navigation_bundle_->FinalPolicies() 29739+ policy_container_builder_->FinalPolicies() 29740 .cross_origin_embedder_policy, 29741 std::move(reporter_remote), &service_worker_container_info, 29742 commit_params_->document_ukm_source_id); 29743@@ -4493,6 +4496,27 @@ void NavigationRequest::CommitNavigation() { 29744 } 29745 } 29746 29747+ // Determine if top-level navigation is allowed without sticky user 29748+ // activation. This is used to fix the exploit in https://crbug.com/1251790. 29749+ // If a child document is cross-origin with its parent, it loses its ability 29750+ // to navigate top without user gesture. One notable exception is made if its 29751+ // parent embeds it using sandbox="allow-top-navigation". Please note this is 29752+ // quite unusual, because it means using sandbox brings new capabilities, as 29753+ // opposed to new restrictions. 29754+ using WebSandboxFlags = network::mojom::WebSandboxFlags; 29755+ const bool embedder_allows_top_navigation_explicitly = 29756+ ((commit_params_->frame_policy.sandbox_flags != WebSandboxFlags::kNone) && 29757+ (commit_params_->frame_policy.sandbox_flags & 29758+ WebSandboxFlags::kTopNavigation) == WebSandboxFlags::kNone); 29759+ const bool is_same_origin_to_top = 29760+ GetOriginToCommit() == 29761+ GetRenderFrameHost()->GetMainFrame()->GetLastCommittedOrigin(); 29762+ if (is_same_origin_to_top) { 29763+ policy_container_builder_->SetAllowTopNavigationWithoutUserGesture(true); 29764+ } else if (!IsInMainFrame() && !embedder_allows_top_navigation_explicitly) { 29765+ policy_container_builder_->SetAllowTopNavigationWithoutUserGesture(false); 29766+ } 29767+ 29768 // If this is a result of an ad auction, need to pass its ad component URLs to 29769 // the renderer. 29770 if (pending_ad_components_map_) { 29771@@ -4875,7 +4899,7 @@ net::Error NavigationRequest::CheckContentSecurityPolicy( 29772 bool has_followed_redirect, 29773 bool url_upgraded_after_redirect, 29774 bool is_response_check) { 29775- DCHECK(policy_container_navigation_bundle_.has_value()); 29776+ DCHECK(policy_container_builder_.has_value()); 29777 if (common_params_->url.SchemeIs(url::kAboutScheme)) 29778 return net::OK; 29779 29780@@ -4889,7 +4913,7 @@ net::Error NavigationRequest::CheckContentSecurityPolicy( 29781 29782 RenderFrameHostImpl* parent = frame_tree_node()->parent(); 29783 const PolicyContainerPolicies* parent_policies = 29784- policy_container_navigation_bundle_->ParentPolicies(); 29785+ policy_container_builder_->ParentPolicies(); 29786 DCHECK(!parent == !parent_policies); 29787 if (!parent && frame_tree_node()->current_frame_host()->InsidePortal() && 29788 frame_tree_node()->render_manager()->GetOuterDelegateNode()) { 29789@@ -4900,12 +4924,12 @@ net::Error NavigationRequest::CheckContentSecurityPolicy( 29790 ->GetParent(); 29791 // TODO(antoniosartori): If we want to keep checking frame-src for portals, 29792 // consider storing a snapshot of the parent policies in the 29793- // `policy_container_navigation_bundle_` at the beginning of the navigation. 29794+ // `policy_container_builder_` at the beginning of the navigation. 29795 parent_policies = &parent->policy_container_host()->policies(); 29796 } 29797 29798 const PolicyContainerPolicies* initiator_policies = 29799- policy_container_navigation_bundle_->InitiatorPolicies(); 29800+ policy_container_builder_->InitiatorPolicies(); 29801 29802 // CSP checking happens in three phases, per steps 3-5 of 29803 // https://fetch.spec.whatwg.org/#main-fetch: 29804@@ -5086,7 +5110,7 @@ NavigationRequest::CheckCSPEmbeddedEnforcement() { 29805 GetParentFrame()->GetLastCommittedOrigin(), GetURL(), allow_csp_from, 29806 required_csp_)) { 29807 // Enforce the required CSPs on the frame by passing them down to blink. 29808- policy_container_navigation_bundle_->AddContentSecurityPolicy( 29809+ policy_container_builder_->AddContentSecurityPolicy( 29810 required_csp_->Clone()); 29811 return CSPEmbeddedEnforcementResult::ALLOW_RESPONSE; 29812 } 29813@@ -5738,7 +5762,7 @@ void NavigationRequest::UpdatePrivateNetworkRequestPolicy() { 29814 } 29815 29816 const PolicyContainerPolicies& policies = 29817- policy_container_navigation_bundle_->FinalPolicies(); 29818+ policy_container_builder_->FinalPolicies(); 29819 29820 if (!policies.is_web_secure_context && 29821 base::FeatureList::IsEnabled( 29822@@ -6748,7 +6772,7 @@ NavigationRequest::ComputeCrossOriginEmbedderPolicy() { 29823 // Return whether the child's |coep| is compatible with its parent's COEP. It 29824 // also sends COEP reports if needed. 29825 bool NavigationRequest::CheckResponseAdherenceToCoep(const GURL& url) { 29826- const auto& coep = policy_container_navigation_bundle_->FinalPolicies() 29827+ const auto& coep = policy_container_builder_->FinalPolicies() 29828 .cross_origin_embedder_policy; 29829 29830 // Fenced Frames should respect the outer frame's COEP. 29831@@ -6824,7 +6848,7 @@ NavigationRequest::EnforceCOEP() { 29832 29833 bool NavigationRequest::CoopCoepSanityCheck() { 29834 const PolicyContainerPolicies& policies = 29835- policy_container_navigation_bundle_->FinalPolicies(); 29836+ policy_container_builder_->FinalPolicies(); 29837 network::mojom::CrossOriginOpenerPolicyValue coop_value = 29838 IsInMainFrame() ? policies.cross_origin_opener_policy.value 29839 : render_frame_host_->GetMainFrame() 29840@@ -6856,7 +6880,7 @@ NavigationRequest::BuildClientSecurityState() { 29841 auto client_security_state = network::mojom::ClientSecurityState::New(); 29842 29843 const PolicyContainerPolicies& policies = 29844- policy_container_navigation_bundle_->FinalPolicies(); 29845+ policy_container_builder_->FinalPolicies(); 29846 client_security_state->is_web_secure_context = policies.is_web_secure_context; 29847 client_security_state->ip_address_space = policies.ip_address_space; 29848 29849@@ -6927,7 +6951,7 @@ RenderFrameHostImpl* NavigationRequest::GetInitiatorDocumentRenderFrameHost() { 29850 29851 void NavigationRequest::RecordAddressSpaceFeature() { 29852 DCHECK(response_head_); 29853- DCHECK(policy_container_navigation_bundle_); 29854+ DCHECK(policy_container_builder_); 29855 29856 RenderFrameHostImpl* initiator_render_frame_host = 29857 GetInitiatorDocumentRenderFrameHost(); 29858@@ -6942,7 +6966,7 @@ void NavigationRequest::RecordAddressSpaceFeature() { 29859 // If there is an initiator document, then `initiator_frame_token_` should 29860 // have a value, and thus there should be initiator policies. 29861 const PolicyContainerPolicies* initiator_policies = 29862- policy_container_navigation_bundle_->InitiatorPolicies(); 29863+ policy_container_builder_->InitiatorPolicies(); 29864 DCHECK(initiator_policies); 29865 if (!initiator_policies) { 29866 base::debug::DumpWithoutCrashing(); // Just in case. 29867@@ -6982,31 +7006,31 @@ void NavigationRequest::ComputePoliciesToCommit() { 29868 29869 network::mojom::IPAddressSpace response_address_space = 29870 CalculateIPAddressSpace(url, response_head_.get()); 29871- policy_container_navigation_bundle_->SetIPAddressSpace( 29872+ policy_container_builder_->SetIPAddressSpace( 29873 response_address_space); 29874 29875 if (response_head_ && !devtools_instrumentation::ShouldBypassCSP(*this)) { 29876- policy_container_navigation_bundle_->AddContentSecurityPolicies( 29877+ policy_container_builder_->AddContentSecurityPolicies( 29878 mojo::Clone(response_head_->parsed_headers->content_security_policy)); 29879 } 29880 29881 // Use the unchecked / non-sandboxed origin to calculate potential 29882 // trustworthiness. Indeed, the potential trustworthiness check should apply 29883 // to the origin of the creation URL, prior to opaquification. 29884- policy_container_navigation_bundle_->SetIsOriginPotentiallyTrustworthy( 29885+ policy_container_builder_->SetIsOriginPotentiallyTrustworthy( 29886 network::IsOriginPotentiallyTrustworthy( 29887 GetOriginForURLLoaderFactoryUnchecked(this))); 29888 29889- policy_container_navigation_bundle_->SetCrossOriginEmbedderPolicy( 29890+ policy_container_builder_->SetCrossOriginEmbedderPolicy( 29891 ComputeCrossOriginEmbedderPolicy()); 29892 29893- policy_container_navigation_bundle_->ComputePolicies(url); 29894+ policy_container_builder_->ComputePolicies(url); 29895 29896 ComputeSandboxFlagsToCommit(); 29897 } 29898 29899 void NavigationRequest::ComputePoliciesToCommitForError() { 29900- policy_container_navigation_bundle_->ComputePoliciesForError(); 29901+ policy_container_builder_->ComputePoliciesForError(); 29902 ComputeSandboxFlagsToCommit(); 29903 } 29904 29905@@ -7021,7 +7045,7 @@ void NavigationRequest::ComputeSandboxFlagsToCommit() { 29906 29907 // The document can also restrict sandbox further, via its CSP. 29908 const PolicyContainerPolicies& policies_to_commit = 29909- policy_container_navigation_bundle_->FinalPolicies(); 29910+ policy_container_builder_->FinalPolicies(); 29911 for (const auto& csp : policies_to_commit.content_security_policies) 29912 *sandbox_flags_to_commit_ |= csp->sandbox; 29913 29914diff --git a/src/content/browser/renderer_host/navigation_request.h b/src/content/browser/renderer_host/navigation_request.h 29915index 6d3c43e17901d..2d985bc9f493a 29916--- a/src/content/browser/renderer_host/navigation_request.h 29917+++ b/src/content/browser/renderer_host/navigation_request.h 29918@@ -27,9 +27,9 @@ 29919 #include "content/browser/renderer_host/cross_origin_opener_policy_status.h" 29920 #include "content/browser/renderer_host/navigation_controller_impl.h" 29921 #include "content/browser/renderer_host/navigation_entry_impl.h" 29922+#include "content/browser/renderer_host/navigation_policy_container_builder.h" 29923 #include "content/browser/renderer_host/navigation_throttle_runner.h" 29924 #include "content/browser/renderer_host/policy_container_host.h" 29925-#include "content/browser/renderer_host/policy_container_navigation_bundle.h" 29926 #include "content/browser/renderer_host/render_frame_host_csp_context.h" 29927 #include "content/browser/renderer_host/render_frame_host_impl.h" 29928 #include "content/browser/site_instance_impl.h" 29929@@ -1851,8 +1851,7 @@ class CONTENT_EXPORT NavigationRequest 29930 const bool anonymous_; 29931 29932 // Non-nullopt from construction until |TakePolicyContainerHost()| is called. 29933- absl::optional<PolicyContainerNavigationBundle> 29934- policy_container_navigation_bundle_; 29935+ absl::optional<NavigationPolicyContainerBuilder> policy_container_builder_; 29936 29937 std::unique_ptr<CrossOriginEmbedderPolicyReporter> coep_reporter_; 29938 29939diff --git a/src/content/browser/renderer_host/policy_container_host.cc b/src/content/browser/renderer_host/policy_container_host.cc 29940index 8ff13d8531e66..82221b3a68b1c 29941--- a/src/content/browser/renderer_host/policy_container_host.cc 29942+++ b/src/content/browser/renderer_host/policy_container_host.cc 29943@@ -48,7 +48,8 @@ bool operator==(const PolicyContainerPolicies& lhs, 29944 rhs.content_security_policies.begin(), 29945 rhs.content_security_policies.end()) && 29946 lhs.cross_origin_opener_policy == rhs.cross_origin_opener_policy && 29947- lhs.cross_origin_embedder_policy == rhs.cross_origin_embedder_policy; 29948+ lhs.cross_origin_embedder_policy == rhs.cross_origin_embedder_policy && 29949+ lhs.can_navigate_top_without_user_gesture == rhs.can_navigate_top_without_user_gesture; 29950 } 29951 29952 bool operator!=(const PolicyContainerPolicies& lhs, 29953@@ -99,6 +100,9 @@ std::ostream& operator<<(std::ostream& out, 29954 .value_or("<null>") 29955 << " }"; 29956 29957+ out << ", can_navigate_top_without_user_gesture: " 29958+ << policies.can_navigate_top_without_user_gesture; 29959+ 29960 return out << " }"; 29961 } 29962 29963@@ -111,13 +115,16 @@ PolicyContainerPolicies::PolicyContainerPolicies( 29964 std::vector<network::mojom::ContentSecurityPolicyPtr> 29965 content_security_policies, 29966 const network::CrossOriginOpenerPolicy& cross_origin_opener_policy, 29967- const network::CrossOriginEmbedderPolicy& cross_origin_embedder_policy) 29968+ const network::CrossOriginEmbedderPolicy& cross_origin_embedder_policy, 29969+ bool can_navigate_top_without_user_gesture) 29970 : referrer_policy(referrer_policy), 29971 ip_address_space(ip_address_space), 29972 is_web_secure_context(is_web_secure_context), 29973 content_security_policies(std::move(content_security_policies)), 29974 cross_origin_opener_policy(cross_origin_opener_policy), 29975- cross_origin_embedder_policy(cross_origin_embedder_policy) {} 29976+ cross_origin_embedder_policy(cross_origin_embedder_policy), 29977+ can_navigate_top_without_user_gesture( 29978+ can_navigate_top_without_user_gesture) {} 29979 29980 PolicyContainerPolicies::~PolicyContainerPolicies() = default; 29981 29982@@ -126,7 +133,7 @@ std::unique_ptr<PolicyContainerPolicies> PolicyContainerPolicies::Clone() 29983 return std::make_unique<PolicyContainerPolicies>( 29984 referrer_policy, ip_address_space, is_web_secure_context, 29985 mojo::Clone(content_security_policies), cross_origin_opener_policy, 29986- cross_origin_embedder_policy); 29987+ cross_origin_embedder_policy, can_navigate_top_without_user_gesture); 29988 } 29989 29990 void PolicyContainerPolicies::AddContentSecurityPolicies( 29991@@ -206,7 +213,7 @@ PolicyContainerHost::CreatePolicyContainerForBlink() { 29992 return blink::mojom::PolicyContainer::New( 29993 blink::mojom::PolicyContainerPolicies::New( 29994 policies_->referrer_policy, policies_->ip_address_space, 29995- mojo::Clone(policies_->content_security_policies)), 29996+ mojo::Clone(policies_->content_security_policies), policies_->can_navigate_top_without_user_gesture), 29997 std::move(remote)); 29998 } 29999 30000diff --git a/src/content/browser/renderer_host/policy_container_host.h b/src/content/browser/renderer_host/policy_container_host.h 30001index c01b337b09dc4..fcd1c10e53be9 30002--- a/src/content/browser/renderer_host/policy_container_host.h 30003+++ b/src/content/browser/renderer_host/policy_container_host.h 30004@@ -32,7 +32,8 @@ struct CONTENT_EXPORT PolicyContainerPolicies { 30005 std::vector<network::mojom::ContentSecurityPolicyPtr> 30006 content_security_policies, 30007 const network::CrossOriginOpenerPolicy& cross_origin_opener_policy, 30008- const network::CrossOriginEmbedderPolicy& cross_origin_embedder_policy); 30009+ const network::CrossOriginEmbedderPolicy& cross_origin_embedder_policy, 30010+ bool can_navigate_top_without_user_gesture); 30011 PolicyContainerPolicies(const PolicyContainerPolicies&) = delete; 30012 PolicyContainerPolicies operator=(const PolicyContainerPolicies&) = delete; 30013 ~PolicyContainerPolicies(); 30014@@ -80,6 +81,14 @@ struct CONTENT_EXPORT PolicyContainerPolicies { 30015 // See: 30016 // https://html.spec.whatwg.org/multipage/origin.html#coep 30017 network::CrossOriginEmbedderPolicy cross_origin_embedder_policy; 30018+ 30019+ // Tracks if a document is allowed to navigate the top-level frame without 30020+ // sticky user activation. A document loses this ability when it is 30021+ // cross-origin with the top-level frame. An exception is made if the parent 30022+ // embeds the child with sandbox="allow-top-navigation", as opposed to not 30023+ // using sandboxing. A document that is same-origin to the top-level frame 30024+ // will always have this value set to true. 30025+ bool can_navigate_top_without_user_gesture = true; 30026 }; 30027 30028 // PolicyContainerPolicies structs are comparable for equality. 30029@@ -173,6 +182,10 @@ class CONTENT_EXPORT PolicyContainerHost 30030 policies_->cross_origin_opener_policy = policy; 30031 } 30032 30033+ void SetCanNavigateTopWithoutUserGesture(bool value) { 30034+ policies_->can_navigate_top_without_user_gesture = value; 30035+ } 30036+ 30037 // Return a PolicyContainer containing copies of the policies and a pending 30038 // mojo remote that can be used to update policies in this object. If called a 30039 // second time, it resets the receiver and creates a new PolicyContainer, 30040diff --git a/src/content/browser/renderer_host/policy_container_host_browsertest.cc b/src/content/browser/renderer_host/policy_container_host_browsertest.cc 30041index 3be044cf68b9e..387e2df8a52e1 30042--- a/src/content/browser/renderer_host/policy_container_host_browsertest.cc 30043+++ b/src/content/browser/renderer_host/policy_container_host_browsertest.cc 30044@@ -427,10 +427,13 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForMainFrame) { 30045 30046 namespace { 30047 30048-bool EqualsExceptCOOP(const PolicyContainerPolicies& lhs, 30049- const PolicyContainerPolicies& rhs) { 30050+bool EqualsExceptCOOPAndTopNavigation(const PolicyContainerPolicies& lhs, 30051+ const PolicyContainerPolicies& rhs) { 30052 std::unique_ptr<PolicyContainerPolicies> rhs_modulo_coop = rhs.Clone(); 30053 rhs_modulo_coop->cross_origin_opener_policy = lhs.cross_origin_opener_policy; 30054+ rhs_modulo_coop->can_navigate_top_without_user_gesture = 30055+ lhs.can_navigate_top_without_user_gesture; 30056+ 30057 return lhs == *rhs_modulo_coop; 30058 } 30059 30060@@ -494,7 +497,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30061 EXPECT_TRUE(WaitForLoadStop(web_contents())); 30062 30063 // The new document inherits from the navigation initiator, except for COOP. 30064- EXPECT_TRUE(EqualsExceptCOOP( 30065+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30066 *main_frame_new_policies, 30067 child->current_frame_host()->policy_container_host()->policies())); 30068 30069@@ -516,7 +519,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30070 ASSERT_TRUE(WaitForLoadStop(web_contents())); 30071 30072 // The policies have not changed. 30073- EXPECT_TRUE(EqualsExceptCOOP( 30074+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30075 *main_frame_new_policies, 30076 child->current_frame_host()->policy_container_host()->policies())); 30077 ASSERT_EQ(2, controller.GetEntryCount()); 30078@@ -542,7 +545,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30079 EXPECT_TRUE(WaitForLoadStop(web_contents())); 30080 30081 // The new document inherits from the navigation initiator. 30082- EXPECT_TRUE(EqualsExceptCOOP( 30083+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30084 *policies_a, 30085 child->current_frame_host()->policy_container_host()->policies())); 30086 30087@@ -585,7 +588,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30088 ASSERT_NE(nullptr, child); 30089 30090 // The correct referrer policy should be restored from history. 30091- EXPECT_TRUE(EqualsExceptCOOP( 30092+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30093 *policies_a, 30094 child->current_frame_host()->policy_container_host()->policies())); 30095 30096@@ -602,7 +605,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30097 EXPECT_TRUE(WaitForLoadStop(web_contents())); 30098 30099 // The correct referrer policy should be restored from history. 30100- EXPECT_TRUE(EqualsExceptCOOP( 30101+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30102 *main_frame_new_policies, 30103 child->current_frame_host()->policy_container_host()->policies())); 30104 30105@@ -616,7 +619,7 @@ IN_PROC_BROWSER_TEST_F(PolicyContainerHostBrowserTest, HistoryForChildFrame) { 30106 EXPECT_TRUE(WaitForLoadStop(web_contents())); 30107 30108 // The correct referrer policy should be restored from history. 30109- EXPECT_TRUE(EqualsExceptCOOP( 30110+ EXPECT_TRUE(EqualsExceptCOOPAndTopNavigation( 30111 *main_frame_new_policies, 30112 child->current_frame_host()->policy_container_host()->policies())); 30113 30114diff --git a/src/content/browser/renderer_host/policy_container_host_unittest.cc b/src/content/browser/renderer_host/policy_container_host_unittest.cc 30115index 125973653a0fd..55ab34798ddcd 30116--- a/src/content/browser/renderer_host/policy_container_host_unittest.cc 30117+++ b/src/content/browser/renderer_host/policy_container_host_unittest.cc 30118@@ -28,6 +28,7 @@ struct SameSizeAsPolicyContainerPolicies { 30119 content_security_policies; 30120 network::CrossOriginOpenerPolicy cross_origin_opener_policy; 30121 network::CrossOriginEmbedderPolicy cross_origin_embedder_policy; 30122+ bool can_navigate_top_without_user_gesture; 30123 }; 30124 30125 } // namespace 30126@@ -65,7 +66,8 @@ TEST(PolicyContainerPoliciesTest, CloneIsEqual) { 30127 auto policies = std::make_unique<PolicyContainerPolicies>( 30128 network::mojom::ReferrerPolicy::kAlways, 30129 network::mojom::IPAddressSpace::kUnknown, 30130- /*is_web_secure_context=*/true, std::move(csps), coop, coep); 30131+ /*is_web_secure_context=*/true, std::move(csps), coop, coep, 30132+ /*can_navigate_top_without_user_gesture=*/true); 30133 30134 EXPECT_THAT(policies->Clone(), Pointee(Eq(ByRef(*policies)))); 30135 } 30136diff --git a/src/content/browser/renderer_host/render_frame_host_impl.cc b/src/content/browser/renderer_host/render_frame_host_impl.cc 30137index 1ae8de600e612..518b6eca6e386 30138--- a/src/content/browser/renderer_host/render_frame_host_impl.cc 30139+++ b/src/content/browser/renderer_host/render_frame_host_impl.cc 30140@@ -8104,6 +8104,18 @@ void RenderFrameHostImpl::CommitNavigation( 30141 } 30142 #endif 30143 30144+#if BUILDFLAG(IS_OHOS) 30145+ if (effective_scheme == url::kResourcesScheme && !navigation_to_web_bundle) { 30146+ base::TaskPriority file_factory_priority = base::TaskPriority::USER_BLOCKING; 30147+ non_network_factories.emplace( 30148+ url::kResourcesScheme, 30149+ FileURLLoaderFactory::Create( 30150+ browser_context->GetPath(), 30151+ browser_context->GetSharedCorsOriginAccessList(), 30152+ file_factory_priority)); 30153+ } 30154+#endif 30155+ 30156 auto* partition = GetStoragePartition(); 30157 non_network_factories.emplace( 30158 url::kFileSystemScheme, 30159diff --git a/src/content/browser/renderer_host/render_frame_metadata_provider_impl.cc b/src/content/browser/renderer_host/render_frame_metadata_provider_impl.cc 30160index 61540a6eb35ad..202e3b1e0c73a 30161--- a/src/content/browser/renderer_host/render_frame_metadata_provider_impl.cc 30162+++ b/src/content/browser/renderer_host/render_frame_metadata_provider_impl.cc 30163@@ -105,11 +105,16 @@ void RenderFrameMetadataProviderImpl::OnRenderFrameMetadataChanged( 30164 for (Observer& observer : observers_) 30165 observer.OnRenderFrameMetadataChangedBeforeActivation(metadata); 30166 30167+// ohos: fix white screen when web instance over 5. 30168+#if !BUILDFLAG(IS_OHOS) 30169 if (metadata.local_surface_id != last_local_surface_id_) { 30170+#endif 30171 last_local_surface_id_ = metadata.local_surface_id; 30172 for (Observer& observer : observers_) 30173 observer.OnLocalSurfaceIdChanged(metadata); 30174+#if !BUILDFLAG(IS_OHOS) 30175 } 30176+#endif 30177 30178 if (!frame_token) 30179 return; 30180diff --git a/src/content/browser/renderer_host/render_process_host_impl.cc b/src/content/browser/renderer_host/render_process_host_impl.cc 30181index 43eaf0012cd37..ea9842d0a9c7b 30182--- a/src/content/browser/renderer_host/render_process_host_impl.cc 30183+++ b/src/content/browser/renderer_host/render_process_host_impl.cc 30184@@ -206,6 +206,11 @@ 30185 #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" 30186 #endif 30187 30188+#if BUILDFLAG(IS_OHOS) 30189+#include "content/browser/font_unique_name_lookup/font_unique_name_lookup_service.h" 30190+#include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" 30191+#endif 30192+ 30193 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 30194 #include <sys/resource.h> 30195 30196@@ -2390,7 +2395,7 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { 30197 base::BindRepeating(&hyphenation::HyphenationImpl::Create), 30198 hyphenation::HyphenationImpl::GetTaskRunner()); 30199 #endif 30200-#if BUILDFLAG(IS_ANDROID) 30201+#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_OHOS) 30202 if (base::FeatureList::IsEnabled(features::kFontSrcLocalMatching)) { 30203 registry->AddInterface( 30204 base::BindRepeating(&FontUniqueNameLookupService::Create), 30205diff --git a/src/content/browser/renderer_host/render_widget_host_impl.cc b/src/content/browser/renderer_host/render_widget_host_impl.cc 30206index 70efd8a0690b4..d2c6d4c57a626 30207--- a/src/content/browser/renderer_host/render_widget_host_impl.cc 30208+++ b/src/content/browser/renderer_host/render_widget_host_impl.cc 30209@@ -322,7 +322,11 @@ class UnboundWidgetInputHandler : public blink::mojom::WidgetInputHandler { 30210 DLOG(WARNING) << "Input request on unbound interface"; 30211 } 30212 #if BUILDFLAG(IS_OHOS) 30213- void StartFling() override { 30214+ void TryStartFling() override { 30215+ DLOG(WARNING) << "Input request on unbound interface"; 30216+ } 30217+ 30218+ void TryFinishFling() override { 30219 DLOG(WARNING) << "Input request on unbound interface"; 30220 } 30221 #endif 30222diff --git a/src/content/browser/web_contents/file_chooser_impl.cc b/src/content/browser/web_contents/file_chooser_impl.cc 30223index 991f9466ff564..5b5799c285ecf 30224--- a/src/content/browser/web_contents/file_chooser_impl.cc 30225+++ b/src/content/browser/web_contents/file_chooser_impl.cc 30226@@ -4,7 +4,10 @@ 30227 30228 #include "content/browser/web_contents/file_chooser_impl.h" 30229 30230+#include "base/files/file_util.h" 30231 #include "base/memory/ptr_util.h" 30232+#include "base/ranges/algorithm.h" 30233+#include "base/task/thread_pool.h" 30234 #include "content/browser/child_process_security_policy_impl.h" 30235 #include "content/browser/renderer_host/back_forward_cache_disable.h" 30236 #include "content/browser/renderer_host/render_frame_host_delegate.h" 30237@@ -17,6 +20,33 @@ 30238 30239 namespace content { 30240 30241+namespace { 30242+ 30243+// Removes any file that is a symlink or is inside a directory symlink. 30244+// For |kUploadFolder| mode only. |base_dir| is the folder being uploaded. 30245+std::vector<blink::mojom::FileChooserFileInfoPtr> RemoveSymlinks( 30246+ std::vector<blink::mojom::FileChooserFileInfoPtr> files, 30247+ base::FilePath base_dir) { 30248+ DCHECK(!base_dir.empty()); 30249+ auto new_end = base::ranges::remove_if( 30250+ files, 30251+ [&base_dir](const base::FilePath& file_path) { 30252+ if (base::IsLink(file_path)) 30253+ return true; 30254+ for (base::FilePath path = file_path.DirName(); base_dir.IsParent(path); 30255+ path = path.DirName()) { 30256+ if (base::IsLink(path)) 30257+ return true; 30258+ } 30259+ return false; 30260+ }, 30261+ [](const auto& file) { return file->get_native_file()->file_path; }); 30262+ files.erase(new_end, files.end()); 30263+ return files; 30264+} 30265+ 30266+} // namespace 30267+ 30268 FileChooserImpl::FileSelectListenerImpl::~FileSelectListenerImpl() { 30269 #if DCHECK_IS_ON() 30270 DCHECK(was_file_select_listener_function_called_) 30271@@ -49,8 +79,20 @@ void FileChooserImpl::FileSelectListenerImpl::FileSelected( 30272 "FileSelectListener::FileSelectionCanceled()"; 30273 was_file_select_listener_function_called_ = true; 30274 #endif 30275- if (owner_) 30276- owner_->FileSelected(std::move(files), base_dir, mode); 30277+ if (!owner_) 30278+ return; 30279+ 30280+ if (mode != blink::mojom::FileChooserParams::Mode::kUploadFolder) { 30281+ owner_->FileSelected(base_dir, mode, std::move(files)); 30282+ return; 30283+ } 30284+ 30285+ base::ThreadPool::PostTaskAndReplyWithResult( 30286+ FROM_HERE, 30287+ {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, 30288+ base::BindOnce(&RemoveSymlinks, std::move(files), base_dir), 30289+ base::BindOnce(&FileChooserImpl::FileSelected, owner_->GetWeakPtr(), 30290+ base_dir, mode)); 30291 } 30292 30293 void FileChooserImpl::FileSelectListenerImpl::FileSelectionCanceled() { 30294@@ -160,9 +202,9 @@ void FileChooserImpl::EnumerateChosenDirectory( 30295 } 30296 30297 void FileChooserImpl::FileSelected( 30298- std::vector<blink::mojom::FileChooserFileInfoPtr> files, 30299 const base::FilePath& base_dir, 30300- blink::mojom::FileChooserParams::Mode mode) { 30301+ blink::mojom::FileChooserParams::Mode mode, 30302+ std::vector<blink::mojom::FileChooserFileInfoPtr> files) { 30303 listener_impl_ = nullptr; 30304 if (!render_frame_host_) { 30305 std::move(callback_).Run(nullptr); 30306diff --git a/src/content/browser/web_contents/file_chooser_impl.h b/src/content/browser/web_contents/file_chooser_impl.h 30307index b9f11f9e6a0b5..b628b29a5f842 30308--- a/src/content/browser/web_contents/file_chooser_impl.h 30309+++ b/src/content/browser/web_contents/file_chooser_impl.h 30310@@ -37,6 +37,8 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser, 30311 30312 // FileSelectListener overrides: 30313 30314+ // TODO(xiaochengh): Move |file| to the end of the argument list to match 30315+ // the argument ordering of FileChooserImpl::FileSelected(). 30316 void FileSelected(std::vector<blink::mojom::FileChooserFileInfoPtr> files, 30317 const base::FilePath& base_dir, 30318 blink::mojom::FileChooserParams::Mode mode) override; 30319@@ -68,9 +70,9 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser, 30320 30321 ~FileChooserImpl() override; 30322 30323- void FileSelected(std::vector<blink::mojom::FileChooserFileInfoPtr> files, 30324- const base::FilePath& base_dir, 30325- blink::mojom::FileChooserParams::Mode mode); 30326+ void FileSelected(const base::FilePath& base_dir, 30327+ blink::mojom::FileChooserParams::Mode mode, 30328+ std::vector<blink::mojom::FileChooserFileInfoPtr> files); 30329 30330 void FileSelectionCanceled(); 30331 30332@@ -82,6 +84,10 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser, 30333 const base::FilePath& directory_path, 30334 EnumerateChosenDirectoryCallback callback) override; 30335 30336+ base::WeakPtr<FileChooserImpl> GetWeakPtr() { 30337+ return weak_factory_.GetWeakPtr(); 30338+ } 30339+ 30340 private: 30341 explicit FileChooserImpl(RenderFrameHostImpl* render_frame_host); 30342 30343@@ -95,6 +101,8 @@ class CONTENT_EXPORT FileChooserImpl : public blink::mojom::FileChooser, 30344 raw_ptr<RenderFrameHostImpl> render_frame_host_; 30345 scoped_refptr<FileSelectListenerImpl> listener_impl_; 30346 base::OnceCallback<void(blink::mojom::FileChooserResultPtr)> callback_; 30347+ 30348+ base::WeakPtrFactory<FileChooserImpl> weak_factory_{this}; 30349 }; 30350 30351 } // namespace content 30352diff --git a/src/content/browser/web_contents/file_chooser_impl_browsertest.cc b/src/content/browser/web_contents/file_chooser_impl_browsertest.cc 30353index ced9bfd8fe905..7753f01681c21 30354--- a/src/content/browser/web_contents/file_chooser_impl_browsertest.cc 30355+++ b/src/content/browser/web_contents/file_chooser_impl_browsertest.cc 30356@@ -5,14 +5,18 @@ 30357 #include "content/browser/web_contents/file_chooser_impl.h" 30358 30359 #include "base/bind.h" 30360+#include "base/files/file_util.h" 30361+#include "base/path_service.h" 30362 #include "base/run_loop.h" 30363 #include "content/browser/renderer_host/render_frame_host_impl.h" 30364 #include "content/public/browser/web_contents_delegate.h" 30365+#include "content/public/common/content_paths.h" 30366 #include "content/public/test/browser_test.h" 30367 #include "content/public/test/browser_test_utils.h" 30368 #include "content/public/test/content_browser_test.h" 30369 #include "content/public/test/content_browser_test_utils.h" 30370 #include "content/shell/browser/shell.h" 30371+#include "content/test/content_browser_test_utils_internal.h" 30372 #include "url/gurl.h" 30373 #include "url/url_constants.h" 30374 30375@@ -143,11 +147,93 @@ IN_PROC_BROWSER_TEST_F(FileChooserImplBrowserTest, 30376 ->SetListenerFunctionCalledTrueForTesting(); 30377 std::vector<blink::mojom::FileChooserFileInfoPtr> files; 30378 files.emplace_back(blink::mojom::FileChooserFileInfoPtr(nullptr)); 30379- chooser->FileSelected(std::move(files), base::FilePath(), 30380- blink::mojom::FileChooserParams::Mode::kOpen); 30381+ chooser->FileSelected(base::FilePath(), 30382+ blink::mojom::FileChooserParams::Mode::kOpen, 30383+ std::move(files)); 30384 30385 // Test passes if this run_loop.Run() returns instead of timing out. 30386 run_loop.Run(); 30387 } 30388 30389+// https://crbug.com/1345275 30390+IN_PROC_BROWSER_TEST_F(FileChooserImplBrowserTest, UploadFolderWithSymlink) { 30391+ EXPECT_TRUE(NavigateToURL( 30392+ shell(), GetTestUrl(".", "file_input_webkitdirectory.html"))); 30393+ 30394+ // The folder contains a regular file and a symbolic link. 30395+ // When uploading the folder, the symbolic link should be excluded. 30396+ base::FilePath dir_test_data; 30397+ ASSERT_TRUE(base::PathService::Get(DIR_TEST_DATA, &dir_test_data)); 30398+ base::FilePath folder_to_upload = 30399+ dir_test_data.AppendASCII("file_chooser").AppendASCII("dir_with_symlink"); 30400+ 30401+ base::FilePath text_file = folder_to_upload.AppendASCII("text_file.txt"); 30402+ base::FilePath symlink_file = folder_to_upload.AppendASCII("symlink"); 30403+ 30404+ // Skip the test if symbolic links are not supported. 30405+ { 30406+ base::ScopedAllowBlockingForTesting allow_blocking; 30407+ if (!base::IsLink(symlink_file)) 30408+ return; 30409+ } 30410+ 30411+ std::unique_ptr<FileChooserDelegate> delegate(new FileChooserDelegate( 30412+ {text_file, symlink_file}, folder_to_upload, base::OnceClosure())); 30413+ shell()->web_contents()->SetDelegate(delegate.get()); 30414+ EXPECT_TRUE(ExecJs(shell(), 30415+ "(async () => {" 30416+ " let listener = new Promise(" 30417+ " resolve => fileinput.onchange = resolve);" 30418+ " fileinput.click();" 30419+ " await listener;" 30420+ "})()")); 30421+ 30422+ EXPECT_EQ( 30423+ 1, EvalJs(shell(), "document.getElementById('fileinput').files.length;")); 30424+ EXPECT_EQ( 30425+ "text_file.txt", 30426+ EvalJs(shell(), "document.getElementById('fileinput').files[0].name;")); 30427+} 30428+ 30429+// https://crbug.com/1378997 30430+IN_PROC_BROWSER_TEST_F(FileChooserImplBrowserTest, UploadFolderWithDirSymlink) { 30431+ EXPECT_TRUE(NavigateToURL( 30432+ shell(), GetTestUrl(".", "file_input_webkitdirectory.html"))); 30433+ 30434+ // The folder contains a regular file and a directory symbolic link. 30435+ // When uploading the folder, the symbolic link should not be followed. 30436+ base::FilePath dir_test_data; 30437+ ASSERT_TRUE(base::PathService::Get(DIR_TEST_DATA, &dir_test_data)); 30438+ base::FilePath folder_to_upload = dir_test_data.AppendASCII("file_chooser") 30439+ .AppendASCII("dir_with_dir_symlink"); 30440+ 30441+ base::FilePath foo_file = folder_to_upload.AppendASCII("foo.txt"); 30442+ base::FilePath dir_symlink = folder_to_upload.AppendASCII("symlink"); 30443+ base::FilePath bar_file = dir_symlink.AppendASCII("bar.txt"); 30444+ 30445+ // Skip the test if symbolic links are not supported. 30446+ { 30447+ base::ScopedAllowBlockingForTesting allow_blocking; 30448+ if (!base::IsLink(dir_symlink)) 30449+ return; 30450+ } 30451+ 30452+ std::unique_ptr<FileChooserDelegate> delegate(new FileChooserDelegate( 30453+ {foo_file, bar_file}, folder_to_upload, base::OnceClosure())); 30454+ shell()->web_contents()->SetDelegate(delegate.get()); 30455+ EXPECT_TRUE(ExecJs(shell(), 30456+ "(async () => {" 30457+ " let listener = new Promise(" 30458+ " resolve => fileinput.onchange = resolve);" 30459+ " fileinput.click();" 30460+ " await listener;" 30461+ "})()")); 30462+ 30463+ EXPECT_EQ( 30464+ 1, EvalJs(shell(), "document.getElementById('fileinput').files.length;")); 30465+ EXPECT_EQ( 30466+ "foo.txt", 30467+ EvalJs(shell(), "document.getElementById('fileinput').files[0].name;")); 30468+} 30469+ 30470 } // namespace content 30471diff --git a/src/content/browser/web_contents/web_contents_impl.cc b/src/content/browser/web_contents/web_contents_impl.cc 30472index 19aa1a8ec22bf..5a153a55f3844 30473--- a/src/content/browser/web_contents/web_contents_impl.cc 30474+++ b/src/content/browser/web_contents/web_contents_impl.cc 30475@@ -3475,6 +3475,8 @@ void WebContentsImpl::FullscreenStateChanged( 30476 "render_frame_host", rfh, "is_fullscreen", 30477 is_fullscreen); 30478 30479+ GetView()->FullscreenStateChanged(is_fullscreen); 30480+ 30481 if (is_fullscreen) { 30482 if (options.is_null()) { 30483 ReceivedBadMessage(rfh->GetProcess(), 30484@@ -6736,6 +6738,7 @@ void WebContentsImpl::ShowContextMenu( 30485 "render_frame_host", render_frame_host); 30486 // If a renderer fires off a second command to show a context menu before the 30487 // first context menu is closed, just ignore it. https://crbug.com/707534 30488+ touch_insert_handle_menu_show_ = true; 30489 if (showing_context_menu_) 30490 return; 30491 30492diff --git a/src/content/browser/web_contents/web_contents_impl.h b/src/content/browser/web_contents/web_contents_impl.h 30493index a983e6f78fdc4..21e4278efe264 30494--- a/src/content/browser/web_contents/web_contents_impl.h 30495+++ b/src/content/browser/web_contents/web_contents_impl.h 30496@@ -379,6 +379,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, 30497 void PostWebMessage(std::string& message, 30498 std::vector<blink::WebMessagePort>& ports, 30499 std::string& targetUri) override; 30500+ void SetTouchInsertHandleMenuShow(bool show) override { 30501+ touch_insert_handle_menu_show_ = show; 30502+ } 30503+ bool GetTouchInsertHandleMenuShow() override { 30504+ return touch_insert_handle_menu_show_; 30505+ } 30506 #endif 30507 void UpdateTitleForEntry(NavigationEntry* entry, 30508 const std::u16string& title) override; 30509@@ -604,6 +610,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, 30510 mojo::PendingAssociatedRemote<blink::mojom::ContextMenuClient> 30511 context_menu_client, 30512 const ContextMenuParams& params) override; 30513+#if BUILDFLAG(IS_OHOS) 30514+#endif 30515 void RunJavaScriptDialog(RenderFrameHostImpl* render_frame_host, 30516 const std::u16string& message, 30517 const std::u16string& default_prompt, 30518@@ -1900,6 +1908,10 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, 30519 std::unique_ptr<WebContentsAndroid> web_contents_android_; 30520 #endif 30521 30522+#if BUILDFLAG(IS_OHOS) 30523+ bool touch_insert_handle_menu_show_ = false; 30524+#endif 30525+ 30526 // Helper classes ------------------------------------------------------------ 30527 30528 // Primary FrameTree of this WebContents instance. This WebContents might have 30529diff --git a/src/content/browser/web_contents/web_contents_view.h b/src/content/browser/web_contents/web_contents_view.h 30530index 9ba3aaa327478..f94c80329ff9c 30531--- a/src/content/browser/web_contents/web_contents_view.h 30532+++ b/src/content/browser/web_contents/web_contents_view.h 30533@@ -107,6 +107,8 @@ class CONTENT_EXPORT WebContentsView { 30534 // loop has ended. 30535 virtual bool CloseTabAfterEventTrackingIfNeeded() = 0; 30536 #endif 30537+ 30538+ virtual void FullscreenStateChanged(bool is_fullscreen) = 0; 30539 }; 30540 30541 } // namespace content 30542diff --git a/src/content/browser/web_contents/web_contents_view_android.cc b/src/content/browser/web_contents/web_contents_view_android.cc 30543index 1315f8f1430dc..a99f45761ac29 30544--- a/src/content/browser/web_contents/web_contents_view_android.cc 30545+++ b/src/content/browser/web_contents/web_contents_view_android.cc 30546@@ -262,6 +262,11 @@ void WebContentsViewAndroid::SetOverscrollControllerEnabled(bool enabled) { 30547 30548 void WebContentsViewAndroid::OnCapturerCountChanged() {} 30549 30550+void WebContentsViewAndroid::FullscreenStateChanged(bool is_fullscreen) { 30551+ if (select_popup_) 30552+ select_popup_->HideMenu(); 30553+} 30554+ 30555 void WebContentsViewAndroid::ShowContextMenu(RenderFrameHost& render_frame_host, 30556 const ContextMenuParams& params) { 30557 auto* rwhv = static_cast<RenderWidgetHostViewAndroid*>( 30558diff --git a/src/content/browser/web_contents/web_contents_view_android.h b/src/content/browser/web_contents/web_contents_view_android.h 30559index 5c50516cbd841..b9c9cf89b30f2 30560--- a/src/content/browser/web_contents/web_contents_view_android.h 30561+++ b/src/content/browser/web_contents/web_contents_view_android.h 30562@@ -83,6 +83,7 @@ class WebContentsViewAndroid : public WebContentsView, 30563 RenderViewHost* new_host) override; 30564 void SetOverscrollControllerEnabled(bool enabled) override; 30565 void OnCapturerCountChanged() override; 30566+ void FullscreenStateChanged(bool is_fullscreen) override; 30567 30568 // Backend implementation of RenderViewHostDelegateView. 30569 void ShowContextMenu(RenderFrameHost& render_frame_host, 30570diff --git a/src/content/browser/web_contents/web_contents_view_aura.cc b/src/content/browser/web_contents/web_contents_view_aura.cc 30571index fc6622cfd56a4..01a2898c7d7c2 30572--- a/src/content/browser/web_contents/web_contents_view_aura.cc 30573+++ b/src/content/browser/web_contents/web_contents_view_aura.cc 30574@@ -345,15 +345,23 @@ aura::Window* GetHostWindow(aura::Window* window) { 30575 30576 } // namespace 30577 30578+WebContentsViewAura::DropMetadata::DropMetadata( 30579+ const ui::DropTargetEvent& event) { 30580+ localized_location = event.location_f(); 30581+ root_location = event.root_location_f(); 30582+ source_operations = event.source_operations(); 30583+ flags = event.flags(); 30584+} 30585+ 30586 WebContentsViewAura::OnPerformDropContext::OnPerformDropContext( 30587 RenderWidgetHostImpl* target_rwh, 30588- const ui::DropTargetEvent& event, 30589+ DropMetadata drop_metadata, 30590 std::unique_ptr<ui::OSExchangeData> data, 30591 base::ScopedClosureRunner end_drag_runner, 30592 absl::optional<gfx::PointF> transformed_pt, 30593 gfx::PointF screen_pt) 30594 : target_rwh(target_rwh->GetWeakPtr()), 30595- event(event), 30596+ drop_metadata(drop_metadata), 30597 data(std::move(data)), 30598 end_drag_runner(std::move(end_drag_runner)), 30599 transformed_pt(std::move(transformed_pt)), 30600@@ -1089,6 +1097,8 @@ void WebContentsViewAura::OnCapturerCountChanged() { 30601 } 30602 } 30603 30604+void WebContentsViewAura::FullscreenStateChanged(bool is_fullscreen) {} 30605+ 30606 //////////////////////////////////////////////////////////////////////////////// 30607 // WebContentsViewAura, RenderViewHostDelegateView implementation: 30608 30609@@ -1331,7 +1341,7 @@ void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) { 30610 // WebContentsViewAura, aura::client::DragDropDelegate implementation: 30611 30612 void WebContentsViewAura::DragEnteredCallback( 30613- ui::DropTargetEvent event, 30614+ DropMetadata drop_metadata, 30615 std::unique_ptr<DropData> drop_data, 30616 base::WeakPtr<RenderWidgetHostViewBase> target, 30617 absl::optional<gfx::PointF> transformed_pt) { 30618@@ -1350,7 +1360,7 @@ void WebContentsViewAura::DragEnteredCallback( 30619 current_rwh_for_drag_->FilterDropData(current_drop_data_.get()); 30620 30621 blink::DragOperationsMask op_mask = 30622- ConvertToDragOperationsMask(event.source_operations()); 30623+ ConvertToDragOperationsMask(drop_metadata.source_operations); 30624 30625 WebContentsDelegate* delegate = web_contents_->GetDelegate(); 30626 30627@@ -1380,7 +1390,8 @@ void WebContentsViewAura::DragEnteredCallback( 30628 gfx::PointF screen_pt(display::Screen::GetScreen()->GetCursorScreenPoint()); 30629 current_rwh_for_drag_->DragTargetDragEnter( 30630 *current_drop_data_, transformed_pt.value(), screen_pt, op_mask, 30631- ui::EventFlagsToWebEventModifiers(event.flags()), base::DoNothing()); 30632+ ui::EventFlagsToWebEventModifiers(drop_metadata.flags), 30633+ base::DoNothing()); 30634 30635 if (drag_dest_delegate_) { 30636 drag_dest_delegate_->OnDragEnter(); 30637@@ -1404,17 +1415,18 @@ void WebContentsViewAura::OnDragEntered(const ui::DropTargetEvent& event) { 30638 drag_dest_delegate_->OnReceiveDragData(event.data()); 30639 } 30640 30641+ DropMetadata drop_metadata(event); 30642 web_contents_->GetInputEventRouter() 30643 ->GetRenderWidgetHostAtPointAsynchronously( 30644 web_contents_->GetRenderViewHost()->GetWidget()->GetView(), 30645 event.location_f(), 30646 base::BindOnce(&WebContentsViewAura::DragEnteredCallback, 30647- weak_ptr_factory_.GetWeakPtr(), event, 30648+ weak_ptr_factory_.GetWeakPtr(), drop_metadata, 30649 std::move(drop_data))); 30650 } 30651 30652 void WebContentsViewAura::DragUpdatedCallback( 30653- ui::DropTargetEvent event, 30654+ DropMetadata drop_metadata, 30655 std::unique_ptr<DropData> drop_data, 30656 base::WeakPtr<RenderWidgetHostViewBase> target, 30657 absl::optional<gfx::PointF> transformed_pt) { 30658@@ -1435,24 +1447,25 @@ void WebContentsViewAura::DragUpdatedCallback( 30659 aura::Window* root_window = GetNativeView()->GetRootWindow(); 30660 aura::client::ScreenPositionClient* screen_position_client = 30661 aura::client::GetScreenPositionClient(root_window); 30662- gfx::PointF screen_pt = event.root_location_f(); 30663+ gfx::PointF screen_pt = drop_metadata.root_location; 30664 if (screen_position_client) 30665 screen_position_client->ConvertPointToScreen(root_window, &screen_pt); 30666 30667 if (target_rwh != current_rwh_for_drag_.get()) { 30668 if (current_rwh_for_drag_) { 30669- gfx::PointF transformed_leave_point = event.location_f(); 30670+ gfx::PointF transformed_leave_point = drop_metadata.localized_location; 30671 static_cast<RenderWidgetHostViewBase*>( 30672 web_contents_->GetRenderWidgetHostView()) 30673 ->TransformPointToCoordSpaceForView( 30674- event.location_f(), 30675+ drop_metadata.localized_location, 30676 static_cast<RenderWidgetHostViewBase*>( 30677 current_rwh_for_drag_->GetView()), 30678 &transformed_leave_point); 30679 current_rwh_for_drag_->DragTargetDragLeave(transformed_leave_point, 30680 screen_pt); 30681 } 30682- DragEnteredCallback(event, std::move(drop_data), target, transformed_pt); 30683+ DragEnteredCallback(drop_metadata, std::move(drop_data), target, 30684+ transformed_pt); 30685 } 30686 30687 if (!current_drop_data_) { 30688@@ -1461,10 +1474,11 @@ void WebContentsViewAura::DragUpdatedCallback( 30689 30690 DCHECK(transformed_pt.has_value()); 30691 blink::DragOperationsMask op_mask = 30692- ConvertToDragOperationsMask(event.source_operations()); 30693+ ConvertToDragOperationsMask(drop_metadata.source_operations); 30694 target_rwh->DragTargetDragOver( 30695 transformed_pt.value(), screen_pt, op_mask, 30696- ui::EventFlagsToWebEventModifiers(event.flags()), base::DoNothing()); 30697+ ui::EventFlagsToWebEventModifiers(drop_metadata.flags), 30698+ base::DoNothing()); 30699 30700 if (drag_dest_delegate_) 30701 drag_dest_delegate_->OnDragOver(); 30702@@ -1474,7 +1488,6 @@ aura::client::DragUpdateInfo WebContentsViewAura::OnDragUpdated( 30703 const ui::DropTargetEvent& event) { 30704 if (web_contents_->ShouldIgnoreInputEvents()) 30705 return aura::client::DragUpdateInfo(); 30706- 30707 aura::client::DragUpdateInfo drag_info; 30708 auto* focused_frame = web_contents_->GetFocusedFrame(); 30709 if (focused_frame && !web_contents_->GetBrowserContext()->IsOffTheRecord()) { 30710@@ -1485,13 +1498,13 @@ aura::client::DragUpdateInfo WebContentsViewAura::OnDragUpdated( 30711 std::unique_ptr<DropData> drop_data = std::make_unique<DropData>(); 30712 // Calling this here as event.data might become invalid inside the callback. 30713 PrepareDropData(drop_data.get(), event.data()); 30714- 30715+ DropMetadata drop_metadata(event); 30716 web_contents_->GetInputEventRouter() 30717 ->GetRenderWidgetHostAtPointAsynchronously( 30718 web_contents_->GetRenderViewHost()->GetWidget()->GetView(), 30719 event.location_f(), 30720 base::BindOnce(&WebContentsViewAura::DragUpdatedCallback, 30721- weak_ptr_factory_.GetWeakPtr(), event, 30722+ weak_ptr_factory_.GetWeakPtr(), drop_metadata, 30723 std::move(drop_data))); 30724 30725 drag_info.drag_operation = static_cast<int>(current_drag_op_); 30726@@ -1526,7 +1539,7 @@ void WebContentsViewAura::CompleteDragExit() { 30727 } 30728 30729 void WebContentsViewAura::PerformDropCallback( 30730- ui::DropTargetEvent event, 30731+ DropMetadata drop_metadata, 30732 std::unique_ptr<ui::OSExchangeData> data, 30733 base::WeakPtr<RenderWidgetHostViewBase> target, 30734 absl::optional<gfx::PointF> transformed_pt) { 30735@@ -1550,13 +1563,14 @@ void WebContentsViewAura::PerformDropCallback( 30736 30737 std::unique_ptr<DropData> drop_data = std::make_unique<DropData>(); 30738 PrepareDropData(drop_data.get(), *data.get()); 30739- DragEnteredCallback(event, std::move(drop_data), target, transformed_pt); 30740+ DragEnteredCallback(drop_metadata, std::move(drop_data), target, 30741+ transformed_pt); 30742 } 30743 30744 if (!current_drop_data_) 30745 return; 30746 30747- OnPerformDropContext context(target_rwh, event, std::move(data), 30748+ OnPerformDropContext context(target_rwh, drop_metadata, std::move(data), 30749 std::move(end_drag_runner), transformed_pt, 30750 screen_pt); 30751 // |delegate_| may be null in unit tests. 30752@@ -1576,7 +1590,7 @@ void WebContentsViewAura::FinishOnPerformDropCallback( 30753 OnPerformDropContext context, 30754 WebContentsViewDelegate::DropCompletionResult result) { 30755 const int key_modifiers = 30756- ui::EventFlagsToWebEventModifiers(context.event.flags()); 30757+ ui::EventFlagsToWebEventModifiers(context.drop_metadata.flags); 30758 // This is possibly an async callback. Make sure the RWH is still valid. 30759 if (!context.target_rwh || !IsValidDragTarget(context.target_rwh.get())) 30760 return; 30761@@ -1637,8 +1651,20 @@ WebContentsViewAura::GetDropCallback(const ui::DropTargetEvent& event) { 30762 return base::DoNothing(); 30763 base::ScopedClosureRunner drag_exit(base::BindOnce( 30764 &WebContentsViewAura::CompleteDragExit, weak_ptr_factory_.GetWeakPtr())); 30765- return base::BindOnce(&WebContentsViewAura::PerformDropOrExitDrag, 30766- weak_ptr_factory_.GetWeakPtr(), std::move(drag_exit)); 30767+ DropMetadata drop_metadata(event); 30768+ // TODO(crbug.com/1293449): Remove this when DropTargetEvent is removed from 30769+ // DropCallback. 30770+ return base::BindOnce( 30771+ [](base::WeakPtr<WebContentsViewAura> web_contents, 30772+ base::ScopedClosureRunner exit_drag, DropMetadata drop_metadata, 30773+ const ui::DropTargetEvent&, std::unique_ptr<ui::OSExchangeData> data, 30774+ ui::mojom::DragOperation& output_drag_op) { 30775+ if (!web_contents) 30776+ return; 30777+ web_contents->PerformDropOrExitDrag(std::move(exit_drag), drop_metadata, 30778+ std::move(data), output_drag_op); 30779+ }, 30780+ weak_ptr_factory_.GetWeakPtr(), std::move(drag_exit), drop_metadata); 30781 } 30782 30783 void WebContentsViewAura::CompleteDrop(RenderWidgetHostImpl* target_rwh, 30784@@ -1662,15 +1688,15 @@ void WebContentsViewAura::CompleteDrop(RenderWidgetHostImpl* target_rwh, 30785 30786 void WebContentsViewAura::PerformDropOrExitDrag( 30787 base::ScopedClosureRunner exit_drag, 30788- const ui::DropTargetEvent& event, 30789+ DropMetadata drop_metadata, 30790 std::unique_ptr<ui::OSExchangeData> data, 30791 ui::mojom::DragOperation& output_drag_op) { 30792 web_contents_->GetInputEventRouter() 30793 ->GetRenderWidgetHostAtPointAsynchronously( 30794 web_contents_->GetRenderViewHost()->GetWidget()->GetView(), 30795- event.location_f(), 30796+ drop_metadata.localized_location, 30797 base::BindOnce(&WebContentsViewAura::PerformDropCallback, 30798- weak_ptr_factory_.GetWeakPtr(), event, 30799+ weak_ptr_factory_.GetWeakPtr(), drop_metadata, 30800 std::move(data))); 30801 output_drag_op = current_drag_op_; 30802 exit_drag.ReplaceClosure(base::DoNothing()); 30803diff --git a/src/content/browser/web_contents/web_contents_view_aura.h b/src/content/browser/web_contents/web_contents_view_aura.h 30804index 56b44055eff92..8567c63f49815 30805--- a/src/content/browser/web_contents/web_contents_view_aura.h 30806+++ b/src/content/browser/web_contents/web_contents_view_aura.h 30807@@ -75,12 +75,30 @@ class CONTENT_EXPORT WebContentsViewAura 30808 RenderWidgetHostViewCreateFunction create_render_widget_host_view); 30809 30810 private: 30811+ // Just the metadata from DropTargetEvent that's safe and cheap to copy to 30812+ // help locate drop events in the callback. 30813+ struct DropMetadata { 30814+ explicit DropMetadata(const ui::DropTargetEvent& event); 30815+ 30816+ // Location local to WebContentsViewAura. 30817+ gfx::PointF localized_location; 30818+ 30819+ // Root location of the drop target event. 30820+ gfx::PointF root_location; 30821+ 30822+ // The supported DnD operation of the source. A bitmask of 30823+ // ui::mojom::DragOperations. 30824+ int source_operations; 30825+ // Flags from ui::Event. Usually represents modifier keys used at drop time. 30826+ int flags; 30827+ }; 30828+ 30829 // A structure used to keep drop context for asynchronously finishing a 30830 // drop operation. This is required because some drop event data gets 30831 // cleared out once PerformDropCallback() returns. 30832 struct CONTENT_EXPORT OnPerformDropContext { 30833 OnPerformDropContext(RenderWidgetHostImpl* target_rwh, 30834- const ui::DropTargetEvent& event, 30835+ DropMetadata drop_metadata, 30836 std::unique_ptr<ui::OSExchangeData> data, 30837 base::ScopedClosureRunner end_drag_runner, 30838 absl::optional<gfx::PointF> transformed_pt, 30839@@ -89,7 +107,7 @@ class CONTENT_EXPORT WebContentsViewAura 30840 ~OnPerformDropContext(); 30841 30842 base::WeakPtr<RenderWidgetHostImpl> target_rwh; 30843- ui::DropTargetEvent event; 30844+ DropMetadata drop_metadata; 30845 std::unique_ptr<ui::OSExchangeData> data; 30846 base::ScopedClosureRunner end_drag_runner; 30847 absl::optional<gfx::PointF> transformed_pt; 30848@@ -180,6 +198,7 @@ class CONTENT_EXPORT WebContentsViewAura 30849 RenderViewHost* new_host) override; 30850 void SetOverscrollControllerEnabled(bool enabled) override; 30851 void OnCapturerCountChanged() override; 30852+ void FullscreenStateChanged(bool is_fullscreen) override; 30853 30854 // Overridden from RenderViewHostDelegateView: 30855 void ShowContextMenu(RenderFrameHost& render_frame_host, 30856@@ -245,15 +264,15 @@ class CONTENT_EXPORT WebContentsViewAura 30857 aura::client::DragDropDelegate::DropCallback GetDropCallback( 30858 const ui::DropTargetEvent& event) override; 30859 30860- void DragEnteredCallback(ui::DropTargetEvent event, 30861+ void DragEnteredCallback(DropMetadata flags, 30862 std::unique_ptr<DropData> drop_data, 30863 base::WeakPtr<RenderWidgetHostViewBase> target, 30864 absl::optional<gfx::PointF> transformed_pt); 30865- void DragUpdatedCallback(ui::DropTargetEvent event, 30866+ void DragUpdatedCallback(DropMetadata drop_metadata, 30867 std::unique_ptr<DropData> drop_data, 30868 base::WeakPtr<RenderWidgetHostViewBase> target, 30869 absl::optional<gfx::PointF> transformed_pt); 30870- void PerformDropCallback(ui::DropTargetEvent event, 30871+ void PerformDropCallback(DropMetadata drop_metadata, 30872 std::unique_ptr<ui::OSExchangeData> data, 30873 base::WeakPtr<RenderWidgetHostViewBase> target, 30874 absl::optional<gfx::PointF> transformed_pt); 30875@@ -277,7 +296,7 @@ class CONTENT_EXPORT WebContentsViewAura 30876 // Performs drop if it's run. Otherwise, it exits the drag. Returned by 30877 // GetDropCallback. 30878 void PerformDropOrExitDrag(base::ScopedClosureRunner exit_drag, 30879- const ui::DropTargetEvent& event, 30880+ DropMetadata drop_metadata, 30881 std::unique_ptr<ui::OSExchangeData> data, 30882 ui::mojom::DragOperation& output_drag_op); 30883 30884diff --git a/src/content/browser/web_contents/web_contents_view_child_frame.cc b/src/content/browser/web_contents/web_contents_view_child_frame.cc 30885index 398cf2bc3c7e7..213a9b46168a9 30886--- a/src/content/browser/web_contents/web_contents_view_child_frame.cc 30887+++ b/src/content/browser/web_contents/web_contents_view_child_frame.cc 30888@@ -110,6 +110,8 @@ bool WebContentsViewChildFrame::CloseTabAfterEventTrackingIfNeeded() { 30889 30890 void WebContentsViewChildFrame::OnCapturerCountChanged() {} 30891 30892+void WebContentsViewChildFrame::FullscreenStateChanged(bool is_fullscreen) {} 30893+ 30894 void WebContentsViewChildFrame::RestoreFocus() { 30895 NOTREACHED(); 30896 } 30897diff --git a/src/content/browser/web_contents/web_contents_view_child_frame.h b/src/content/browser/web_contents/web_contents_view_child_frame.h 30898index c9409f457f993..9e72bfe110176 30899--- a/src/content/browser/web_contents/web_contents_view_child_frame.h 30900+++ b/src/content/browser/web_contents/web_contents_view_child_frame.h 30901@@ -56,6 +56,7 @@ class WebContentsViewChildFrame : public WebContentsView, 30902 bool CloseTabAfterEventTrackingIfNeeded() override; 30903 #endif 30904 void OnCapturerCountChanged() override; 30905+ void FullscreenStateChanged(bool is_fullscreen) override; 30906 30907 // Backend implementation of RenderViewHostDelegateView. 30908 void ShowContextMenu(RenderFrameHost& render_frame_host, 30909diff --git a/src/content/browser/web_contents/web_contents_view_mac.h b/src/content/browser/web_contents/web_contents_view_mac.h 30910index 660632b0bab94..755bc41fd5c53 30911--- a/src/content/browser/web_contents/web_contents_view_mac.h 30912+++ b/src/content/browser/web_contents/web_contents_view_mac.h 30913@@ -88,6 +88,7 @@ class WebContentsViewMac : public WebContentsView, 30914 void SetOverscrollControllerEnabled(bool enabled) override; 30915 bool CloseTabAfterEventTrackingIfNeeded() override; 30916 void OnCapturerCountChanged() override; 30917+ void FullscreenStateChanged(bool is_fullscreen) override; 30918 30919 // RenderViewHostDelegateView: 30920 void StartDragging(const DropData& drop_data, 30921diff --git a/src/content/browser/web_contents/web_contents_view_mac.mm b/src/content/browser/web_contents/web_contents_view_mac.mm 30922index 333032b082f09..8a66cb8773113 30923--- a/src/content/browser/web_contents/web_contents_view_mac.mm 30924+++ b/src/content/browser/web_contents/web_contents_view_mac.mm 30925@@ -140,6 +140,8 @@ gfx::Rect WebContentsViewMac::GetContainerBounds() const { 30926 30927 void WebContentsViewMac::OnCapturerCountChanged() {} 30928 30929+void WebContentsViewMac::FullscreenStateChanged(bool is_fullscreen) {} 30930+ 30931 void WebContentsViewMac::StartDragging( 30932 const DropData& drop_data, 30933 DragOperationsMask allowed_operations, 30934diff --git a/src/content/browser/worker_host/worker_script_fetcher.cc b/src/content/browser/worker_host/worker_script_fetcher.cc 30935index 0343d9f22ee47..736d41fe15cfc 30936--- a/src/content/browser/worker_host/worker_script_fetcher.cc 30937+++ b/src/content/browser/worker_host/worker_script_fetcher.cc 30938@@ -522,6 +522,16 @@ WorkerScriptFetcher::CreateFactoryBundle( 30939 file_factory_priority)); 30940 } 30941 30942+#if BUILDFLAG(IS_OHOS) 30943+ base::TaskPriority resources_factory_priority = base::TaskPriority::USER_VISIBLE; 30944+ non_network_factories.emplace( 30945+ url::kResourcesScheme, FileURLLoaderFactory::Create( 30946+ storage_partition->browser_context()->GetPath(), 30947+ storage_partition->browser_context() 30948+ ->GetSharedCorsOriginAccessList(), 30949+ resources_factory_priority)); 30950+#endif 30951+ 30952 switch (loader_type) { 30953 case LoaderType::kMainResource: 30954 GetContentClient() 30955diff --git a/src/content/common/url_schemes.cc b/src/content/common/url_schemes.cc 30956index e59440185a5fe..aab0ccd297cb6 30957--- a/src/content/common/url_schemes.cc 30958+++ b/src/content/common/url_schemes.cc 30959@@ -29,7 +29,12 @@ const char* const kDefaultSavableSchemes[] = { 30960 url::kFileSystemScheme, 30961 kChromeDevToolsScheme, 30962 kChromeUIScheme, 30963+#if BUILDFLAG(IS_OHOS) 30964+ url::kDataScheme, 30965+ url::kResourcesScheme 30966+#else 30967 url::kDataScheme 30968+#endif 30969 }; 30970 30971 // These lists are lazily initialized below and are leaked on shutdown to 30972diff --git a/src/content/public/browser/web_contents.h b/src/content/public/browser/web_contents.h 30973index 0bbac07fad970..2ac5c5b0f7a80 30974--- a/src/content/public/browser/web_contents.h 30975+++ b/src/content/public/browser/web_contents.h 30976@@ -595,6 +595,11 @@ class WebContents : public PageNavigator, 30977 std::string& targetUri) = 0; 30978 #endif 30979 30980+#if BUILDFLAG(IS_OHOS) 30981+ virtual void SetTouchInsertHandleMenuShow(bool show) = 0; 30982+ virtual bool GetTouchInsertHandleMenuShow() = 0; 30983+#endif 30984+ 30985 // Saves the given title to the navigation entry and does associated work. It 30986 // will update history and the view with the new title, and also synthesize 30987 // titles for file URLs that have none. Thus |entry| must have a URL set. 30988diff --git a/src/content/public/common/content_switches.cc b/src/content/public/common/content_switches.cc 30989index d06e11873b6d2..4ff10e78b5921 30990--- a/src/content/public/common/content_switches.cc 30991+++ b/src/content/public/common/content_switches.cc 30992@@ -999,9 +999,11 @@ const char kEnableSpeechDispatcher[] = "enable-speech-dispatcher"; 30993 #endif 30994 30995 #if BUILDFLAG(IS_OHOS) 30996+const char kOhosHapPath[] = "user-hap-path"; 30997 const char kEnableMultiRendererProcess[] = "enable-multi-renderer-process"; 30998 const char kForBrowser[] = "for-browser"; 30999 const char kOhosCustomScheme[] = "ohos-custom-scheme"; 31000+const char kOhosHanceSurface[] = "ohos-enhance-surface"; 31001 #endif 31002 31003 #if BUILDFLAG(IS_WIN) 31004diff --git a/src/content/public/common/content_switches.h b/src/content/public/common/content_switches.h 31005index b05070fcf048c..786c839ecbf75 31006--- a/src/content/public/common/content_switches.h 31007+++ b/src/content/public/common/content_switches.h 31008@@ -277,9 +277,11 @@ CONTENT_EXPORT extern const char kEnableSpeechDispatcher[]; 31009 #endif 31010 31011 #if BUILDFLAG(IS_OHOS) 31012+CONTENT_EXPORT extern const char kOhosHapPath[]; 31013 CONTENT_EXPORT extern const char kEnableMultiRendererProcess[]; 31014 CONTENT_EXPORT extern const char kForBrowser[]; 31015 CONTENT_EXPORT extern const char kOhosCustomScheme[]; 31016+CONTENT_EXPORT extern const char kOhosHanceSurface[]; 31017 #endif 31018 31019 #if BUILDFLAG(IS_WIN) 31020diff --git a/src/content/shell/browser/shell_content_browser_client.cc b/src/content/shell/browser/shell_content_browser_client.cc 31021index d4aa790bcccbb..1bf23d38bae56 31022--- a/src/content/shell/browser/shell_content_browser_client.cc 31023+++ b/src/content/shell/browser/shell_content_browser_client.cc 31024@@ -267,6 +267,9 @@ bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { 31025 url::kWssScheme, url::kBlobScheme, url::kFileSystemScheme, 31026 kChromeUIScheme, kChromeUIUntrustedScheme, kChromeDevToolsScheme, 31027 url::kDataScheme, url::kFileScheme, 31028+ #if BUILDFLAG(IS_OHOS) 31029+ url::kResourcesScheme, 31030+ #endif 31031 }; 31032 for (const char* supported_protocol : kProtocolList) { 31033 if (url.scheme_piece() == supported_protocol) 31034diff --git a/src/content/test/BUILD.gn b/src/content/test/BUILD.gn 31035index 690b5f2ff8b9b..1775205b66f9d 31036--- a/src/content/test/BUILD.gn 31037+++ b/src/content/test/BUILD.gn 31038@@ -1251,13 +1251,13 @@ test("content_browsertests") { 31039 "../browser/renderer_host/media/video_capture_browsertest.cc", 31040 "../browser/renderer_host/navigation_controller_impl_browsertest.cc", 31041 "../browser/renderer_host/navigation_handle_user_data_browsertest.cc", 31042+ "../browser/renderer_host/navigation_policy_container_builder_browsertest.cc", 31043 "../browser/renderer_host/navigation_request_browsertest.cc", 31044 "../browser/renderer_host/origin_agent_cluster_browsertest.cc", 31045 "../browser/renderer_host/page_impl_browsertest.cc", 31046 "../browser/renderer_host/page_lifecycle_state_manager_browsertest.cc", 31047 "../browser/renderer_host/panel_rotation_browsertest.cc", 31048 "../browser/renderer_host/policy_container_host_browsertest.cc", 31049- "../browser/renderer_host/policy_container_navigation_bundle_browsertest.cc", 31050 "../browser/renderer_host/private_network_access_browsertest.cc", 31051 "../browser/renderer_host/render_document_host_browsertest.cc", 31052 "../browser/renderer_host/render_frame_host_impl_browsertest.cc", 31053@@ -2181,13 +2181,13 @@ test("content_unittests") { 31054 "../browser/renderer_host/mixed_content_navigation_throttle_unittest.cc", 31055 "../browser/renderer_host/navigation_controller_impl_unittest.cc", 31056 "../browser/renderer_host/navigation_entry_impl_unittest.cc", 31057+ "../browser/renderer_host/navigation_policy_container_builder_unittest.cc", 31058 "../browser/renderer_host/navigation_request_unittest.cc", 31059 "../browser/renderer_host/navigation_throttle_runner_unittest.cc", 31060 "../browser/renderer_host/navigator_unittest.cc", 31061 "../browser/renderer_host/origin_policy_throttle_unittest.cc", 31062 "../browser/renderer_host/overscroll_controller_unittest.cc", 31063 "../browser/renderer_host/policy_container_host_unittest.cc", 31064- "../browser/renderer_host/policy_container_navigation_bundle_unittest.cc", 31065 "../browser/renderer_host/recently_destroyed_hosts_unittest.cc", 31066 "../browser/renderer_host/render_frame_host_impl_unittest.cc", 31067 "../browser/renderer_host/render_frame_host_manager_unittest.cc", 31068diff --git a/src/content/test/content_browser_test_utils_internal.cc b/src/content/test/content_browser_test_utils_internal.cc 31069index 0051e21d4a4ff..2b7a97fd3c006 31070--- a/src/content/test/content_browser_test_utils_internal.cc 31071+++ b/src/content/test/content_browser_test_utils_internal.cc 31072@@ -447,9 +447,18 @@ Shell* OpenPopup(const ToRenderFrameHost& opener, 31073 return new_shell_observer.GetShell(); 31074 } 31075 31076+FileChooserDelegate::FileChooserDelegate(std::vector<base::FilePath> files, 31077+ const base::FilePath& base_dir, 31078+ base::OnceClosure callback) 31079+ : files_(std::move(files)), 31080+ base_dir_(base_dir), 31081+ callback_(std::move(callback)) {} 31082+ 31083 FileChooserDelegate::FileChooserDelegate(const base::FilePath& file, 31084 base::OnceClosure callback) 31085- : file_(file), callback_(std::move(callback)) {} 31086+ : FileChooserDelegate(std::vector<base::FilePath>(1, file), 31087+ base::FilePath(), 31088+ std::move(callback)) {} 31089 31090 FileChooserDelegate::~FileChooserDelegate() = default; 31091 31092@@ -457,16 +466,21 @@ void FileChooserDelegate::RunFileChooser( 31093 RenderFrameHost* render_frame_host, 31094 scoped_refptr<content::FileSelectListener> listener, 31095 const blink::mojom::FileChooserParams& params) { 31096- // Send the selected file to the renderer process. 31097- auto file_info = blink::mojom::FileChooserFileInfo::NewNativeFile( 31098- blink::mojom::NativeFileInfo::New(file_, std::u16string())); 31099+ // |base_dir_| should be set for and only for |kUploadFolder| mode. 31100+ DCHECK(base_dir_.empty() == 31101+ (params.mode != blink::mojom::FileChooserParams::Mode::kUploadFolder)); 31102+ // Send the selected files to the renderer process. 31103 std::vector<blink::mojom::FileChooserFileInfoPtr> files; 31104- files.push_back(std::move(file_info)); 31105- listener->FileSelected(std::move(files), base::FilePath(), 31106- blink::mojom::FileChooserParams::Mode::kOpen); 31107+ for (const auto& file : files_) { 31108+ auto file_info = blink::mojom::FileChooserFileInfo::NewNativeFile( 31109+ blink::mojom::NativeFileInfo::New(file, std::u16string())); 31110+ files.push_back(std::move(file_info)); 31111+ } 31112+ listener->FileSelected(std::move(files), base_dir_, params.mode); 31113 31114 params_ = params.Clone(); 31115- std::move(callback_).Run(); 31116+ if (callback_) 31117+ std::move(callback_).Run(); 31118 } 31119 31120 FrameTestNavigationManager::FrameTestNavigationManager( 31121diff --git a/src/content/test/content_browser_test_utils_internal.h b/src/content/test/content_browser_test_utils_internal.h 31122index 73be6e8a2f458..bff69b028af40 31123--- a/src/content/test/content_browser_test_utils_internal.h 31124+++ b/src/content/test/content_browser_test_utils_internal.h 31125@@ -176,9 +176,14 @@ Shell* OpenPopup(const ToRenderFrameHost& opener, 31126 class FileChooserDelegate : public WebContentsDelegate { 31127 public: 31128 // Constructs a WebContentsDelegate that mocks a file dialog. 31129- // The mocked file dialog will always reply that the user selected |file|. 31130- // |callback| is invoked when RunFileChooser() is called. 31131+ // The mocked file dialog will always reply that the user selected |file| or 31132+ // |files|. |callback| is invoked when RunFileChooser() is called. 31133 FileChooserDelegate(const base::FilePath& file, base::OnceClosure callback); 31134+ // |base_dir| must be set to the folder being uploaded in |kUploadFolder| 31135+ // mode, and must be empty in all other modes. 31136+ FileChooserDelegate(std::vector<base::FilePath> files, 31137+ const base::FilePath& base_dir, 31138+ base::OnceClosure callback); 31139 ~FileChooserDelegate() override; 31140 31141 // Implementation of WebContentsDelegate::RunFileChooser. 31142@@ -190,7 +195,8 @@ class FileChooserDelegate : public WebContentsDelegate { 31143 const blink::mojom::FileChooserParams& params() const { return *params_; } 31144 31145 private: 31146- base::FilePath file_; 31147+ std::vector<base::FilePath> files_; 31148+ const base::FilePath base_dir_; 31149 base::OnceClosure callback_; 31150 blink::mojom::FileChooserParamsPtr params_; 31151 }; 31152diff --git a/src/content/test/data/file_chooser/dir_with_dir_symlink/foo.txt b/src/content/test/data/file_chooser/dir_with_dir_symlink/foo.txt 31153new file mode 100644 31154index 0000000000000..257cc5642cb1a 31155--- /dev/null 31156+++ b/src/content/test/data/file_chooser/dir_with_dir_symlink/foo.txt 31157@@ -0,0 +1 @@ 31158+foo 31159diff --git a/src/content/test/data/file_chooser/dir_with_dir_symlink/symlink b/src/content/test/data/file_chooser/dir_with_dir_symlink/symlink 31160new file mode 100644 31161index 0000000000000..10f6d1ab9ba9e 31162--- /dev/null 31163+++ b/src/content/test/data/file_chooser/dir_with_dir_symlink/symlink 31164@@ -0,0 +1 @@ 31165+../linked_dir/ 31166\ No newline at end of file 31167diff --git a/src/content/test/data/file_chooser/dir_with_symlink/symlink b/src/content/test/data/file_chooser/dir_with_symlink/symlink 31168new file mode 120000 31169index 0000000000000..7857c689f7043 31170--- /dev/null 31171+++ b/src/content/test/data/file_chooser/dir_with_symlink/symlink 31172@@ -0,0 +1 @@ 31173+../linked_text_file.txt 31174\ No newline at end of file 31175diff --git a/src/content/test/data/file_chooser/dir_with_symlink/text_file.txt b/src/content/test/data/file_chooser/dir_with_symlink/text_file.txt 31176new file mode 100644 31177index 0000000000000..8e27be7d6154a 31178--- /dev/null 31179+++ b/src/content/test/data/file_chooser/dir_with_symlink/text_file.txt 31180@@ -0,0 +1 @@ 31181+text 31182diff --git a/src/content/test/data/file_chooser/linked_dir/bar.txt b/src/content/test/data/file_chooser/linked_dir/bar.txt 31183new file mode 100644 31184index 0000000000000..5716ca5987cbf 31185--- /dev/null 31186+++ b/src/content/test/data/file_chooser/linked_dir/bar.txt 31187@@ -0,0 +1 @@ 31188+bar 31189diff --git a/src/content/test/data/file_chooser/linked_text_file.txt b/src/content/test/data/file_chooser/linked_text_file.txt 31190new file mode 100644 31191index 0000000000000..9a1f4bc60917c 31192--- /dev/null 31193+++ b/src/content/test/data/file_chooser/linked_text_file.txt 31194@@ -0,0 +1 @@ 31195+linked text file 31196diff --git a/src/content/test/data/file_input_webkitdirectory.html b/src/content/test/data/file_input_webkitdirectory.html 31197new file mode 100644 31198index 0000000000000..5b7bb501f7eb5 31199--- /dev/null 31200+++ b/src/content/test/data/file_input_webkitdirectory.html 31201@@ -0,0 +1 @@ 31202+<input type="file" id="fileinput" webkitdirectory /> 31203diff --git a/src/extensions/browser/api/messaging/messaging_api_message_filter.cc b/src/extensions/browser/api/messaging/messaging_api_message_filter.cc 31204index 0f7adeb290ea3..2ae367ca3bdf8 31205--- a/src/extensions/browser/api/messaging/messaging_api_message_filter.cc 31206+++ b/src/extensions/browser/api/messaging/messaging_api_message_filter.cc 31207@@ -209,6 +209,18 @@ void MessagingAPIMessageFilter::Shutdown() { 31208 shutdown_notifier_subscription_ = {}; 31209 } 31210 31211+content::RenderProcessHost* MessagingAPIMessageFilter::GetRenderProcessHost() { 31212+ DCHECK_CURRENTLY_ON(BrowserThread::UI); 31213+ if (!browser_context_) 31214+ return nullptr; 31215+ 31216+ // The IPC might race with RenderProcessHost destruction. This may only 31217+ // happen in scenarios that are already inherently racey, so returning nullptr 31218+ // (and dropping the IPC) is okay and won't lead to any additional risk of 31219+ // data loss. 31220+ return content::RenderProcessHost::FromID(render_process_id_); 31221+} 31222+ 31223 void MessagingAPIMessageFilter::OverrideThreadForMessage( 31224 const IPC::Message& message, 31225 BrowserThread::ID* thread) { 31226@@ -299,8 +311,17 @@ void MessagingAPIMessageFilter::OnOpenChannelToTab( 31227 const std::string& channel_name, 31228 const PortId& port_id) { 31229 DCHECK_CURRENTLY_ON(BrowserThread::UI); 31230- if (!browser_context_) 31231+ auto* process = GetRenderProcessHost(); 31232+ if (!process) 31233+ return; 31234+ TRACE_EVENT("extensions", "MessageFilter::OnOpenChannelToTab", 31235+ ChromeTrackEvent::kRenderProcessHost, *process); 31236+ 31237+ if (!CanRendererHostExtensionOrigin(render_process_id_, extension_id)) { 31238+ bad_message::ReceivedBadMessage( 31239+ process, bad_message::EMF_INVALID_EXTENSION_ID_FOR_TAB_MSG); 31240 return; 31241+ } 31242 31243 ChannelEndpoint source_endpoint(browser_context_, render_process_id_, 31244 source_context); 31245diff --git a/src/extensions/browser/api/messaging/messaging_api_message_filter.h b/src/extensions/browser/api/messaging/messaging_api_message_filter.h 31246index 59c796801e28d..d4a952b5a495a 31247--- a/src/extensions/browser/api/messaging/messaging_api_message_filter.h 31248+++ b/src/extensions/browser/api/messaging/messaging_api_message_filter.h 31249@@ -13,6 +13,7 @@ struct ExtensionMsg_TabTargetConnectionInfo; 31250 31251 namespace content { 31252 class BrowserContext; 31253+class RenderProcessHost; 31254 } 31255 31256 namespace extensions { 31257@@ -39,6 +40,11 @@ class MessagingAPIMessageFilter : public content::BrowserMessageFilter { 31258 31259 void Shutdown(); 31260 31261+ // Returns the process that the IPC came from, or `nullptr` if the IPC should 31262+ // be dropped (in case the IPC arrived racily after the process or its 31263+ // BrowserContext already got destructed). 31264+ content::RenderProcessHost* GetRenderProcessHost(); 31265+ 31266 // content::BrowserMessageFilter implementation: 31267 void OverrideThreadForMessage(const IPC::Message& message, 31268 content::BrowserThread::ID* thread) override; 31269diff --git a/src/extensions/browser/api/socket/udp_socket.cc b/src/extensions/browser/api/socket/udp_socket.cc 31270index 859caa5205c27..1f1e8309731aa 31271--- a/src/extensions/browser/api/socket/udp_socket.cc 31272+++ b/src/extensions/browser/api/socket/udp_socket.cc 31273@@ -9,6 +9,7 @@ 31274 31275 #include "base/bind.h" 31276 #include "base/containers/contains.h" 31277+#include "base/containers/cxx20_erase.h" 31278 #include "base/lazy_instance.h" 31279 #include "extensions/browser/api/api_resource.h" 31280 #include "net/base/ip_address.h" 31281@@ -306,9 +307,7 @@ void UDPSocket::OnLeaveGroupCompleted(net::CompletionOnceCallback callback, 31282 const std::string& normalized_address, 31283 int result) { 31284 if (result == net::OK) { 31285- auto find_result = std::find(multicast_groups_.begin(), 31286- multicast_groups_.end(), normalized_address); 31287- multicast_groups_.erase(find_result); 31288+ base::Erase(multicast_groups_, normalized_address); 31289 } 31290 31291 std::move(callback).Run(result); 31292diff --git a/src/extensions/browser/bad_message.h b/src/extensions/browser/bad_message.h 31293index e56bf2ca33c34..c6d858faca0c7 31294--- a/src/extensions/browser/bad_message.h 31295+++ b/src/extensions/browser/bad_message.h 31296@@ -42,6 +42,7 @@ enum BadMessageReason { 31297 EMF_INVALID_EXTENSION_ID_FOR_CONTENT_SCRIPT = 16, 31298 EMF_INVALID_EXTENSION_ID_FOR_WORKER_CONTEXT = 17, 31299 EMF_INVALID_PORT_CONTEXT = 18, 31300+ EMF_INVALID_EXTENSION_ID_FOR_TAB_MSG = 21, 31301 // Please add new elements here. The naming convention is abbreviated class 31302 // name (e.g. ExtensionHost becomes EH) plus a unique description of the 31303 // reason. After making changes, you MUST update histograms.xml by running: 31304diff --git a/src/gin/v8_initializer.cc b/src/gin/v8_initializer.cc 31305index 1447b3828da1e..39acc81ec18a0 31306--- a/src/gin/v8_initializer.cc 31307+++ b/src/gin/v8_initializer.cc 31308@@ -47,6 +47,12 @@ 31309 #endif 31310 #endif // V8_USE_EXTERNAL_STARTUP_DATA 31311 31312+#if BUILDFLAG(IS_OHOS) 31313+#include "base/command_line.h" 31314+#include "content/public/common/content_switches.h" 31315+#include "ohos_adapter_helper.h" 31316+#endif 31317+ 31318 namespace gin { 31319 31320 namespace { 31321@@ -487,13 +493,43 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) { 31322 // files in a process. 31323 return; 31324 } 31325- 31326+#if BUILDFLAG(IS_OHOS) 31327+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(::switches::kOhosHapPath)) { 31328+ LoadV8SnapshotFromFileByHap(snapshot_file_type); 31329+ } else { 31330+ base::MemoryMappedFile::Region file_region; 31331+ base::File file = 31332+ OpenV8File(GetSnapshotFileName(snapshot_file_type), &file_region); 31333+ LoadV8SnapshotFromFile(std::move(file), &file_region, snapshot_file_type); 31334+ } 31335+#else 31336 base::MemoryMappedFile::Region file_region; 31337 base::File file = 31338 OpenV8File(GetSnapshotFileName(snapshot_file_type), &file_region); 31339 LoadV8SnapshotFromFile(std::move(file), &file_region, snapshot_file_type); 31340+#endif 31341 } 31342 31343+#if BUILDFLAG(IS_OHOS) 31344+const char kSnapshotFileNameHap[] = "resources/rawfile/snapshot_blob.bin"; 31345+// static 31346+int V8Initializer::LoadV8SnapshotFromFileByHap(V8SnapshotFileType snapshot_file_type) { 31347+ size_t length = 0; 31348+ std::unique_ptr<uint8_t[]> data; 31349+ auto resourceInstance = OHOS::NWeb::OhosAdapterHelper::GetInstance().GetResourceAdapter(); 31350+ if (!resourceInstance->GetRawFileData(kSnapshotFileNameHap, length, data, true)) { 31351+ LOG(FATAL) << "couldn't mmap snapshot_blob data file " << kSnapshotFileNameHap; 31352+ return 1; 31353+ } 31354+ LOG(INFO) << "snapshot_blob data file length: " << length; 31355+ std::unique_ptr<base::MemoryMappedFile> mmapped_file = std::make_unique<base::MemoryMappedFile>(); 31356+ mmapped_file->SetDataAndLength(data, length); 31357+ g_mapped_snapshot = mmapped_file.release(); 31358+ g_snapshot_file_type = snapshot_file_type; 31359+ return 0; 31360+} 31361+#endif 31362+ 31363 // static 31364 void V8Initializer::LoadV8SnapshotFromFile( 31365 base::File snapshot_file, 31366diff --git a/src/gin/v8_initializer.h b/src/gin/v8_initializer.h 31367index beeedc5737f6e..6dbdcd6a4e867 31368--- a/src/gin/v8_initializer.h 31369+++ b/src/gin/v8_initializer.h 31370@@ -43,6 +43,10 @@ class GIN_EXPORT V8Initializer { 31371 static void LoadV8Snapshot( 31372 V8SnapshotFileType snapshot_file_type = V8SnapshotFileType::kDefault); 31373 31374+#if BUILDFLAG(IS_OHOS) 31375+ static int LoadV8SnapshotFromFileByHap(V8SnapshotFileType snapshot_file_type); 31376+#endif 31377+ 31378 // Load V8 snapshot from user provided file. 31379 // The region argument, if non-zero, specifies the portions 31380 // of the files to be mapped. Since the VM can boot with or without 31381diff --git a/src/gpu/command_buffer/service/gles2_cmd_decoder.cc b/src/gpu/command_buffer/service/gles2_cmd_decoder.cc 31382index c269e5c9a8449..1df046c759da2 31383--- a/src/gpu/command_buffer/service/gles2_cmd_decoder.cc 31384+++ b/src/gpu/command_buffer/service/gles2_cmd_decoder.cc 31385@@ -8644,10 +8644,18 @@ void GLES2DecoderImpl::DoFramebufferTexture2DCommon( 31386 service_id = texture_ref->service_id(); 31387 } 31388 31389+ bool valid_target = false; 31390+ if (texture_ref) { 31391+ valid_target = texture_manager()->ValidForTextureTarget( 31392+ texture_ref->texture(), level, 0, 0, 1); 31393+ } else { 31394+ valid_target = texture_manager()->ValidForTarget(textarget, level, 0, 0, 1); 31395+ } 31396+ 31397 if ((level > 0 && !feature_info_->IsWebGL2OrES3Context() && 31398 !(fbo_render_mipmap_explicitly_enabled_ && 31399 feature_info_->feature_flags().oes_fbo_render_mipmap)) || 31400- !texture_manager()->ValidForTarget(textarget, level, 0, 0, 1)) { 31401+ !valid_target) { 31402 LOCAL_SET_GL_ERROR( 31403 GL_INVALID_VALUE, 31404 name, "level out of range"); 31405@@ -8719,8 +8727,8 @@ void GLES2DecoderImpl::DoFramebufferTextureLayer( 31406 "texture is neither TEXTURE_3D nor TEXTURE_2D_ARRAY"); 31407 return; 31408 } 31409- if (!texture_manager()->ValidForTarget(texture_target, level, 31410- 0, 0, layer)) { 31411+ if (!texture_manager()->ValidForTextureTarget(texture_ref->texture(), level, 31412+ 0, 0, layer)) { 31413 LOCAL_SET_GL_ERROR( 31414 GL_INVALID_VALUE, function_name, "invalid level or layer"); 31415 return; 31416@@ -15101,11 +15109,6 @@ error::Error GLES2DecoderImpl::DoCompressedTexImage( 31417 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "imageSize < 0"); 31418 return error::kNoError; 31419 } 31420- if (!texture_manager()->ValidForTarget(target, level, width, height, depth) || 31421- border != 0) { 31422- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range"); 31423- return error::kNoError; 31424- } 31425 TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget( 31426 &state_, target); 31427 if (!texture_ref) { 31428@@ -15114,6 +15117,12 @@ error::Error GLES2DecoderImpl::DoCompressedTexImage( 31429 return error::kNoError; 31430 } 31431 Texture* texture = texture_ref->texture(); 31432+ if (!texture_manager()->ValidForTextureTarget(texture, level, width, height, 31433+ depth) || 31434+ border != 0) { 31435+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range"); 31436+ return error::kNoError; 31437+ } 31438 if (texture->IsImmutable()) { 31439 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, func_name, "texture is immutable"); 31440 return error::kNoError; 31441@@ -15483,10 +15492,6 @@ error::Error GLES2DecoderImpl::DoCompressedTexSubImage( 31442 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "imageSize < 0"); 31443 return error::kNoError; 31444 } 31445- if (!texture_manager()->ValidForTarget(target, level, width, height, depth)) { 31446- LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range"); 31447- return error::kNoError; 31448- } 31449 TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget( 31450 &state_, target); 31451 if (!texture_ref) { 31452@@ -15494,7 +15499,14 @@ error::Error GLES2DecoderImpl::DoCompressedTexSubImage( 31453 GL_INVALID_OPERATION, func_name, "no texture bound at target"); 31454 return error::kNoError; 31455 } 31456+ 31457 Texture* texture = texture_ref->texture(); 31458+ if (!texture_manager()->ValidForTextureTarget(texture, level, width, height, 31459+ depth)) { 31460+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, func_name, "dimensions out of range"); 31461+ return error::kNoError; 31462+ } 31463+ 31464 GLenum type = 0; 31465 GLenum internal_format = 0; 31466 if (!texture->GetLevelType(target, level, &type, &internal_format)) { 31467@@ -15619,7 +15631,8 @@ void GLES2DecoderImpl::DoCopyTexImage2D( 31468 GL_INVALID_OPERATION, func_name, "texture is immutable"); 31469 return; 31470 } 31471- if (!texture_manager()->ValidForTarget(target, level, width, height, 1) || 31472+ if (!texture_manager()->ValidForTextureTarget(texture, level, width, height, 31473+ 1) || 31474 border != 0) { 31475 LOCAL_SET_GL_ERROR( 31476 GL_INVALID_VALUE, func_name, "dimensions out of range"); 31477@@ -18216,8 +18229,8 @@ void GLES2DecoderImpl::DoCopyTextureCHROMIUM( 31478 } 31479 31480 // Check that this type of texture is allowed. 31481- if (!texture_manager()->ValidForTarget(source_target, source_level, 31482- source_width, source_height, 1)) { 31483+ if (!texture_manager()->ValidForTextureTarget( 31484+ source_texture, source_level, source_width, source_height, 1)) { 31485 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, kFunctionName, "Bad dimensions"); 31486 return; 31487 } 31488@@ -18384,8 +18397,8 @@ void GLES2DecoderImpl::CopySubTextureHelper(const char* function_name, 31489 } 31490 31491 // Check that this type of texture is allowed. 31492- if (!texture_manager()->ValidForTarget(source_target, source_level, 31493- source_width, source_height, 1)) { 31494+ if (!texture_manager()->ValidForTextureTarget( 31495+ source_texture, source_level, source_width, source_height, 1)) { 31496 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, function_name, 31497 "source texture bad dimensions"); 31498 return; 31499@@ -18625,11 +18638,20 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target, 31500 return; 31501 } 31502 } 31503+ TextureRef* texture_ref = 31504+ texture_manager()->GetTextureInfoForTarget(&state_, target); 31505+ if (!texture_ref) { 31506+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, 31507+ "unknown texture for target"); 31508+ return; 31509+ } 31510+ Texture* texture = texture_ref->texture(); 31511 // The glTexStorage entry points require width, height, and depth to be 31512 // at least 1, but the other texture entry points (those which use 31513- // ValidForTarget) do not. So we have to add an extra check here. 31514+ // ValidForTextureTarget) do not. So we have to add an extra check here. 31515 bool is_invalid_texstorage_size = width < 1 || height < 1 || depth < 1; 31516- if (!texture_manager()->ValidForTarget(target, 0, width, height, depth) || 31517+ if (!texture_manager()->ValidForTextureTarget(texture, 0, width, height, 31518+ depth) || 31519 is_invalid_texstorage_size) { 31520 LOCAL_SET_GL_ERROR( 31521 GL_INVALID_VALUE, function_name, "dimensions out of range"); 31522@@ -18642,14 +18664,6 @@ void GLES2DecoderImpl::TexStorageImpl(GLenum target, 31523 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name, "too many levels"); 31524 return; 31525 } 31526- TextureRef* texture_ref = texture_manager()->GetTextureInfoForTarget( 31527- &state_, target); 31528- if (!texture_ref) { 31529- LOCAL_SET_GL_ERROR( 31530- GL_INVALID_OPERATION, function_name, "unknown texture for target"); 31531- return; 31532- } 31533- Texture* texture = texture_ref->texture(); 31534 if (texture->IsAttachedToFramebuffer()) { 31535 framebuffer_state_.clear_state_dirty = true; 31536 } 31537diff --git a/src/gpu/command_buffer/service/texture_manager.cc b/src/gpu/command_buffer/service/texture_manager.cc 31538index 44162d9361750..5d641d9203611 31539--- a/src/gpu/command_buffer/service/texture_manager.cc 31540+++ b/src/gpu/command_buffer/service/texture_manager.cc 31541@@ -1642,7 +1642,7 @@ void Texture::Update() { 31542 return; 31543 31544 if (face_infos_.empty() || 31545- static_cast<size_t>(base_level_) >= face_infos_[0].level_infos.size()) { 31546+ static_cast<size_t>(base_level_) >= MaxValidMipLevel()) { 31547 texture_complete_ = false; 31548 cube_complete_ = false; 31549 return; 31550@@ -2029,8 +2029,7 @@ bool Texture::CanRenderTo(const FeatureInfo* feature_info, GLint level) const { 31551 // the time. 31552 if (face_infos_.size() == 6 && !cube_complete()) 31553 return false; 31554- DCHECK(level >= 0 && 31555- level < static_cast<GLint>(face_infos_[0].level_infos.size())); 31556+ DCHECK(level >= 0 && level < static_cast<GLint>(MaxValidMipLevel())); 31557 if (level > base_level_ && !texture_complete()) { 31558 return false; 31559 } 31560@@ -2065,7 +2064,7 @@ void Texture::SetCompatibilitySwizzle(const CompatibilitySwizzle* swizzle) { 31561 31562 void Texture::ApplyFormatWorkarounds(const FeatureInfo* feature_info) { 31563 if (feature_info->gl_version_info().NeedsLuminanceAlphaEmulation()) { 31564- if (static_cast<size_t>(base_level_) >= face_infos_[0].level_infos.size()) 31565+ if (static_cast<size_t>(base_level_) >= MaxValidMipLevel()) 31566 return; 31567 const Texture::LevelInfo& info = face_infos_[0].level_infos[base_level_]; 31568 SetCompatibilitySwizzle(GetCompatibilitySwizzleInternal(info.format)); 31569@@ -2299,8 +2298,11 @@ scoped_refptr<TextureRef> 31570 return default_texture; 31571 } 31572 31573-bool TextureManager::ValidForTarget( 31574- GLenum target, GLint level, GLsizei width, GLsizei height, GLsizei depth) { 31575+bool TextureManager::ValidForTarget(GLenum target, 31576+ GLint level, 31577+ GLsizei width, 31578+ GLsizei height, 31579+ GLsizei depth) { 31580 if (level < 0 || level >= MaxLevelsForTarget(target)) 31581 return false; 31582 GLsizei max_size = MaxSizeForTarget(target) >> level; 31583@@ -2320,6 +2322,18 @@ bool TextureManager::ValidForTarget( 31584 (target != GL_TEXTURE_2D || (depth == 1)); 31585 } 31586 31587+bool TextureManager::ValidForTextureTarget(const Texture* texture, 31588+ GLint level, 31589+ GLsizei width, 31590+ GLsizei height, 31591+ GLsizei depth) { 31592+ if (texture->target() == 0) 31593+ return false; 31594+ if (level < 0 || static_cast<size_t>(level) >= texture->MaxValidMipLevel()) 31595+ return false; 31596+ return ValidForTarget(texture->target(), level, width, height, depth); 31597+} 31598+ 31599 void TextureManager::SetTarget(TextureRef* ref, GLenum target) { 31600 DCHECK(ref); 31601 ref->texture()->SetTarget(target, MaxLevelsForTarget(target)); 31602@@ -2803,14 +2817,6 @@ bool TextureManager::ValidateTexImage(ContextState* state, 31603 args.internal_format, args.level)) { 31604 return false; 31605 } 31606- if (!ValidForTarget(args.target, args.level, 31607- args.width, args.height, args.depth) || 31608- args.border != 0) { 31609- ERRORSTATE_SET_GL_ERROR( 31610- error_state, GL_INVALID_VALUE, function_name, 31611- "dimensions out of range"); 31612- return false; 31613- } 31614 if ((GLES2Util::GetChannelsForFormat(args.format) & 31615 (GLES2Util::kDepth | GLES2Util::kStencil)) != 0 && args.pixels 31616 && !feature_info_->IsWebGL2OrES3Context()) { 31617@@ -2833,7 +2839,13 @@ bool TextureManager::ValidateTexImage(ContextState* state, 31618 "texture is immutable"); 31619 return false; 31620 } 31621- 31622+ if (!ValidForTextureTarget(local_texture_ref->texture(), args.level, 31623+ args.width, args.height, args.depth) || 31624+ args.border != 0) { 31625+ ERRORSTATE_SET_GL_ERROR(error_state, GL_INVALID_VALUE, function_name, 31626+ "dimensions out of range"); 31627+ return false; 31628+ } 31629 Buffer* buffer = state->bound_pixel_unpack_buffer.get(); 31630 if (buffer) { 31631 if (buffer->GetMappedRange()) { 31632diff --git a/src/gpu/command_buffer/service/texture_manager.h b/src/gpu/command_buffer/service/texture_manager.h 31633index e4b2dbf47b595..15d3c0c6579ff 31634--- a/src/gpu/command_buffer/service/texture_manager.h 31635+++ b/src/gpu/command_buffer/service/texture_manager.h 31636@@ -469,6 +469,11 @@ class GPU_GLES2_EXPORT Texture final : public TextureBase { 31637 sampler_state_.min_filter != GL_LINEAR; 31638 } 31639 31640+ size_t MaxValidMipLevel() const { 31641+ DCHECK(!face_infos_.empty()); 31642+ return face_infos_[0].level_infos.size(); 31643+ } 31644+ 31645 private: 31646 friend class MailboxManagerTest; 31647 friend class TextureManager; 31648@@ -931,6 +936,11 @@ class GPU_GLES2_EXPORT TextureManager 31649 bool ValidForTarget( 31650 GLenum target, GLint level, 31651 GLsizei width, GLsizei height, GLsizei depth); 31652+ bool ValidForTextureTarget(const Texture* texture, 31653+ GLint level, 31654+ GLsizei width, 31655+ GLsizei height, 31656+ GLsizei depth); 31657 31658 // True if this texture meets all the GLES2 criteria for rendering. 31659 // See section 3.8.2 of the GLES2 spec. 31660diff --git a/src/ipc/ipc_mojo_bootstrap.cc b/src/ipc/ipc_mojo_bootstrap.cc 31661index a017111a64715..5f5e8ca50acf4 31662--- a/src/ipc/ipc_mojo_bootstrap.cc 31663+++ b/src/ipc/ipc_mojo_bootstrap.cc 31664@@ -16,13 +16,15 @@ 31665 #include "base/bind.h" 31666 #include "base/callback.h" 31667 #include "base/check_op.h" 31668+#include "base/containers/circular_deque.h" 31669 #include "base/containers/contains.h" 31670-#include "base/containers/queue.h" 31671 #include "base/memory/ptr_util.h" 31672 #include "base/memory/raw_ptr.h" 31673 #include "base/no_destructor.h" 31674+#include "base/ranges/algorithm.h" 31675 #include "base/strings/stringprintf.h" 31676 #include "base/synchronization/lock.h" 31677+#include "base/synchronization/waitable_event.h" 31678 #include "base/task/common/task_annotator.h" 31679 #include "base/task/sequenced_task_runner.h" 31680 #include "base/task/single_thread_task_runner.h" 31681@@ -48,6 +50,7 @@ 31682 #include "mojo/public/cpp/bindings/pipe_control_message_proxy.h" 31683 #include "mojo/public/cpp/bindings/sequence_local_sync_event_watcher.h" 31684 #include "mojo/public/cpp/bindings/tracing_helpers.h" 31685+#include "third_party/abseil-cpp/absl/types/optional.h" 31686 31687 namespace IPC { 31688 31689@@ -466,6 +469,11 @@ class ChannelAssociatedGroupController 31690 return *this; 31691 } 31692 31693+ bool HasRequestId(uint64_t request_id) { 31694+ return !value_.IsNull() && value_.version() >= 1 && 31695+ value_.header_v1()->request_id == request_id; 31696+ } 31697+ 31698 mojo::Message& value() { return value_; } 31699 31700 private: 31701@@ -557,10 +565,15 @@ class ChannelAssociatedGroupController 31702 sync_watcher_.reset(); 31703 } 31704 31705- uint32_t EnqueueSyncMessage(MessageWrapper message) { 31706+ absl::optional<uint32_t> EnqueueSyncMessage(MessageWrapper message) { 31707 controller_->lock_.AssertAcquired(); 31708+ if (exclusive_wait_ && exclusive_wait_->TryFulfillingWith(message)) { 31709+ exclusive_wait_ = nullptr; 31710+ return absl::nullopt; 31711+ } 31712+ 31713 uint32_t id = GenerateSyncMessageId(); 31714- sync_messages_.emplace(id, std::move(message)); 31715+ sync_messages_.emplace_back(id, std::move(message)); 31716 SignalSyncMessageEvent(); 31717 return id; 31718 } 31719@@ -577,7 +590,7 @@ class ChannelAssociatedGroupController 31720 if (sync_messages_.empty() || sync_messages_.front().first != id) 31721 return MessageWrapper(); 31722 MessageWrapper message = std::move(sync_messages_.front().second); 31723- sync_messages_.pop(); 31724+ sync_messages_.pop_front(); 31725 return message; 31726 } 31727 31728@@ -607,10 +620,38 @@ class ChannelAssociatedGroupController 31729 return sync_watcher_->SyncWatch(&should_stop); 31730 } 31731 31732+ MessageWrapper WaitForIncomingSyncReply(uint64_t request_id) { 31733+ absl::optional<ExclusiveSyncWait> wait; 31734+ { 31735+ base::AutoLock lock(controller_->lock_); 31736+ for (auto& [id, message] : sync_messages_) { 31737+ if (message.HasRequestId(request_id)) { 31738+ return std::move(message); 31739+ } 31740+ } 31741+ 31742+ DCHECK(!exclusive_wait_); 31743+ wait.emplace(request_id); 31744+ exclusive_wait_ = &wait.value(); 31745+ } 31746+ 31747+ wait->event.Wait(); 31748+ return std::move(wait->message); 31749+ } 31750+ 31751 bool SyncWatchExclusive(uint64_t request_id) override { 31752- // We don't support exclusive waits on Channel-associated interfaces. 31753- NOTREACHED(); 31754- return false; 31755+ MessageWrapper message = WaitForIncomingSyncReply(request_id); 31756+ if (message.value().IsNull() || !client_) { 31757+ return false; 31758+ } 31759+ 31760+ if (!client_->HandleIncomingMessage(&message.value())) { 31761+ base::AutoLock locker(controller_->lock_); 31762+ controller_->RaiseError(); 31763+ return false; 31764+ } 31765+ 31766+ return true; 31767 } 31768 31769 void RegisterExternalSyncWaiter(uint64_t request_id) override {} 31770@@ -624,20 +665,26 @@ class ChannelAssociatedGroupController 31771 DCHECK(closed_); 31772 DCHECK(peer_closed_); 31773 DCHECK(!sync_watcher_); 31774+ if (exclusive_wait_) { 31775+ exclusive_wait_->event.Signal(); 31776+ } 31777 } 31778 31779 void OnSyncMessageEventReady() { 31780 DCHECK(task_runner_->RunsTasksInCurrentSequence()); 31781 31782- scoped_refptr<Endpoint> keepalive(this); 31783+ // SUBTLE: The order of these scoped_refptrs matters. 31784+ // `controller_keepalive` MUST outlive `keepalive` because the Endpoint 31785+ // holds raw pointer to the AssociatedGroupController. 31786 scoped_refptr<AssociatedGroupController> controller_keepalive( 31787 controller_.get()); 31788+ scoped_refptr<Endpoint> keepalive(this); 31789 base::AutoLock locker(controller_->lock_); 31790 bool more_to_process = false; 31791 if (!sync_messages_.empty()) { 31792 MessageWrapper message_wrapper = 31793 std::move(sync_messages_.front().second); 31794- sync_messages_.pop(); 31795+ sync_messages_.pop_front(); 31796 31797 bool dispatch_succeeded; 31798 mojo::InterfaceEndpointClient* client = client_; 31799@@ -685,6 +732,28 @@ class ChannelAssociatedGroupController 31800 return id; 31801 } 31802 31803+ // Tracks the state of a pending sync wait which excludes all other incoming 31804+ // IPC on the waiting thread. 31805+ struct ExclusiveSyncWait { 31806+ explicit ExclusiveSyncWait(uint64_t request_id) 31807+ : request_id(request_id) {} 31808+ ~ExclusiveSyncWait() = default; 31809+ 31810+ bool TryFulfillingWith(MessageWrapper& wrapper) { 31811+ if (!wrapper.HasRequestId(request_id)) { 31812+ return false; 31813+ } 31814+ 31815+ message = std::move(wrapper); 31816+ event.Signal(); 31817+ return true; 31818+ } 31819+ 31820+ uint64_t request_id; 31821+ base::WaitableEvent event; 31822+ MessageWrapper message; 31823+ }; 31824+ 31825 const raw_ptr<ChannelAssociatedGroupController> controller_; 31826 const mojo::InterfaceId id_; 31827 31828@@ -696,7 +765,8 @@ class ChannelAssociatedGroupController 31829 raw_ptr<mojo::InterfaceEndpointClient> client_ = nullptr; 31830 scoped_refptr<base::SequencedTaskRunner> task_runner_; 31831 std::unique_ptr<mojo::SequenceLocalSyncEventWatcher> sync_watcher_; 31832- base::queue<std::pair<uint32_t, MessageWrapper>> sync_messages_; 31833+ base::circular_deque<std::pair<uint32_t, MessageWrapper>> sync_messages_; 31834+ ExclusiveSyncWait* exclusive_wait_ = nullptr; 31835 uint32_t next_sync_message_id_ = 0; 31836 }; 31837 31838@@ -929,12 +999,15 @@ class ChannelAssociatedGroupController 31839 // sync message queue. If the endpoint was blocking, it will dequeue the 31840 // message and dispatch it. Otherwise the posted |AcceptSyncMessage()| 31841 // call will dequeue the message and dispatch it. 31842- uint32_t message_id = 31843+ absl::optional<uint32_t> message_id = 31844 endpoint->EnqueueSyncMessage(std::move(message_wrapper)); 31845- task_runner->PostTask( 31846- FROM_HERE, 31847- base::BindOnce(&ChannelAssociatedGroupController::AcceptSyncMessage, 31848- this, id, message_id)); 31849+ if (message_id) { 31850+ task_runner->PostTask( 31851+ FROM_HERE, 31852+ base::BindOnce( 31853+ &ChannelAssociatedGroupController::AcceptSyncMessage, this, 31854+ id, *message_id)); 31855+ } 31856 return true; 31857 } 31858 31859diff --git a/src/media/BUILD.gn b/src/media/BUILD.gn 31860index 732da9826667f..0c917f40d568f 31861--- a/src/media/BUILD.gn 31862+++ b/src/media/BUILD.gn 31863@@ -54,6 +54,10 @@ buildflag_header("media_buildflags") { 31864 "USE_PROPRIETARY_CODECS=$proprietary_codecs", 31865 "ENABLE_PLATFORM_DTS_AUDIO=$enable_platform_dts_audio", 31866 ] 31867+ 31868+ if (is_ohos) { 31869+ flags += [ "OHOS_ENABLE_MEDIA_ROUTER=$ohos_enable_media_router" ] 31870+ } 31871 } 31872 31873 if (proprietary_codecs && media_use_ffmpeg) { 31874diff --git a/src/media/base/media_switches.h b/src/media/base/media_switches.h 31875index 5a719685e73fd..05700ba70d596 31876--- a/src/media/base/media_switches.h 31877+++ b/src/media/base/media_switches.h 31878@@ -11,15 +11,12 @@ 31879 31880 #include "base/feature_list.h" 31881 #include "base/metrics/field_trial_params.h" 31882+#include "base/command_line.h" 31883 #include "build/build_config.h" 31884 #include "build/chromeos_buildflags.h" 31885 #include "media/base/media_export.h" 31886 #include "media/media_buildflags.h" 31887 31888-namespace base { 31889-class CommandLine; 31890-} 31891- 31892 namespace switches { 31893 31894 MEDIA_EXPORT extern const char kAudioBufferSize[]; 31895diff --git a/src/media/media_options.gni b/src/media/media_options.gni 31896index 307e79ad5490f..7395734870aeb 31897--- a/src/media/media_options.gni 31898+++ b/src/media/media_options.gni 31899@@ -253,7 +253,7 @@ declare_args() { 31900 # This switch defines whether the Media Remoting implementation will be built. 31901 # When enabled, media is allowed to be renderer and played back on remote 31902 # devices when the tab is being casted and other conditions are met. 31903- enable_media_remoting = !is_chromecast && !is_ios 31904+ enable_media_remoting = !is_chromecast && !is_ios && !is_ohos 31905 } 31906 31907 declare_args() { 31908@@ -299,6 +299,10 @@ if (is_fuchsia) { 31909 } 31910 31911 if (is_ohos) { 31912+ declare_args() { 31913+ ohos_enable_media_router = false 31914+ } 31915+ 31916 media_subcomponent_deps += [ 31917 "//media/base/ohos", 31918 ] 31919diff --git a/src/mojo/public/cpp/bindings/BUILD.gn b/src/mojo/public/cpp/bindings/BUILD.gn 31920index 9361ca9f1ba11..e8e9898453f5c 31921--- a/src/mojo/public/cpp/bindings/BUILD.gn 31922+++ b/src/mojo/public/cpp/bindings/BUILD.gn 31923@@ -187,6 +187,7 @@ component("bindings") { 31924 "lib/sync_event_watcher.cc", 31925 "lib/sync_handle_registry.cc", 31926 "lib/sync_handle_watcher.cc", 31927+ "lib/sync_method_traits.h", 31928 "lib/task_runner_helper.cc", 31929 "lib/task_runner_helper.h", 31930 "lib/thread_safe_forwarder_base.cc", 31931diff --git a/src/mojo/public/cpp/bindings/associated_receiver.h b/src/mojo/public/cpp/bindings/associated_receiver.h 31932index 6143940518efe..2a18b52bb0567 31933--- a/src/mojo/public/cpp/bindings/associated_receiver.h 31934+++ b/src/mojo/public/cpp/bindings/associated_receiver.h 31935@@ -5,13 +5,17 @@ 31936 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_H_ 31937 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_RECEIVER_H_ 31938 31939+#include <stdint.h> 31940+ 31941 #include <memory> 31942 #include <utility> 31943 31944 #include "base/check.h" 31945+#include "base/containers/span.h" 31946 #include "base/memory/scoped_refptr.h" 31947 #include "base/memory/weak_ptr.h" 31948 #include "base/task/sequenced_task_runner.h" 31949+#include "mojo/public/cpp/bindings/lib/sync_method_traits.h" 31950 #include "mojo/public/cpp/bindings/pending_associated_receiver.h" 31951 #include "mojo/public/cpp/bindings/pending_associated_remote.h" 31952 #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" 31953@@ -58,7 +62,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) AssociatedReceiverBase { 31954 void BindImpl(ScopedInterfaceEndpointHandle handle, 31955 MessageReceiverWithResponderStatus* receiver, 31956 std::unique_ptr<MessageReceiver> payload_validator, 31957- bool expect_sync_requests, 31958+ base::span<const uint32_t> sync_method_ordinals, 31959 scoped_refptr<base::SequencedTaskRunner> runner, 31960 uint32_t interface_version, 31961 const char* interface_name); 31962@@ -197,8 +201,8 @@ class AssociatedReceiver : public internal::AssociatedReceiverBase { 31963 if (pending_receiver) { 31964 BindImpl(pending_receiver.PassHandle(), &stub_, 31965 base::WrapUnique(new typename Interface::RequestValidator_()), 31966- Interface::HasSyncMethods_, std::move(task_runner), 31967- Interface::Version_, Interface::Name_); 31968+ internal::SyncMethodTraits<Interface>::GetOrdinals(), 31969+ std::move(task_runner), Interface::Version_, Interface::Name_); 31970 } else { 31971 reset(); 31972 } 31973diff --git a/src/mojo/public/cpp/bindings/interface_endpoint_client.h b/src/mojo/public/cpp/bindings/interface_endpoint_client.h 31974index ef8f61c4de81a..cbe3fd730d742 31975--- a/src/mojo/public/cpp/bindings/interface_endpoint_client.h 31976+++ b/src/mojo/public/cpp/bindings/interface_endpoint_client.h 31977@@ -15,6 +15,7 @@ 31978 #include "base/check_op.h" 31979 #include "base/compiler_specific.h" 31980 #include "base/component_export.h" 31981+#include "base/containers/span.h" 31982 #include "base/location.h" 31983 #include "base/memory/raw_ptr.h" 31984 #include "base/memory/ref_counted.h" 31985@@ -56,7 +57,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient 31986 InterfaceEndpointClient(ScopedInterfaceEndpointHandle handle, 31987 MessageReceiverWithResponderStatus* receiver, 31988 std::unique_ptr<MessageReceiver> payload_validator, 31989- bool expect_sync_requests, 31990+ base::span<const uint32_t> sync_method_ordinals, 31991 scoped_refptr<base::SequencedTaskRunner> task_runner, 31992 uint32_t interface_version, 31993 const char* interface_name); 31994@@ -212,6 +213,10 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient 31995 // The router lock must be held when calling this. 31996 void ForgetAsyncRequest(uint64_t request_id); 31997 31998+ base::span<const uint32_t> sync_method_ordinals() const { 31999+ return sync_method_ordinals_; 32000+ } 32001+ 32002 private: 32003 struct PendingAsyncResponse { 32004 public: 32005@@ -273,7 +278,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) InterfaceEndpointClient 32006 32007 bool HandleValidatedMessage(Message* message); 32008 32009- const bool expect_sync_requests_ = false; 32010+ const base::span<const uint32_t> sync_method_ordinals_; 32011 32012 // The callback to invoke when our peer endpoint sends us NotifyIdle and we 32013 // have no outstanding unacked messages. If null, no callback has been set and 32014diff --git a/src/mojo/public/cpp/bindings/interface_endpoint_controller.h b/src/mojo/public/cpp/bindings/interface_endpoint_controller.h 32015index 89dbe39994620..8649abe1ac9c4 32016--- a/src/mojo/public/cpp/bindings/interface_endpoint_controller.h 32017+++ b/src/mojo/public/cpp/bindings/interface_endpoint_controller.h 32018@@ -36,6 +36,10 @@ class InterfaceEndpointController { 32019 // Watches the endpoint for a specific incoming sync reply. This method only 32020 // returns true once the reply is received, or false if the endpoint is 32021 // detached or destroyed beforehand. 32022+ // 32023+ // Unlike with SyncWatch(), no other IPCs (not even other sync IPCs) can be 32024+ // dispatched to the calling thread while SyncWatchExclusive() is waiting on 32025+ // the reply for `request_id`. 32026 virtual bool SyncWatchExclusive(uint64_t request_id) = 0; 32027 32028 // Notifies the controller that a specific in-flight sync message identified 32029diff --git a/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc b/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc 32030index 6f6d4abc787da..bf4da352e9100 32031--- a/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc 32032+++ b/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.cc 32033@@ -4,6 +4,11 @@ 32034 32035 #include "mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h" 32036 32037+#include <stdint.h> 32038+ 32039+#include <utility> 32040+ 32041+#include "base/containers/span.h" 32042 #include "mojo/public/cpp/bindings/lib/task_runner_helper.h" 32043 32044 namespace mojo { 32045@@ -68,7 +73,8 @@ void AssociatedInterfacePtrStateBase::Bind( 32046 // The version is only queried from the client so the value passed here 32047 // will not be used. 32048 endpoint_client_ = std::make_unique<InterfaceEndpointClient>( 32049- std::move(handle), nullptr, std::move(validator), false, 32050+ std::move(handle), nullptr, std::move(validator), 32051+ /*sync_method_ordinals=*/base::span<const uint32_t>(), 32052 GetTaskRunnerToUseFromUserProvidedTaskRunner(std::move(runner)), 0u, 32053 interface_name); 32054 } 32055diff --git a/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h b/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h 32056index 85b53a762786a..637a1e2ab8d0a 32057--- a/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h 32058+++ b/src/mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h 32059@@ -138,6 +138,10 @@ class AssociatedInterfacePtrState : public AssociatedInterfacePtrStateBase { 32060 return info; 32061 } 32062 32063+ InterfaceEndpointClient* endpoint_client_for_test() { 32064+ return endpoint_client(); 32065+ } 32066+ 32067 private: 32068 std::unique_ptr<Proxy> proxy_; 32069 }; 32070diff --git a/src/mojo/public/cpp/bindings/lib/associated_receiver.cc b/src/mojo/public/cpp/bindings/lib/associated_receiver.cc 32071index 8a7fe542218f9..2e2bc26141e54 32072--- a/src/mojo/public/cpp/bindings/lib/associated_receiver.cc 32073+++ b/src/mojo/public/cpp/bindings/lib/associated_receiver.cc 32074@@ -62,7 +62,7 @@ void AssociatedReceiverBase::BindImpl( 32075 ScopedInterfaceEndpointHandle handle, 32076 MessageReceiverWithResponderStatus* receiver, 32077 std::unique_ptr<MessageReceiver> payload_validator, 32078- bool expect_sync_requests, 32079+ base::span<const uint32_t> sync_method_ordinals, 32080 scoped_refptr<base::SequencedTaskRunner> runner, 32081 uint32_t interface_version, 32082 const char* interface_name) { 32083@@ -70,7 +70,7 @@ void AssociatedReceiverBase::BindImpl( 32084 32085 endpoint_client_ = std::make_unique<InterfaceEndpointClient>( 32086 std::move(handle), receiver, std::move(payload_validator), 32087- expect_sync_requests, 32088+ sync_method_ordinals, 32089 internal::GetTaskRunnerToUseFromUserProvidedTaskRunner(std::move(runner)), 32090 interface_version, interface_name); 32091 } 32092diff --git a/src/mojo/public/cpp/bindings/lib/binding_state.cc b/src/mojo/public/cpp/bindings/lib/binding_state.cc 32093index 1efeb0791c301..4708b460573ca 32094--- a/src/mojo/public/cpp/bindings/lib/binding_state.cc 32095+++ b/src/mojo/public/cpp/bindings/lib/binding_state.cc 32096@@ -107,7 +107,7 @@ void BindingStateBase::BindInternal( 32097 const char* interface_name, 32098 std::unique_ptr<MessageReceiver> request_validator, 32099 bool passes_associated_kinds, 32100- bool has_sync_methods, 32101+ base::span<const uint32_t> sync_method_ordinals, 32102 MessageReceiverWithResponderStatus* stub, 32103 uint32_t interface_version) { 32104 DCHECK(!is_bound()) << "Attempting to bind interface that is already bound: " 32105@@ -119,7 +119,7 @@ void BindingStateBase::BindInternal( 32106 MultiplexRouter::Config config = 32107 passes_associated_kinds 32108 ? MultiplexRouter::MULTI_INTERFACE 32109- : (has_sync_methods 32110+ : (!sync_method_ordinals.empty() 32111 ? MultiplexRouter::SINGLE_INTERFACE_WITH_SYNC_METHODS 32112 : MultiplexRouter::SINGLE_INTERFACE); 32113 router_ = MultiplexRouter::CreateAndStartReceiving( 32114@@ -129,7 +129,7 @@ void BindingStateBase::BindInternal( 32115 32116 endpoint_client_ = std::make_unique<InterfaceEndpointClient>( 32117 router_->CreateLocalEndpointHandle(kPrimaryInterfaceId), stub, 32118- std::move(request_validator), has_sync_methods, 32119+ std::move(request_validator), sync_method_ordinals, 32120 std::move(sequenced_runner), interface_version, interface_name); 32121 endpoint_client_->SetIdleTrackingEnabledCallback( 32122 base::BindOnce(&MultiplexRouter::SetConnectionGroup, router_)); 32123diff --git a/src/mojo/public/cpp/bindings/lib/binding_state.h b/src/mojo/public/cpp/bindings/lib/binding_state.h 32124index dfe255abc95f0..9b409ff611706 32125--- a/src/mojo/public/cpp/bindings/lib/binding_state.h 32126+++ b/src/mojo/public/cpp/bindings/lib/binding_state.h 32127@@ -5,6 +5,8 @@ 32128 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ 32129 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDING_STATE_H_ 32130 32131+#include <stdint.h> 32132+ 32133 #include <memory> 32134 #include <string> 32135 #include <utility> 32136@@ -13,6 +15,7 @@ 32137 #include "base/callback.h" 32138 #include "base/check.h" 32139 #include "base/component_export.h" 32140+#include "base/containers/span.h" 32141 #include "base/memory/ptr_util.h" 32142 #include "base/memory/ref_counted.h" 32143 #include "base/task/sequenced_task_runner.h" 32144@@ -25,6 +28,7 @@ 32145 #include "mojo/public/cpp/bindings/interface_request.h" 32146 #include "mojo/public/cpp/bindings/lib/multiplex_router.h" 32147 #include "mojo/public/cpp/bindings/lib/pending_receiver_state.h" 32148+#include "mojo/public/cpp/bindings/lib/sync_method_traits.h" 32149 #include "mojo/public/cpp/bindings/message_header_validator.h" 32150 #include "mojo/public/cpp/bindings/pending_flush.h" 32151 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" 32152@@ -91,7 +95,7 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) BindingStateBase { 32153 const char* interface_name, 32154 std::unique_ptr<MessageReceiver> request_validator, 32155 bool passes_associated_kinds, 32156- bool has_sync_methods, 32157+ base::span<const uint32_t> sync_method_ordinals, 32158 MessageReceiverWithResponderStatus* stub, 32159 uint32_t interface_version); 32160 32161@@ -120,8 +124,8 @@ class BindingState : public BindingStateBase { 32162 BindingStateBase::BindInternal( 32163 std::move(receiver_state), runner, Interface::Name_, 32164 std::make_unique<typename Interface::RequestValidator_>(), 32165- Interface::PassesAssociatedKinds_, Interface::HasSyncMethods_, &stub_, 32166- Interface::Version_); 32167+ Interface::PassesAssociatedKinds_, 32168+ SyncMethodTraits<Interface>::GetOrdinals(), &stub_, Interface::Version_); 32169 } 32170 32171 InterfaceRequest<Interface> Unbind() { 32172diff --git a/src/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc b/src/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc 32173index 3ccc876ebc045..00ca42371026a 32174--- a/src/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc 32175+++ b/src/mojo/public/cpp/bindings/lib/interface_endpoint_client.cc 32176@@ -385,7 +385,9 @@ void ThreadSafeInterfaceEndpointClientProxy::SendMessageWithResponder( 32177 } 32178 32179 // If the Remote is bound on another sequence, post the call. 32180- const bool allow_interrupt = !message.has_flag(Message::kFlagNoInterrupt); 32181+ const bool allow_interrupt = 32182+ SyncCallRestrictions::AreSyncCallInterruptsEnabled() && 32183+ !message.has_flag(Message::kFlagNoInterrupt); 32184 auto response = base::MakeRefCounted<SyncResponseInfo>(); 32185 auto response_signaler = std::make_unique<SyncResponseSignaler>(response); 32186 task_runner_->PostTask( 32187@@ -435,11 +437,11 @@ InterfaceEndpointClient::InterfaceEndpointClient( 32188 ScopedInterfaceEndpointHandle handle, 32189 MessageReceiverWithResponderStatus* receiver, 32190 std::unique_ptr<MessageReceiver> payload_validator, 32191- bool expect_sync_requests, 32192+ base::span<const uint32_t> sync_method_ordinals, 32193 scoped_refptr<base::SequencedTaskRunner> task_runner, 32194 uint32_t interface_version, 32195 const char* interface_name) 32196- : expect_sync_requests_(expect_sync_requests), 32197+ : sync_method_ordinals_(sync_method_ordinals), 32198 handle_(std::move(handle)), 32199 incoming_receiver_(receiver), 32200 dispatcher_(&thunk_), 32201@@ -619,7 +621,9 @@ bool InterfaceEndpointClient::SendMessageWithResponder( 32202 32203 const uint32_t message_name = message->name(); 32204 const bool is_sync = message->has_flag(Message::kFlagIsSync); 32205- const bool exclusive_wait = message->has_flag(Message::kFlagNoInterrupt); 32206+ const bool exclusive_wait = 32207+ message->has_flag(Message::kFlagNoInterrupt) || 32208+ !SyncCallRestrictions::AreSyncCallInterruptsEnabled(); 32209 if (!controller_->SendMessage(message)) 32210 return false; 32211 32212@@ -839,7 +843,8 @@ void InterfaceEndpointClient::InitControllerIfNecessary() { 32213 32214 controller_ = handle_.group_controller()->AttachEndpointClient(handle_, this, 32215 task_runner_); 32216- if (expect_sync_requests_ && task_runner_->RunsTasksInCurrentSequence()) 32217+ if (!sync_method_ordinals_.empty() && 32218+ task_runner_->RunsTasksInCurrentSequence()) 32219 controller_->AllowWokenUpBySyncWatchOnSameThread(); 32220 } 32221 32222diff --git a/src/mojo/public/cpp/bindings/lib/interface_ptr_state.cc b/src/mojo/public/cpp/bindings/lib/interface_ptr_state.cc 32223index ea1c937f80c98..76f6c362b3b7a 32224--- a/src/mojo/public/cpp/bindings/lib/interface_ptr_state.cc 32225+++ b/src/mojo/public/cpp/bindings/lib/interface_ptr_state.cc 32226@@ -4,6 +4,11 @@ 32227 32228 #include "mojo/public/cpp/bindings/lib/interface_ptr_state.h" 32229 32230+#include <stdint.h> 32231+ 32232+#include <utility> 32233+ 32234+#include "base/containers/span.h" 32235 #include "mojo/public/cpp/bindings/lib/task_runner_helper.h" 32236 32237 namespace mojo { 32238@@ -94,7 +99,9 @@ bool InterfacePtrStateBase::InitializeEndpointClient( 32239 interface_name); 32240 endpoint_client_ = std::make_unique<InterfaceEndpointClient>( 32241 router_->CreateLocalEndpointHandle(kPrimaryInterfaceId), nullptr, 32242- std::move(payload_validator), false, std::move(runner_), 32243+ std::move(payload_validator), 32244+ /* sync_method_ordinals= */ base::span<const uint32_t>(), 32245+ std::move(runner_), 32246 // The version is only queried from the client so the value passed here 32247 // will not be used. 32248 0u, interface_name); 32249diff --git a/src/mojo/public/cpp/bindings/lib/interface_ptr_state.h b/src/mojo/public/cpp/bindings/lib/interface_ptr_state.h 32250index 142a35bc95e6e..45ec397195893 32251--- a/src/mojo/public/cpp/bindings/lib/interface_ptr_state.h 32252+++ b/src/mojo/public/cpp/bindings/lib/interface_ptr_state.h 32253@@ -29,6 +29,7 @@ 32254 #include "mojo/public/cpp/bindings/interface_ptr_info.h" 32255 #include "mojo/public/cpp/bindings/lib/multiplex_router.h" 32256 #include "mojo/public/cpp/bindings/lib/pending_remote_state.h" 32257+#include "mojo/public/cpp/bindings/lib/sync_method_traits.h" 32258 #include "mojo/public/cpp/bindings/message_header_validator.h" 32259 #include "mojo/public/cpp/bindings/pending_flush.h" 32260 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" 32261@@ -242,6 +243,10 @@ class InterfacePtrState : public InterfacePtrStateBase { 32262 endpoint_client()->RaiseError(); 32263 } 32264 32265+ InterfaceEndpointClient* endpoint_client_for_test() { 32266+ return endpoint_client(); 32267+ } 32268+ 32269 private: 32270 void ConfigureProxyIfNecessary() { 32271 // The proxy has been configured. 32272@@ -252,7 +257,8 @@ class InterfacePtrState : public InterfacePtrStateBase { 32273 } 32274 32275 if (InitializeEndpointClient( 32276- Interface::PassesAssociatedKinds_, Interface::HasSyncMethods_, 32277+ Interface::PassesAssociatedKinds_, 32278+ !SyncMethodTraits<Interface>::GetOrdinals().empty(), 32279 Interface::HasUninterruptableMethods_, 32280 std::make_unique<typename Interface::ResponseValidator_>(), 32281 Interface::Name_)) { 32282diff --git a/src/mojo/public/cpp/bindings/lib/multiplex_router.cc b/src/mojo/public/cpp/bindings/lib/multiplex_router.cc 32283index 1b21719333bb1..462e8476b8227 32284--- a/src/mojo/public/cpp/bindings/lib/multiplex_router.cc 32285+++ b/src/mojo/public/cpp/bindings/lib/multiplex_router.cc 32286@@ -1067,6 +1067,12 @@ bool MultiplexRouter::ProcessIncomingMessage( 32287 32288 bool can_direct_call; 32289 if (message->has_flag(Message::kFlagIsSync)) { 32290+ if (!message->has_flag(Message::kFlagIsResponse) && 32291+ !base::Contains(endpoint->client()->sync_method_ordinals(), 32292+ message->name())) { 32293+ RaiseErrorInNonTestingMode(); 32294+ return true; 32295+ } 32296 can_direct_call = client_call_behavior != NO_DIRECT_CLIENT_CALLS && 32297 endpoint->task_runner()->RunsTasksInCurrentSequence(); 32298 } else { 32299diff --git a/src/mojo/public/cpp/bindings/lib/sync_call_restrictions.cc b/src/mojo/public/cpp/bindings/lib/sync_call_restrictions.cc 32300index fa7934bdb3404..166b9bdc5052f 32301--- a/src/mojo/public/cpp/bindings/lib/sync_call_restrictions.cc 32302+++ b/src/mojo/public/cpp/bindings/lib/sync_call_restrictions.cc 32303@@ -4,8 +4,6 @@ 32304 32305 #include "mojo/public/cpp/bindings/sync_call_restrictions.h" 32306 32307-#if ENABLE_SYNC_CALL_RESTRICTIONS 32308- 32309 #include "base/debug/leak_annotations.h" 32310 #include "base/logging.h" 32311 #include "base/no_destructor.h" 32312@@ -18,6 +16,11 @@ namespace mojo { 32313 32314 namespace { 32315 32316+// Sync call interrupts are enabled by default. 32317+bool g_enable_sync_call_interrupts = true; 32318+ 32319+#if ENABLE_SYNC_CALL_RESTRICTIONS 32320+ 32321 class GlobalSyncCallSettings { 32322 public: 32323 GlobalSyncCallSettings() = default; 32324@@ -60,8 +63,12 @@ bool SyncCallRestrictionsEnforceable() { 32325 return base::internal::SequenceLocalStorageMap::IsSetForCurrentThread(); 32326 } 32327 32328+#endif // ENABLE_SYNC_CALL_RESTRICTIONS 32329+ 32330 } // namespace 32331 32332+#if ENABLE_SYNC_CALL_RESTRICTIONS 32333+ 32334 // static 32335 void SyncCallRestrictions::AssertSyncCallAllowed() { 32336 if (GetGlobalSettings().sync_call_allowed_by_default() || 32337@@ -101,6 +108,21 @@ void SyncCallRestrictions::DecreaseScopedAllowCount() { 32338 --GetSequenceLocalScopedAllowCount(); 32339 } 32340 32341-} // namespace mojo 32342- 32343 #endif // ENABLE_SYNC_CALL_RESTRICTIONS 32344+ 32345+// static 32346+void SyncCallRestrictions::DisableSyncCallInterrupts() { 32347+ g_enable_sync_call_interrupts = false; 32348+} 32349+ 32350+// static 32351+void SyncCallRestrictions::EnableSyncCallInterruptsForTesting() { 32352+ g_enable_sync_call_interrupts = true; 32353+} 32354+ 32355+// static 32356+bool SyncCallRestrictions::AreSyncCallInterruptsEnabled() { 32357+ return g_enable_sync_call_interrupts; 32358+} 32359+ 32360+} // namespace mojo 32361diff --git a/src/mojo/public/cpp/bindings/lib/sync_method_traits.h b/src/mojo/public/cpp/bindings/lib/sync_method_traits.h 32362new file mode 100644 32363index 0000000000000..2b334f8d01c2e 32364--- /dev/null 32365+++ b/src/mojo/public/cpp/bindings/lib/sync_method_traits.h 32366@@ -0,0 +1,31 @@ 32367+// Copyright 2022 The Chromium Authors 32368+// Use of this source code is governed by a BSD-style license that can be 32369+// found in the LICENSE file. 32370+ 32371+#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_METHOD_TRAITS_H_ 32372+#define MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_METHOD_TRAITS_H_ 32373+ 32374+#include <stdint.h> 32375+ 32376+#include <type_traits> 32377+ 32378+#include "base/containers/span.h" 32379+ 32380+namespace mojo::internal { 32381+ 32382+template <typename Interface, typename SFINAE = void> 32383+struct SyncMethodTraits { 32384+ static constexpr base::span<const uint32_t> GetOrdinals() { return {}; } 32385+}; 32386+ 32387+template <typename Interface> 32388+struct SyncMethodTraits<Interface, 32389+ std::void_t<decltype(Interface::kSyncMethodOrdinals)>> { 32390+ static constexpr base::span<const uint32_t> GetOrdinals() { 32391+ return Interface::kSyncMethodOrdinals; 32392+ } 32393+}; 32394+ 32395+} // namespace mojo::internal 32396+ 32397+#endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_SYNC_METHOD_TRAITS_H_ 32398diff --git a/src/mojo/public/cpp/bindings/sync_call_restrictions.h b/src/mojo/public/cpp/bindings/sync_call_restrictions.h 32399index bb044cff83f58..f3bfd33a53e5e 32400--- a/src/mojo/public/cpp/bindings/sync_call_restrictions.h 32401+++ b/src/mojo/public/cpp/bindings/sync_call_restrictions.h 32402@@ -87,6 +87,20 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { 32403 static void DisallowSyncCall() {} 32404 #endif 32405 32406+ // Globally disables sync call interrupts. This means that all sync calls in 32407+ // the current process will be strictly blocking until a reply is received, 32408+ // and no incoming sync calls can dispatch on the blocking thread in interim. 32409+ static void DisableSyncCallInterrupts(); 32410+ 32411+ // Used only in tests to re-enable sync call interrupts after disabling them. 32412+ static void EnableSyncCallInterruptsForTesting(); 32413+ 32414+ // Indicates whether sync call interrupts are enabled in the calling process. 32415+ // They're enabled by default, so any sync message that isn't marked [Sync] 32416+ // may have its blocking call interrupted to dispatch other incoming sync 32417+ // IPCs which target the blocking thread. 32418+ static bool AreSyncCallInterruptsEnabled(); 32419+ 32420 private: 32421 // DO NOT ADD ANY OTHER FRIEND STATEMENTS, talk to mojo/OWNERS first. 32422 // BEGIN ALLOWED USAGE. 32423diff --git a/src/mojo/public/cpp/bindings/tests/BUILD.gn b/src/mojo/public/cpp/bindings/tests/BUILD.gn 32424index f164dc9e3e4b3..c7e0f37683434 32425--- a/src/mojo/public/cpp/bindings/tests/BUILD.gn 32426+++ b/src/mojo/public/cpp/bindings/tests/BUILD.gn 32427@@ -67,6 +67,7 @@ source_set("tests") { 32428 ":mojo_public_bindings_test_utils", 32429 ":test_extra_cpp_template_mojom", 32430 ":test_mojom", 32431+ ":test_mojom__generate_message_ids", 32432 "//base/test:test_support", 32433 "//mojo/core/test:test_support", 32434 "//mojo/public/cpp/bindings", 32435diff --git a/src/mojo/public/cpp/bindings/tests/bindings_perftest.cc b/src/mojo/public/cpp/bindings/tests/bindings_perftest.cc 32436index 233d024fd0d03..01ff318a1afc1 32437--- a/src/mojo/public/cpp/bindings/tests/bindings_perftest.cc 32438+++ b/src/mojo/public/cpp/bindings/tests/bindings_perftest.cc 32439@@ -205,12 +205,10 @@ TEST_F(MojoBindingsPerftest, MultiplexRouterPingPong) { 32440 32441 InterfaceEndpointClient client0( 32442 router0->CreateLocalEndpointHandle(kPrimaryInterfaceId), &paddle0, 32443- nullptr, false, base::ThreadTaskRunnerHandle::Get(), 0u, 32444- kTestInterfaceName); 32445+ nullptr, {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32446 InterfaceEndpointClient client1( 32447 router1->CreateLocalEndpointHandle(kPrimaryInterfaceId), &paddle1, 32448- nullptr, false, base::ThreadTaskRunnerHandle::Get(), 0u, 32449- kTestInterfaceName); 32450+ nullptr, {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32451 32452 paddle0.set_sender(&client0); 32453 paddle1.set_sender(&client1); 32454@@ -257,8 +255,7 @@ TEST_F(MojoBindingsPerftest, MultiplexRouterDispatchCost) { 32455 CounterReceiver receiver; 32456 InterfaceEndpointClient client( 32457 router->CreateLocalEndpointHandle(kPrimaryInterfaceId), &receiver, 32458- nullptr, false, base::ThreadTaskRunnerHandle::Get(), 0u, 32459- kTestInterfaceName); 32460+ nullptr, {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32461 32462 static const uint32_t kIterations[] = {1000, 3000000}; 32463 32464diff --git a/src/mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc b/src/mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc 32465index af60dfd66e251..6f746101534c3 32466--- a/src/mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc 32467+++ b/src/mojo/public/cpp/bindings/tests/multiplex_router_unittest.cc 32468@@ -66,12 +66,12 @@ class MultiplexRouterTest : public testing::Test { 32469 32470 TEST_F(MultiplexRouterTest, BasicRequestResponse) { 32471 InterfaceEndpointClient client0( 32472- std::move(endpoint0_), nullptr, std::make_unique<PassThroughFilter>(), 32473- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32474+ std::move(endpoint0_), nullptr, std::make_unique<PassThroughFilter>(), {}, 32475+ base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32476 ResponseGenerator generator; 32477 InterfaceEndpointClient client1( 32478 std::move(endpoint1_), &generator, std::make_unique<PassThroughFilter>(), 32479- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32480+ {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32481 32482 Message request; 32483 AllocRequestMessage(1, "hello", &request); 32484@@ -113,12 +113,12 @@ TEST_F(MultiplexRouterTest, BasicRequestResponse) { 32485 32486 TEST_F(MultiplexRouterTest, BasicRequestResponse_Synchronous) { 32487 InterfaceEndpointClient client0( 32488- std::move(endpoint0_), nullptr, std::make_unique<PassThroughFilter>(), 32489- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32490+ std::move(endpoint0_), nullptr, std::make_unique<PassThroughFilter>(), {}, 32491+ base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32492 ResponseGenerator generator; 32493 InterfaceEndpointClient client1( 32494 std::move(endpoint1_), &generator, std::make_unique<PassThroughFilter>(), 32495- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32496+ {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32497 32498 Message request; 32499 AllocRequestMessage(1, "hello", &request); 32500@@ -161,13 +161,13 @@ TEST_F(MultiplexRouterTest, BasicRequestResponse_Synchronous) { 32501 TEST_F(MultiplexRouterTest, LazyResponses) { 32502 InterfaceEndpointClient client0( 32503 std::move(endpoint0_), nullptr, base::WrapUnique(new PassThroughFilter()), 32504- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32505+ {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32506 base::RunLoop run_loop; 32507 LazyResponseGenerator generator(run_loop.QuitClosure()); 32508 InterfaceEndpointClient client1(std::move(endpoint1_), &generator, 32509- base::WrapUnique(new PassThroughFilter()), 32510- false, base::ThreadTaskRunnerHandle::Get(), 32511- 0u, kTestInterfaceName); 32512+ base::WrapUnique(new PassThroughFilter()), {}, 32513+ base::ThreadTaskRunnerHandle::Get(), 0u, 32514+ kTestInterfaceName); 32515 32516 Message request; 32517 AllocRequestMessage(1, "hello", &request); 32518@@ -233,7 +233,7 @@ TEST_F(MultiplexRouterTest, MissingResponses) { 32519 base::RunLoop run_loop0, run_loop1; 32520 InterfaceEndpointClient client0( 32521 std::move(endpoint0_), nullptr, base::WrapUnique(new PassThroughFilter()), 32522- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32523+ {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32524 bool error_handler_called0 = false; 32525 client0.set_connection_error_handler(base::BindOnce( 32526 &ForwardErrorHandler, &error_handler_called0, run_loop0.QuitClosure())); 32527@@ -241,9 +241,9 @@ TEST_F(MultiplexRouterTest, MissingResponses) { 32528 base::RunLoop run_loop3; 32529 LazyResponseGenerator generator(run_loop3.QuitClosure()); 32530 InterfaceEndpointClient client1(std::move(endpoint1_), &generator, 32531- base::WrapUnique(new PassThroughFilter()), 32532- false, base::ThreadTaskRunnerHandle::Get(), 32533- 0u, kTestInterfaceName); 32534+ base::WrapUnique(new PassThroughFilter()), {}, 32535+ base::ThreadTaskRunnerHandle::Get(), 0u, 32536+ kTestInterfaceName); 32537 bool error_handler_called1 = false; 32538 client1.set_connection_error_handler(base::BindOnce( 32539 &ForwardErrorHandler, &error_handler_called1, run_loop1.QuitClosure())); 32540@@ -290,11 +290,11 @@ TEST_F(MultiplexRouterTest, LateResponse) { 32541 { 32542 InterfaceEndpointClient client0( 32543 std::move(endpoint0_), nullptr, std::make_unique<PassThroughFilter>(), 32544- false, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32545+ {}, base::ThreadTaskRunnerHandle::Get(), 0u, kTestInterfaceName); 32546 InterfaceEndpointClient client1(std::move(endpoint1_), &generator, 32547- std::make_unique<PassThroughFilter>(), 32548- false, base::ThreadTaskRunnerHandle::Get(), 32549- 0u, kTestInterfaceName); 32550+ std::make_unique<PassThroughFilter>(), {}, 32551+ base::ThreadTaskRunnerHandle::Get(), 0u, 32552+ kTestInterfaceName); 32553 32554 Message request; 32555 AllocRequestMessage(1, "hello", &request); 32556diff --git a/src/mojo/public/cpp/bindings/tests/sync_method_unittest.cc b/src/mojo/public/cpp/bindings/tests/sync_method_unittest.cc 32557index 1c37b87a65db4..3a48d1d2c93fa 32558--- a/src/mojo/public/cpp/bindings/tests/sync_method_unittest.cc 32559+++ b/src/mojo/public/cpp/bindings/tests/sync_method_unittest.cc 32560@@ -2,6 +2,7 @@ 32561 // Use of this source code is governed by a BSD-style license that can be 32562 // found in the LICENSE file. 32563 32564+#include <tuple> 32565 #include <utility> 32566 32567 #include "base/barrier_closure.h" 32568@@ -9,16 +10,22 @@ 32569 #include "base/check.h" 32570 #include "base/run_loop.h" 32571 #include "base/sequence_token.h" 32572+#include "base/task/sequenced_task_runner.h" 32573 #include "base/task/post_task.h" 32574 #include "base/task/thread_pool.h" 32575 #include "base/test/bind.h" 32576 #include "base/test/task_environment.h" 32577 #include "base/threading/sequence_bound.h" 32578+#include "base/threading/sequenced_task_runner_handle.h" 32579 #include "base/threading/thread.h" 32580 #include "base/time/time.h" 32581 #include "mojo/public/cpp/bindings/associated_receiver.h" 32582 #include "mojo/public/cpp/bindings/associated_receiver_set.h" 32583 #include "mojo/public/cpp/bindings/associated_remote.h" 32584+#include "mojo/public/cpp/bindings/lib/message_fragment.h" 32585+#include "mojo/public/cpp/bindings/lib/send_message_helper.h" 32586+#include "mojo/public/cpp/bindings/lib/serialization_util.h" 32587+#include "mojo/public/cpp/bindings/message.h" 32588 #include "mojo/public/cpp/bindings/receiver.h" 32589 #include "mojo/public/cpp/bindings/receiver_set.h" 32590 #include "mojo/public/cpp/bindings/remote.h" 32591@@ -26,11 +33,18 @@ 32592 #include "mojo/public/cpp/bindings/self_owned_receiver.h" 32593 #include "mojo/public/cpp/bindings/shared_associated_remote.h" 32594 #include "mojo/public/cpp/bindings/shared_remote.h" 32595+#include "mojo/public/cpp/bindings/sync_call_restrictions.h" 32596 #include "mojo/public/cpp/bindings/tests/bindings_test_base.h" 32597+#include "mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom-shared-message-ids.h" 32598 #include "mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom.h" 32599 #include "mojo/public/interfaces/bindings/tests/test_sync_methods.mojom.h" 32600 #include "testing/gtest/include/gtest/gtest.h" 32601 32602+// This needs to be included last, since it forward declares a bunch of classes 32603+// but depends on those definitions to be included by headers that sort 32604+// lexicographically after. 32605+#include "mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom-params-data.h" 32606+ 32607 namespace mojo { 32608 namespace test { 32609 namespace sync_method_unittest { 32610@@ -1564,7 +1578,375 @@ TEST_P(SyncInterruptTest, SharedAssociatedRemoteNoInterrupt) { 32611 EXPECT_EQ(0, same_pipe_ponger().num_sync_pongs()); 32612 } 32613 32614+class SyncService : public mojom::SyncService { 32615+ public: 32616+ explicit SyncService(PendingReceiver<mojom::SyncService> receiver) 32617+ : receiver_(this, std::move(receiver)) {} 32618+ 32619+ void SetCallHandler(base::OnceClosure call_handler) { 32620+ call_handler_ = std::move(call_handler); 32621+ } 32622+ 32623+ // mojom::SyncService: 32624+ void SyncCall(SyncCallCallback callback) override { 32625+ std::move(callback).Run(); 32626+ if (call_handler_) { 32627+ std::move(call_handler_).Run(); 32628+ } 32629+ } 32630+ 32631+ private: 32632+ Receiver<mojom::SyncService> receiver_; 32633+ base::OnceClosure call_handler_; 32634+}; 32635+ 32636+class DisableSyncInterruptTest : public BindingsTestBase { 32637+ public: 32638+ void SetUp() override { 32639+ mojo::SyncCallRestrictions::DisableSyncCallInterrupts(); 32640+ } 32641+ 32642+ void TearDown() override { 32643+ mojo::SyncCallRestrictions::EnableSyncCallInterruptsForTesting(); 32644+ } 32645+}; 32646+ 32647+TEST_P(DisableSyncInterruptTest, NoInterruptWhenDisabled) { 32648+ PendingRemote<mojom::SyncService> interrupter; 32649+ SyncService service(interrupter.InitWithNewPipeAndPassReceiver()); 32650+ 32651+ base::RunLoop wait_for_main_thread_service_call; 32652+ bool main_thread_service_called = false; 32653+ service.SetCallHandler(base::BindLambdaForTesting([&] { 32654+ main_thread_service_called = true; 32655+ wait_for_main_thread_service_call.Quit(); 32656+ })); 32657+ 32658+ Remote<mojom::SyncService> caller; 32659+ base::Thread background_service_thread("SyncService"); 32660+ background_service_thread.Start(); 32661+ base::SequenceBound<SyncService> background_service{ 32662+ background_service_thread.task_runner(), 32663+ caller.BindNewPipeAndPassReceiver()}; 32664+ 32665+ base::Thread interrupter_thread("Interrupter"); 32666+ interrupter_thread.Start(); 32667+ interrupter_thread.task_runner()->PostTask( 32668+ FROM_HERE, base::BindLambdaForTesting([&interrupter] { 32669+ // Issue a sync call to the SyncService on the main thread. This should 32670+ // never be dispatched until *after* the sync call *from* the main 32671+ // thread completes below. 32672+ Remote<mojom::SyncService>(std::move(interrupter))->SyncCall(); 32673+ })); 32674+ 32675+ // The key test expectation here is that `main_thread_service_called` cannot 32676+ // be set to true until after SyncCall() returns and we can pump the thread's 32677+ // message loop. If sync interrupts are not properly disabled, this 32678+ // expectation can fail flakily (and often.) 32679+ caller->SyncCall(); 32680+ EXPECT_FALSE(main_thread_service_called); 32681+ 32682+ // Now the incoming sync call can be dispatched. 32683+ wait_for_main_thread_service_call.Run(); 32684+ EXPECT_TRUE(main_thread_service_called); 32685+ 32686+ background_service.SynchronouslyResetForTest(); 32687+ interrupter_thread.Stop(); 32688+ background_service_thread.Stop(); 32689+} 32690+ 32691+TEST_P(DisableSyncInterruptTest, SharedRemoteNoInterruptWhenDisabled) { 32692+ PendingRemote<mojom::SyncService> interrupter; 32693+ SyncService service(interrupter.InitWithNewPipeAndPassReceiver()); 32694+ 32695+ base::RunLoop wait_for_main_thread_service_call; 32696+ bool main_thread_service_called = false; 32697+ service.SetCallHandler(base::BindLambdaForTesting([&] { 32698+ main_thread_service_called = true; 32699+ wait_for_main_thread_service_call.Quit(); 32700+ })); 32701+ 32702+ // Bind a SharedRemote to another background thread so that we exercise 32703+ // SharedRemote's own sync wait codepath when called into from the main 32704+ // thread. 32705+ base::Thread background_client_thread("Client"); 32706+ background_client_thread.Start(); 32707+ 32708+ base::Thread background_service_thread("Service"); 32709+ background_service_thread.Start(); 32710+ 32711+ SharedRemote<mojom::SyncService> caller; 32712+ base::SequenceBound<SyncService> background_service{ 32713+ background_service_thread.task_runner(), 32714+ caller.BindNewPipeAndPassReceiver( 32715+ background_client_thread.task_runner())}; 32716+ 32717+ base::Thread interrupter_thread("Interrupter"); 32718+ interrupter_thread.Start(); 32719+ interrupter_thread.task_runner()->PostTask( 32720+ FROM_HERE, base::BindLambdaForTesting([&interrupter] { 32721+ // Issue a sync call to the SyncService on the main thread. This should 32722+ // never be dispatched until *after* the sync call *from* the main 32723+ // thread completes below. 32724+ Remote<mojom::SyncService>(std::move(interrupter))->SyncCall(); 32725+ })); 32726+ 32727+ // The key test expectation here is that `main_thread_service_called` cannot 32728+ // be set to true until after SyncCall() returns and we can pump the thread's 32729+ // message loop. If sync interrupts are not properly disabled, this 32730+ // expectation can fail flakily (and often.) 32731+ caller->SyncCall(); 32732+ EXPECT_FALSE(main_thread_service_called); 32733+ 32734+ // Now the incoming sync call can be dispatched. 32735+ wait_for_main_thread_service_call.Run(); 32736+ EXPECT_TRUE(main_thread_service_called); 32737+ 32738+ background_service.SynchronouslyResetForTest(); 32739+ 32740+ // We need to reset the SharedRemote before the client thread is stopped, to 32741+ // ensure the necessary teardown work is executed on that thread. Otherwise 32742+ // the underlying pipe and related state will leak, and ASan will complain. 32743+ caller.reset(); 32744+ 32745+ interrupter_thread.Stop(); 32746+ background_service_thread.Stop(); 32747+ background_client_thread.Stop(); 32748+} 32749+ 32750 INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(SyncInterruptTest); 32751+INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(DisableSyncInterruptTest); 32752+ 32753+class OneSyncImpl; 32754+ 32755+class NoSyncImpl : public mojom::NoSync { 32756+ public: 32757+ explicit NoSyncImpl(PendingReceiver<mojom::NoSync> receiver) 32758+ : receiver_(this, std::move(receiver)) {} 32759+ 32760+ explicit NoSyncImpl( 32761+ PendingAssociatedReceiver<mojom::NoSync> associated_receiver) 32762+ : associated_receiver_(this, std::move(associated_receiver)) {} 32763+ 32764+ // mojom::NoSync implementation: 32765+ void Method(MethodCallback callback) override; 32766+ void BindNoSync(PendingAssociatedReceiver<mojom::NoSync> receiver) override; 32767+ void BindOneSync(PendingAssociatedReceiver<mojom::OneSync> receiver) override; 32768+ 32769+ private: 32770+ Receiver<mojom::NoSync> receiver_{this}; 32771+ AssociatedReceiver<mojom::NoSync> associated_receiver_{this}; 32772+ 32773+ std::unique_ptr<NoSyncImpl> associated_no_sync_; 32774+ std::unique_ptr<OneSyncImpl> associated_one_sync_; 32775+}; 32776+ 32777+class OneSyncImpl : public mojom::OneSync { 32778+ public: 32779+ explicit OneSyncImpl(PendingReceiver<mojom::OneSync> receiver) 32780+ : receiver_(this, std::move(receiver)) {} 32781+ 32782+ explicit OneSyncImpl( 32783+ PendingAssociatedReceiver<mojom::OneSync> associated_receiver) 32784+ : associated_receiver_(this, std::move(associated_receiver)) {} 32785+ 32786+ // mojom::OneSync implementation: 32787+ void Method(MethodCallback callback) override; 32788+ void SyncMethod(SyncMethodCallback callback) override; 32789+ void BindNoSync(PendingAssociatedReceiver<mojom::NoSync> receiver) override; 32790+ void BindOneSync(PendingAssociatedReceiver<mojom::OneSync> receiver) override; 32791+ 32792+ private: 32793+ Receiver<mojom::OneSync> receiver_{this}; 32794+ AssociatedReceiver<mojom::OneSync> associated_receiver_{this}; 32795+ 32796+ std::unique_ptr<NoSyncImpl> associated_no_sync_; 32797+ std::unique_ptr<OneSyncImpl> associated_one_sync_; 32798+}; 32799+ 32800+void NoSyncImpl::Method(MethodCallback callback) { 32801+ EXPECT_TRUE(false); 32802+ std::move(callback).Run(); 32803+} 32804+ 32805+void NoSyncImpl::BindNoSync(PendingAssociatedReceiver<mojom::NoSync> receiver) { 32806+ associated_no_sync_ = std::make_unique<NoSyncImpl>(std::move(receiver)); 32807+} 32808+ 32809+void NoSyncImpl::BindOneSync( 32810+ PendingAssociatedReceiver<mojom::OneSync> receiver) { 32811+ associated_one_sync_ = std::make_unique<OneSyncImpl>(std::move(receiver)); 32812+} 32813+ 32814+void OneSyncImpl::Method(MethodCallback callback) { 32815+ EXPECT_TRUE(false); 32816+ std::move(callback).Run(); 32817+} 32818+ 32819+void OneSyncImpl::SyncMethod(MethodCallback callback) { 32820+ std::move(callback).Run(); 32821+} 32822+ 32823+void OneSyncImpl::BindNoSync( 32824+ PendingAssociatedReceiver<mojom::NoSync> receiver) { 32825+ associated_no_sync_ = std::make_unique<NoSyncImpl>(std::move(receiver)); 32826+} 32827+ 32828+void OneSyncImpl::BindOneSync( 32829+ PendingAssociatedReceiver<mojom::OneSync> receiver) { 32830+ associated_one_sync_ = std::make_unique<OneSyncImpl>(std::move(receiver)); 32831+} 32832+ 32833+class NoResponseExpectedResponder : public MessageReceiver { 32834+ public: 32835+ explicit NoResponseExpectedResponder() = default; 32836+ 32837+ // MessageReceiver implementation: 32838+ bool Accept(Message* message) override { 32839+ EXPECT_TRUE(false); 32840+ return true; 32841+ } 32842+}; 32843+ 32844+class SyncFlagValidationTest : public ::testing::TestWithParam<uint32_t> { 32845+ protected: 32846+ Message MakeNoSyncMethodMessage() { 32847+ const uint32_t flags = 32848+ // Always set the sync flag, as that's the primary point of the test. 32849+ Message::kFlagIsSync | 32850+ // InterfaceEndpointClient requires this flag if sending a message with 32851+ // a responder. 32852+ Message::kFlagExpectsResponse | GetParam(); 32853+ Message message(mojom::internal::kNoSync_Method_Name, flags, 0, 0, nullptr); 32854+ ::mojo::internal::MessageFragment< 32855+ mojom::internal::NoSync_Method_Params_Data> 32856+ params(message); 32857+ params.Allocate(); 32858+ return message; 32859+ } 32860+ 32861+ Message MakeOneSyncMethodMessage() { 32862+ const uint32_t flags = 32863+ // Always set the sync flag, as that's the primary point of the test. 32864+ Message::kFlagIsSync | 32865+ // InterfaceEndpointClient requires this flag if sending a message with 32866+ // a responder. 32867+ Message::kFlagExpectsResponse | GetParam(); 32868+ Message message(mojom::internal::kOneSync_Method_Name, flags, 0, 0, 32869+ nullptr); 32870+ ::mojo::internal::MessageFragment< 32871+ mojom::internal::NoSync_Method_Params_Data> 32872+ params(message); 32873+ params.Allocate(); 32874+ return message; 32875+ } 32876+ 32877+ void FlushPostedTasks() { 32878+ base::RunLoop run_loop; 32879+ base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, 32880+ run_loop.QuitClosure()); 32881+ run_loop.Run(); 32882+ } 32883+ 32884+ private: 32885+ base::test::SingleThreadTaskEnvironment task_environment; 32886+}; 32887+ 32888+TEST_P(SyncFlagValidationTest, NonSync) { 32889+ Remote<mojom::NoSync> remote; 32890+ NoSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32891+ 32892+ Message message = MakeNoSyncMethodMessage(); 32893+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32894+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32895+ ::mojo::internal::SendMessage( 32896+ *remote.internal_state()->endpoint_client_for_test(), message, 32897+ std::move(responder)); 32898+} 32899+ 32900+TEST_P(SyncFlagValidationTest, OneSync) { 32901+ Remote<mojom::OneSync> remote; 32902+ OneSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32903+ 32904+ Message message = MakeOneSyncMethodMessage(); 32905+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32906+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32907+ ::mojo::internal::SendMessage( 32908+ *remote.internal_state()->endpoint_client_for_test(), message, 32909+ std::move(responder)); 32910+} 32911+ 32912+TEST_P(SyncFlagValidationTest, NoSyncAssociatedWithNoSync) { 32913+ Remote<mojom::NoSync> remote; 32914+ NoSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32915+ 32916+ AssociatedRemote<mojom::NoSync> associated_remote; 32917+ remote->BindNoSync(associated_remote.BindNewEndpointAndPassReceiver()); 32918+ 32919+ FlushPostedTasks(); 32920+ 32921+ Message message = MakeNoSyncMethodMessage(); 32922+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32923+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32924+ ::mojo::internal::SendMessage( 32925+ *associated_remote.internal_state()->endpoint_client_for_test(), message, 32926+ std::move(responder)); 32927+} 32928+ 32929+TEST_P(SyncFlagValidationTest, OneSyncAssociatedWithNoSync) { 32930+ Remote<mojom::NoSync> remote; 32931+ NoSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32932+ 32933+ AssociatedRemote<mojom::OneSync> associated_remote; 32934+ remote->BindOneSync(associated_remote.BindNewEndpointAndPassReceiver()); 32935+ 32936+ FlushPostedTasks(); 32937+ 32938+ Message message = MakeOneSyncMethodMessage(); 32939+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32940+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32941+ ::mojo::internal::SendMessage( 32942+ *associated_remote.internal_state()->endpoint_client_for_test(), message, 32943+ std::move(responder)); 32944+} 32945+ 32946+TEST_P(SyncFlagValidationTest, NoSyncAssociatedWithOneSync) { 32947+ Remote<mojom::OneSync> remote; 32948+ OneSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32949+ 32950+ AssociatedRemote<mojom::NoSync> associated_remote; 32951+ remote->BindNoSync(associated_remote.BindNewEndpointAndPassReceiver()); 32952+ 32953+ FlushPostedTasks(); 32954+ 32955+ Message message = MakeNoSyncMethodMessage(); 32956+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32957+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32958+ ::mojo::internal::SendMessage( 32959+ *associated_remote.internal_state()->endpoint_client_for_test(), message, 32960+ std::move(responder)); 32961+} 32962+ 32963+TEST_P(SyncFlagValidationTest, OneSyncAssociatedWithOneSync) { 32964+ Remote<mojom::OneSync> remote; 32965+ OneSyncImpl impl(remote.BindNewPipeAndPassReceiver()); 32966+ 32967+ AssociatedRemote<mojom::OneSync> associated_remote; 32968+ remote->BindOneSync(associated_remote.BindNewEndpointAndPassReceiver()); 32969+ 32970+ FlushPostedTasks(); 32971+ 32972+ Message message = MakeOneSyncMethodMessage(); 32973+ auto responder = std::make_unique<NoResponseExpectedResponder>(); 32974+ ASSERT_TRUE(remote.internal_state()->endpoint_client_for_test()); 32975+ ::mojo::internal::SendMessage( 32976+ *associated_remote.internal_state()->endpoint_client_for_test(), message, 32977+ std::move(responder)); 32978+} 32979+ 32980+INSTANTIATE_TEST_SUITE_P(, 32981+ SyncFlagValidationTest, 32982+ ::testing::Values(0, Message::kFlagIsResponse)); 32983 32984 } // namespace 32985 } // namespace sync_method_unittest 32986diff --git a/src/mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom b/src/mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom 32987index 383b54f3ab654..0cc5f7c6d288f 32988--- a/src/mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom 32989+++ b/src/mojo/public/cpp/bindings/tests/sync_method_unittest.test-mojom 32990@@ -45,3 +45,24 @@ interface Ponger { 32991 [Sync] Pong() => (); 32992 PongAsync(); 32993 }; 32994+ 32995+interface SyncService { 32996+ [Sync] SyncCall() => (); 32997+}; 32998+ 32999+interface NoSync { 33000+ Method() => (); 33001+ 33002+ BindNoSync(pending_associated_receiver<NoSync> no_sync); 33003+ BindOneSync(pending_associated_receiver<OneSync> one_sync); 33004+}; 33005+ 33006+interface OneSync { 33007+ Method() => (); 33008+ 33009+ [Sync] 33010+ SyncMethod() => (); 33011+ 33012+ BindNoSync(pending_associated_receiver<NoSync> no_sync); 33013+ BindOneSync(pending_associated_receiver<OneSync> one_sync); 33014+}; 33015diff --git a/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl b/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl 33016index c4dd04adb433b..7220a25990516 33017--- a/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl 33018+++ b/src/mojo/public/tools/bindings/generators/cpp_templates/interface_declaration.tmpl 33019@@ -26,7 +26,12 @@ class {{export_attribute}} {{interface.name}} 33020 {%- endif %} 33021 static constexpr uint32_t Version_ = {{interface.version}}; 33022 static constexpr bool PassesAssociatedKinds_ = {% if interface|passes_associated_kinds %}true{% else %}false{% endif %}; 33023- static constexpr bool HasSyncMethods_ = {% if interface|has_sync_methods %}true{% else %}false{% endif %}; 33024+ {%- set sync_method_ordinals = interface|get_sync_method_ordinals -%} 33025+{%- if sync_method_ordinals %} 33026+ static inline constexpr uint32_t kSyncMethodOrdinals[] = { 33027+ {{sync_method_ordinals|sort|join(', \n')|indent(4)}} 33028+ }; 33029+{%- endif %} 33030 static constexpr bool HasUninterruptableMethods_ = 33031 {%- if interface|has_uninterruptable_methods %} true 33032 {%- else %} false{% endif %}; 33033diff --git a/src/mojo/public/tools/bindings/generators/cpp_templates/module-params-data.h.tmpl b/src/mojo/public/tools/bindings/generators/cpp_templates/module-params-data.h.tmpl 33034index af3bc5168beb5..ab71e91dab403 33035--- a/src/mojo/public/tools/bindings/generators/cpp_templates/module-params-data.h.tmpl 33036+++ b/src/mojo/public/tools/bindings/generators/cpp_templates/module-params-data.h.tmpl 33037@@ -17,13 +17,15 @@ 33038 #pragma clang diagnostic ignored "-Wunused-private-field" 33039 #endif 33040 33041+namespace mojo::internal { 33042+class ValidationContext; 33043+} 33044+ 33045 {%- for namespace in namespaces_as_array %} 33046 namespace {{namespace}} { 33047 {%- endfor %} 33048 namespace internal { 33049 33050-class ValidationContext; 33051- 33052 {#--- Interface parameter definitions #} 33053 {%- for interface in interfaces %} 33054 {%- for method in interface.methods %} 33055diff --git a/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py 33056index 014f2bf04da4f..add5a877cb7e3 33057--- a/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py 33058+++ b/src/mojo/public/tools/bindings/generators/mojom_cpp_generator.py 33059@@ -403,7 +403,7 @@ class Generator(generator.Generator): 33060 "get_qualified_name_for_kind": self._GetQualifiedNameForKind, 33061 "has_callbacks": mojom.HasCallbacks, 33062 "has_packed_method_ordinals": HasPackedMethodOrdinals, 33063- "has_sync_methods": mojom.HasSyncMethods, 33064+ "get_sync_method_ordinals": mojom.GetSyncMethodOrdinals, 33065 "has_uninterruptable_methods": mojom.HasUninterruptableMethods, 33066 "method_supports_lazy_serialization": 33067 self._MethodSupportsLazySerialization, 33068diff --git a/src/mojo/public/tools/mojom/mojom/generate/module.py b/src/mojo/public/tools/mojom/mojom/generate/module.py 33069index 3bba7dd285812..6f4c64645cfe2 33070--- a/src/mojo/public/tools/mojom/mojom/generate/module.py 33071+++ b/src/mojo/public/tools/mojom/mojom/generate/module.py 33072@@ -1703,11 +1703,8 @@ def MethodPassesInterfaces(method): 33073 return _AnyMethodParameterRecursive(method, IsInterfaceKind) 33074 33075 33076-def HasSyncMethods(interface): 33077- for method in interface.methods: 33078- if method.sync: 33079- return True 33080- return False 33081+def GetSyncMethodOrdinals(interface): 33082+ return [method.ordinal for method in interface.methods if method.sync] 33083 33084 33085 def HasUninterruptableMethods(interface): 33086diff --git a/src/net/android/android_http_util.cc b/src/net/android/android_http_util.cc 33087index 83f8831548faf..0a632c4ddb264 33088--- a/src/net/android/android_http_util.cc 33089+++ b/src/net/android/android_http_util.cc 33090@@ -20,9 +20,9 @@ jboolean JNI_HttpUtil_IsAllowedHeader( 33091 std::string header_name(ConvertJavaStringToUTF8(env, j_header_name)); 33092 std::string header_value(ConvertJavaStringToUTF8(env, j_header_value)); 33093 33094- return HttpUtil::IsValidHeaderName(header_name) 33095- && HttpUtil::IsSafeHeader(header_name) 33096- && HttpUtil::IsValidHeaderValue(header_value); 33097+ return HttpUtil::IsValidHeaderName(header_name) && 33098+ HttpUtil::IsSafeHeader(header_name, header_value) && 33099+ HttpUtil::IsValidHeaderValue(header_value); 33100 } 33101 33102 } // namespace net 33103diff --git a/src/net/base/features.cc b/src/net/base/features.cc 33104index f6b1c6faecdf7..ce6dd7e8b2da8 33105--- a/src/net/base/features.cc 33106+++ b/src/net/base/features.cc 33107@@ -266,5 +266,9 @@ const base::Feature kSwitchWebSocketThroughputWindow{ 33108 const base::FeatureParam<int> kRollingAverageWindow{ 33109 &kSwitchWebSocketThroughputWindow, "RollingAverageWindow", 100}; 33110 33111+const base::Feature kBlockNewForbiddenHeaders{ 33112+ "BlockNewForbiddenHeaders", 33113+ base::FEATURE_ENABLED_BY_DEFAULT}; 33114+ 33115 } // namespace features 33116 } // namespace net 33117diff --git a/src/net/base/features.h b/src/net/base/features.h 33118index 5e95b2e97ea94..251b287ebe30c 33119--- a/src/net/base/features.h 33120+++ b/src/net/base/features.h 33121@@ -393,6 +393,9 @@ NET_EXPORT extern const base::FeatureParam<int> kSmallReadBufferSize; 33122 NET_EXPORT extern const base::Feature kSwitchWebSocketThroughputWindow; 33123 NET_EXPORT extern const base::FeatureParam<int> kRollingAverageWindow; 33124 33125+// Whether to block newly added forbidden headers (https://crbug.com/1362331). 33126+NET_EXPORT extern const base::Feature kBlockNewForbiddenHeaders; 33127+ 33128 } // namespace features 33129 } // namespace net 33130 33131diff --git a/src/net/base/net_error_list.h b/src/net/base/net_error_list.h 33132index 4f00e42155fa6..aeb80d2ceb595 33133--- a/src/net/base/net_error_list.h 33134+++ b/src/net/base/net_error_list.h 33135@@ -557,6 +557,10 @@ NET_ERROR(CERT_KNOWN_INTERCEPTION_BLOCKED, -217) 33136 // -218 was SSL_OBSOLETE_VERSION which is not longer used. TLS 1.0/1.1 instead 33137 // cause SSL_VERSION_OR_CIPHER_MISMATCH now. 33138 33139+#if BUILDFLAG(IS_OHOS) 33140+// The connection uses an obsolete version of SSL/TLS or cipher. 33141+NET_ERROR(SSL_OBSOLETE_VERSION_OR_CIPHER, -218) 33142+#endif 33143 // Add new certificate error codes here. 33144 // 33145 // Update the value of CERT_END whenever you add a new certificate error 33146diff --git a/src/net/cert/cert_status_flags.cc b/src/net/cert/cert_status_flags.cc 33147index 5476b699af867..c21b72e9495ac 33148--- a/src/net/cert/cert_status_flags.cc 33149+++ b/src/net/cert/cert_status_flags.cc 33150@@ -50,6 +50,10 @@ CertStatus MapNetErrorToCertStatus(int error) { 33151 return CERT_STATUS_SYMANTEC_LEGACY; 33152 case ERR_CERT_KNOWN_INTERCEPTION_BLOCKED: 33153 return (CERT_STATUS_KNOWN_INTERCEPTION_BLOCKED | CERT_STATUS_REVOKED); 33154+#if BUILDFLAG(IS_OHOS) 33155+ case ERR_SSL_OBSOLETE_VERSION_OR_CIPHER: 33156+ return CERT_STATUS_LEGACY_TLS; 33157+#endif 33158 default: 33159 return 0; 33160 } 33161@@ -94,6 +98,10 @@ int MapCertStatusToNetError(CertStatus cert_status) { 33162 return ERR_CERT_UNABLE_TO_CHECK_REVOCATION; 33163 if (cert_status & CERT_STATUS_NO_REVOCATION_MECHANISM) 33164 return ERR_CERT_NO_REVOCATION_MECHANISM; 33165+#if BUILDFLAG(IS_OHOS) 33166+ if (cert_status & CERT_STATUS_LEGACY_TLS) 33167+ return ERR_SSL_OBSOLETE_VERSION_OR_CIPHER; 33168+#endif 33169 33170 // Unknown status. The assumption is 0 (an OK status) won't be used here. 33171 NOTREACHED(); 33172diff --git a/src/net/cert/cert_status_flags_list.h b/src/net/cert/cert_status_flags_list.h 33173index 416426faf8c81..b06d3bc4cd71b 33174--- a/src/net/cert/cert_status_flags_list.h 33175+++ b/src/net/cert/cert_status_flags_list.h 33176@@ -15,6 +15,8 @@ 33177 33178 // The possible status bits for CertStatus. 33179 // Bits 0 to 15 are for errors. 33180+#include "build/build_config.h" 33181+ 33182 CERT_STATUS_FLAG(COMMON_NAME_INVALID, 1 << 0) 33183 CERT_STATUS_FLAG(DATE_INVALID, 1 << 1) 33184 CERT_STATUS_FLAG(AUTHORITY_INVALID, 1 << 2) 33185@@ -46,3 +48,7 @@ CERT_STATUS_FLAG(SYMANTEC_LEGACY, 1 << 25) 33186 CERT_STATUS_FLAG(KNOWN_INTERCEPTION_BLOCKED, 1 << 26) 33187 CERT_STATUS_FLAG(DEPTH_ZERO_SELF_SIGNED_CERT, 1 << 27) 33188 // Bit 27 was CERT_STATUS_LEGACY_TLS. 33189+#if BUILDFLAG(IS_OHOS) 33190+//a legacy TLS version is allowed, but needs to be warned 33191+CERT_STATUS_FLAG(LEGACY_TLS, 1 << 28) 33192+#endif 33193\ No newline at end of file 33194diff --git a/src/net/cert/cert_verify_proc_ohos.cc b/src/net/cert/cert_verify_proc_ohos.cc 33195index 848203637a37a..1ef0335a1169d 33196--- a/src/net/cert/cert_verify_proc_ohos.cc 33197+++ b/src/net/cert/cert_verify_proc_ohos.cc 33198@@ -246,12 +246,9 @@ void X509CertChainVerify(const std::vector<std::string>& cert_chain, 33199 int* status, 33200 bool* is_issued_by_known_root, 33201 std::vector<std::string>* verified_chain) { 33202- *is_issued_by_known_root = true; 33203+ *is_issued_by_known_root = false; 33204 33205 *status = CertVerify(cert_chain); 33206- if (*status == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY) { 33207- *is_issued_by_known_root = false; 33208- } 33209 33210 verified_chain->assign(cert_chain.begin(), cert_chain.end()); 33211 } 33212diff --git a/src/net/http/http_util.cc b/src/net/http/http_util.cc 33213index 32948a3b46976..8a3ccab2221c2 33214--- a/src/net/http/http_util.cc 33215+++ b/src/net/http/http_util.cc 33216@@ -311,6 +311,23 @@ const char* const kForbiddenHeaderFields[] = { 33217 "via", 33218 }; 33219 33220+// A header string containing any of the following fields with a forbidden 33221+// method name in the value will cause an error. The list comes from the fetch 33222+// standard. 33223+const char* const kForbiddenHeaderFieldsWithForbiddenMethod[] = { 33224+ "x-http-method", 33225+ "x-http-method-override", 33226+ "x-method-override", 33227+}; 33228+ 33229+// The forbidden method names that is defined in the fetch standard, and used 33230+// to check the kForbiddenHeaderFileWithForbiddenMethod above. 33231+const char* const kForbiddenMethods[] = { 33232+ "connect", 33233+ "trace", 33234+ "track", 33235+}; 33236+ 33237 } // namespace 33238 33239 // static 33240@@ -325,7 +342,7 @@ bool HttpUtil::IsMethodIdempotent(base::StringPiece method) { 33241 } 33242 33243 // static 33244-bool HttpUtil::IsSafeHeader(base::StringPiece name) { 33245+bool HttpUtil::IsSafeHeader(base::StringPiece name, base::StringPiece value) { 33246 if (base::StartsWith(name, "proxy-", base::CompareCase::INSENSITIVE_ASCII) || 33247 base::StartsWith(name, "sec-", base::CompareCase::INSENSITIVE_ASCII)) 33248 return false; 33249@@ -334,6 +351,28 @@ bool HttpUtil::IsSafeHeader(base::StringPiece name) { 33250 if (base::LowerCaseEqualsASCII(name, field)) 33251 return false; 33252 } 33253+ 33254+ if (base::FeatureList::IsEnabled(features::kBlockNewForbiddenHeaders)) { 33255+ bool is_forbidden_header_fields_with_forbidden_method = false; 33256+ for (const char* field : kForbiddenHeaderFieldsWithForbiddenMethod) { 33257+ if (base::EqualsCaseInsensitiveASCII(name, field)) { 33258+ is_forbidden_header_fields_with_forbidden_method = true; 33259+ break; 33260+ } 33261+ } 33262+ if (is_forbidden_header_fields_with_forbidden_method) { 33263+ std::string value_string(value); 33264+ ValuesIterator method_iterator(value_string.begin(), value_string.end(), 33265+ ','); 33266+ while (method_iterator.GetNext()) { 33267+ base::StringPiece method = method_iterator.value_piece(); 33268+ for (const char* forbidden_method : kForbiddenMethods) { 33269+ if (base::EqualsCaseInsensitiveASCII(method, forbidden_method)) 33270+ return false; 33271+ } 33272+ } 33273+ } 33274+ } 33275 return true; 33276 } 33277 33278diff --git a/src/net/http/http_util.h b/src/net/http/http_util.h 33279index 7494ae8a8b877..f2dfd9513f25a 33280--- a/src/net/http/http_util.h 33281+++ b/src/net/http/http_util.h 33282@@ -94,11 +94,11 @@ class NET_EXPORT HttpUtil { 33283 // RFC 7231). 33284 static bool IsMethodIdempotent(base::StringPiece method); 33285 33286- // Returns true if it is safe to allow users and scripts to specify the header 33287- // named |name|. Returns true for headers not in the list at 33288- // https://fetch.spec.whatwg.org/#forbidden-header-name. Does not check header 33289- // validity. 33290- static bool IsSafeHeader(base::StringPiece name); 33291+ // Returns true if it is safe to allow users and scripts to specify a header 33292+ // with a given |name| and |value|. 33293+ // See https://fetch.spec.whatwg.org/#forbidden-request-header. 33294+ // Does not check header validity. 33295+ static bool IsSafeHeader(base::StringPiece name, base::StringPiece value); 33296 33297 // Returns true if |name| is a valid HTTP header name. 33298 static bool IsValidHeaderName(base::StringPiece name); 33299diff --git a/src/net/http/http_util_unittest.cc b/src/net/http/http_util_unittest.cc 33300index 7ba495f988cd2..fd782a65864ab 33301--- a/src/net/http/http_util_unittest.cc 33302+++ b/src/net/http/http_util_unittest.cc 33303@@ -45,9 +45,9 @@ TEST(HttpUtilTest, IsSafeHeader) { 33304 "via", 33305 }; 33306 for (size_t i = 0; i < base::size(unsafe_headers); ++i) { 33307- EXPECT_FALSE(HttpUtil::IsSafeHeader(unsafe_headers[i])) 33308+ EXPECT_FALSE(HttpUtil::IsSafeHeader(unsafe_headers[i], "")) 33309 << unsafe_headers[i]; 33310- EXPECT_FALSE(HttpUtil::IsSafeHeader(base::ToUpperASCII(unsafe_headers[i]))) 33311+ EXPECT_FALSE(HttpUtil::IsSafeHeader(base::ToUpperASCII(unsafe_headers[i]), "")) 33312 << unsafe_headers[i]; 33313 } 33314 static const char* const safe_headers[] = { 33315@@ -90,12 +90,45 @@ TEST(HttpUtilTest, IsSafeHeader) { 33316 "user-agenta", 33317 "user_agent", 33318 "viaa", 33319+ // Following 3 headers are safe if there is no forbidden method in values. 33320+ "x-http-method", 33321+ "x-http-method-override", 33322+ "x-method-override", 33323 }; 33324 for (size_t i = 0; i < base::size(safe_headers); ++i) { 33325- EXPECT_TRUE(HttpUtil::IsSafeHeader(safe_headers[i])) << safe_headers[i]; 33326- EXPECT_TRUE(HttpUtil::IsSafeHeader(base::ToUpperASCII(safe_headers[i]))) 33327+ EXPECT_TRUE(HttpUtil::IsSafeHeader(safe_headers[i], "")) << safe_headers[i]; 33328+ EXPECT_TRUE(HttpUtil::IsSafeHeader(base::ToUpperASCII(safe_headers[i]), "")) 33329 << safe_headers[i]; 33330 } 33331+ 33332+ static const char* const disallowed_with_forbidden_methods_headers[] = { 33333+ "x-http-method", 33334+ "x-http-method-override", 33335+ "x-method-override", 33336+ }; 33337+ static const struct { 33338+ const char* value; 33339+ bool is_safe; 33340+ } disallowed_values[] = {{"connect", false}, 33341+ {"trace", false}, 33342+ {"track", false}, 33343+ {"CONNECT", false}, 33344+ {"cOnnEcT", false}, 33345+ {"get", true}, 33346+ {"get,post", true}, 33347+ {"get,connect", false}, 33348+ {"get, connect", false}, 33349+ {"get,connect ", false}, 33350+ {"get,connect ,post", false}, 33351+ {"get,,,,connect", false}, 33352+ {"trace,get,PUT", false}}; 33353+ for (const auto* header : disallowed_with_forbidden_methods_headers) { 33354+ for (const auto& test_case : disallowed_values) { 33355+ EXPECT_EQ(test_case.is_safe, 33356+ HttpUtil::IsSafeHeader(header, test_case.value)) 33357+ << header << ": " << test_case.value; 33358+ } 33359+ } 33360 } 33361 33362 TEST(HttpUtilTest, HeadersIterator) { 33363diff --git a/src/net/socket/ssl_client_socket_impl.cc b/src/net/socket/ssl_client_socket_impl.cc 33364index 28dbb77d62efc..7a28b6f2b2127 33365--- a/src/net/socket/ssl_client_socket_impl.cc 33366+++ b/src/net/socket/ssl_client_socket_impl.cc 33367@@ -84,6 +84,10 @@ const int kCertVerifyPending = 1; 33368 // Default size of the internal BoringSSL buffers. 33369 const int kDefaultOpenSSLBufferSize = 17 * 1024; 33370 33371+#if BUILDFLAG(IS_OHOS) 33372+constexpr uint16_t kDefaultSSLVersionMinWarn = SSL_PROTOCOL_VERSION_TLS1_2; 33373+constexpr uint16_t k3DESCipher = 0x000a; 33374+#endif 33375 base::Value NetLogPrivateKeyOperationParams(uint16_t algorithm, 33376 SSLPrivateKey* key) { 33377 base::Value value(base::Value::Type::DICTIONARY); 33378@@ -850,6 +854,32 @@ int SSLClientSocketImpl::Init() { 33379 SSL_set_mode(ssl_.get(), mode.set_mask); 33380 SSL_clear_mode(ssl_.get(), mode.clear_mask); 33381 33382+#if BUILDFLAG(IS_OHOS) 33383+ // Use BoringSSL defaults, but disable HMAC-SHA1 ciphers in ECDSA. 33384+ // These are the remaining CBC-mode ECDSA ciphers. 33385+ std::string command("ALL:!aPSK:!ECDSA+SHA1"); 33386+ 33387+ if (ssl_config_.require_ecdhe) 33388+ command.append(":!kRSA"); 33389+ 33390+ if (ssl_config_.disable_legacy_crypto) { 33391+ command.append(":!3DES"); 33392+ } 33393+ 33394+ // Remove any disabled ciphers. 33395+ for (uint16_t id : context_->config().disabled_cipher_suites) { 33396+ const SSL_CIPHER* cipher = SSL_get_cipher_by_value(id); 33397+ if (cipher) { 33398+ command.append(":!"); 33399+ command.append(SSL_CIPHER_get_name(cipher)); 33400+ } 33401+ } 33402+ 33403+ if (!SSL_set_strict_cipher_list(ssl_.get(), command.c_str())) { 33404+ LOG(ERROR) << "SSL_set_cipher_list('" << command << "') failed"; 33405+ return ERR_UNEXPECTED; 33406+ } 33407+#else 33408 // Use BoringSSL defaults, but disable 3DES and HMAC-SHA1 ciphers in ECDSA. 33409 // These are the remaining CBC-mode ECDSA ciphers. 33410 std::string command("ALL:!aPSK:!ECDSA+SHA1:!3DES"); 33411@@ -870,6 +900,7 @@ int SSLClientSocketImpl::Init() { 33412 LOG(ERROR) << "SSL_set_cipher_list('" << command << "') failed"; 33413 return ERR_UNEXPECTED; 33414 } 33415+#endif 33416 33417 if (ssl_config_.disable_legacy_crypto) { 33418 static const uint16_t kVerifyPrefs[] = { 33419@@ -1298,9 +1329,30 @@ ssl_verify_result_t SSLClientSocketImpl::HandleVerifyResult() { 33420 result = ct_result; 33421 } 33422 33423+#if BUILDFLAG(IS_OHOS) 33424+ // If no other errors occurred, check whether the connection used a legacy 33425+ SSLInfo ssl_info; 33426+ bool has_ssl_info = GetSSLInfo(&ssl_info); 33427+ DCHECK(has_ssl_info); 33428+ uint16_t cipher_suite = 33429+ SSLConnectionStatusToCipherSuite(ssl_info.connection_status); 33430+ if (result == OK && 33431+ (SSL_version(ssl_.get()) < kDefaultSSLVersionMinWarn || 33432+ cipher_suite == k3DESCipher)) { 33433+ server_cert_verify_result_.cert_status |= CERT_STATUS_LEGACY_TLS; 33434+ 33435+ // Only set the resulting net error if it hasn't been previously bypassed. 33436+ if (!IsAllowedBadCert(server_cert_.get(), nullptr)) 33437+ result = ERR_SSL_OBSOLETE_VERSION_OR_CIPHER; 33438+ } 33439+#endif 33440+ 33441 is_fatal_cert_error_ = 33442 IsCertStatusError(server_cert_verify_result_.cert_status) && 33443 result != ERR_CERT_KNOWN_INTERCEPTION_BLOCKED && 33444+#if BUILDFLAG(IS_OHOS) 33445+ result != ERR_SSL_OBSOLETE_VERSION_OR_CIPHER && 33446+#endif 33447 context_->transport_security_state()->ShouldSSLErrorsBeFatal( 33448 host_and_port_.host()); 33449 33450diff --git a/src/net/socket/ssl_client_socket_unittest.cc b/src/net/socket/ssl_client_socket_unittest.cc 33451index 25470bb57e873..08a1c82a8e7b9 33452--- a/src/net/socket/ssl_client_socket_unittest.cc 33453+++ b/src/net/socket/ssl_client_socket_unittest.cc 33454@@ -3368,7 +3368,11 @@ TEST_F(SSLClientSocketTest, 3DES) { 33455 // 3DES is always disabled. 33456 int rv; 33457 ASSERT_TRUE(CreateAndConnectSSLClientSocket(SSLConfig(), &rv)); 33458- EXPECT_THAT(rv, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); 33459+#if BUILDFLAG(IS_OHOS) 33460+ EXPECT_THAT(rv, IsError(ERR_SSL_OBSOLETE_VERSION_OR_CIPHER)); 33461+#else 33462+ EXPECT_THAT(rv, IsError(ERR_SSL_VERSION_OR_CIPHER_MISMATCH)); 33463+#endif 33464 } 33465 33466 TEST_F(SSLClientSocketTest, SHA1) { 33467@@ -5491,7 +5495,16 @@ TEST_P(SSLHandshakeDetailsTest, Metrics) { 33468 base::HistogramTester histograms; 33469 int rv; 33470 ASSERT_TRUE(CreateAndConnectSSLClientSocket(client_config, &rv)); 33471+#if BUILDFLAG(IS_OHOS) 33472+ if (version < SSL_CONNECTION_VERSION_TLS1_2) { 33473+ EXPECT_THAT(rv, IsError(ERR_SSL_OBSOLETE_VERSION_OR_CIPHER)); 33474+ return; 33475+ } else { 33476+ EXPECT_THAT(rv, IsOk()); 33477+ } 33478+#else 33479 EXPECT_THAT(rv, IsOk()); 33480+#endif 33481 33482 // Sanity-check the socket matches the test parameters. 33483 SSLInfo info; 33484diff --git a/src/net/socket/ssl_connect_job.cc b/src/net/socket/ssl_connect_job.cc 33485index e580d84e48abf..1c6456c0ed264 33486--- a/src/net/socket/ssl_connect_job.cc 33487+++ b/src/net/socket/ssl_connect_job.cc 33488@@ -42,6 +42,9 @@ namespace { 33489 // Timeout for the SSL handshake portion of the connect. 33490 constexpr base::TimeDelta kSSLHandshakeTimeout(base::Seconds(30)); 33491 33492+#if BUILDFLAG(IS_OHOS) 33493+constexpr uint16_t k3DESCipher = 0x000a; 33494+#endif 33495 } // namespace 33496 33497 SSLSocketParams::SSLSocketParams( 33498@@ -469,7 +472,16 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { 33499 } 33500 } 33501 } 33502- if (ssl_info.peer_signature_algorithm == SSL_SIGN_RSA_PKCS1_SHA1) { 33503+#if BUILDFLAG(IS_OHOS) 33504+ if (cipher_suite == k3DESCipher /* TLS_RSA_WITH_3DES_EDE_CBC_SHA */) { 33505+ // TLS_RSA_WITH_3DES_EDE_CBC_SHA does not involve a peer signature. 33506+ DCHECK_EQ(0, ssl_info.peer_signature_algorithm); 33507+ fallback = sent_sha1_cert 33508+ ? SSLLegacyCryptoFallback::kSentSHA1CertAndUsed3DES 33509+ : SSLLegacyCryptoFallback::kUsed3DES; 33510+ } else 33511+#endif 33512+ if (ssl_info.peer_signature_algorithm == SSL_SIGN_RSA_PKCS1_SHA1) { 33513 fallback = sent_sha1_cert 33514 ? SSLLegacyCryptoFallback::kSentSHA1CertAndUsedSHA1 33515 : SSLLegacyCryptoFallback::kUsedSHA1; 33516diff --git a/src/net/ssl/ssl_legacy_crypto_fallback.h b/src/net/ssl/ssl_legacy_crypto_fallback.h 33517index 820e149f76d25..debff3fd89b38 33518--- a/src/net/ssl/ssl_legacy_crypto_fallback.h 33519+++ b/src/net/ssl/ssl_legacy_crypto_fallback.h 33520@@ -16,6 +16,28 @@ namespace net { 33521 // These values are logged to UMA. Entries should not be renumbered and 33522 // numeric values should never be reused. Please keep in sync with 33523 // "SSLLegacyCryptoFallback" in src/tools/metrics/histograms/enums.xml. 33524+#if BUILDFLAG(IS_OHOS) 33525+enum class SSLLegacyCryptoFallback { 33526+ // The connection did not use the fallback. 33527+ kNoFallback = 0, 33528+ // The connection used the fallback and negotiated 3DES. 33529+ kUsed3DES = 1, 33530+ // The connection used the fallback and negotiated SHA-1. 33531+ kUsedSHA1 = 2, 33532+ // The connection used the fallback and sent a SHA-1 certificate. 33533+ kSentSHA1Cert = 3, 33534+ // The connection used the fallback, negotiated 3DES, and sent a SHA-1 33535+ // certificate. 33536+ kSentSHA1CertAndUsed3DES = 4, 33537+ // The connection used the fallback, negotiated SHA-1, and sent a SHA-1 33538+ // certificate. 33539+ kSentSHA1CertAndUsedSHA1 = 5, 33540+ // The connection used the fallback for an unknown reason, likely a 33541+ // transient network error. 33542+ kUnknownReason = 6, 33543+ kMaxValue = kUnknownReason, 33544+}; 33545+#else 33546 enum class SSLLegacyCryptoFallback { 33547 // The connection did not use the fallback. 33548 kNoFallback = 0, 33549@@ -35,6 +57,7 @@ enum class SSLLegacyCryptoFallback { 33550 kUnknownReason = 6, 33551 kMaxValue = kUnknownReason, 33552 }; 33553+#endif 33554 33555 } // namespace net 33556 33557diff --git a/src/ohos_nweb/BUILD.gn b/src/ohos_nweb/BUILD.gn 33558index fbd9b4848fa72..74afb6ce40d0c 33559--- a/src/ohos_nweb/BUILD.gn 33560+++ b/src/ohos_nweb/BUILD.gn 33561@@ -56,7 +56,6 @@ config("cef_nweb_config") { 33562 33563 if (product_name == "rk3568") { 33564 defines += [ 33565- "DEFAULT_PORTRAIT", 33566 "RK3568", 33567 ] 33568 } 33569@@ -123,6 +122,8 @@ component("cef_nweb") { 33570 "src/cef_delegate/nweb_render_handler.h", 33571 "src/cef_delegate/nweb_resource_handler.cc", 33572 "src/cef_delegate/nweb_resource_handler.h", 33573+ "src/cef_delegate/nweb_select_popup_menu_callback.cc", 33574+ "src/cef_delegate/nweb_select_popup_menu_callback.h", 33575 "src/cef_delegate/nweb_touch_handle_state_impl.cc", 33576 "src/cef_delegate/nweb_touch_handle_state_impl.h", 33577 "src/cef_delegate/nweb_web_storage_delegate.cc", 33578@@ -133,9 +134,7 @@ component("cef_nweb") { 33579 33580 deps = [ 33581 "//base:base", 33582- "//cef:libcef_dll_wrapper", 33583- "//cef:libweb_engine", 33584- "//content/public/common:static_switches", 33585+ "//content/public/common", 33586 "//ui/events/keycodes:x11", 33587 "//url", 33588 ] 33589@@ -227,19 +226,6 @@ component("nweb_sources") { 33590 libs = [ "surface.z" ] 33591 } 33592 33593-shared_library("libnweb_adapter") { 33594- configs += [ "//build/config/sanitizers:cfi_config" ] 33595- deps = [ ":nweb_sources" ] 33596- 33597- if (defined(ohos_nweb_ex) && ohos_nweb_ex) { 33598- deps += [ "//ohos_nweb_ex:nweb_ex" ] 33599- } 33600-} 33601- 33602-static_library("libohosnweb_static") { 33603- deps = [ ":nweb_sources" ] 33604-} 33605- 33606 ################################################# 33607 33608 config("ohosnweb_core_config") { 33609diff --git a/src/ohos_nweb/include/nweb.h b/src/ohos_nweb/include/nweb.h 33610index dceeb2ef1997e..761b46af69684 33611--- a/src/ohos_nweb/include/nweb.h 33612+++ b/src/ohos_nweb/include/nweb.h 33613@@ -27,8 +27,10 @@ 33614 #include "nweb_history_list.h" 33615 #include "nweb_javascript_result_callback.h" 33616 #include "nweb_preference.h" 33617+#include "nweb_release_surface_callback.h" 33618 #include "nweb_value_callback.h" 33619 #include "nweb_hit_testresult.h" 33620+#include "nweb_web_message.h" 33621 33622 namespace OHOS::NWeb { 33623 class NWebHandler; 33624@@ -69,6 +71,7 @@ struct OHOS_NWEB_EXPORT NWebInitArgs { 33625 std::list<std::string> web_engine_args_to_add; 33626 std::list<std::string> web_engine_args_to_delete; 33627 bool multi_renderer_process = false; 33628+ bool is_enhance_surface = false; 33629 }; 33630 33631 struct OHOS_NWEB_EXPORT NWebCreateInfo { 33632@@ -85,6 +88,7 @@ struct OHOS_NWEB_EXPORT NWebCreateInfo { 33633 33634 /* rs producer surface, for acquiring elgsurface from ohos */ 33635 void *producer_surface = nullptr; 33636+ void* enhance_surface_info = nullptr; 33637 }; 33638 33639 enum class OHOS_NWEB_EXPORT DragAction { 33640@@ -103,6 +107,8 @@ struct OHOS_NWEB_EXPORT DragEvent { 33641 DragAction action; 33642 }; 33643 33644+using WebState = std::shared_ptr<std::vector<uint8_t>>; 33645+ 33646 class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> { 33647 public: 33648 NWeb() = default; 33649@@ -276,8 +282,9 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> { 33650 */ 33651 virtual void PutDownloadCallback( 33652 std::shared_ptr<NWebDownloadCallback> downloadListener) = 0; 33653+ 33654 /** 33655- * Sets the NWebHandler that will receive various notifications and 33656+ * Set the NWebHandler that will receive various notifications and 33657 * requests. This will replace the current handler. 33658 * 33659 * @param client NWebHandler: an implementation of NWebHandler This value 33660@@ -473,7 +480,7 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> { 33661 * @param portHandle the port to send message. 33662 * @param data the message to send. 33663 */ 33664- virtual void PostPortMessage(std::string& portHandle, std::string& data) = 0; 33665+ virtual void PostPortMessage(std::string& portHandle, std::shared_ptr<NWebMessage> data) = 0; 33666 33667 /** 33668 * set the callback of the message port. 33669@@ -482,7 +489,7 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> { 33670 * @param callback to reveive the result when the other port post message. 33671 */ 33672 virtual void SetPortMessageCallback(std::string& portHandle, 33673- std::shared_ptr<NWebValueCallback<std::string>> callback) = 0; 33674+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) = 0; 33675 33676 virtual void SendDragEvent(const DragEvent& dragEvent) const = 0; 33677 33678@@ -558,6 +565,67 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this<NWeb> { 33679 * @param web has image or not 33680 */ 33681 virtual std::shared_ptr<NWebHistoryList> GetHistoryList() = 0; 33682+ 33683+ /** 33684+ * Set the NWebReleaseSurfaceCallback that will receive release surface event. 33685+ * This will replace the current handler. 33686+ * 33687+ * @param releaseSurfaceListener NWebReleaseSurfaceCallback. 33688+ */ 33689+ virtual void PutReleaseSurfaceCallback( 33690+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) = 0; 33691+ 33692+ /** 33693+ * Get web back forward state. 33694+ * 33695+ * @return web back forward state. 33696+ */ 33697+ virtual WebState SerializeWebState() = 0; 33698+ 33699+ /** 33700+ * Restore web back forward state. 33701+ * 33702+ * @param web back forward state. 33703+ */ 33704+ virtual bool RestoreWebState(WebState state) = 0; 33705+ 33706+ /** 33707+ * Move page up. 33708+ * 33709+ * @param top whether move to the top. 33710+ */ 33711+ virtual void PageUp(bool top) = 0; 33712+ 33713+ /** 33714+ * Move page down. 33715+ * 33716+ * @param bottom whether move to the bottom. 33717+ */ 33718+ virtual void PageDown(bool bottom) = 0; 33719+ 33720+ /** 33721+ * Scroll to the position. 33722+ * 33723+ * @param x horizontal coordinate. 33724+ * @param y vertical coordinate. 33725+ */ 33726+ virtual void ScrollTo(float x, float y) = 0; 33727+ 33728+ /** 33729+ * Scroll by the delta distance. 33730+ * 33731+ * @param delta_x horizontal offset. 33732+ * @param delta_y vertical offset. 33733+ */ 33734+ virtual void ScrollBy(float delta_x, float delta_y) = 0; 33735+ 33736+ /** 33737+ * Slide scroll by the speed. 33738+ * 33739+ * @param vx horizontal slide speed. 33740+ * @param vy vertical slide speed. 33741+ */ 33742+ virtual void SlideScroll(float vx, float vy) = 0; 33743 }; 33744 } // namespace OHOS::NWeb 33745 33746diff --git a/src/ohos_nweb/include/nweb_context_menu_params.h b/src/ohos_nweb/include/nweb_context_menu_params.h 33747index 197f4050d6b6f..1889d386cabf1 33748--- a/src/ohos_nweb/include/nweb_context_menu_params.h 33749+++ b/src/ohos_nweb/include/nweb_context_menu_params.h 33750@@ -38,22 +38,29 @@ public: 33751 enum ContextMenuMediaType { 33752 CM_MT_NONE, 33753 CM_MT_IMAGE, 33754- CM_MT_VIDEO, 33755- CM_MT_AUDIO, 33756- CM_MT_FILE, 33757- CM_MT_PLUGIN, 33758 }; 33759 33760 enum ContextMenuEditStateFlags { 33761 CM_ES_NONE = 0, 33762- CM_ES_CAN_UNDO = 1 << 0, 33763- CM_ES_CAN_REDO = 1 << 1, 33764- CM_ES_CAN_CUT = 1 << 2, 33765- CM_ES_CAN_COPY = 1 << 3, 33766- CM_ES_CAN_PASTE = 1 << 4, 33767- CM_ES_CAN_DELETE = 1 << 5, 33768- CM_ES_CAN_SELECT_ALL = 1 << 6, 33769- CM_ES_CAN_TRANSLATE = 1 << 7, 33770+ CM_ES_CAN_CUT = 1 << 0, 33771+ CM_ES_CAN_COPY = 1 << 1, 33772+ CM_ES_CAN_PASTE = 1 << 2, 33773+ CM_ES_CAN_SELECT_ALL = 1 << 3, 33774+ }; 33775+ 33776+ enum ContextMenuInputFieldType { 33777+ CM_IT_NONE = 0, 33778+ CM_IT_PLAINTEXT = 1, 33779+ CM_IT_PASSWORD = 2, 33780+ CM_IT_NUMBER = 3, 33781+ CM_IT_TELEPHONE = 4, 33782+ CM_IT_OTHER = 5, 33783+ }; 33784+ 33785+ enum ContextMenuSourceType { 33786+ CM_ST_NONE = 0, 33787+ CM_ST_MOUSE = 1, 33788+ CM_ST_LONG_PRESS = 2, 33789 }; 33790 33791 virtual ~NWebContextMenuParams() = default; 33792@@ -65,9 +72,9 @@ public: 33793 virtual int32_t GetContextMenuTypeFlags() = 0; 33794 33795 virtual std::string GetLinkUrl() = 0; 33796- 33797+ 33798 virtual std::string GetUnfilteredLinkUrl() = 0; 33799- 33800+ 33801 virtual std::string GetSourceUrl() = 0; 33802 33803 virtual bool HasImageContents() = 0; 33804@@ -81,6 +88,12 @@ public: 33805 virtual bool IsEditable() = 0; 33806 33807 virtual int32_t GetEditStateFlags() = 0; 33808+ 33809+ virtual ContextMenuSourceType GetSourceType() = 0; 33810+ 33811+ virtual ContextMenuInputFieldType GetInputFieldType() = 0; 33812+ 33813+ virtual std::string GetSelectionText() = 0; 33814 }; 33815 33816 class OHOS_NWEB_EXPORT NWebQuickMenuParams { 33817@@ -123,6 +136,11 @@ enum MenuEventFlags { 33818 33819 enum MenuCommandId { 33820 CI_IMAGE_COPY = 0, 33821+ CI_COPY = 1, 33822+ CI_PASTE = 2, 33823+ CI_CUT = 3, 33824+ CI_SELECT_ALL = 4, 33825+ CI_DELETE = 5, 33826 }; 33827 33828 class OHOS_NWEB_EXPORT NWebContextMenuCallback { 33829@@ -137,9 +155,9 @@ public: 33830 class OHOS_NWEB_EXPORT NWebQuickMenuCallback { 33831 public: 33832 virtual ~NWebQuickMenuCallback() = default; 33833- 33834+ 33835 virtual void Continue(int32_t commandId, MenuEventFlags flag) = 0; 33836- 33837+ 33838 virtual void Cancel() = 0; 33839 }; 33840 } 33841diff --git a/src/ohos_nweb/include/nweb_data_base.h b/src/ohos_nweb/include/nweb_data_base.h 33842index 104b7145b8f27..bbf35d382f7bc 33843--- a/src/ohos_nweb/include/nweb_data_base.h 33844+++ b/src/ohos_nweb/include/nweb_data_base.h 33845@@ -60,10 +60,12 @@ public: 33846 * 33847 * @param host the host to which the credentials apply. 33848 * @param realm the realm to which the credentials apply. 33849- * @return return an array containing username and password. 33850+ * @param username the username. 33851+ * @param password the password. 33852+ * @param passwordSize the password array size. 33853 */ 33854- virtual std::vector<std::string> GetHttpAuthCredentials(const std::string& host, 33855- const std::string& realm) const = 0; 33856+ virtual void GetHttpAuthCredentials(const std::string& host, const std::string& realm, 33857+ std::string& username, char* password, uint32_t passwordSize) const = 0; 33858 33859 /** 33860 * @brief gets whether the instance holds the specified permissions for the specified source. 33861diff --git a/src/ohos_nweb/include/nweb_handler.h b/src/ohos_nweb/include/nweb_handler.h 33862index f09b58edb8019..9f1ba1ddf8bf9 33863--- a/src/ohos_nweb/include/nweb_handler.h 33864+++ b/src/ohos_nweb/include/nweb_handler.h 33865@@ -35,6 +35,7 @@ 33866 #include "nweb_js_ssl_error_result.h" 33867 #include "nweb_js_ssl_select_cert_result.h" 33868 #include "nweb_key_event.h" 33869+#include "nweb_select_popup_menu.h" 33870 #include "nweb_touch_handle_state.h" 33871 #include "nweb_url_resource_error.h" 33872 #include "nweb_url_resource_request.h" 33873@@ -79,6 +80,71 @@ enum class SslError { 33874 UNTRUSTED, 33875 }; 33876 33877+// Cursor type values. 33878+enum class CursorType: int32_t { 33879+ CT_POINTER = 0, 33880+ CT_CROSS, 33881+ CT_HAND, 33882+ CT_IBEAM, 33883+ CT_WAIT, 33884+ CT_HELP, 33885+ CT_EASTRESIZE, 33886+ CT_NORTHRESIZE, 33887+ CT_NORTHEASTRESIZE, 33888+ CT_NORTHWESTRESIZE, 33889+ CT_SOUTHRESIZE, 33890+ CT_SOUTHEASTRESIZE, 33891+ CT_SOUTHWESTRESIZE, 33892+ CT_WESTRESIZE, 33893+ CT_NORTHSOUTHRESIZE, 33894+ CT_EASTWESTRESIZE, 33895+ CT_NORTHEASTSOUTHWESTRESIZE, 33896+ CT_NORTHWESTSOUTHEASTRESIZE, 33897+ CT_COLUMNRESIZE, 33898+ CT_ROWRESIZE, 33899+ CT_MIDDLEPANNING, 33900+ CT_EASTPANNING, 33901+ CT_NORTHPANNING, 33902+ CT_NORTHEASTPANNING, 33903+ CT_NORTHWESTPANNING, 33904+ CT_SOUTHPANNING, 33905+ CT_SOUTHEASTPANNING, 33906+ CT_SOUTHWESTPANNING, 33907+ CT_WESTPANNING, 33908+ CT_MOVE, 33909+ CT_VERTICALTEXT, 33910+ CT_CELL, 33911+ CT_CONTEXTMENU, 33912+ CT_ALIAS, 33913+ CT_PROGRESS, 33914+ CT_NODROP, 33915+ CT_COPY, 33916+ CT_NONE, 33917+ CT_NOTALLOWED, 33918+ CT_ZOOMIN, 33919+ CT_ZOOMOUT, 33920+ CT_GRAB, 33921+ CT_GRABBING, 33922+ CT_MIDDLE_PANNING_VERTICAL, 33923+ CT_MIDDLE_PANNING_HORIZONTAL, 33924+ CT_CUSTOM, 33925+ CT_DND_NONE, 33926+ CT_DND_MOVE, 33927+ CT_DND_COPY, 33928+ CT_DND_LINK, 33929+ CT_MAX_VALUE, 33930+}; 33931+ 33932+struct NWebCursorInfo { 33933+ int32_t width = 0; 33934+ int32_t height = 0; 33935+ int32_t x = 0; 33936+ int32_t y = 0; 33937+ float scale = 1.0; 33938+ // buff will be width*height*4 bytes in size and represents a BGRA image with an upper-left origin. 33939+ std::unique_ptr<uint8_t[]> buff = nullptr; 33940+}; 33941+ 33942 using FileSelectorCallback = NWebValueCallback<std::vector<std::string>&>; 33943 33944 class OHOS_NWEB_EXPORT NWebHandler { 33945@@ -465,6 +531,19 @@ public: 33946 virtual bool OnUnProcessedKeyEvent(std::shared_ptr<NWebKeyEvent> event) { 33947 return false; 33948 } 33949+ 33950+ /** 33951+ * @brief Called when the browser's cursor has changed. 33952+ * @param type Cursor type. 33953+ * @param info If |type| is CT_CUSTOM then |info| will be populated with the custom cursor information. 33954+ * @return True if the cursor change was handled or false for default handling. 33955+ */ 33956+ virtual bool OnCursorChange(const CursorType& type, const NWebCursorInfo& info) { 33957+ return false; 33958+ } 33959+ 33960+ virtual void OnSelectPopupMenu(std::shared_ptr<NWebSelectPopupMenuParam> params, 33961+ std::shared_ptr<NWebSelectPopupMenuCallback> callback) {} 33962 }; 33963 } // namespace OHOS::NWeb 33964 33965diff --git a/src/ohos_nweb/include/nweb_preference.h b/src/ohos_nweb/include/nweb_preference.h 33966index 11cf96bb8db23..36b1ecac418f4 33967--- a/src/ohos_nweb/include/nweb_preference.h 33968+++ b/src/ohos_nweb/include/nweb_preference.h 33969@@ -118,11 +118,11 @@ public: 33970 virtual void PutFixedFontFamilyName(std::string font) = 0; 33971 33972 /** 33973- * Enables or disables the force dark mode for this WebView. 33974+ * Enables or disables the force dark mode for this NWeb. 33975 * 33976- * @param forceDark true if set the force dark mode for this WebView. 33977+ * @param forceDark True if set the force dark mode enabled for this NWeb. 33978 */ 33979- virtual void PutDarkModeEnabled(int forceDark) = 0; 33980+ virtual void PutForceDarkModeEnabled(int forceDark) = 0; 33981 33982 /** 33983 * Put whether JavaScript can open windows by JavaScript. This applies to the 33984@@ -372,11 +372,11 @@ public: 33985 virtual std::string FixedFontFamilyName() = 0; 33986 33987 /** 33988- * Get if the dark mode for this WebView is supported. 33989+ * Get whether the force dark mode is enabled for this NWeb. 33990 * 33991- * @see PutDarkModeEnabled 33992+ * @see PutForceDarkModeEnabled 33993 */ 33994- virtual int DarkModeEnabled() = 0; 33995+ virtual int ForceDarkModeEnabled() = 0; 33996 33997 /** 33998 * Get if JavaScript can open windows. 33999@@ -516,6 +516,44 @@ public: 34000 * @see PutMultiWindowAccess 34001 */ 34002 virtual bool IsMultiWindowAccess() = 0; 34003+ 34004+ /** 34005+ * Enables or disables the dark mode prefer-color-scheme for this NWeb. 34006+ * 34007+ * @param darkScheme True if set the dark mode prefer-color-scheme enabled for this NWeb. 34008+ */ 34009+ virtual void PutDarkSchemeEnabled(int darkScheme) = 0; 34010+ 34011+ /** 34012+ * Get whether the dark mode prefer-color-scheme is enabled for this NWeb. 34013+ * 34014+ * @see PutDarkSchemeEnabled 34015+ */ 34016+ virtual int DarkSchemeEnabled() = 0; 34017+ 34018+ /** 34019+ * Get whether enable horizontal scroll bar. 34020+ * 34021+ * @see PutHorizontalScrollBarAccess 34022+ */ 34023+ virtual bool IsHorizontalScrollBarAccess() = 0; 34024+ 34025+ /** 34026+ * Get whether enable vertical scroll bar. 34027+ * 34028+ * @see PutVerticalScrollBarAccess 34029+ */ 34030+ virtual bool IsVerticalScrollBarAccess() = 0; 34031+ 34032+ /** 34033+ * Put whether enable horizontal scroll bar, default value is false. 34034+ */ 34035+ virtual void PutHorizontalScrollBarAccess(bool flag) = 0; 34036+ 34037+ /** 34038+ * Put whether enable vertical scroll bar, default value is false. 34039+ */ 34040+ virtual void PutVerticalScrollBarAccess(bool flag) = 0; 34041 }; 34042 } // namespace OHOS::NWeb 34043 #endif // NWEB_PREFERENCE_H 34044diff --git a/src/ohos_nweb/include/nweb_release_surface_callback.h b/src/ohos_nweb/include/nweb_release_surface_callback.h 34045new file mode 100755 34046index 0000000000000..a92075ac36d65 34047--- /dev/null 34048+++ b/src/ohos_nweb/include/nweb_release_surface_callback.h 34049@@ -0,0 +1,34 @@ 34050+/* 34051+ * Copyright (c) 2022 Huawei Device Co., Ltd. 34052+ * Licensed under the Apache License, Version 2.0 (the "License"); 34053+ * you may not use this file except in compliance with the License. 34054+ * You may obtain a copy of the License at 34055+ * 34056+ * http://www.apache.org/licenses/LICENSE-2.0 34057+ * 34058+ * Unless required by applicable law or agreed to in writing, software 34059+ * distributed under the License is distributed on an "AS IS" BASIS, 34060+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34061+ * See the License for the specific language governing permissions and 34062+ * limitations under the License. 34063+ */ 34064+ 34065+#ifndef NWEB_RELEASE_SURFACE_CALLBACK_H 34066+#define NWEB_RELEASE_SURFACE_CALLBACK_H 34067+ 34068+#include <string> 34069+ 34070+#include "nweb_export.h" 34071+ 34072+namespace OHOS::NWeb { 34073+class OHOS_NWEB_EXPORT NWebReleaseSurfaceCallback { 34074+public: 34075+ NWebReleaseSurfaceCallback() = default; 34076+ 34077+ virtual ~NWebReleaseSurfaceCallback() = default; 34078+ 34079+ virtual void ReleaseSurface() = 0; 34080+}; 34081+} // namespace OHOS::NWeb 34082+ 34083+#endif // NWEB_RELEASE_SURFACE_CALLBACK_H 34084\ No newline at end of file 34085diff --git a/src/ohos_nweb/include/nweb_select_popup_menu.h b/src/ohos_nweb/include/nweb_select_popup_menu.h 34086new file mode 100644 34087index 0000000000000..5ec65542e7ba0 34088--- /dev/null 34089+++ b/src/ohos_nweb/include/nweb_select_popup_menu.h 34090@@ -0,0 +1,76 @@ 34091+/* 34092+ * Copyright (c) 2023 Huawei Device Co., Ltd. 34093+ * Licensed under the Apache License, Version 2.0 (the "License"); 34094+ * you may not use this file except in compliance with the License. 34095+ * You may obtain a copy of the License at 34096+ * 34097+ * http://www.apache.org/licenses/LICENSE-2.0 34098+ * 34099+ * Unless required by applicable law or agreed to in writing, software 34100+ * distributed under the License is distributed on an "AS IS" BASIS, 34101+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34102+ * See the License for the specific language governing permissions and 34103+ * limitations under the License. 34104+ */ 34105+ 34106+#ifndef NWEB_SELECT_POPUP_MENU_H 34107+#define NWEB_SELECT_POPUP_MENU_H 34108+ 34109+#include <memory> 34110+#include <string> 34111+#include <vector> 34112+ 34113+namespace OHOS::NWeb { 34114+ 34115+struct SelectMenuBound { 34116+ int x = -1; 34117+ int y = -1; 34118+ int width = -1; 34119+ int height = -1; 34120+}; 34121+ 34122+enum SelectPopupMenuItemType { 34123+ SP_OPTION, 34124+ SP_CHECKABLE_OPTION, 34125+ SP_GROUP, 34126+ SP_SEPARATOR, 34127+ SP_SUBMENU, 34128+}; 34129+ 34130+enum TextDirection { 34131+ SP_UNKNOWN, 34132+ SP_RTL, 34133+ SP_LTR, 34134+}; 34135+ 34136+struct SelectPopupMenuItem { 34137+ std::string label = ""; 34138+ std::string toolTip = ""; 34139+ SelectPopupMenuItemType type = SP_OPTION; 34140+ uint32_t action = 0; 34141+ TextDirection textDirection = SP_UNKNOWN; 34142+ bool enabled = false; 34143+ bool hasTextDirectionOverride = false; 34144+ bool checked = false; 34145+}; 34146+ 34147+struct NWebSelectPopupMenuParam { 34148+ SelectMenuBound bounds; 34149+ int itemHeight = -1; 34150+ double itemFontSize = -1; 34151+ int selectedItem = -1; 34152+ std::vector<SelectPopupMenuItem> menuItems; 34153+ bool rightAligned = false; 34154+ bool allowMultipleSelection = false; 34155+}; 34156+ 34157+class NWebSelectPopupMenuCallback { 34158+public: 34159+ virtual ~NWebSelectPopupMenuCallback() = default; 34160+ 34161+ virtual void Continue(const std::vector<int32_t>& indices) = 0; 34162+ 34163+ virtual void Cancel() = 0; 34164+}; 34165+} 34166+#endif 34167\ No newline at end of file 34168diff --git a/src/ohos_nweb/include/nweb_web_message.h b/src/ohos_nweb/include/nweb_web_message.h 34169new file mode 100755 34170index 0000000000000..1d5abfea195c0 34171--- /dev/null 34172+++ b/src/ohos_nweb/include/nweb_web_message.h 34173@@ -0,0 +1,45 @@ 34174+/* 34175+ * Copyright (c) 2022 Huawei Device Co., Ltd. 34176+ * Licensed under the Apache License, Version 2.0 (the "License"); 34177+ * you may not use this file except in compliance with the License. 34178+ * You may obtain a copy of the License at 34179+ * 34180+ * http://www.apache.org/licenses/LICENSE-2.0 34181+ * 34182+ * Unless required by applicable law or agreed to in writing, software 34183+ * distributed under the License is distributed on an "AS IS" BASIS, 34184+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34185+ * See the License for the specific language governing permissions and 34186+ * limitations under the License. 34187+ */ 34188+ 34189+#ifndef NWEB_WEB_MESSAGE_H_ 34190+#define NWEB_WEB_MESSAGE_H_ 34191+ 34192+#include <vector> 34193+ 34194+#include "nweb_value.h" 34195+#include "nweb_export.h" 34196+ 34197+namespace OHOS::NWeb { 34198+class OHOS_NWEB_EXPORT NWebMessage : public NWebValue { 34199+public: 34200+ explicit NWebMessage(NWebValue::Type type) : NWebValue(type){} 34201+ 34202+ ~NWebMessage() = default; 34203+ 34204+ void SetBinary(std::vector<uint8_t>& binary_data) { 34205+ binary_data_.reserve(binary_data.size()); 34206+ binary_data_ = binary_data; 34207+ } 34208+ 34209+ std::vector<uint8_t> GetBinary() { 34210+ return binary_data_; 34211+ } 34212+ 34213+private: 34214+ std::vector<uint8_t> binary_data_; 34215+}; 34216+} 34217+ 34218+#endif // NWEB_WEB_MESSAGE_H_ 34219diff --git a/src/ohos_nweb/src/capi/nweb_app_client_extension_callback.h b/src/ohos_nweb/src/capi/nweb_app_client_extension_callback.h 34220index cbd38e98a8012..35b01bd6fdda0 34221--- a/src/ohos_nweb/src/capi/nweb_app_client_extension_callback.h 34222+++ b/src/ohos_nweb/src/capi/nweb_app_client_extension_callback.h 34223@@ -18,20 +18,16 @@ 34224 34225 #include <stddef.h> 34226 34227-#include "nweb_capi_export.h" 34228- 34229-struct NWEB_CAPI_EXPORT NWebReceivedIconInfo { 34230- const char* image_url; 34231- size_t width; 34232- size_t height; 34233- int color_type{0}; 34234- int alpha_type{0}; 34235-}; 34236- 34237-struct NWEB_CAPI_EXPORT NWebAppClientExtensionCallback { 34238- int NWebID{0}; 34239- void (*OnReceivedFaviconUrl)(const NWebReceivedIconInfo&, int); 34240- void (*OnLoadStarted)(bool toDifferentDocument, int); 34241+struct NWebAppClientExtensionCallback { 34242+ size_t struct_size = sizeof(NWebAppClientExtensionCallback); 34243+ int nweb_id{0}; 34244+ void (*OnReceivedFaviconUrl)(const char* image_url, 34245+ size_t width, 34246+ size_t height, 34247+ int color_type, 34248+ int alpha_type, 34249+ int nweb_id); 34250+ void (*OnLoadStarted)(bool toDifferentDocument, int nweb_id); 34251 }; 34252 34253 #endif // OHOS_NWEB_SRC_NWEB_APP_CLIENT_EXTENSION_CALLBACK_H_ 34254diff --git a/src/ohos_nweb/src/cef_delegate/nweb_application.cc b/src/ohos_nweb/src/cef_delegate/nweb_application.cc 34255index 370536415b042..6ac4069fc63ae 34256--- a/src/ohos_nweb/src/cef_delegate/nweb_application.cc 34257+++ b/src/ohos_nweb/src/cef_delegate/nweb_application.cc 34258@@ -17,8 +17,12 @@ 34259 34260 #include <cstdlib> 34261 #include <thread> 34262-#include "content/public/common/content_switches.h" 34263+ 34264+#include "cef/include/wrapper/cef_closure_task.h" 34265 #include "cef/include/wrapper/cef_helpers.h" 34266+#include "content/public/browser/browser_task_traits.h" 34267+#include "content/public/browser/browser_thread.h" 34268+#include "content/public/common/content_switches.h" 34269 #include "nweb_handler_delegate.h" 34270 34271 namespace OHOS::NWeb { 34272@@ -30,7 +34,7 @@ NWebApplication::NWebApplication( 34273 : preference_delegate_(preference_delegate), 34274 url_(url), 34275 handler_delegate_(handler_delegate), 34276- window_(window) {} 34277+ window_(window){} 34278 34279 NWebApplication::~NWebApplication() {} 34280 34281@@ -95,16 +99,37 @@ void NWebApplication::OnContextInitialized() { 34282 LOG(INFO) << "NWebApplication::OnContextInitialized"; 34283 CEF_REQUIRE_UI_THREAD(); 34284 CreateBrowser(); 34285+ auto runWebInitedCallback = OhosAdapterHelper::GetInstance().GetInitWebAdapter()->GetRunWebInitedCallback(); 34286+ content::GetUIThreadTaskRunner({})->PostTask( 34287+ FROM_HERE, base::BindOnce(&NWebApplication::RunWebInitedCallback, this, 34288+ runWebInitedCallback)); 34289 34290 OnContextInitializedInternal(); 34291 } 34292 34293+void NWebApplication::RunWebInitedCallback(WebRunInitedCallback* callback) 34294+{ 34295+ if (callback != nullptr) { 34296+ callback->RunInitedCallback(); 34297+ delete callback; 34298+ callback = nullptr; 34299+ } else { 34300+ LOG(ERROR) << "There is no web inited callback to run."; 34301+ } 34302+} 34303+ 34304 void NWebApplication::OnBeforeChildProcessLaunch(CefRefPtr<CefCommandLine> command_line) 34305 { 34306 LOG(INFO) << "NWebApplication::OnBeforeChildProcessLaunch"; 34307 if (CefCommandLine::GetGlobalCommandLine()->HasSwitch(::switches::kOhosCustomScheme)) { 34308 command_line->AppendSwitchWithValue(::switches::kOhosCustomScheme, CefCommandLine::GetGlobalCommandLine()->GetSwitchValue(::switches::kOhosCustomScheme).ToString()); 34309 } 34310+ 34311+ if (CefCommandLine::GetGlobalCommandLine()->HasSwitch(::switches::kOhosHapPath)) { 34312+ LOG(INFO) << "hap package is not decompresssed"; 34313+ command_line->AppendSwitchWithValue(::switches::kOhosHapPath, 34314+ CefCommandLine::GetGlobalCommandLine()->GetSwitchValue(::switches::kOhosHapPath).ToString()); 34315+ } 34316 } 34317 /* CefBrowserProcessHandler methods end */ 34318 34319diff --git a/src/ohos_nweb/src/cef_delegate/nweb_application.h b/src/ohos_nweb/src/cef_delegate/nweb_application.h 34320index 5d5e8cf8b296f..fb10de0f9380c 34321--- a/src/ohos_nweb/src/cef_delegate/nweb_application.h 34322+++ b/src/ohos_nweb/src/cef_delegate/nweb_application.h 34323@@ -20,6 +20,7 @@ 34324 #include "cef/include/cef_app.h" 34325 #include "nweb_handler_delegate.h" 34326 #include "nweb_preference_delegate.h" 34327+#include "ohos_adapter_helper.h" 34328 34329 namespace OHOS::NWeb { 34330 namespace switches { 34331@@ -64,11 +65,12 @@ class NWebApplication : public CefApp, 34332 void OnContextInitializedInternal(); 34333 std::vector<std::string> CustomSchemeCmdLineSplit(std::string str, const char split); 34334 34335+ void RunWebInitedCallback(WebRunInitedCallback* callback); 34336+ 34337 std::shared_ptr<NWebPreferenceDelegate> preference_delegate_ = nullptr; 34338 std::string url_; 34339 CefRefPtr<NWebHandlerDelegate> handler_delegate_{nullptr}; 34340 void* window_ = nullptr; 34341- 34342 // Include the default reference counting implementation. 34343 IMPLEMENT_REFCOUNTING(NWebApplication); 34344 }; // NWebApplication 34345diff --git a/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.cc b/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.cc 34346index 803a2571a8968..b5e211126ad8e 34347--- a/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.cc 34348+++ b/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.cc 34349@@ -23,7 +23,10 @@ namespace { 34350 using CmTf = NWebContextMenuParams::ContextMenuTypeFlags; 34351 using CmMt = NWebContextMenuParams::ContextMenuMediaType; 34352 using CmEf = NWebContextMenuParams::ContextMenuEditStateFlags; 34353+using CmIt = NWebContextMenuParams::ContextMenuInputFieldType; 34354+using CmSt = NWebContextMenuParams::ContextMenuSourceType; 34355 using QmEf = NWebQuickMenuParams::QuickMenuEditStateFlags; 34356+ 34357 const std::unordered_map<int, int> kCmTypeFlagMap = { 34358 {CM_TYPEFLAG_NONE, CmTf::CM_TF_NONE}, 34359 {CM_TYPEFLAG_PAGE, CmTf::CM_TF_PAGE}, 34360@@ -37,22 +40,18 @@ const std::unordered_map<int, int> kCmTypeFlagMap = { 34361 const std::unordered_map<int, int> kCmMediaTypeMap = { 34362 {CM_MEDIATYPE_NONE, CmMt::CM_MT_NONE}, 34363 {CM_MEDIATYPE_IMAGE, CmMt::CM_MT_IMAGE}, 34364- {CM_MEDIATYPE_VIDEO, CmMt::CM_MT_VIDEO}, 34365- {CM_MEDIATYPE_AUDIO, CmMt::CM_MT_AUDIO}, 34366- {CM_MEDIATYPE_FILE, CmMt::CM_MT_FILE}, 34367- {CM_MEDIATYPE_PLUGIN, CmMt::CM_MT_PLUGIN}, 34368+ {CM_MEDIATYPE_VIDEO, CmMt::CM_MT_NONE}, 34369+ {CM_MEDIATYPE_AUDIO, CmMt::CM_MT_NONE}, 34370+ {CM_MEDIATYPE_FILE, CmMt::CM_MT_NONE}, 34371+ {CM_MEDIATYPE_PLUGIN, CmMt::CM_MT_NONE}, 34372 }; 34373 34374 const std::unordered_map<int, int> kCmEditStateFlagsMap = { 34375 {CM_EDITFLAG_NONE, CmEf::CM_ES_NONE}, 34376- {CM_EDITFLAG_CAN_UNDO, CmEf::CM_ES_CAN_UNDO}, 34377- {CM_EDITFLAG_CAN_REDO, CmEf::CM_ES_CAN_REDO}, 34378 {CM_EDITFLAG_CAN_CUT, CmEf::CM_ES_CAN_CUT}, 34379 {CM_EDITFLAG_CAN_COPY, CmEf::CM_ES_CAN_COPY}, 34380 {CM_EDITFLAG_CAN_PASTE, CmEf::CM_ES_CAN_PASTE}, 34381- {CM_EDITFLAG_CAN_DELETE, CmEf::CM_ES_CAN_DELETE}, 34382 {CM_EDITFLAG_CAN_SELECT_ALL, CmEf::CM_ES_CAN_SELECT_ALL}, 34383- {CM_EDITFLAG_CAN_TRANSLATE, CmEf::CM_ES_CAN_TRANSLATE}, 34384 }; 34385 34386 const std::unordered_map<int, int> kQmEditStateFlagsMap = { 34387@@ -77,6 +76,34 @@ const std::unordered_map<int, int> KMenuEventFlagsMap = { 34388 34389 const std::unordered_map<int32_t, cef_menu_id_t> KMenuCommandIdMap = { 34390 {CI_IMAGE_COPY, MENU_ID_IMAGE_COPY}, 34391+ {CI_CUT, MENU_ID_CUT}, 34392+ {CI_COPY, MENU_ID_COPY}, 34393+ {CI_PASTE, MENU_ID_PASTE}, 34394+ {CI_DELETE, MENU_ID_DELETE}, 34395+ {CI_SELECT_ALL, MENU_ID_SELECT_ALL}, 34396+}; 34397+ 34398+const std::unordered_map<int, int> kCmInputFieldTypeMap = { 34399+ {CM_INPUTFIELDTYPE_NONE, CmIt::CM_IT_NONE}, 34400+ {CM_INPUTFIELDTYPE_PLAINTEXT, CmIt::CM_IT_PLAINTEXT}, 34401+ {CM_INPUTFIELDTYPE_PASSWORD, CmIt::CM_IT_PASSWORD}, 34402+ {CM_INPUTFIELDTYPE_NUMBER, CmIt::CM_IT_NUMBER}, 34403+ {CM_INPUTFIELDTYPE_TELEPHONE, CmIt::CM_IT_TELEPHONE}, 34404+ {CM_INPUTFIELDTYPE_OTHER, CmIt::CM_IT_OTHER}, 34405+}; 34406+ 34407+const std::unordered_map<int, int> kCmSourceTypeMap = { 34408+ {CM_SOURCETYPE_NONE, CmSt::CM_ST_NONE}, 34409+ {CM_SOURCETYPE_MOUSE, CmSt::CM_ST_MOUSE}, 34410+ {CM_SOURCETYPE_KEYBOARD, CmSt::CM_ST_NONE}, 34411+ {CM_SOURCETYPE_TOUCH, CmSt::CM_ST_NONE}, 34412+ {CM_SOURCETYPE_TOUCH_EDIT_MENU, CmSt::CM_ST_NONE}, 34413+ {CM_SOURCETYPE_LONG_PRESS, CmSt::CM_ST_LONG_PRESS}, 34414+ {CM_SOURCETYPE_LONG_TAP, CmSt::CM_ST_NONE}, 34415+ {CM_SOURCETYPE_TOUCH_HANDLE, CmSt::CM_ST_NONE}, 34416+ {CM_SOURCETYPE_STYLUS, CmSt::CM_ST_NONE}, 34417+ {CM_SOURCETYPE_ADJUST_SELECTION, CmSt::CM_ST_NONE}, 34418+ {CM_SOURCETYPE_SELECTION_RESET, CmSt::CM_ST_NONE}, 34419 }; 34420 34421 cef_menu_id_t ConvertCommandId(int32_t id) { 34422@@ -101,29 +128,50 @@ int32_t ConvertMenuFlags(int32_t value, 34423 34424 CmMt ConvertContextMenuMediaType( 34425 CefContextMenuParams::MediaType value) { 34426- std::unordered_map<int, int>::const_iterator iter = 34427+ std::unordered_map<int, int>::const_iterator iter = 34428 kCmMediaTypeMap.find(static_cast<int32_t>(value)); 34429 if (iter != kCmMediaTypeMap.end()) { 34430 return static_cast<CmMt>(iter->second); 34431 } 34432 return CmMt::CM_MT_NONE; 34433 } 34434+ 34435+CmIt ConvertContextMenuInputFieldType(CefContextMenuParams::InputFieldType value) { 34436+ std::unordered_map<int, int>::const_iterator iter = 34437+ kCmInputFieldTypeMap.find(static_cast<int32_t>(value)); 34438+ if (iter != kCmInputFieldTypeMap.end()) { 34439+ return static_cast<CmIt>(iter->second); 34440+ } 34441+ return CmIt::CM_IT_NONE; 34442+} 34443+ 34444+CmSt ConvertContextMenuSourceType(CefContextMenuParams::SourceType value) { 34445+ std::unordered_map<int, int>::const_iterator iter = 34446+ kCmSourceTypeMap.find(static_cast<int32_t>(value)); 34447+ if (iter != kCmSourceTypeMap.end()) { 34448+ return static_cast<CmSt>(iter->second); 34449+ } 34450+ return CmSt::CM_ST_NONE; 34451 } 34452+} // namespace end 34453 34454 namespace OHOS::NWeb { 34455 NWebContextMenuParamsImpl::NWebContextMenuParamsImpl( 34456- CefRefPtr<CefContextMenuParams> params) : params_(params) {} 34457+ CefRefPtr<CefContextMenuParams> params, 34458+ float virutal_device_ratio) : 34459+ params_(params), 34460+ virutal_device_ratio_(virutal_device_ratio) {} 34461 34462 int32_t NWebContextMenuParamsImpl::GetXCoord() { 34463 if (params_ != nullptr) { 34464- return params_->GetXCoord(); 34465+ return params_->GetXCoord() * virutal_device_ratio_; 34466 } 34467 return -1; 34468 } 34469 34470 int32_t NWebContextMenuParamsImpl::GetYCoord() { 34471 if (params_ != nullptr) { 34472- return params_->GetYCoord(); 34473+ return params_->GetYCoord() * virutal_device_ratio_;; 34474 } 34475 return -1; 34476 } 34477@@ -141,14 +189,14 @@ std::string NWebContextMenuParamsImpl::GetLinkUrl() { 34478 } 34479 return std::string(); 34480 } 34481- 34482+ 34483 std::string NWebContextMenuParamsImpl::GetUnfilteredLinkUrl() { 34484 if (params_ != nullptr) { 34485 return params_->GetUnfilteredLinkUrl().ToString(); 34486 } 34487 return std::string(); 34488 } 34489- 34490+ 34491 std::string NWebContextMenuParamsImpl::GetSourceUrl() { 34492 if (params_ != nullptr) { 34493 return params_->GetSourceUrl().ToString(); 34494@@ -165,14 +213,14 @@ bool NWebContextMenuParamsImpl::HasImageContents() { 34495 34496 std::string NWebContextMenuParamsImpl::GetTitleText() { 34497 if (params_ != nullptr) { 34498- return params_->GetTitleText(); 34499+ return params_->GetTitleText().ToString(); 34500 } 34501 return std::string(); 34502 } 34503 34504 std::string NWebContextMenuParamsImpl::GetPageUrl() { 34505 if (params_ != nullptr) { 34506- return params_->GetPageUrl(); 34507+ return params_->GetPageUrl().ToString(); 34508 } 34509 return std::string(); 34510 } 34511@@ -186,9 +234,10 @@ CmMt NWebContextMenuParamsImpl::GetMediaType() { 34512 34513 bool NWebContextMenuParamsImpl::IsEditable() { 34514 if (params_ != nullptr) { 34515- return params_->HasImageContents(); 34516+ return params_->IsEditable(); 34517 } 34518- return params_->IsEditable(); 34519+ 34520+ return false; 34521 } 34522 34523 int32_t NWebContextMenuParamsImpl::GetEditStateFlags() { 34524@@ -198,6 +247,27 @@ int32_t NWebContextMenuParamsImpl::GetEditStateFlags() { 34525 return 0; 34526 } 34527 34528+CmIt NWebContextMenuParamsImpl::GetInputFieldType() { 34529+ if (params_ != nullptr) { 34530+ return ConvertContextMenuInputFieldType(params_->GetInputFieldType()); 34531+ } 34532+ return CmIt::CM_IT_NONE; 34533+} 34534+ 34535+CmSt NWebContextMenuParamsImpl::GetSourceType() { 34536+ if (params_ != nullptr) { 34537+ return ConvertContextMenuSourceType(params_->GetSourceType()); 34538+ } 34539+ return CmSt::CM_ST_NONE; 34540+} 34541+ 34542+std::string NWebContextMenuParamsImpl::GetSelectionText() 34543+{ 34544+ if (params_ != nullptr) { 34545+ return params_->GetSelectionText().ToString(); 34546+ } 34547+ return std::string(); 34548+} 34549 NWebQuickMenuParamsImpl::NWebQuickMenuParamsImpl( 34550 int32_t x, int32_t y, int32_t width, int32_t height, int32_t flags) 34551 : x_(x), y_(y), width_(width), height_(height), 34552@@ -262,7 +332,7 @@ NWebContextMenuCallbackImpl::NWebContextMenuCallbackImpl( 34553 void NWebContextMenuCallbackImpl::Continue( 34554 int32_t commandId, MenuEventFlags flag) { 34555 if (callback_ != nullptr) { 34556- int32_t event_flag = 34557+ int32_t event_flag = 34558 ConvertMenuFlags(static_cast<int32_t>(flag), KMenuEventFlagsMap); 34559 callback_->Continue(ConvertCommandId(commandId), 34560 static_cast<cef_event_flags_t>(event_flag)); 34561@@ -281,7 +351,7 @@ NWebQuickMenuCallbackImpl::NWebQuickMenuCallbackImpl( 34562 void NWebQuickMenuCallbackImpl::Continue( 34563 int32_t commandId, MenuEventFlags flag) { 34564 if (callback_ != nullptr) { 34565- int32_t event_flag = 34566+ int32_t event_flag = 34567 ConvertMenuFlags(static_cast<int32_t>(flag), KMenuEventFlagsMap); 34568 callback_->Continue(commandId, 34569 static_cast<cef_event_flags_t>(event_flag)); 34570diff --git a/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.h b/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.h 34571index 0ea7e5d7d0b08..54efd7bed15b4 34572--- a/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.h 34573+++ b/src/ohos_nweb/src/cef_delegate/nweb_context_menu_params_impl.h 34574@@ -24,7 +24,8 @@ namespace OHOS::NWeb { 34575 class NWebContextMenuParamsImpl : public NWebContextMenuParams { 34576 public: 34577 explicit NWebContextMenuParamsImpl( 34578- CefRefPtr<CefContextMenuParams> params); 34579+ CefRefPtr<CefContextMenuParams> params, 34580+ float virutal_device_ratio); 34581 int32_t GetXCoord() override; 34582 int32_t GetYCoord() override; 34583 int32_t GetContextMenuTypeFlags() override; 34584@@ -37,9 +38,12 @@ class NWebContextMenuParamsImpl : public NWebContextMenuParams { 34585 ContextMenuMediaType GetMediaType() override; 34586 bool IsEditable() override; 34587 int32_t GetEditStateFlags() override; 34588- 34589+ ContextMenuInputFieldType GetInputFieldType() override; 34590+ ContextMenuSourceType GetSourceType() override; 34591+ std::string GetSelectionText() override; 34592 private: 34593 CefRefPtr<CefContextMenuParams> params_; 34594+ float virutal_device_ratio_ = 1.0; 34595 }; 34596 34597 class NWebQuickMenuParamsImpl : public NWebQuickMenuParams { 34598diff --git a/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.cc b/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.cc 34599index 08c3c2cfe3e76..48bf4d81b4377 34600--- a/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.cc 34601+++ b/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.cc 34602@@ -54,20 +54,16 @@ void NWebDataBaseDelegate::SaveHttpAuthCredentials(const std::string& host, 34603 data_base->SaveHttpAuthCredentials(host, realm,username, password); 34604 } 34605 34606-std::vector<std::string> NWebDataBaseDelegate::GetHttpAuthCredentials(const std::string& host, const std::string& realm) { 34607+void NWebDataBaseDelegate::GetHttpAuthCredentials(const std::string& host, const std::string& realm, 34608+ std::string& username, char* password, uint32_t passwordSize) { 34609 CefRefPtr<CefDataBase> data_base = GetGlobalCefDataBase(); 34610 if (data_base == nullptr) { 34611- return {}; 34612+ return; 34613 } 34614 34615- std::vector<CefString> method_vector; 34616- data_base->GetHttpAuthCredentials(host, realm, method_vector); 34617- 34618- std::vector<std::string> username_password; 34619- for (std::string value : method_vector) { 34620- username_password.push_back(value); 34621- } 34622- return username_password; 34623+ CefString usernameCef; 34624+ data_base->GetHttpAuthCredentials(host, realm, usernameCef, password, passwordSize); 34625+ username = usernameCef; 34626 } 34627 34628 bool NWebDataBaseDelegate::ExistPermissionByOrigin(const std::string& origin, int type) 34629diff --git a/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.h b/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.h 34630index d7f322230a281..999b359ae38c0 34631--- a/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.h 34632+++ b/src/ohos_nweb/src/cef_delegate/nweb_data_base_delegate.h 34633@@ -36,7 +36,8 @@ class NWebDataBaseDelegate { 34634 void SaveHttpAuthCredentials(const std::string& host, const std::string& realm, 34635 const std::string& username, const char* password); 34636 34637- std::vector<std::string> GetHttpAuthCredentials(const std::string& host, const std::string& realm); 34638+ void GetHttpAuthCredentials(const std::string& host, const std::string& realm, 34639+ std::string& username, char* password, uint32_t passwordSize); 34640 34641 bool ExistPermissionByOrigin(const std::string& origin, int type); 34642 34643diff --git a/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc b/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc 34644index 6ce40d12f9391..4fb5d7687f927 34645--- a/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc 34646+++ b/src/ohos_nweb/src/cef_delegate/nweb_delegate.cc 34647@@ -26,10 +26,13 @@ 34648 #include "cef/include/cef_app.h" 34649 #include "cef/include/cef_base.h" 34650 #include "cef/include/cef_request_context.h" 34651+#include "content/public/common/content_switches.h" 34652 #include "nweb_find_delegate.h" 34653 #include "nweb_preference_delegate.h" 34654 #include "url/gurl.h" 34655 34656+#include "cef/libcef/browser/navigation_state_serializer.h" 34657+ 34658 namespace OHOS::NWeb { 34659 34660 static const float maxZoomFactor = 10.0; 34661@@ -51,6 +54,38 @@ class JavaScriptResultCallbackImpl : public CefJavaScriptResultCallback { 34662 IMPLEMENT_REFCOUNTING(JavaScriptResultCallbackImpl); 34663 }; 34664 34665+class CefWebMessageReceiverImpl : public CefWebMessageReceiver { 34666+ public: 34667+ CefWebMessageReceiverImpl( 34668+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) 34669+ : callback_(callback){}; 34670+ void OnMessage(CefRefPtr<CefValue> message) override { 34671+ if (callback_ != nullptr) { 34672+ auto data = std::make_shared<OHOS::NWeb::NWebMessage>(NWebValue::Type::NONE); 34673+ if (message->GetType() == VTYPE_STRING) { 34674+ data->SetType(NWebValue::Type::STRING); 34675+ data->SetString(message->GetString()); 34676+ } else if (message->GetType() == VTYPE_BINARY) { 34677+ CefRefPtr<CefBinaryValue> binValue = message->GetBinary(); 34678+ size_t len = binValue->GetSize(); 34679+ std::vector<uint8_t> arr(len); 34680+ binValue->GetData(&arr[0], len, 0); 34681+ data->SetType(NWebValue::Type::BINARY); 34682+ data->SetBinary(arr); 34683+ } else { 34684+ LOG(ERROR) << "OnMessage not support type"; 34685+ return; 34686+ } 34687+ callback_->OnReceiveValue(data); 34688+ } 34689+ } 34690+ 34691+ private: 34692+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback_; 34693+ 34694+ IMPLEMENT_REFCOUNTING(CefWebMessageReceiverImpl); 34695+}; 34696+ 34697 class StoreWebArchiveResultCallbackImpl 34698 : public CefStoreWebArchiveResultCallback { 34699 public: 34700@@ -119,24 +154,23 @@ NWebDelegate::NWebDelegate(int argc, const char* argv[]) 34701 : argc_(argc), argv_(argv) {} 34702 34703 NWebDelegate::~NWebDelegate() { 34704- if (display_listener_ != nullptr && 34705- display_manager_adapter_ != nullptr) { 34706+ if (display_listener_ != nullptr && display_manager_adapter_ != nullptr) { 34707 display_manager_adapter_->UnregisterDisplayListener(display_listener_); 34708 } 34709 } 34710 34711-bool NWebDelegate::Init(void* window) { 34712+bool NWebDelegate::Init(bool is_enhance_surface, void* window) { 34713 preference_delegate_ = std::make_shared<NWebPreferenceDelegate>(); 34714 find_delegate_ = std::make_shared<NWebFindDelegate>(); 34715- 34716+ is_enhance_surface_ = is_enhance_surface; 34717 display_manager_adapter_ = 34718- OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 34719+ OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 34720 if (display_manager_adapter_ == nullptr) { 34721 return false; 34722 } 34723 34724 display_listener_ = 34725- std::make_shared<DisplayScreenListener>(shared_from_this()); 34726+ std::make_shared<DisplayScreenListener>(shared_from_this()); 34727 if (display_listener_ == nullptr) { 34728 return false; 34729 } 34730@@ -158,10 +192,10 @@ bool NWebDelegate::Init(void* window) { 34731 } 34732 34733 std::string url_for_init = ""; 34734- InitializeCef(url_for_init, window); 34735+ InitializeCef(url_for_init, is_enhance_surface_, window); 34736 34737 std::shared_ptr<DisplayAdapter> display = 34738- display_manager_adapter_->GetDefaultDisplay(); 34739+ display_manager_adapter_->GetDefaultDisplay(); 34740 if (display != nullptr) { 34741 NotifyScreenInfoChanged(display->GetRotation(), display->GetOrientation()); 34742 SetVirtualPixelRatio(display->GetVirtualPixelRatio()); 34743@@ -171,8 +205,7 @@ bool NWebDelegate::Init(void* window) { 34744 } 34745 34746 void NWebDelegate::OnDestroy(bool is_close_all) { 34747- if (display_listener_ != nullptr && 34748- display_manager_adapter_ != nullptr) { 34749+ if (display_listener_ != nullptr && display_manager_adapter_ != nullptr) { 34750 display_manager_adapter_->UnregisterDisplayListener(display_listener_); 34751 } 34752 if (handler_delegate_ != nullptr) { 34753@@ -196,6 +229,15 @@ void NWebDelegate::RegisterDownLoadListener( 34754 handler_delegate_->RegisterDownLoadListener(download_listener); 34755 } 34756 34757+void NWebDelegate::RegisterReleaseSurfaceListener( 34758+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) { 34759+ if (handler_delegate_ == nullptr) { 34760+ LOG(ERROR) << "fail to register release surface, NWEB handler is nullptr"; 34761+ return; 34762+ } 34763+ handler_delegate_->RegisterReleaseSurfaceListener(releaseSurfaceListener); 34764+} 34765+ 34766 void NWebDelegate::RegisterFindListener( 34767 std::shared_ptr<NWebFindCallback> find_listener) { 34768 if (find_delegate_ == nullptr) { 34769@@ -243,6 +285,15 @@ void NWebDelegate::RegisterWebAppClientExtensionListener( 34770 web_app_client_extension_listener); 34771 } 34772 34773+void NWebDelegate::UnRegisterWebAppClientExtensionListener() { 34774+ if (handler_delegate_ == nullptr) { 34775+ LOG(ERROR) << "fail to unregister web app client extension listener, nweb " 34776+ "handler delegate is nullptr"; 34777+ return; 34778+ } 34779+ handler_delegate_->UnRegisterWebAppClientExtensionListener(); 34780+} 34781+ 34782 void NWebDelegate::RegisterNWebHandler(std::shared_ptr<NWebHandler> handler) { 34783 if (handler_delegate_ == nullptr) { 34784 LOG(ERROR) 34785@@ -285,19 +336,22 @@ void NWebDelegate::Resize(uint32_t width, uint32_t height) { 34786 34787 void NWebDelegate::OnTouchPress(int32_t id, double x, double y) { 34788 if (event_handler_ != nullptr) { 34789- event_handler_->OnTouchPress(id, x, y); 34790+ event_handler_->OnTouchPress(id, x / default_virtual_pixel_ratio_, 34791+ y / default_virtual_pixel_ratio_); 34792 } 34793 } 34794 34795 void NWebDelegate::OnTouchRelease(int32_t id, double x, double y) { 34796 if (event_handler_ != nullptr) { 34797- event_handler_->OnTouchRelease(id, x, y); 34798+ event_handler_->OnTouchRelease(id, x / default_virtual_pixel_ratio_, 34799+ y / default_virtual_pixel_ratio_); 34800 } 34801 } 34802 34803 void NWebDelegate::OnTouchMove(int32_t id, double x, double y) { 34804 if (event_handler_ != nullptr) { 34805- event_handler_->OnTouchMove(id, x, y); 34806+ event_handler_->OnTouchMove(id, x / default_virtual_pixel_ratio_, 34807+ y / default_virtual_pixel_ratio_); 34808 } 34809 } 34810 34811@@ -315,21 +369,32 @@ bool NWebDelegate::SendKeyEvent(int32_t keyCode, int32_t keyAction) { 34812 return retVal; 34813 } 34814 34815-void NWebDelegate::SendMouseWheelEvent(double x, double y, double deltaX, double deltaY) { 34816+void NWebDelegate::SendMouseWheelEvent(double x, 34817+ double y, 34818+ double deltaX, 34819+ double deltaY) { 34820 if (event_handler_ != nullptr) { 34821- event_handler_->SendMouseWheelEvent(x, y, deltaX, deltaY); 34822+ event_handler_->SendMouseWheelEvent(x / default_virtual_pixel_ratio_, 34823+ y / default_virtual_pixel_ratio_, 34824+ deltaX / default_virtual_pixel_ratio_, 34825+ deltaY / default_virtual_pixel_ratio_); 34826 } 34827 } 34828 34829-void NWebDelegate::SendMouseEvent(int x, int y, int button, int action, int count) { 34830+void NWebDelegate::SendMouseEvent(int x, 34831+ int y, 34832+ int button, 34833+ int action, 34834+ int count) { 34835 if (event_handler_ != nullptr) { 34836- event_handler_->SendMouseEvent(x, y, button, action, count); 34837+ event_handler_->SendMouseEvent(x / default_virtual_pixel_ratio_, 34838+ y / default_virtual_pixel_ratio_, button, 34839+ action, count); 34840 } 34841 } 34842 34843-void NWebDelegate::NotifyScreenInfoChanged( 34844- RotationType rotation, 34845- OrientationType orientation) { 34846+void NWebDelegate::NotifyScreenInfoChanged(RotationType rotation, 34847+ OrientationType orientation) { 34848 if (render_handler_ != nullptr) { 34849 if (display_manager_adapter_ == nullptr) { 34850 LOG(ERROR) << "Get display_manager_adapter_ failed"; 34851@@ -348,8 +413,9 @@ void NWebDelegate::NotifyScreenInfoChanged( 34852 } 34853 int width = display->GetWidth() / display_ratio; 34854 int height = display->GetHeight() / display_ratio; 34855- render_handler_->SetScreenInfo(rotation, orientation, width, height, 34856- display_ratio); 34857+ bool default_portrait = display_manager_adapter_->IsDefaultPortrait(); 34858+ render_handler_->SetScreenInfo({rotation, orientation, width, height, 34859+ display_ratio, default_portrait}); 34860 auto browser = GetBrowser(); 34861 if (browser != nullptr && browser->GetHost() != nullptr) { 34862 browser->GetHost()->NotifyScreenInfoChanged(); 34863@@ -585,8 +651,7 @@ int NWebDelegate::ZoomOut() const { 34864 return NWEB_OK; 34865 } 34866 34867-bool NWebDelegate::SetZoomInFactor(float factor) 34868-{ 34869+bool NWebDelegate::SetZoomInFactor(float factor) { 34870 LOG(INFO) << "NWebDelegate::SetZoomInFactor"; 34871 if (factor <= 0) { 34872 return false; 34873@@ -595,8 +660,7 @@ bool NWebDelegate::SetZoomInFactor(float factor) 34874 return true; 34875 } 34876 34877-bool NWebDelegate::SetZoomOutFactor(float factor) 34878-{ 34879+bool NWebDelegate::SetZoomOutFactor(float factor) { 34880 LOG(INFO) << "NWebDelegate::SetZoomOutFactor"; 34881 if (factor >= 0) { 34882 return false; 34883@@ -641,12 +705,12 @@ void NWebDelegate::PutBackgroundColor(int color) const { 34884 34885 void NWebDelegate::InitialScale(float scale) const { 34886 LOG(INFO) << "NWebDelegate::InitialScale"; 34887- if (scale == intial_scale_) { 34888+ if (scale == intial_scale_ || !render_handler_) { 34889 return; 34890 } 34891- 34892+ float ratio = render_handler_->GetVirtualPixelRatio(); 34893 if (GetBrowser().get()) { 34894- GetBrowser()->GetHost()->SetInitialScale(scale); 34895+ GetBrowser()->GetHost()->SetInitialScale(scale / ratio); 34896 } 34897 } 34898 34899@@ -682,9 +746,12 @@ void NWebDelegate::OnContinue() { 34900 GetBrowser()->GetHost()->SetFocus(true); 34901 } 34902 34903-void NWebDelegate::InitializeCef(std::string url, void* window) { 34904+void NWebDelegate::InitializeCef(std::string url, 34905+ bool is_enhance_surface, 34906+ void* window) { 34907 handler_delegate_ = NWebHandlerDelegate::Create( 34908- preference_delegate_, render_handler_, event_handler_, find_delegate_, window); 34909+ preference_delegate_, render_handler_, event_handler_, find_delegate_, 34910+ is_enhance_surface, window); 34911 nweb_app_ = 34912 new NWebApplication(preference_delegate_, url, handler_delegate_, window); 34913 34914@@ -711,7 +778,6 @@ void NWebDelegate::InitializeCef(std::string url, void* window) { 34915 if (is_initialized) { 34916 return nweb_app_->CreateBrowser(); 34917 } 34918- 34919 if (!CefInitialize(mainargs, settings, nweb_app_, NULL)) { 34920 LOG(ERROR) << "CefInitialize failed"; 34921 } else { 34922@@ -745,7 +811,9 @@ void NWebDelegate::CreateWebMessagePorts(std::vector<std::string>& ports) { 34923 } 34924 } 34925 34926-void NWebDelegate::PostWebMessage(std::string& message, std::vector<std::string>& ports, std::string& targetUri) { 34927+void NWebDelegate::PostWebMessage(std::string& message, 34928+ std::vector<std::string>& ports, 34929+ std::string& targetUri) { 34930 if (!GetBrowser().get()) { 34931 LOG(ERROR) << "JSAPI PostWebMessage can not get browser"; 34932 return; 34933@@ -777,26 +845,33 @@ void NWebDelegate::ClosePort(std::string& portHandle) { 34934 GetBrowser()->GetHost()->ClosePort(handleCef); 34935 } 34936 34937-void NWebDelegate::PostPortMessage(std::string& portHandle, std::string& data) { 34938+void NWebDelegate::PostPortMessage(std::string& portHandle, std::shared_ptr<NWebMessage> data) { 34939 if (!GetBrowser().get()) { 34940 LOG(ERROR) << "JSAPI PostPortMessage can not get browser"; 34941 return; 34942 } 34943 CefString handleCef; 34944 handleCef.FromString(portHandle); 34945- CefString dataCef; 34946- dataCef.FromString(data); 34947 34948- GetBrowser()->GetHost()->PostPortMessage(handleCef, dataCef); 34949+ CefRefPtr<CefValue> message = CefValue::Create(); 34950+ if (data->GetType() == NWebValue::Type::STRING) { 34951+ message->SetString(data->GetString()); 34952+ } else if (data->GetType() == NWebValue::Type::BINARY) { 34953+ std::vector<uint8_t> vecBinary = data->GetBinary(); 34954+ CefRefPtr<CefBinaryValue> value = CefBinaryValue::Create(vecBinary.data(), vecBinary.size()); 34955+ message->SetBinary(value); 34956+ } 34957+ 34958+ GetBrowser()->GetHost()->PostPortMessage(handleCef, message); 34959 } 34960 34961 void NWebDelegate::SetPortMessageCallback(std::string& portHandle, 34962- std::shared_ptr<NWebValueCallback<std::string>> callback) { 34963+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) { 34964 if (!GetBrowser().get()) { 34965 LOG(ERROR) << "JSAPI SetPortMessageCallback can not get browser"; 34966 return; 34967 } 34968- CefRefPtr<JavaScriptResultCallbackImpl> JsResultCb = new JavaScriptResultCallbackImpl(callback); 34969+ CefRefPtr<CefWebMessageReceiver> JsResultCb = new CefWebMessageReceiverImpl(callback); 34970 CefString handleCef; 34971 handleCef.FromString(portHandle); 34972 GetBrowser()->GetHost()->SetPortMessageCallback(handleCef, JsResultCb); 34973@@ -805,7 +880,10 @@ void NWebDelegate::SetPortMessageCallback(std::string& portHandle, 34974 std::string NWebDelegate::GetUrl() const { 34975 LOG(INFO) << "NWebDelegate::get url"; 34976 if (GetBrowser().get()) { 34977- return GetBrowser()->GetMainFrame()->GetURL().ToString(); 34978+ auto entry = GetBrowser()->GetHost()->GetVisibleNavigationEntry(); 34979+ if (entry) { 34980+ return entry->GetDisplayURL().ToString(); 34981+ } 34982 } 34983 return ""; 34984 } 34985@@ -963,21 +1041,25 @@ void NWebDelegate::RegisterNWebJavaScriptCallBack( 34986 } 34987 34988 void NWebDelegate::OnFocus() const { 34989- LOG(INFO) << "NWebDelegate::OnFocus"; 34990 if (!GetBrowser().get()) { 34991+ LOG(ERROR) << "NWebDelegate::OnFocus GetBrowser().get() fail"; 34992 return; 34993 } 34994- 34995- GetBrowser()->GetHost()->SetFocus(true); 34996+ if (handler_delegate_ && !handler_delegate_->GetFocusState()) { 34997+ GetBrowser()->GetHost()->SetFocus(true); 34998+ } 34999 } 35000 35001 void NWebDelegate::OnBlur() const { 35002- LOG(INFO) << "NWebDelegate::OnBlur"; 35003 if (!GetBrowser().get()) { 35004+ LOG(ERROR) << "NWebDelegate::OnBlur GetBrowser().get() fail"; 35005 return; 35006 } 35007 35008- GetBrowser()->GetHost()->SetFocus(false); 35009+ if (handler_delegate_ && handler_delegate_->GetFocusState()) { 35010+ handler_delegate_->SetFocusState(false); 35011+ GetBrowser()->GetHost()->SetFocus(false); 35012+ } 35013 } 35014 35015 void NWebDelegate::UpdateLocale(const std::string& language, 35016@@ -1009,13 +1091,14 @@ void NWebDelegate::SetNWebId(uint32_t nwebId) { 35017 #endif 35018 35019 void NWebDelegate::SendDragEvent(const DelegateDragEvent& dragEvent) const { 35020- if (!GetBrowser().get()) { 35021- LOG(ERROR) << "browser is nullptr"; 35022+ if (!GetBrowser().get() || !render_handler_) { 35023+ LOG(ERROR) << "browser or render_handler is nullptr"; 35024 return; 35025 } 35026 CefMouseEvent event; 35027- event.x = dragEvent.x; 35028- event.y = dragEvent.y; 35029+ float ratio = render_handler_->GetVirtualPixelRatio(); 35030+ event.x = dragEvent.x / ratio; 35031+ event.y = dragEvent.y / ratio; 35032 event.modifiers = EVENTFLAG_LEFT_MOUSE_BUTTON; 35033 switch (dragEvent.action) { 35034 case DelegateDragAction::DRAG_START: 35035@@ -1023,7 +1106,8 @@ void NWebDelegate::SendDragEvent(const DelegateDragEvent& dragEvent) const { 35036 case DelegateDragAction::DRAG_ENTER: 35037 if (render_handler_) { 35038 LOG(INFO) << "SendDragEvent enter"; 35039- GetBrowser()->GetHost()->DragTargetDragEnter(render_handler_->GetDragData(), event, DRAG_OPERATION_MOVE); 35040+ GetBrowser()->GetHost()->DragTargetDragEnter( 35041+ render_handler_->GetDragData(), event, DRAG_OPERATION_MOVE); 35042 } 35043 break; 35044 case DelegateDragAction::DRAG_LEAVE: 35045@@ -1040,7 +1124,8 @@ void NWebDelegate::SendDragEvent(const DelegateDragEvent& dragEvent) const { 35046 break; 35047 case DelegateDragAction::DRAG_END: 35048 LOG(INFO) << "SendDragEvent end"; 35049- GetBrowser()->GetHost()->DragSourceEndedAt(event.x, event.y, DRAG_OPERATION_MOVE); 35050+ GetBrowser()->GetHost()->DragSourceEndedAt(event.x, event.y, 35051+ DRAG_OPERATION_MOVE); 35052 GetBrowser()->GetHost()->DragSourceSystemDragEnded(); 35053 break; 35054 case DelegateDragAction::DRAG_CANCEL: 35055@@ -1084,4 +1169,86 @@ std::shared_ptr<NWebHistoryList> NWebDelegate::GetHistoryList() { 35056 GetBrowser()->GetHost()->GetNavigationEntries(visitor, false); 35057 return visitor->GetHistoryList(); 35058 } 35059+ 35060+void NWebDelegate::PageUp(bool top) { 35061+ if (!GetBrowser().get() || !render_handler_ || !handler_delegate_) { 35062+ return; 35063+ } 35064+ float ratio = render_handler_->GetVirtualPixelRatio(); 35065+ float scale = handler_delegate_->GetScale() / 100.0; 35066+ if (ratio <= 0 || scale <= 0) { 35067+ LOG(ERROR) << "get ratio and scale invalid " << ratio << " " << scale; 35068+ return; 35069+ } 35070+ GetBrowser()->GetHost()->ScrollPageUpDown(true, !top, 35071+ height_ / ratio / scale); 35072+} 35073+ 35074+void NWebDelegate::PageDown(bool bottom) { 35075+ if (!GetBrowser().get() || !render_handler_ || !handler_delegate_) { 35076+ return; 35077+ } 35078+ float ratio = render_handler_->GetVirtualPixelRatio(); 35079+ float scale = handler_delegate_->GetScale() / 100.0; 35080+ if (ratio <= 0 || scale <= 0) { 35081+ LOG(ERROR) << "get ratio and scale invalid " << ratio << " " << scale; 35082+ return; 35083+ } 35084+ GetBrowser()->GetHost()->ScrollPageUpDown(false, !bottom, 35085+ height_ / ratio / scale); 35086+} 35087+ 35088+void NWebDelegate::ScrollTo(float x, float y) { 35089+ if (!GetBrowser().get()) { 35090+ LOG(ERROR) << "JSAPI ScrollTo can not get browser"; 35091+ return; 35092+ } 35093+ 35094+ GetBrowser()->GetHost()->ScrollTo(x, y); 35095+} 35096+ 35097+void NWebDelegate::ScrollBy(float delta_x, float delta_y) { 35098+ if (!GetBrowser().get()) { 35099+ LOG(ERROR) << "JSAPI ScrollBy can not get browser"; 35100+ return; 35101+ } 35102+ 35103+ GetBrowser()->GetHost()->ScrollBy(delta_x, delta_y); 35104+} 35105+ 35106+void NWebDelegate::SlideScroll(float vx, float vy) { 35107+ if (!GetBrowser().get()) { 35108+ LOG(ERROR) << "JSAPI SlideScroll can not get browser"; 35109+ return; 35110+ } 35111+ 35112+ GetBrowser()->GetHost()->SlideScroll(vx, vy); 35113+} 35114+ 35115+WebState NWebDelegate::SerializeWebState() { 35116+ CefRefPtr<CefBinaryValue> state_value = 35117+ GetBrowser()->GetHost()->GetWebState(); 35118+ if (!state_value || !GetBrowser().get()) { 35119+ return nullptr; 35120+ } 35121+ size_t state_size = state_value->GetSize(); 35122+ if (state_size == 0) { 35123+ return nullptr; 35124+ } 35125+ WebState state = std::make_shared<std::vector<uint8_t>>(state_size); 35126+ size_t read_size = state_value->GetData(state->data(), state_size, 0); 35127+ if (read_size != state_size) { 35128+ LOG(ERROR) << "SerializeWebState failed"; 35129+ return nullptr; 35130+ } 35131+ return state; 35132+} 35133+ 35134+bool NWebDelegate::RestoreWebState(WebState state) { 35135+ if (!GetBrowser().get() || !state || state->size() == 0) { 35136+ return false; 35137+ } 35138+ auto web_state = CefBinaryValue::Create(state->data(), state->size()); 35139+ return GetBrowser()->GetHost()->RestoreWebState(web_state); 35140+} 35141 } // namespace OHOS::NWeb 35142diff --git a/src/ohos_nweb/src/cef_delegate/nweb_delegate.h b/src/ohos_nweb/src/cef_delegate/nweb_delegate.h 35143index e4a47501bbe2f..a188933f6232d 35144--- a/src/ohos_nweb/src/cef_delegate/nweb_delegate.h 35145+++ b/src/ohos_nweb/src/cef_delegate/nweb_delegate.h 35146@@ -37,7 +37,7 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35147 public: 35148 NWebDelegate(int argc, const char* argv[]); 35149 ~NWebDelegate(); 35150- bool Init(void* window); 35151+ bool Init(bool is_enhance_surface, void* window); 35152 35153 bool IsReady() override; 35154 void OnDestroy(bool is_close_all) override; 35155@@ -45,8 +45,11 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35156 void RegisterWebAppClientExtensionListener( 35157 std::shared_ptr<NWebAppClientExtensionCallback> 35158 web_app_client_extension_listener) override; 35159+ void UnRegisterWebAppClientExtensionListener() override; 35160 void RegisterDownLoadListener( 35161 std::shared_ptr<NWebDownloadCallback> downloadListener) override; 35162+ void RegisterReleaseSurfaceListener( 35163+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) override; 35164 void RegisterNWebHandler(std::shared_ptr<NWebHandler> handler) override; 35165 void RegisterRenderCb( 35166 std::function<void(const char*)> render_update_cb) override; 35167@@ -94,9 +97,9 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35168 void CreateWebMessagePorts(std::vector<std::string>& ports) override; 35169 void PostWebMessage(std::string& message, std::vector<std::string>& ports, std::string& targetUri) override; 35170 void ClosePort(std::string& port_handle) override; 35171- void PostPortMessage(std::string& port_handle, std::string& data) override; 35172+ void PostPortMessage(std::string& port_handle, std::shared_ptr<NWebMessage> data) override; 35173 void SetPortMessageCallback(std::string& port_handle, 35174- std::shared_ptr<NWebValueCallback<std::string>> callback) override; 35175+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) override; 35176 HitTestResult GetHitTestResult() const override; 35177 int PageLoadProgress() override; 35178 float Scale() override; 35179@@ -158,6 +161,13 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35180 void GetImages(std::shared_ptr<NWebValueCallback<bool>> callback) override; 35181 void RemoveCache(bool include_disk_files) override; 35182 std::shared_ptr<NWebHistoryList> GetHistoryList() override; 35183+ void PageUp(bool top) override; 35184+ void PageDown(bool bottom) override; 35185+ void ScrollTo(float x, float y) override; 35186+ void ScrollBy(float delta_x, float delta_y) override; 35187+ void SlideScroll(float vx, float vy) override; 35188+ WebState SerializeWebState() override; 35189+ bool RestoreWebState(WebState state) override; 35190 35191 public: 35192 int argc_; 35193@@ -165,7 +175,7 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35194 35195 private: 35196 void RunMessageLoop(); 35197- void InitializeCef(std::string url, void* window); 35198+ void InitializeCef(std::string url, bool is_enhance_surface, void* window); 35199 const CefRefPtr<CefBrowser> GetBrowser() const; 35200 void RequestVisitedHistory(); 35201 void SetVirtualPixelRatio(float ratio); 35202@@ -193,6 +203,7 @@ class NWebDelegate : public NWebDelegateInterface, public virtual CefRefCount { 35203 #if defined(REPORT_SYS_EVENT) 35204 uint32_t nweb_id_; 35205 #endif 35206+ bool is_enhance_surface_ = false; 35207 }; 35208 } // namespace OHOS::NWeb 35209 #endif 35210diff --git a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc b/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc 35211index da697a8331dab..81e11228d08af 35212--- a/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc 35213+++ b/src/ohos_nweb/src/cef_delegate/nweb_event_handler.cc 35214@@ -24,6 +24,10 @@ 35215 #include "ui/events/keycodes/keysym_to_unicode.h" 35216 35217 namespace OHOS::NWeb { 35218+ 35219+constexpr double MAX_ZOOM_FACTOR = 10.0; 35220+constexpr double ZOOM_FACTOR = 2.0; 35221+ 35222 // static 35223 std::shared_ptr<NWebEventHandler> NWebEventHandler::Create() { 35224 auto event_handler = std::make_shared<NWebEventHandler>(); 35225@@ -128,7 +132,18 @@ void NWebEventHandler::SendMouseWheelEvent(double x, 35226 mouseEvent.x = x; 35227 mouseEvent.y = y; 35228 mouseEvent.modifiers = input_delegate_.GetModifiers(); 35229- if (browser_ && browser_->GetHost()) { 35230+ if (!browser_ || !browser_->GetHost()){ 35231+ return; 35232+ } 35233+ if ((mouseEvent.modifiers & EVENTFLAG_CONTROL_DOWN) && (deltaY != 0)) { 35234+ double curFactor = browser_->GetHost()->GetZoomLevel(); 35235+ double tempZoomFactor = deltaY < 0 ? curFactor + ZOOM_FACTOR : curFactor - ZOOM_FACTOR; 35236+ if (tempZoomFactor > MAX_ZOOM_FACTOR || tempZoomFactor < 0) { 35237+ LOG(ERROR) << "The mouse wheel event can no longer be zoomed in or out."; 35238+ return; 35239+ } 35240+ browser_->GetHost()->SetZoomLevel(tempZoomFactor); 35241+ } else { 35242 browser_->GetHost()->SendMouseWheelEvent( 35243 mouseEvent, deltaX * input_delegate_.GetMouseWheelRatio(), 35244 deltaY * input_delegate_.GetMouseWheelRatio()); 35245diff --git a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc b/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc 35246index 7cdb2e0b70e35..3ee35ae243de4 35247--- a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc 35248+++ b/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc 35249@@ -43,6 +43,7 @@ 35250 #include "nweb_key_event.h" 35251 #include "nweb_preference_delegate.h" 35252 #include "nweb_resource_handler.h" 35253+#include "nweb_select_popup_menu_callback.h" 35254 #include "nweb_url_resource_error_impl.h" 35255 #include "nweb_url_resource_request_impl.h" 35256 #include "nweb_url_resource_response.h" 35257@@ -181,10 +182,6 @@ char* CopyCefStringToChar(const CefString& str) { 35258 return result; 35259 } 35260 35261-void ReleaseNwebReceivedIconUrlInfo(NWebReceivedIconInfo* iconInfo) { 35262- if (iconInfo->image_url) 35263- delete[] iconInfo->image_url; 35264-} 35265 } // namespace 35266 35267 // static 35268@@ -193,10 +190,11 @@ CefRefPtr<NWebHandlerDelegate> NWebHandlerDelegate::Create( 35269 CefRefPtr<NWebRenderHandler> render_handler, 35270 std::shared_ptr<NWebEventHandler> event_handler, 35271 std::shared_ptr<NWebFindDelegate> find_delegate, 35272+ bool is_enhance_surface, 35273 void* window) { 35274 CefRefPtr<NWebHandlerDelegate> handler_delegate = 35275 new NWebHandlerDelegate(preference_delegate, render_handler, 35276- event_handler, find_delegate, window); 35277+ event_handler, find_delegate, is_enhance_surface, window); 35278 if (handler_delegate == nullptr) { 35279 LOG(ERROR) << "fail to create NWebHandlerDelegate instance"; 35280 return nullptr; 35281@@ -210,17 +208,21 @@ NWebHandlerDelegate::NWebHandlerDelegate( 35282 CefRefPtr<NWebRenderHandler> render_handler, 35283 std::shared_ptr<NWebEventHandler> event_handler, 35284 std::shared_ptr<NWebFindDelegate> find_delegate, 35285+ bool is_enhance_surface, 35286 void* window) 35287 : preference_delegate_(preference_delegate), 35288 render_handler_(render_handler), 35289 event_handler_(event_handler), 35290 find_delegate_(find_delegate), 35291- window_(reinterpret_cast<NativeWindow*>(window)) { 35292+ is_enhance_surface_(is_enhance_surface){ 35293 #if defined(REPORT_SYS_EVENT) 35294 access_sum_count_ = 0; 35295 access_success_count_ = 0; 35296 access_fail_count_ = 0; 35297 #endif 35298+ if (!is_enhance_surface_) { 35299+ window_ = reinterpret_cast<NativeWindow*>(window); 35300+ } 35301 } 35302 35303 void NWebHandlerDelegate::OnDestroy() { 35304@@ -238,12 +240,21 @@ void NWebHandlerDelegate::RegisterDownLoadListener( 35305 download_listener_ = download_listener; 35306 } 35307 35308+void NWebHandlerDelegate::RegisterReleaseSurfaceListener( 35309+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) { 35310+ releaseSurfaceListener_ = releaseSurfaceListener; 35311+} 35312+ 35313 void NWebHandlerDelegate::RegisterWebAppClientExtensionListener( 35314 std::shared_ptr<NWebAppClientExtensionCallback> 35315 web_app_client_extension_listener) { 35316 web_app_client_extension_listener_ = web_app_client_extension_listener; 35317 } 35318 35319+void NWebHandlerDelegate::UnRegisterWebAppClientExtensionListener() { 35320+ web_app_client_extension_listener_ = nullptr; 35321+} 35322+ 35323 void NWebHandlerDelegate::RegisterNWebHandler( 35324 std::shared_ptr<NWebHandler> handler) { 35325 LOG(INFO) << "RegisterNWebHandler"; 35326@@ -414,11 +425,18 @@ bool NWebHandlerDelegate::DoClose(CefRefPtr<CefBrowser> browser) { 35327 void NWebHandlerDelegate::OnBeforeClose(CefRefPtr<CefBrowser> browser) { 35328 LOG(INFO) << "NWebHandlerDelegate::OnBeforeClose"; 35329 CEF_REQUIRE_UI_THREAD(); 35330- 35331 // Destruct window here to ensure that the GPU thread has stopped 35332 // and will not use window again. 35333- DestoryNativeWindow(window_); 35334- window_ = nullptr; 35335+ if (is_enhance_surface_) { 35336+ if (releaseSurfaceListener_ != nullptr) { 35337+ LOG(INFO) << "NWebHandlerDelegate:: ReleaseSurface"; 35338+ releaseSurfaceListener_->ReleaseSurface(); 35339+ } 35340+ } else { 35341+ DestoryNativeWindow(window_); 35342+ window_ = nullptr; 35343+ } 35344+ 35345 35346 // Remove from the list of existing browsers. 35347 BrowserList::iterator bit = browser_list_.begin(); 35348@@ -443,7 +461,7 @@ bool NWebHandlerDelegate::OnPreBeforePopup(CefRefPtr<CefBrowser> browser, 35349 if (nweb_handler_ == nullptr) { 35350 return true; 35351 } 35352- 35353+ 35354 switch (target_disposition) { 35355 case WOD_NEW_WINDOW: 35356 case WOD_NEW_POPUP: { 35357@@ -1040,7 +1058,7 @@ void NWebHandlerDelegate::OnLoadingProgressChange(CefRefPtr<CefBrowser> browser, 35358 on_load_start_notified_ = true; 35359 web_app_client_extension_listener_->OnLoadStarted( 35360 browser != nullptr ? browser->ShouldShowLoadingUI() : false, 35361- web_app_client_extension_listener_->NWebID); 35362+ web_app_client_extension_listener_->nweb_id); 35363 } 35364 if (new_progress == MAX_LOADING_PROGRESS) { 35365 on_load_start_notified_ = false; 35366@@ -1113,13 +1131,15 @@ void NWebHandlerDelegate::OnReceivedIconUrl(const CefString& image_url, 35367 return; 35368 } 35369 35370- NWebReceivedIconInfo iconInfo{ 35371- CopyCefStringToChar(image_url), width, height, 35372- TransformColorTypeToInt(TransformColorType(color_type)), 35373- TransformAlphaTypeToInt(TransformAlphaType(alpha_type))}; 35374+ char* c_image_url = CopyCefStringToChar(image_url); 35375 web_app_client_extension_listener_->OnReceivedFaviconUrl( 35376- iconInfo, web_app_client_extension_listener_->NWebID); 35377- ReleaseNwebReceivedIconUrlInfo(&iconInfo); 35378+ c_image_url, width, height, 35379+ TransformColorTypeToInt(TransformColorType(color_type)), 35380+ TransformAlphaTypeToInt(TransformAlphaType(alpha_type)), 35381+ web_app_client_extension_listener_->nweb_id); 35382+ if (c_image_url) { 35383+ delete[] c_image_url; 35384+ } 35385 } 35386 35387 void NWebHandlerDelegate::OnReceivedTouchIconUrl(CefRefPtr<CefBrowser> browser, 35388@@ -1149,11 +1169,48 @@ bool NWebHandlerDelegate::OnConsoleMessage(CefRefPtr<CefBrowser> browser, 35389 void NWebHandlerDelegate::OnScaleChanged(CefRefPtr<CefBrowser> browser, 35390 float old_page_scale_factor, 35391 float new_page_scale_factor) { 35392+ if (!render_handler_) { 35393+ LOG(ERROR) << "render handler is nullptr"; 35394+ return; 35395+ } 35396 if (nweb_handler_ != nullptr) { 35397 LOG(INFO) << "OnScaleChanged new scale: " << new_page_scale_factor 35398 << " old scale: " << old_page_scale_factor; 35399 nweb_handler_->OnScaleChanged(old_page_scale_factor, new_page_scale_factor); 35400 } 35401+ scale_ = new_page_scale_factor; 35402+} 35403+ 35404+bool NWebHandlerDelegate::OnCursorChange(CefRefPtr<CefBrowser> browser, 35405+ CefCursorHandle cursor, 35406+ cef_cursor_type_t type, 35407+ const CefCursorInfo& custom_cursor_info) { 35408+ LOG(DEBUG) << "OnCursorChange type: " << type; 35409+ if (nweb_handler_ == nullptr) { 35410+ LOG(ERROR) << "OnCursorChange nweb handler is nullptr"; 35411+ return false; 35412+ } 35413+ if (type < 0 || type >= static_cast<int32_t>(CursorType::CT_MAX_VALUE)) { 35414+ LOG(ERROR) << "OnCursorChange type exception"; 35415+ return false; 35416+ } 35417+ NWebCursorInfo info = {0}; 35418+ if (type == CT_CUSTOM && custom_cursor_info.size.width > 0 && custom_cursor_info.size.height > 0) { 35419+ info.width = custom_cursor_info.size.width; 35420+ info.height = custom_cursor_info.size.height; 35421+ info.x = custom_cursor_info.hotspot.x; 35422+ info.y = custom_cursor_info.hotspot.y; 35423+ info.scale = custom_cursor_info.image_scale_factor; 35424+ uint64_t len = info.width * info.height * 4; 35425+ info.buff = std::make_unique<uint8_t[]>(len); 35426+ if (!info.buff) { 35427+ LOG(ERROR) << "OnCursorChange make_unique failed"; 35428+ return false; 35429+ } 35430+ memcpy((char *)info.buff.get(), custom_cursor_info.buffer, len); 35431+ } 35432+ CursorType cursorType(static_cast<CursorType>(type)); 35433+ return nweb_handler_->OnCursorChange(cursorType, info); 35434 } 35435 /* CefDisplayHandler method end */ 35436 35437@@ -1161,6 +1218,7 @@ void NWebHandlerDelegate::OnScaleChanged(CefRefPtr<CefBrowser> browser, 35438 bool NWebHandlerDelegate::OnSetFocus(CefRefPtr<CefBrowser> browser, 35439 FocusSource source) { 35440 if (nweb_handler_ != nullptr) { 35441+ focusState_ = true; 35442 nweb_handler_->OnFocus(); 35443 } 35444 return false; 35445@@ -1295,6 +1353,54 @@ bool NWebHandlerDelegate::OnFileDialog( 35446 std::make_shared<FileSelectorCallbackImpl>(callback); 35447 return nweb_handler_->OnFileSelectorShow(file_path_callback, param); 35448 } 35449+ 35450+void NWebHandlerDelegate::OnSelectPopupMenu( 35451+ CefRefPtr<CefBrowser> browser, 35452+ const CefRect& bounds, 35453+ int item_height, 35454+ double item_font_size, 35455+ int selected_item, 35456+ const std::vector<CefSelectPopupItem>& menu_items, 35457+ bool right_aligned, 35458+ bool allow_multiple_selection, 35459+ CefRefPtr<CefSelectPopupCallback> callback) { 35460+ if (!nweb_handler_ || !render_handler_) { 35461+ return; 35462+ } 35463+ float ratio = render_handler_->GetVirtualPixelRatio(); 35464+ std::shared_ptr<NWebSelectPopupMenuParam> param = 35465+ std::make_shared<NWebSelectPopupMenuParam>(); 35466+ if (!param) { 35467+ return; 35468+ } 35469+ param->bounds = { bounds.x * ratio, bounds.y * ratio, bounds.width * ratio, 35470+ bounds.height * ratio}; 35471+ param->itemHeight = item_height; 35472+ param->itemFontSize = item_font_size; 35473+ param->selectedItem = selected_item; 35474+ param->rightAligned = right_aligned; 35475+ param->allowMultipleSelection = allow_multiple_selection; 35476+ std::vector<SelectPopupMenuItem> menu_list; 35477+ for (auto& menu_item : menu_items) { 35478+ std::string label = CefString(&menu_item.label); 35479+ SelectPopupMenuItem item = { 35480+ CefString(&menu_item.label).ToString(), 35481+ CefString(&menu_item.tool_tip).ToString(), 35482+ static_cast<SelectPopupMenuItemType>(menu_item.type), 35483+ menu_item.action, 35484+ static_cast<TextDirection>(menu_item.text_direction), 35485+ menu_item.enabled, 35486+ menu_item.has_text_direction_override, 35487+ menu_item.checked, 35488+ }; 35489+ menu_list.push_back(std::move(item)); 35490+ } 35491+ param->menuItems = std::move(menu_list); 35492+ 35493+ std::shared_ptr<NWebSelectPopupMenuCallback> popup_callback = 35494+ std::make_shared<NWebSelectPopupMenuCallbackImpl>(callback); 35495+ nweb_handler_->OnSelectPopupMenu(param, popup_callback); 35496+} 35497 /* CefDialogHandler method end */ 35498 35499 /* CefContextMenuHandler method begin */ 35500@@ -1374,13 +1480,15 @@ bool NWebHandlerDelegate::RunContextMenu( 35501 CefRefPtr<CefContextMenuParams> params, 35502 CefRefPtr<CefMenuModel> model, 35503 CefRefPtr<CefRunContextMenuCallback> callback) { 35504- if (nweb_handler_ == nullptr) { 35505+ if (!nweb_handler_ || !render_handler_) { 35506 return false; 35507 } 35508 std::shared_ptr<NWebContextMenuParams> nweb_param = 35509- std::make_shared<NWebContextMenuParamsImpl>(params); 35510+ std::make_shared<NWebContextMenuParamsImpl>(params, 35511+ render_handler_->GetVirtualPixelRatio()); 35512 std::shared_ptr<NWebContextMenuCallback> nweb_callback = 35513 std::make_shared<NWebContextMenuCallbackImpl>(callback); 35514+ 35515 image_cache_src_url_ = params->GetSourceUrl(); 35516 if (nweb_handler_->RunContextMenu(nweb_param, nweb_callback)) { 35517 return true; 35518@@ -1638,4 +1746,12 @@ void NWebHandlerDelegate::SetNWebId(uint32_t nwebId) { 35519 nweb_id_ = nwebId; 35520 } 35521 #endif 35522+ 35523+bool NWebHandlerDelegate::GetFocusState() { 35524+ return focusState_; 35525+} 35526+ 35527+void NWebHandlerDelegate::SetFocusState(bool focusState) { 35528+ focusState_ = focusState; 35529+} 35530 } // namespace OHOS::NWeb 35531diff --git a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h b/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h 35532index fc71882e0c025..551c62501c469 35533--- a/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h 35534+++ b/src/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h 35535@@ -66,6 +66,7 @@ class NWebHandlerDelegate : public CefClient, 35536 CefRefPtr<NWebRenderHandler> render_handler, 35537 std::shared_ptr<NWebEventHandler> event_handler, 35538 std::shared_ptr<NWebFindDelegate> find_delegate, 35539+ bool is_enhance_surface, 35540 void* window); 35541 35542 NWebHandlerDelegate( 35543@@ -73,6 +74,7 @@ class NWebHandlerDelegate : public CefClient, 35544 CefRefPtr<NWebRenderHandler> render_handler, 35545 std::shared_ptr<NWebEventHandler> event_handler, 35546 std::shared_ptr<NWebFindDelegate> find_delegate, 35547+ bool is_enhance_surface, 35548 void* window); 35549 ~NWebHandlerDelegate() = default; 35550 35551@@ -80,10 +82,13 @@ class NWebHandlerDelegate : public CefClient, 35552 35553 void RegisterDownLoadListener( 35554 std::shared_ptr<NWebDownloadCallback> download_listener); 35555+ void RegisterReleaseSurfaceListener( 35556+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener); 35557 void RegisterNWebHandler(std::shared_ptr<NWebHandler> handler); 35558 void RegisterWebAppClientExtensionListener( 35559 std::shared_ptr<NWebAppClientExtensionCallback> 35560 web_app_client_extension_listener); 35561+ void UnRegisterWebAppClientExtensionListener(); 35562 void RegisterNWebJavaScriptCallBack( 35563 std::shared_ptr<NWebJavaScriptResultCallBack> callback); 35564 35565@@ -293,6 +298,10 @@ class NWebHandlerDelegate : public CefClient, 35566 void OnScaleChanged(CefRefPtr<CefBrowser> browser, 35567 float old_page_scale_factor, 35568 float new_page_scale_factor) override; 35569+ bool OnCursorChange(CefRefPtr<CefBrowser> browser, 35570+ CefCursorHandle cursor, 35571+ cef_cursor_type_t type, 35572+ const CefCursorInfo& custom_cursor_info) override; 35573 /* CefDisplayHandler method end */ 35574 35575 /* CefFocusHandler method begin */ 35576@@ -333,6 +342,15 @@ class NWebHandlerDelegate : public CefClient, 35577 int selected_accept_filter, 35578 bool capture, 35579 CefRefPtr<CefFileDialogCallback> callback) override; 35580+ void OnSelectPopupMenu(CefRefPtr<CefBrowser> browser, 35581+ const CefRect& bounds, 35582+ int item_height, 35583+ double item_font_size, 35584+ int selected_item, 35585+ const std::vector<CefSelectPopupItem>& menu_items, 35586+ bool right_aligned, 35587+ bool allow_multiple_selection, 35588+ CefRefPtr<CefSelectPopupCallback> callback) override; 35589 /* CefDialogHandler method end */ 35590 35591 /* CefContextMenuHandler method begin */ 35592@@ -400,7 +418,10 @@ class NWebHandlerDelegate : public CefClient, 35593 ImageColorType color_type, ImageAlphaType alpha_type); 35594 bool GetFavicon(const void** data, size_t& width, size_t& height, 35595 ImageColorType& colorType, ImageAlphaType& alphaType); 35596+ float GetScale() const { return scale_; } 35597 35598+ bool GetFocusState(); 35599+ void SetFocusState(bool focusState); 35600 private: 35601 void CopyImageToClipboard(CefRefPtr<CefImage> image); 35602 // List of existing browser windows. Only accessed on the CEF UI thread. 35603@@ -419,6 +440,7 @@ class NWebHandlerDelegate : public CefClient, 35604 IMPLEMENT_REFCOUNTING(NWebHandlerDelegate); 35605 35606 std::shared_ptr<NWebDownloadCallback> download_listener_ = nullptr; 35607+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener_ = nullptr; 35608 std::shared_ptr<NWebHandler> nweb_handler_ = nullptr; 35609 std::shared_ptr<NWebJavaScriptResultCallBack> nweb_javascript_callback_ = 35610 nullptr; 35611@@ -428,6 +450,7 @@ class NWebHandlerDelegate : public CefClient, 35612 35613 // lifecycle wrapped by ace WebGeolocationOhos 35614 NWebGeolocationCallback* callback_ = nullptr; 35615+ bool is_enhance_surface_ = false; 35616 NativeWindow* window_ = nullptr; 35617 35618 CefString image_cache_src_url_; 35619@@ -453,6 +476,9 @@ class NWebHandlerDelegate : public CefClient, 35620 #if defined(OHOS_NWEB_EX) 35621 bool on_load_start_notified_ = false; 35622 #endif // OHOS_NWEB_EX 35623+ 35624+ float scale_ = 100.0; 35625+ bool focusState_ = false; 35626 }; 35627 } // namespace OHOS::NWeb 35628 35629diff --git a/src/ohos_nweb/src/cef_delegate/nweb_history_list_impl.cc b/src/ohos_nweb/src/cef_delegate/nweb_history_list_impl.cc 35630index 475ea2d7f9187..c0e2b7a8fbfff 35631--- a/src/ohos_nweb/src/cef_delegate/nweb_history_list_impl.cc 35632+++ b/src/ohos_nweb/src/cef_delegate/nweb_history_list_impl.cc 35633@@ -51,9 +51,12 @@ NWebHistoryItemImpl::NWebHistoryItemImpl(CefRefPtr<CefNavigationEntry> entry) 35634 : entry_(entry) {} 35635 35636 std::string NWebHistoryItemImpl::GetHistoryRawUrl() { 35637- return (entry_ != nullptr && entry_->IsValid()) 35638- ? entry_->GetOriginalURL().ToString() 35639- : std::string(); 35640+ if (!entry_ || !entry_->IsValid()) { 35641+ return std::string(); 35642+ } 35643+ return entry_->GetOriginalURL().ToString().empty() 35644+ ? entry_->GetDisplayURL().ToString() 35645+ : entry_->GetOriginalURL().ToString(); 35646 } 35647 35648 std::string NWebHistoryItemImpl::GetHistoryTitle() { 35649diff --git a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc b/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc 35650index 384a9d0e03f45..1042294b19a77 35651--- a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc 35652+++ b/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc 35653@@ -32,6 +32,10 @@ 35654 #include "ohos_nweb/src/cef_delegate/nweb_application.h" 35655 35656 namespace OHOS::NWeb { 35657+ 35658+constexpr int fontMinSize = 1; 35659+constexpr int fontMaxSize = 72; 35660+ 35661 int ConvertCacheMode(NWebPreference::CacheModeFlag flag) { 35662 switch (flag) { 35663 case NWebPreference::CacheModeFlag::USE_CACHE_ELSE_NETWORK: 35664@@ -109,7 +113,7 @@ void NWebPreferenceDelegate::ComputeBrowserSettings( 35665 browser_settings.minimum_font_size = FontSizeLowerLimit(); 35666 browser_settings.minimum_logical_font_size = LogicalFontSizeLowerLimit(); 35667 browser_settings.initialize_at_minimum_page_scale = 35668- !IsLoadWithOverviewMode() ? STATE_ENABLED : STATE_DISABLED; 35669+ IsLoadWithOverviewMode() ? STATE_ENABLED : STATE_DISABLED; 35670 35671 str = CefString(DefaultTextEncodingFormat()); 35672 cef_string_set(str.c_str(), str.length(), 35673@@ -132,7 +136,9 @@ void NWebPreferenceDelegate::ComputeBrowserSettings( 35674 //browser_settings.file_access_from_file_urls = 35675 // EnableRawFileAccessFromFileURLs() ? STATE_ENABLED : STATE_DISABLED; 35676 browser_settings.force_dark_mode_enabled = 35677- DarkModeEnabled() ? STATE_ENABLED : STATE_DISABLED; 35678+ ForceDarkModeEnabled() ? STATE_ENABLED : STATE_DISABLED; 35679+ browser_settings.dark_prefer_color_scheme_enabled = 35680+ DarkSchemeEnabled() ? STATE_ENABLED : STATE_DISABLED; 35681 browser_settings.javascript_can_open_windows_automatically = 35682 IsCreateWindowsByJavaScriptAllowed(); 35683 browser_settings.text_size_percent = ZoomingForTextFactor(); 35684@@ -147,6 +153,10 @@ void NWebPreferenceDelegate::ComputeBrowserSettings( 35685 browser_settings.supports_multi_touch_zoom = ZoomingfunctionEnabled(); 35686 browser_settings.user_gesture_required = GetMediaPlayGestureAccess(); 35687 browser_settings.pinch_smooth_mode = GetPinchSmoothMode(); 35688+ browser_settings.hide_horizontal_scrollbars = 35689+ !IsHorizontalScrollBarAccess() ? STATE_ENABLED : STATE_DISABLED; 35690+ browser_settings.hide_vertical_scrollbars = 35691+ !IsVerticalScrollBarAccess() ? STATE_ENABLED : STATE_DISABLED; 35692 CefRefPtr<CefCommandLine> command_line = 35693 CefCommandLine::GetGlobalCommandLine(); 35694 if (command_line->HasSwitch(::switches::kForBrowser)) { 35695@@ -169,6 +179,16 @@ void NWebPreferenceDelegate::PutMultiWindowAccess(bool flag) { 35696 multiWindow_access_ = flag; 35697 } 35698 35699+void NWebPreferenceDelegate::PutHorizontalScrollBarAccess(bool flag) { 35700+ horizontal_scrollBar_access_ = flag; 35701+ WebPreferencesChanged(); 35702+} 35703+ 35704+void NWebPreferenceDelegate::PutVerticalScrollBarAccess(bool flag) { 35705+ vertical_scrollBar_access_ = flag; 35706+ WebPreferencesChanged(); 35707+} 35708+ 35709 void NWebPreferenceDelegate::PutEnableContentAccess(bool flag) { 35710 content_access_ = flag; 35711 SetBrowserSettingsToNetHelpers(); 35712@@ -176,7 +196,12 @@ void NWebPreferenceDelegate::PutEnableContentAccess(bool flag) { 35713 35714 void NWebPreferenceDelegate::PutEnableRawFileAccess(bool flag) { 35715 raw_file_access_ = flag; 35716- SetBrowserSettingsToNetHelpers(); 35717+ if (!browser_.get()) { 35718+ LOG(ERROR) << "browser is null"; 35719+ return; 35720+ } 35721+ 35722+ browser_->GetHost()->SetFileAccess(flag); 35723 } 35724 35725 void NWebPreferenceDelegate::PutEnableRawFileAccessFromFileURLs(bool flag) { 35726@@ -204,11 +229,11 @@ void NWebPreferenceDelegate::PutDatabaseAllowed(bool flag) { 35727 } 35728 35729 void NWebPreferenceDelegate::PutDefaultFixedFontSize(int size) { 35730- default_fixed_font_size_ = size; 35731+ default_fixed_font_size_ = std::clamp(size, fontMinSize, fontMaxSize); 35732 WebPreferencesChanged(); 35733 } 35734 void NWebPreferenceDelegate::PutDefaultFontSize(int size) { 35735- default_font_size_ = size; 35736+ default_font_size_ = std::clamp(size, fontMinSize, fontMaxSize); 35737 WebPreferencesChanged(); 35738 } 35739 35740@@ -233,8 +258,13 @@ void NWebPreferenceDelegate::PutFixedFontFamilyName(std::string font) { 35741 WebPreferencesChanged(); 35742 } 35743 35744-void NWebPreferenceDelegate::PutDarkModeEnabled(int forceDark) { 35745- dark_mode_enabled_ = forceDark; 35746+void NWebPreferenceDelegate::PutForceDarkModeEnabled(int forceDark) { 35747+ force_dark_mode_enabled_ = forceDark; 35748+ WebPreferencesChanged(); 35749+} 35750+ 35751+void NWebPreferenceDelegate::PutDarkSchemeEnabled(int darkScheme) { 35752+ dark_prefer_color_scheme_enabled_ = darkScheme; 35753 WebPreferencesChanged(); 35754 } 35755 35756@@ -254,12 +284,12 @@ void NWebPreferenceDelegate::PutImageLoadingAllowed(bool flag) { 35757 } 35758 35759 void NWebPreferenceDelegate::PutFontSizeLowerLimit(int size) { 35760- font_size_lower_limit_ = size; 35761+ font_size_lower_limit_ = std::clamp(size, fontMinSize, fontMaxSize); 35762 WebPreferencesChanged(); 35763 } 35764 35765 void NWebPreferenceDelegate::PutLogicalFontSizeLowerLimit(int size) { 35766- logical_font_size_lower_limit_ = size; 35767+ logical_font_size_lower_limit_ = std::clamp(size, fontMinSize, fontMaxSize); 35768 WebPreferencesChanged(); 35769 } 35770 35771@@ -328,12 +358,22 @@ void NWebPreferenceDelegate::PutBlockNetwork(bool flag) { 35772 "INTERNET permission"; 35773 } 35774 is_network_blocked_ = flag; 35775- SetBrowserSettingsToNetHelpers(); 35776+ if (!browser_.get()) { 35777+ LOG(ERROR) << "browser is null"; 35778+ return; 35779+ } 35780+ 35781+ browser_->GetHost()->SetBlockNetwork(flag); 35782 } 35783 35784 void NWebPreferenceDelegate::PutCacheMode(CacheModeFlag flag) { 35785 cache_mode_flag_ = flag; 35786- SetBrowserSettingsToNetHelpers(); 35787+ if (!browser_.get()) { 35788+ LOG(ERROR) << "browser is null"; 35789+ return; 35790+ } 35791+ 35792+ browser_->GetHost()->SetCacheMode(ConvertCacheMode(flag)); 35793 } 35794 35795 void NWebPreferenceDelegate::PutWebDebuggingAccess(bool flag) { 35796@@ -416,8 +456,12 @@ std::string NWebPreferenceDelegate::FixedFontFamilyName() { 35797 return fixed_font_family_name_; 35798 } 35799 35800-int NWebPreferenceDelegate::DarkModeEnabled() { 35801- return dark_mode_enabled_; 35802+int NWebPreferenceDelegate::ForceDarkModeEnabled() { 35803+ return force_dark_mode_enabled_; 35804+} 35805+ 35806+int NWebPreferenceDelegate::DarkSchemeEnabled() { 35807+ return dark_prefer_color_scheme_enabled_; 35808 } 35809 35810 bool NWebPreferenceDelegate::IsCreateWindowsByJavaScriptAllowed() { 35811@@ -530,4 +574,12 @@ bool NWebPreferenceDelegate::GetPinchSmoothMode() { 35812 bool NWebPreferenceDelegate::IsMultiWindowAccess() { 35813 return multiWindow_access_; 35814 } 35815+ 35816+bool NWebPreferenceDelegate::IsHorizontalScrollBarAccess() { 35817+ return horizontal_scrollBar_access_; 35818+} 35819+ 35820+bool NWebPreferenceDelegate::IsVerticalScrollBarAccess() { 35821+ return vertical_scrollBar_access_; 35822+} 35823 } // namespace OHOS::NWeb 35824diff --git a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h b/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h 35825index 35363bc75d94d..4c34798987b4b 35826--- a/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h 35827+++ b/src/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h 35828@@ -45,7 +45,8 @@ class NWebPreferenceDelegate : public NWebPreference { 35829 void PutDomStorageEnabled(bool flag) override; 35830 void PutFantasyFontFamilyName(std::string font) override; 35831 void PutFixedFontFamilyName(std::string font) override; 35832- void PutDarkModeEnabled(int forceDark) override; 35833+ void PutForceDarkModeEnabled(int forceDark) override; 35834+ void PutDarkSchemeEnabled(int darkScheme) override; 35835 void PutIsCreateWindowsByJavaScriptAllowed(bool flag) override; 35836 void PutJavaScriptEnabled(bool flag) override; 35837 void PutImageLoadingAllowed(bool flag) override; 35838@@ -66,7 +67,8 @@ class NWebPreferenceDelegate : public NWebPreference { 35839 void PutMediaPlayGestureAccess(bool flag) override; 35840 void PutPinchSmoothMode(bool flag) override; 35841 void PutMultiWindowAccess(bool flag) override; 35842- 35843+ void PutHorizontalScrollBarAccess(bool flag) override; 35844+ void PutVerticalScrollBarAccess(bool flag) override; 35845 /* get methods*/ 35846 bool EnableContentAccess() override; 35847 bool EnableRawFileAccess() override; 35848@@ -82,7 +84,8 @@ class NWebPreferenceDelegate : public NWebPreference { 35849 bool IsDomStorageEnabled() override; 35850 std::string FantasyFontFamilyName() override; 35851 std::string FixedFontFamilyName() override; 35852- int DarkModeEnabled() override; 35853+ int ForceDarkModeEnabled() override; 35854+ int DarkSchemeEnabled() override; 35855 bool IsCreateWindowsByJavaScriptAllowed() override; 35856 bool IsJavaScriptAllowed() override; 35857 bool IsImageLoadingAllowed() override; 35858@@ -102,6 +105,8 @@ class NWebPreferenceDelegate : public NWebPreference { 35859 bool IsWebDebuggingAccess() override; 35860 bool GetMediaPlayGestureAccess() override; 35861 bool IsMultiWindowAccess() override; 35862+ bool IsHorizontalScrollBarAccess() override; 35863+ bool IsVerticalScrollBarAccess() override; 35864 35865 bool RunningInsecureContentAllowed(); 35866 bool UseStricMixedContentCheckingAllowed(); 35867@@ -134,10 +139,13 @@ class NWebPreferenceDelegate : public NWebPreference { 35868 bool raw_file_access_{false}; 35869 bool universal_access_from_file_urls_{false}; 35870 bool raw_file_access_from_file_urls_{false}; 35871- bool dark_mode_enabled_{false}; 35872+ bool force_dark_mode_enabled_{false}; 35873+ bool dark_prefer_color_scheme_enabled_{false}; 35874 bool is_need_gesture_access_{true}; 35875 bool pinch_smooth_mode_{false}; 35876 bool multiWindow_access_{false}; 35877+ bool horizontal_scrollBar_access_{true}; 35878+ bool vertical_scrollBar_access_{true}; 35879 /* Web preferences end*/ 35880 bool create_windows_by_javascript_allowed_{false}; 35881 std::string user_agent_{""}; 35882diff --git a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc b/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc 35883index b6ffec6e8b82a..9f5601d4fafed 35884--- a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc 35885+++ b/src/ohos_nweb/src/cef_delegate/nweb_render_handler.cc 35886@@ -26,31 +26,25 @@ 35887 35888 namespace { 35889 cef_screen_orientation_type_t ConvertOrientationType( 35890- OHOS::NWeb::OrientationType type) { 35891+ OHOS::NWeb::OrientationType type, 35892+ bool default_portrait) { 35893 switch (type) { 35894-#if defined(DEFAULT_PORTRAIT) 35895 case OHOS::NWeb::OrientationType::UNSPECIFIED: 35896- return cef_screen_orientation_type_t::PORTRAIT_PRIMARY; 35897+ return default_portrait 35898+ ? cef_screen_orientation_type_t::PORTRAIT_PRIMARY 35899+ : cef_screen_orientation_type_t::LANDSCAPE_PRIMARY; 35900 case OHOS::NWeb::OrientationType::VERTICAL: 35901 return cef_screen_orientation_type_t::PORTRAIT_PRIMARY; 35902 case OHOS::NWeb::OrientationType::HORIZONTAL: 35903- return cef_screen_orientation_type_t::LANDSCAPE_SECONDARY; 35904+ return default_portrait 35905+ ? cef_screen_orientation_type_t::LANDSCAPE_SECONDARY 35906+ : cef_screen_orientation_type_t::LANDSCAPE_PRIMARY; 35907 case OHOS::NWeb::OrientationType::REVERSE_VERTICAL: 35908 return cef_screen_orientation_type_t::PORTRAIT_SECONDARY; 35909 case OHOS::NWeb::OrientationType::REVERSE_HORIZONTAL: 35910- return cef_screen_orientation_type_t::LANDSCAPE_PRIMARY; 35911-#else 35912- case OHOS::NWeb::OrientationType::UNSPECIFIED: 35913- return cef_screen_orientation_type_t::LANDSCAPE_PRIMARY; 35914- case OHOS::NWeb::OrientationType::VERTICAL: 35915- return cef_screen_orientation_type_t::PORTRAIT_PRIMARY; 35916- case OHOS::NWeb::OrientationType::HORIZONTAL: 35917- return cef_screen_orientation_type_t::LANDSCAPE_PRIMARY; 35918- case OHOS::NWeb::OrientationType::REVERSE_VERTICAL: 35919- return cef_screen_orientation_type_t::PORTRAIT_SECONDARY; 35920- case OHOS::NWeb::OrientationType::REVERSE_HORIZONTAL: 35921- return cef_screen_orientation_type_t::LANDSCAPE_SECONDARY; 35922-#endif 35923+ return default_portrait 35924+ ? cef_screen_orientation_type_t::LANDSCAPE_PRIMARY 35925+ : cef_screen_orientation_type_t::LANDSCAPE_SECONDARY; 35926 // Now ohos platform don't hava sensor orientation. 35927 // Will be support later. 35928 case OHOS::NWeb::OrientationType::SENSOR: 35929@@ -62,33 +56,23 @@ cef_screen_orientation_type_t ConvertOrientationType( 35930 } 35931 } 35932 35933-uint16_t ConvertRotationAngel(OHOS::NWeb::RotationType type) { 35934+uint16_t ConvertRotationAngel(OHOS::NWeb::RotationType type, 35935+ bool default_portrait) { 35936 // Notice: 90 and 270 is reverse. 35937 switch (type) { 35938-#if defined(DEFAULT_PORTRAIT) 35939 case OHOS::NWeb::RotationType::ROTATION_0: 35940- return 0; 35941+ return default_portrait ? 0 : 90; 35942 case OHOS::NWeb::RotationType::ROTATION_90: 35943- return 270; 35944+ return default_portrait ? 270 : 0; 35945 case OHOS::NWeb::RotationType::ROTATION_180: 35946- return 180; 35947+ return default_portrait ? 180 : 270; 35948 case OHOS::NWeb::RotationType::ROTATION_270: 35949- return 90; 35950-#else 35951- case OHOS::NWeb::RotationType::ROTATION_0: 35952- return 90; 35953- case OHOS::NWeb::RotationType::ROTATION_90: 35954- return 0; 35955- case OHOS::NWeb::RotationType::ROTATION_180: 35956- return 270; 35957- case OHOS::NWeb::RotationType::ROTATION_270: 35958- return 180; 35959-#endif 35960+ return default_portrait ? 90 : 180; 35961 default: 35962 return 0; 35963 } 35964 } 35965-} 35966+} // namespace 35967 35968 namespace OHOS::NWeb { 35969 // static 35970@@ -125,29 +109,41 @@ void NWebRenderHandler::GetViewRect(CefRefPtr<CefBrowser> browser, 35971 CefRect& rect) { 35972 rect.x = 0; 35973 rect.y = 0; 35974- rect.width = width_; 35975- rect.height = height_; 35976- return; 35977+ if (screen_info_.display_ratio <= 0) { 35978+ rect.width = width_; 35979+ rect.height = height_; 35980+ } else { 35981+ rect.width = width_ / screen_info_.display_ratio; 35982+ rect.height = height_ / screen_info_.display_ratio; 35983+ } 35984+ 35985+ if (rect.width <= 0) { 35986+ rect.width = 1; 35987+ } 35988+ if (rect.height <= 0) { 35989+ rect.height = 1; 35990+ } 35991 } 35992 35993-void NWebRenderHandler::SetScreenInfo(RotationType rotation, 35994- OrientationType orientation, 35995- int width, 35996- int height, 35997- double display_ratio) { 35998- rotation_ = rotation; 35999- orientation_ = orientation; 36000- screen_width_ = width; 36001- screen_height_ = height; 36002- display_ratio_ = display_ratio; 36003+void NWebRenderHandler::SetScreenInfo(const NWebScreenInfo& screen_info) { 36004+ screen_info_ = screen_info; 36005 } 36006 36007 bool NWebRenderHandler::GetScreenInfo(CefRefPtr<CefBrowser> browser, 36008 CefScreenInfo& screen_info) { 36009- screen_info.orientation = ConvertOrientationType(orientation_); 36010- screen_info.angle = ConvertRotationAngel(rotation_); 36011- screen_info.rect.width = screen_width_; 36012- screen_info.rect.height = screen_height_; 36013+ screen_info.orientation = ConvertOrientationType( 36014+ screen_info_.orientation, screen_info_.default_portrait); 36015+ screen_info.angle = ConvertRotationAngel(screen_info_.rotation, 36016+ screen_info_.default_portrait); 36017+ screen_info.rect.width = screen_info_.width; 36018+ screen_info.rect.height = screen_info_.height; 36019+ screen_info.device_scale_factor = screen_info_.display_ratio; 36020+ 36021+ // TODO: currently display dont have interface to get. We use fix value 36022+ // instead. 36023+ screen_info.depth = 24; 36024+ screen_info.depth_per_component = 8; 36025+ 36026 return true; 36027 } 36028 36029@@ -186,8 +182,8 @@ void NWebRenderHandler::OnRootLayerChanged(CefRefPtr<CefBrowser> browser, 36030 } 36031 36032 void NWebRenderHandler::OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser, 36033- double x, 36034- double y) { 36035+ double x, 36036+ double y) { 36037 if (auto handler = handler_.lock()) { 36038 handler->OnScroll(x, y); 36039 } 36040@@ -215,8 +211,10 @@ void NWebRenderHandler::OnTextSelectionChanged(CefRefPtr<CefBrowser> browser, 36041 36042 void NWebRenderHandler::OnVirtualKeyboardRequested( 36043 CefRefPtr<CefBrowser> browser, 36044- TextInputMode input_mode, bool show_keyboard) { 36045- LOG(INFO) << "NWebRenderHandler::OnVirtualKeyboardRequested input_mode = " << input_mode << ", show_keyboard = " << show_keyboard; 36046+ TextInputMode input_mode, 36047+ bool show_keyboard) { 36048+ LOG(INFO) << "NWebRenderHandler::OnVirtualKeyboardRequested input_mode = " 36049+ << input_mode << ", show_keyboard = " << show_keyboard; 36050 36051 if (inputmethod_client_) { 36052 if (input_mode != CEF_TEXT_INPUT_MODE_NONE) { 36053@@ -232,26 +230,29 @@ void NWebRenderHandler::GetTouchHandleSize( 36054 cef_horizontal_alignment_t orientation, 36055 CefSize& size) { 36056 // TODO: need to refactor in 3.2.8.1 use arkui refactor. 36057- size.width = 20; 36058- size.height = 20; 36059- if (display_ratio_ <= 0.0) { 36060- LOG(ERROR) << "invalid display_ratio_, display_ratio_ = " << display_ratio_; 36061+ size.width = 10; 36062+ size.height = 10; 36063+ if (screen_info_.display_ratio <= 0.0) { 36064+ LOG(ERROR) << "invalid display_ratio_, display_ratio_ = " 36065+ << screen_info_.display_ratio; 36066 return; 36067 } 36068- if (display_ratio_ <= 1) { 36069+ if (screen_info_.display_ratio <= 1) { 36070 return; 36071- } else if (display_ratio_ > 1 && display_ratio_ < 1.7) { 36072+ } else if (screen_info_.display_ratio > 1 && 36073+ screen_info_.display_ratio < 1.7) { 36074 // rk 36075- size.width = 30; 36076- size.height = 30; 36077- } else if (display_ratio_ >= 1.7 && display_ratio_ < 2.5) { 36078+ size.width = 30 / screen_info_.display_ratio; 36079+ size.height = 30 / screen_info_.display_ratio; 36080+ } else if (screen_info_.display_ratio >= 1.7 && 36081+ screen_info_.display_ratio < 2.5) { 36082 // wgr 36083- size.width = 40; 36084- size.height = 40; 36085+ size.width = 40 / screen_info_.display_ratio; 36086+ size.height = 40 / screen_info_.display_ratio; 36087 } else { 36088- // wgr 36089- size.width = 60; 36090- size.height = 60; 36091+ // phone 36092+ size.width = 60 / screen_info_.display_ratio; 36093+ size.height = 60 / screen_info_.display_ratio; 36094 } 36095 LOG(ERROR) << "GetTouchHandleSize " << size.width << " " << size.height; 36096 } 36097@@ -260,35 +261,53 @@ std::shared_ptr<NWebTouchHandleState> NWebRenderHandler::GetTouchHandleState( 36098 NWebTouchHandleState::TouchHandleType type) { 36099 switch (type) { 36100 case NWebTouchHandleState::TouchHandleType::INSERT_HANDLE: 36101- return insert_handle_.enabled ? 36102- std::make_shared<NWebTouchHandleStateImpl>(insert_handle_) : nullptr; 36103+ return insert_handle_.enabled 36104+ ? std::make_shared<NWebTouchHandleStateImpl>(insert_handle_) 36105+ : nullptr; 36106 case NWebTouchHandleState::TouchHandleType::SELECTION_BEGIN_HANDLE: 36107- return start_selection_handle_.enabled ? 36108- std::make_shared<NWebTouchHandleStateImpl>(start_selection_handle_) : nullptr; 36109+ return start_selection_handle_.enabled 36110+ ? std::make_shared<NWebTouchHandleStateImpl>( 36111+ start_selection_handle_) 36112+ : nullptr; 36113 case NWebTouchHandleState::TouchHandleType::SELECTION_END_HANDLE: 36114- return end_selection_handle_.enabled ? 36115- std::make_shared<NWebTouchHandleStateImpl>(end_selection_handle_) : nullptr; 36116+ return end_selection_handle_.enabled 36117+ ? std::make_shared<NWebTouchHandleStateImpl>( 36118+ end_selection_handle_) 36119+ : nullptr; 36120 default: 36121 return nullptr; 36122 } 36123 } 36124 36125+CefTouchHandleState NWebRenderHandler::ConvertTouchHandleDisplayRatio( 36126+ const CefTouchHandleState& touch_handle) { 36127+ CefTouchHandleState result_touch_handle = touch_handle; 36128+ if (screen_info_.display_ratio <= 0) { 36129+ LOG(WARNING) << "virtual display ratio is invalid"; 36130+ return result_touch_handle; 36131+ } 36132+ result_touch_handle.edge_height *= screen_info_.display_ratio; 36133+ result_touch_handle.origin.x *= screen_info_.display_ratio; 36134+ result_touch_handle.origin.y *= screen_info_.display_ratio; 36135+ return result_touch_handle; 36136+} 36137+ 36138 void NWebRenderHandler::OnTouchSelectionChanged( 36139 const CefTouchHandleState& insert_handle, 36140 const CefTouchHandleState& start_selection_handle, 36141 const CefTouchHandleState& end_selection_handle, 36142 bool need_report) { 36143- insert_handle_ = insert_handle; 36144- start_selection_handle_ = start_selection_handle; 36145- end_selection_handle_ = end_selection_handle; 36146+ insert_handle_ = ConvertTouchHandleDisplayRatio(insert_handle); 36147+ start_selection_handle_ = ConvertTouchHandleDisplayRatio(start_selection_handle); 36148+ end_selection_handle_ = ConvertTouchHandleDisplayRatio(end_selection_handle); 36149 if (!need_report) { 36150 return; 36151 } 36152 if (auto handler = handler_.lock()) { 36153 handler->OnTouchSelectionChanged( 36154- std::make_shared<NWebTouchHandleStateImpl>(insert_handle_), 36155- std::make_shared<NWebTouchHandleStateImpl>(start_selection_handle_), 36156- std::make_shared<NWebTouchHandleStateImpl>(end_selection_handle_)); 36157+ std::make_shared<NWebTouchHandleStateImpl>(insert_handle_), 36158+ std::make_shared<NWebTouchHandleStateImpl>(start_selection_handle_), 36159+ std::make_shared<NWebTouchHandleStateImpl>(end_selection_handle_)); 36160 } 36161 } 36162 36163@@ -297,7 +316,8 @@ bool NWebRenderHandler::StartDragging(CefRefPtr<CefBrowser> browser, 36164 DragOperationsMask allowed_ops, 36165 int x, 36166 int y) { 36167- LOG(INFO) << "received start dragging callback, operation = " << allowed_ops << ", x = " << x << ", y = " << y; 36168+ LOG(INFO) << "received start dragging callback, operation = " << allowed_ops 36169+ << ", x = " << x << ", y = " << y; 36170 if (!drag_data && !drag_data->HasImage()) { 36171 LOG(ERROR) << "drag data invalid"; 36172 return false; 36173@@ -311,7 +331,8 @@ bool NWebRenderHandler::StartDragging(CefRefPtr<CefBrowser> browser, 36174 36175 int width; 36176 int height; 36177- auto bitmap = image->GetAsBitmap(1, CEF_COLOR_TYPE_BGRA_8888, CEF_ALPHA_TYPE_OPAQUE, width, height); 36178+ auto bitmap = image->GetAsBitmap(1, CEF_COLOR_TYPE_BGRA_8888, 36179+ CEF_ALPHA_TYPE_OPAQUE, width, height); 36180 if (!bitmap) { 36181 LOG(ERROR) << "drag data bitmap invalid"; 36182 return false; 36183@@ -330,7 +351,8 @@ bool NWebRenderHandler::StartDragging(CefRefPtr<CefBrowser> browser, 36184 return false; 36185 } 36186 36187- LOG(INFO) << "drag image width : " << width << ", height : " << height<< ", buffer size : " << read_size; 36188+ LOG(INFO) << "drag image width : " << width << ", height : " << height 36189+ << ", buffer size : " << read_size; 36190 auto handler = handler_.lock(); 36191 if (handler == nullptr) { 36192 LOG(ERROR) << "can't get strong ptr with handler"; 36193diff --git a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h b/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h 36194index 2f0684513b74f..4d24b5caa4614 36195--- a/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h 36196+++ b/src/ohos_nweb/src/cef_delegate/nweb_render_handler.h 36197@@ -21,11 +21,20 @@ 36198 #include <vector> 36199 #include "cef/include/cef_render_handler.h" 36200 #include "display_manager_adapter.h" 36201-#include "nweb_inputmethod_client.h" 36202 #include "nweb_handler.h" 36203+#include "nweb_inputmethod_client.h" 36204 #include "nweb_touch_handle_state_impl.h" 36205 36206 namespace OHOS::NWeb { 36207+struct NWebScreenInfo { 36208+ RotationType rotation = RotationType::ROTATION_0; 36209+ OrientationType orientation = OrientationType::UNSPECIFIED; 36210+ int width = 0; 36211+ int height = 0; 36212+ double display_ratio = -1.0; 36213+ bool default_portrait = false; 36214+}; 36215+ 36216 class NWebRenderHandler : public CefRenderHandler { 36217 public: 36218 static CefRefPtr<NWebRenderHandler> Create(); 36219@@ -35,8 +44,7 @@ class NWebRenderHandler : public CefRenderHandler { 36220 void RegisterRenderCb(std::function<void(const char*)> render_update_cb); 36221 void RegisterNWebHandler(std::shared_ptr<NWebHandler> handler); 36222 void Resize(uint32_t width, uint32_t height); 36223- void SetScreenInfo(RotationType rotation, OrientationType orientation, 36224- int width, int height, double display_ratio); 36225+ void SetScreenInfo(const NWebScreenInfo& screen_info); 36226 int ContentHeight(); 36227 void SetInputMethodClient(CefRefPtr<NWebInputMethodClient> client); 36228 36229@@ -51,14 +59,14 @@ class NWebRenderHandler : public CefRenderHandler { 36230 const void* buffer, 36231 int width, 36232 int height) override; 36233- 36234+ 36235 void OnRootLayerChanged(CefRefPtr<CefBrowser> browser, 36236 int height, 36237 int width) override; 36238 36239 void OnScrollOffsetChanged(CefRefPtr<CefBrowser> browser, 36240- double x, 36241- double y) override; 36242+ double x, 36243+ double y) override; 36244 36245 virtual void OnImeCompositionRangeChanged( 36246 CefRefPtr<CefBrowser> browser, 36247@@ -70,15 +78,17 @@ class NWebRenderHandler : public CefRenderHandler { 36248 const CefRange& selected_range) override; 36249 36250 virtual void OnVirtualKeyboardRequested(CefRefPtr<CefBrowser> browser, 36251- TextInputMode input_mode, bool show_keyboard) override; 36252+ TextInputMode input_mode, 36253+ bool show_keyboard) override; 36254 36255 void GetTouchHandleSize(CefRefPtr<CefBrowser> browser, 36256 cef_horizontal_alignment_t orientation, 36257 CefSize& size) override; 36258- void OnTouchSelectionChanged(const CefTouchHandleState& insert_handle, 36259- const CefTouchHandleState& start_selection_handle, 36260- const CefTouchHandleState& end_selection_handle, 36261- bool need_report) override; 36262+ void OnTouchSelectionChanged( 36263+ const CefTouchHandleState& insert_handle, 36264+ const CefTouchHandleState& start_selection_handle, 36265+ const CefTouchHandleState& end_selection_handle, 36266+ bool need_report) override; 36267 36268 bool StartDragging(CefRefPtr<CefBrowser> browser, 36269 CefRefPtr<CefDragData> drag_data, 36270@@ -92,21 +102,22 @@ class NWebRenderHandler : public CefRenderHandler { 36271 36272 CefRefPtr<CefDragData> GetDragData(); 36273 36274+ float GetVirtualPixelRatio() const { return screen_info_.display_ratio; } 36275+ 36276 // Include the default reference counting implementation. 36277 IMPLEMENT_REFCOUNTING(NWebRenderHandler); 36278 36279 private: 36280+ CefTouchHandleState ConvertTouchHandleDisplayRatio( 36281+ const CefTouchHandleState& touch_handle); 36282+ 36283 std::function<void(const char*)> render_update_cb_ = nullptr; 36284 CefRefPtr<NWebInputMethodClient> inputmethod_client_ = nullptr; 36285 uint32_t width_ = 0; 36286 uint32_t height_ = 0; 36287- RotationType rotation_ = RotationType::ROTATION_0; 36288- OrientationType orientation_ = OrientationType::UNSPECIFIED; 36289 int content_height_ = 0; 36290 int content_width_ = 0; 36291- double display_ratio_ = -1.0; 36292- uint32_t screen_width_ = 0; 36293- uint32_t screen_height_ = 0; 36294+ NWebScreenInfo screen_info_; 36295 36296 std::weak_ptr<NWebHandler> handler_; 36297 CefTouchHandleState insert_handle_; 36298@@ -114,6 +125,6 @@ class NWebRenderHandler : public CefRenderHandler { 36299 CefTouchHandleState end_selection_handle_; 36300 CefRefPtr<CefDragData> drag_data_ = nullptr; 36301 }; 36302-} 36303+} // namespace OHOS::NWeb 36304 36305 #endif // NWEB_RENDER_HANDLER_H 36306diff --git a/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.cc b/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.cc 36307new file mode 100644 36308index 0000000000000..0a97d72f55ddb 36309--- /dev/null 36310+++ b/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.cc 36311@@ -0,0 +1,35 @@ 36312+/* 36313+ * Copyright (c) 2023 Huawei Device Co., Ltd. 36314+ * Licensed under the Apache License, Version 2.0 (the "License"); 36315+ * you may not use this file except in compliance with the License. 36316+ * You may obtain a copy of the License at 36317+ * 36318+ * http://www.apache.org/licenses/LICENSE-2.0 36319+ * 36320+ * Unless required by applicable law or agreed to in writing, software 36321+ * distributed under the License is distributed on an "AS IS" BASIS, 36322+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 36323+ * See the License for the specific language governing permissions and 36324+ * limitations under the License. 36325+ */ 36326+ 36327+#include "nweb_select_popup_menu_callback.h" 36328+ 36329+namespace OHOS::NWeb { 36330+NWebSelectPopupMenuCallbackImpl::NWebSelectPopupMenuCallbackImpl( 36331+ CefRefPtr<CefSelectPopupCallback> callback) 36332+ : callback_(callback) {} 36333+ 36334+void NWebSelectPopupMenuCallbackImpl::Continue( 36335+ const std::vector<int32_t>& indices) { 36336+ if (callback_) { 36337+ callback_->Continue(indices); 36338+ } 36339+} 36340+ 36341+void NWebSelectPopupMenuCallbackImpl::Cancel() { 36342+ if (callback_) { 36343+ callback_->Cancel(); 36344+ } 36345+} 36346+} // namespace OHOS::NWeb 36347\ No newline at end of file 36348diff --git a/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.h b/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.h 36349new file mode 100644 36350index 0000000000000..0f210c9eb2788 36351--- /dev/null 36352+++ b/src/ohos_nweb/src/cef_delegate/nweb_select_popup_menu_callback.h 36353@@ -0,0 +1,36 @@ 36354+/* 36355+ * Copyright (c) 2023 Huawei Device Co., Ltd. 36356+ * Licensed under the Apache License, Version 2.0 (the "License"); 36357+ * you may not use this file except in compliance with the License. 36358+ * You may obtain a copy of the License at 36359+ * 36360+ * http://www.apache.org/licenses/LICENSE-2.0 36361+ * 36362+ * Unless required by applicable law or agreed to in writing, software 36363+ * distributed under the License is distributed on an "AS IS" BASIS, 36364+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 36365+ * See the License for the specific language governing permissions and 36366+ * limitations under the License. 36367+ */ 36368+ 36369+#ifndef NWEB_SELECT_POPUP_MENU_CALLBACK_H 36370+#define NWEB_SELECT_POPUP_MENU_CALLBACK_H 36371+ 36372+#include "cef/include/cef_dialog_handler.h" 36373+#include "nweb_select_popup_menu.h" 36374+ 36375+namespace OHOS::NWeb { 36376+class NWebSelectPopupMenuCallbackImpl : public NWebSelectPopupMenuCallback { 36377+ public: 36378+ NWebSelectPopupMenuCallbackImpl() = default; 36379+ explicit NWebSelectPopupMenuCallbackImpl( 36380+ CefRefPtr<CefSelectPopupCallback> callback); 36381+ ~NWebSelectPopupMenuCallbackImpl() = default; 36382+ void Continue(const std::vector<int32_t>& indices) override; 36383+ void Cancel() override; 36384+ 36385+ private: 36386+ CefRefPtr<CefSelectPopupCallback> callback_ = nullptr; 36387+}; 36388+} // namespace OHOS::NWeb 36389+#endif 36390\ No newline at end of file 36391diff --git a/src/ohos_nweb/src/nweb_data_base_impl.cc b/src/ohos_nweb/src/nweb_data_base_impl.cc 36392index 962f3552f65bd..0419148be6d41 36393--- a/src/ohos_nweb/src/nweb_data_base_impl.cc 36394+++ b/src/ohos_nweb/src/nweb_data_base_impl.cc 36395@@ -48,16 +48,15 @@ void NWebDataBaseImpl::DeleteHttpAuthCredentials() { 36396 void NWebDataBaseImpl::SaveHttpAuthCredentials(const std::string& host, const std::string& realm, 36397 const std::string& username, const char* password) { 36398 if (delegate_ != nullptr) { 36399- return delegate_->SaveHttpAuthCredentials(host, realm, username, password); 36400+ delegate_->SaveHttpAuthCredentials(host, realm, username, password); 36401 } 36402 } 36403 36404-std::vector<std::string> NWebDataBaseImpl::GetHttpAuthCredentials(const std::string& host, 36405- const std::string& realm) const { 36406+void NWebDataBaseImpl::GetHttpAuthCredentials(const std::string& host, const std::string& realm, 36407+ std::string& username, char* password, uint32_t passwordSize) const { 36408 if (delegate_ != nullptr) { 36409- return delegate_->GetHttpAuthCredentials(host, realm); 36410+ delegate_->GetHttpAuthCredentials(host, realm, username, password, passwordSize); 36411 } 36412- return {}; 36413 } 36414 36415 bool NWebDataBaseImpl::ExistPermissionByOrigin(const std::string& origin, int type) 36416diff --git a/src/ohos_nweb/src/nweb_data_base_impl.h b/src/ohos_nweb/src/nweb_data_base_impl.h 36417index 4b50872ba5d0f..febf150422ed6 36418--- a/src/ohos_nweb/src/nweb_data_base_impl.h 36419+++ b/src/ohos_nweb/src/nweb_data_base_impl.h 36420@@ -35,8 +35,8 @@ class NWebDataBaseImpl : public NWebDataBase { 36421 void SaveHttpAuthCredentials(const std::string& host, const std::string& realm, 36422 const std::string& username, const char* password) override; 36423 36424- std::vector<std::string> GetHttpAuthCredentials(const std::string& host, 36425- const std::string& realm) const override; 36426+ void GetHttpAuthCredentials(const std::string& host, const std::string& realm, 36427+ std::string& username, char* password, uint32_t passwordSize) const override; 36428 36429 bool ExistPermissionByOrigin(const std::string& origin, int type) override; 36430 36431diff --git a/src/ohos_nweb/src/nweb_delegate_adapter.cc b/src/ohos_nweb/src/nweb_delegate_adapter.cc 36432index badff60157498..d770595faea5e 36433--- a/src/ohos_nweb/src/nweb_delegate_adapter.cc 36434+++ b/src/ohos_nweb/src/nweb_delegate_adapter.cc 36435@@ -25,12 +25,13 @@ namespace OHOS::NWeb { 36436 std::shared_ptr<NWebDelegateInterface> NWebDelegateAdapter::CreateNWebDelegate( 36437 int argc, 36438 const char* argv[], 36439+ bool is_enhance_surface, 36440 void* window) { 36441 #if defined(USE_CEF) 36442 std::shared_ptr<NWebDelegate> delegate = 36443 std::make_shared<NWebDelegate>(argc, argv); 36444 36445- if (delegate == nullptr || !delegate->Init(window)) { 36446+ if (delegate == nullptr || !delegate->Init(is_enhance_surface, window)) { 36447 WVLOG_I("FAIL to create nweb delegate instance"); 36448 return nullptr; 36449 } 36450diff --git a/src/ohos_nweb/src/nweb_delegate_adapter.h b/src/ohos_nweb/src/nweb_delegate_adapter.h 36451index 36eb920b24770..7fa0f7bd757c8 36452--- a/src/ohos_nweb/src/nweb_delegate_adapter.h 36453+++ b/src/ohos_nweb/src/nweb_delegate_adapter.h 36454@@ -26,6 +26,7 @@ class OHOS_NWEB_EXPORT NWebDelegateAdapter { 36455 static std::shared_ptr<NWebDelegateInterface> CreateNWebDelegate( 36456 int argc, 36457 const char* argv[], 36458+ bool is_enhance_surface, 36459 void* window); 36460 }; 36461 } 36462diff --git a/src/ohos_nweb/src/nweb_delegate_interface.h b/src/ohos_nweb/src/nweb_delegate_interface.h 36463index 7609f424e91f0..ba7425c3ca4a8 36464--- a/src/ohos_nweb/src/nweb_delegate_interface.h 36465+++ b/src/ohos_nweb/src/nweb_delegate_interface.h 36466@@ -26,6 +26,7 @@ 36467 #include "nweb_find_callback.h" 36468 #include "nweb_handler.h" 36469 #include "nweb_preference.h" 36470+#include "nweb_web_message.h" 36471 36472 namespace OHOS::NWeb { 36473 enum class DelegateDragAction { 36474@@ -44,6 +45,8 @@ struct DelegateDragEvent { 36475 DelegateDragAction action; 36476 }; 36477 36478+using WebState = std::shared_ptr<std::vector<uint8_t>>; 36479+ 36480 class NWebDelegateInterface 36481 : public std::enable_shared_from_this<NWebDelegateInterface>{ 36482 public: 36483@@ -53,12 +56,15 @@ class NWebDelegateInterface 36484 virtual void OnDestroy(bool is_close_all) = 0; 36485 virtual void RegisterDownLoadListener( 36486 std::shared_ptr<NWebDownloadCallback> downloadListener) = 0; 36487+ virtual void RegisterReleaseSurfaceListener( 36488+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) = 0; 36489 virtual void RegisterNWebHandler(std::shared_ptr<NWebHandler> handler) = 0; 36490 virtual void RegisterRenderCb( 36491 std::function<void(const char*)> render_update_cb) = 0; 36492 virtual void RegisterWebAppClientExtensionListener( 36493 std::shared_ptr<NWebAppClientExtensionCallback> 36494 web_app_client_extension_listener) = 0; 36495+ virtual void UnRegisterWebAppClientExtensionListener() = 0; 36496 virtual void SetInputMethodClient( 36497 CefRefPtr<NWebInputMethodClient> client) = 0; 36498 36499@@ -103,9 +109,9 @@ class NWebDelegateInterface 36500 virtual void CreateWebMessagePorts(std::vector<std::string>& ports) = 0; 36501 virtual void PostWebMessage(std::string& message, std::vector<std::string>& ports, std::string& targetUri) = 0; 36502 virtual void ClosePort(std::string& portHandle) = 0; 36503- virtual void PostPortMessage(std::string& portHandle, std::string& data) = 0; 36504+ virtual void PostPortMessage(std::string& portHandle, std::shared_ptr<NWebMessage> data) = 0; 36505 virtual void SetPortMessageCallback(std::string& portHandle, 36506- std::shared_ptr<NWebValueCallback<std::string>> callback) = 0; 36507+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) = 0; 36508 virtual HitTestResult GetHitTestResult() const = 0; 36509 virtual int PageLoadProgress() = 0; 36510 virtual float Scale() = 0; 36511@@ -161,6 +167,13 @@ class NWebDelegateInterface 36512 virtual void GetImages(std::shared_ptr<NWebValueCallback<bool>> callback) = 0; 36513 virtual void RemoveCache(bool include_disk_files) = 0; 36514 virtual std::shared_ptr<NWebHistoryList> GetHistoryList() = 0; 36515+ virtual WebState SerializeWebState() = 0; 36516+ virtual bool RestoreWebState(WebState state) = 0; 36517+ virtual void PageUp(bool top) = 0; 36518+ virtual void PageDown(bool bottom) = 0; 36519+ virtual void ScrollTo(float x, float y) = 0; 36520+ virtual void ScrollBy(float delta_x, float delta_y) = 0; 36521+ virtual void SlideScroll(float vx, float vy) = 0; 36522 }; 36523 } // namespace OHOS::NWeb 36524 36525diff --git a/src/ohos_nweb/src/nweb_impl.cc b/src/ohos_nweb/src/nweb_impl.cc 36526index 5a5ce7a601cfd..4b7f7767700c3 36527--- a/src/ohos_nweb/src/nweb_impl.cc 36528+++ b/src/ohos_nweb/src/nweb_impl.cc 36529@@ -19,11 +19,13 @@ 36530 #include <cerrno> 36531 #include <iostream> 36532 #include <map> 36533+#include <memory> 36534 #include <string> 36535 #include <thread> 36536 36537 #include "base/lazy_instance.h" 36538 #include "base/trace_event/common/trace_event_common.h" 36539+#include "ohos_adapter_helper.h" 36540 #include "nweb_delegate_adapter.h" 36541 #include "nweb_export.h" 36542 #include "nweb_handler.h" 36543@@ -47,51 +49,32 @@ bool g_browser_service_api_enabled = false; 36544 #endif 36545 } 36546 36547-using namespace OHOS::NWeb; 36548-extern "C" OHOS_NWEB_EXPORT NWeb* CreateNWeb( 36549- const NWebCreateInfo& create_info) { 36550- static uint32_t current_nweb_id = 0; 36551- uint32_t nweb_id = ++current_nweb_id; 36552- TRACE_EVENT1("NWebImpl", "NWebImpl | CreateNWeb", "nweb_id", nweb_id); 36553- WVLOG_I("creating nweb %{public}u, size %{public}u*%{public}u", nweb_id, 36554- create_info.width, create_info.height); 36555- auto nweb = new NWebImpl(nweb_id); 36556- if (nweb == nullptr) { 36557- WVLOG_E("fail to create nweb instance"); 36558- return nullptr; 36559- } 36560- 36561- if (!nweb->Init(create_info)) { 36562- WVLOG_E("fail to init nweb"); 36563- delete nweb; 36564- return nullptr; 36565- } 36566- 36567- ++g_nweb_count; 36568-#if defined(REPORT_SYS_EVENT) 36569- // Report nweb instance count 36570- if (g_nweb_count > g_nweb_max_count) { 36571- g_nweb_max_count = g_nweb_count; 36572- } 36573- ReportMultiInstanceStats(nweb_id, g_nweb_count, g_nweb_max_count); 36574-#endif 36575- return nweb; 36576-} 36577- 36578 namespace OHOS::NWeb { 36579 36580 // For NWebEx 36581-typedef std::unordered_map<int32_t, NWebImpl*> NWebMap; 36582+typedef std::unordered_map<int32_t, std::weak_ptr<NWebImpl>> NWebMap; 36583 base::LazyInstance<NWebMap>::DestructorAtExit g_nweb_map = 36584 LAZY_INSTANCE_INITIALIZER; 36585 36586 base::LazyInstance<std::vector<std::string>>::DestructorAtExit g_browser_args = 36587 LAZY_INSTANCE_INITIALIZER; 36588 36589+void NWebImpl::AddNWebToMap(uint32_t id, std::shared_ptr<NWebImpl>& nweb) { 36590+ if (nweb) { 36591+ std::weak_ptr<NWebImpl> nweb_weak(nweb); 36592+ g_nweb_map.Get().emplace(id, nweb_weak); 36593+ } 36594+} 36595+ 36596 NWebImpl* NWebImpl::FromID(int32_t nweb_id) { 36597 NWebMap* map = g_nweb_map.Pointer(); 36598- auto it = map->find(nweb_id); 36599- return it == map->end() ? nullptr : it->second; 36600+ if (auto it = map->find(nweb_id); it != map->end()) { 36601+ auto nweb = it->second.lock(); 36602+ if (nweb) { 36603+ return nweb.get(); 36604+ } 36605+ } 36606+ return nullptr; 36607 } 36608 36609 void NWebImpl::InitBrowserServiceApi(std::vector<std::string>& browser_args) { 36610@@ -107,9 +90,7 @@ bool NWebImpl::GetBrowserServiceApiEnabled() { 36611 return g_browser_service_api_enabled; 36612 } 36613 36614-NWebImpl::NWebImpl(uint32_t id) : nweb_id_(id) { 36615- g_nweb_map.Get().emplace(id, this); 36616-} 36617+NWebImpl::NWebImpl(uint32_t id) : nweb_id_(id) {} 36618 36619 NWebImpl::~NWebImpl() { 36620 g_nweb_map.Get().erase(nweb_id_); 36621@@ -173,11 +154,45 @@ void NWebImpl::ProcessInitArgs(const NWebInitArgs& init_args) { 36622 InitWebEngineArgs(init_args); 36623 } 36624 36625+bool NWebImpl::SetVirtualDeviceRatio() { 36626+ if (fabs(device_pixel_ratio_) < 1e-15) { 36627+ auto display_manager_adapter = 36628+ OHOS::NWeb::OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 36629+ if (display_manager_adapter == nullptr) { 36630+ WVLOG_E("display_manager_adapter is nullptr."); 36631+ return false; 36632+ } 36633+ std::shared_ptr<OHOS::NWeb::DisplayAdapter> display = 36634+ display_manager_adapter->GetDefaultDisplay(); 36635+ if (display == nullptr) { 36636+ WVLOG_E("display is nullptr."); 36637+ return false; 36638+ } 36639+ device_pixel_ratio_ = display->GetVirtualPixelRatio(); 36640+ if (device_pixel_ratio_ <= 0) { 36641+ WVLOG_E("invalid ratio."); 36642+ return false; 36643+ } 36644+ WVLOG_I("GetVirtualPixelRatio ratio: %{public}f", device_pixel_ratio_); 36645+ } 36646+ return true; 36647+} 36648+ 36649+uint32_t NWebImpl::NormalizeVirtualDeviceRatio(uint32_t length) { 36650+ float ratio = static_cast<int>(length / device_pixel_ratio_) 36651+ * device_pixel_ratio_; 36652+ return std::ceil(ratio); 36653+} 36654+ 36655 bool NWebImpl::InitWebEngine(const NWebCreateInfo& create_info) { 36656 if (output_handler_ == nullptr) { 36657 WVLOG_E("fail to init web engine, NWeb output handler is not ready"); 36658 return false; 36659 } 36660+ if (!SetVirtualDeviceRatio()) { 36661+ WVLOG_E("fail to set virtual device ratio"); 36662+ return false; 36663+ } 36664 if (web_engine_args_.empty()) { 36665 WVLOG_E("fail to init web engine args"); 36666 return false; 36667@@ -189,16 +204,22 @@ bool NWebImpl::InitWebEngine(const NWebCreateInfo& create_info) { 36668 for (auto it = web_engine_args_.begin(); i < argc; ++i, ++it) { 36669 argv[i] = it->c_str(); 36670 } 36671- 36672- void* window = 36673+ bool is_enhance_surface = create_info.init_args.is_enhance_surface; 36674+ void* window = nullptr; 36675+ if (is_enhance_surface) { 36676+ window = create_info.enhance_surface_info; 36677+ } else { 36678+ window = 36679 reinterpret_cast<void*>(output_handler_->GetNativeWindowFromSurface( 36680 create_info.producer_surface)); 36681+ } 36682+ 36683 if (window == nullptr) { 36684 WVLOG_E("fail to init web engine, get native window from surface failed"); 36685 delete[] argv; 36686 return false; 36687 } 36688- nweb_delegate_ = NWebDelegateAdapter::CreateNWebDelegate(argc, argv, window); 36689+ nweb_delegate_ = NWebDelegateAdapter::CreateNWebDelegate(argc, argv, is_enhance_surface, window); 36690 if (nweb_delegate_ == nullptr) { 36691 WVLOG_E("fail to create nweb delegate of web engine"); 36692 delete[] argv; 36693@@ -214,6 +235,8 @@ bool NWebImpl::InitWebEngine(const NWebCreateInfo& create_info) { 36694 36695 uint32_t width, height; 36696 output_handler_->GetWindowInfo(width, height); 36697+ width = NormalizeVirtualDeviceRatio(width); 36698+ height = NormalizeVirtualDeviceRatio(height); 36699 nweb_delegate_->Resize(width, height); 36700 nweb_delegate_->RegisterRenderCb(render_update_cb); 36701 36702@@ -231,6 +254,7 @@ bool NWebImpl::InitWebEngine(const NWebCreateInfo& create_info) { 36703 void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) { 36704 web_engine_args_.clear(); 36705 36706+ WVLOG_E("===OH=== InitWebEngineArgs 60fps"); 36707 auto args = g_browser_args.Get(); 36708 for (const std::string& arg : args) { 36709 web_engine_args_.emplace_back(arg); 36710@@ -245,7 +269,7 @@ void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) { 36711 #ifdef RK3568 36712 web_engine_args_.emplace_back("--off-screen-frame-rate=70"); 36713 #else 36714- web_engine_args_.emplace_back("--off-screen-frame-rate=65"); 36715+ web_engine_args_.emplace_back("--off-screen-frame-rate=60"); 36716 #endif 36717 web_engine_args_.emplace_back("--no-unsandboxed-zygote"); 36718 web_engine_args_.emplace_back("--no-zygote"); 36719@@ -260,7 +284,10 @@ void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) { 36720 web_engine_args_.emplace_back("--zygote-cmd-prefix=/system/bin/web_render"); 36721 web_engine_args_.emplace_back("--remote-debugging-port=9222"); 36722 web_engine_args_.emplace_back("--enable-touch-drag-drop"); 36723- 36724+ if (init_args.is_enhance_surface) { 36725+ WVLOG_I("is_enhance_surface is true"); 36726+ web_engine_args_.emplace_back("--ohos-enhance-surface"); 36727+ } 36728 for (auto arg : init_args.web_engine_args_to_delete) { 36729 auto it = std::find(web_engine_args_.begin(), web_engine_args_.end(), arg); 36730 if (it != web_engine_args_.end()) { 36731@@ -287,6 +314,10 @@ void NWebImpl::PutWebAppClientExtensionCallback( 36732 web_app_client_extension_listener); 36733 } 36734 36735+void NWebImpl::RemoveWebAppClientExtensionCallback() { 36736+ nweb_delegate_->UnRegisterWebAppClientExtensionListener(); 36737+} 36738+ 36739 void NWebImpl::SetNWebHandler(std::shared_ptr<NWebHandler> client) { 36740 nweb_handle_ = client; 36741 nweb_delegate_->RegisterNWebHandler(client); 36742@@ -301,6 +332,8 @@ void NWebImpl::Resize(uint32_t width, uint32_t height) { 36743 if (input_handler_ == nullptr || output_handler_ == nullptr) { 36744 return; 36745 } 36746+ width = NormalizeVirtualDeviceRatio(width); 36747+ height = NormalizeVirtualDeviceRatio(height); 36748 if (width > kSurfaceMaxWidth || height > kSurfaceMaxHeight) { 36749 return; 36750 } 36751@@ -560,7 +593,7 @@ void NWebImpl::ClosePort(std::string& portHandle) { 36752 nweb_delegate_->ClosePort(portHandle); 36753 } 36754 36755-void NWebImpl::PostPortMessage(std::string& portHandle, std::string& data) { 36756+void NWebImpl::PostPortMessage(std::string& portHandle, std::shared_ptr<NWebMessage> data) { 36757 if (nweb_delegate_ == nullptr) { 36758 WVLOG_E("JSAPI nweb_delegate_ its null"); 36759 return; 36760@@ -569,7 +602,7 @@ void NWebImpl::PostPortMessage(std::string& portHandle, std::string& data) { 36761 } 36762 36763 void NWebImpl::SetPortMessageCallback(std::string& portHandle, 36764- std::shared_ptr<NWebValueCallback<std::string>> callback) { 36765+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) { 36766 if (nweb_delegate_ == nullptr) { 36767 WVLOG_E("JSAPI nweb_delegate_ its null"); 36768 return; 36769@@ -818,9 +851,99 @@ std::shared_ptr<NWebHistoryList> NWebImpl::GetHistoryList() { 36770 36771 return nweb_delegate_->GetHistoryList(); 36772 } 36773+ 36774+WebState NWebImpl::SerializeWebState() { 36775+ if (nweb_delegate_ == nullptr) { 36776+ return nullptr; 36777+ } 36778+ return nweb_delegate_->SerializeWebState(); 36779+} 36780+ 36781+bool NWebImpl::RestoreWebState(WebState state) { 36782+ if (nweb_delegate_ == nullptr) { 36783+ return false; 36784+ } 36785+ return nweb_delegate_->RestoreWebState(state); 36786+} 36787+ 36788+void NWebImpl::PutReleaseSurfaceCallback( 36789+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) { 36790+ nweb_delegate_->RegisterReleaseSurfaceListener(releaseSurfaceListener); 36791+} 36792+ 36793+void NWebImpl::PageUp(bool top) { 36794+ if (nweb_delegate_ == nullptr) { 36795+ return; 36796+ } 36797+ return nweb_delegate_->PageUp(top); 36798+} 36799+ 36800+void NWebImpl::PageDown(bool bottom) { 36801+ if (nweb_delegate_ == nullptr) { 36802+ return; 36803+ } 36804+ return nweb_delegate_->PageDown(bottom); 36805+} 36806+ 36807+void NWebImpl::ScrollTo(float x, float y) { 36808+ if (nweb_delegate_ == nullptr) { 36809+ return; 36810+ } 36811+ return nweb_delegate_->ScrollTo(x, y); 36812+} 36813+ 36814+void NWebImpl::ScrollBy(float delta_x, float delta_y) { 36815+ if (nweb_delegate_ == nullptr) { 36816+ return; 36817+ } 36818+ return nweb_delegate_->ScrollBy(delta_x, delta_y); 36819+} 36820+ 36821+void NWebImpl::SlideScroll(float vx, float vy) { 36822+ if (nweb_delegate_ == nullptr) { 36823+ return; 36824+ } 36825+ return nweb_delegate_->SlideScroll(vx, vy); 36826+} 36827+ 36828 } // namespace OHOS::NWeb 36829-extern "C" OHOS_NWEB_EXPORT NWeb* GetNWeb(int32_t nweb_id) { 36830+ 36831+using namespace OHOS::NWeb; 36832+extern "C" OHOS_NWEB_EXPORT void CreateNWeb(const NWebCreateInfo& create_info, 36833+ std::shared_ptr<NWebImpl>& nweb) { 36834+ static uint32_t current_nweb_id = 0; 36835+ uint32_t nweb_id = ++current_nweb_id; 36836+ TRACE_EVENT1("NWebImpl", "NWebImpl | CreateNWeb", "nweb_id", nweb_id); 36837+ WVLOG_I("creating nweb %{public}u, size %{public}u*%{public}u", nweb_id, 36838+ create_info.width, create_info.height); 36839+ WVLOG_I("creating nweb use enhance surface %{public}d", 36840+ create_info.init_args.is_enhance_surface); 36841+ nweb = std::make_shared<NWebImpl>(nweb_id); 36842+ if (nweb == nullptr) { 36843+ WVLOG_E("fail to create nweb instance"); 36844+ return; 36845+ } 36846+ 36847+ if (!nweb->Init(create_info)) { 36848+ WVLOG_E("fail to init nweb"); 36849+ return; 36850+ } 36851+ 36852+ nweb->AddNWebToMap(nweb_id, nweb); 36853+ ++g_nweb_count; 36854+#if defined(REPORT_SYS_EVENT) 36855+ // Report nweb instance count 36856+ if (g_nweb_count > g_nweb_max_count) { 36857+ g_nweb_max_count = g_nweb_count; 36858+ } 36859+ ReportMultiInstanceStats(nweb_id, g_nweb_count, g_nweb_max_count); 36860+#endif 36861+} 36862+ 36863+extern "C" OHOS_NWEB_EXPORT void GetNWeb(int32_t nweb_id, 36864+ std::weak_ptr<NWebImpl>& nweb) { 36865 NWebMap* map = OHOS::NWeb::g_nweb_map.Pointer(); 36866- auto it = map->find(nweb_id); 36867- return it == map->end() ? nullptr : it->second; 36868+ if (auto it = map->find(nweb_id); it != map->end()) { 36869+ nweb = it->second; 36870+ } 36871 } 36872diff --git a/src/ohos_nweb/src/nweb_impl.h b/src/ohos_nweb/src/nweb_impl.h 36873index abbba9094f7ed..2a6f2c2b7f60e 36874--- a/src/ohos_nweb/src/nweb_impl.h 36875+++ b/src/ohos_nweb/src/nweb_impl.h 36876@@ -76,15 +76,17 @@ class NWebImpl : public NWeb { 36877 const std::shared_ptr<NWebPreference> GetPreference() const override; 36878 void PutDownloadCallback( 36879 std::shared_ptr<NWebDownloadCallback> downloadListener) override; 36880+ void PutReleaseSurfaceCallback( 36881+ std::shared_ptr<NWebReleaseSurfaceCallback> releaseSurfaceListener) override; 36882 void SetNWebHandler(std::shared_ptr<NWebHandler> handler) override; 36883 const std::shared_ptr<NWebHandler> GetNWebHandler() const override; 36884 std::string Title() override; 36885 void CreateWebMessagePorts(std::vector<std::string>& ports) override; 36886 void PostWebMessage(std::string& message, std::vector<std::string>& ports, std::string& targetUri) override; 36887 void ClosePort(std::string& port_handle) override; 36888- void PostPortMessage(std::string& port_handle, std::string& data) override; 36889+ void PostPortMessage(std::string& port_handle, std::shared_ptr<NWebMessage> data) override; 36890 void SetPortMessageCallback(std::string& port_handle, 36891- std::shared_ptr<NWebValueCallback<std::string>> callback) override; 36892+ std::shared_ptr<NWebValueCallback<std::shared_ptr<NWebMessage>>> callback) override; 36893 uint32_t GetWebId() const override; 36894 HitTestResult GetHitTestResult() const override; 36895 int PageLoadProgress() override; 36896@@ -129,7 +131,13 @@ class NWebImpl : public NWeb { 36897 void HasImages(std::shared_ptr<NWebValueCallback<bool>> callback) override; 36898 void RemoveCache(bool include_disk_files) override; 36899 std::shared_ptr<NWebHistoryList> GetHistoryList() override; 36900- 36901+ WebState SerializeWebState() override; 36902+ bool RestoreWebState(WebState state) override; 36903+ void PageUp(bool top) override; 36904+ void PageDown(bool bottom) override; 36905+ void ScrollTo(float x, float y) override; 36906+ void ScrollBy(float delta_x, float delta_y) override; 36907+ void SlideScroll(float vx, float vy) override; 36908 36909 // For NWebEx 36910 static NWebImpl* FromID(int32_t nweb_id); 36911@@ -141,14 +149,18 @@ class NWebImpl : public NWeb { 36912 void PutWebAppClientExtensionCallback( 36913 std::shared_ptr<NWebAppClientExtensionCallback> 36914 web_app_client_extension_listener); 36915+ void RemoveWebAppClientExtensionCallback(); 36916 36917 CefRefPtr<CefClient> GetCefClient() const { 36918 return nweb_delegate_->GetCefClient(); 36919 } 36920+ void AddNWebToMap(uint32_t id, std::shared_ptr<NWebImpl>& nweb); 36921 private: 36922 void ProcessInitArgs(const NWebInitArgs& init_args); 36923 void InitWebEngineArgs(const NWebInitArgs& init_args); 36924 bool InitWebEngine(const NWebCreateInfo& create_info); 36925+ bool SetVirtualDeviceRatio(); 36926+ uint32_t NormalizeVirtualDeviceRatio(uint32_t length); 36927 36928 private: 36929 uint32_t nweb_id_ = 0; 36930@@ -159,6 +171,7 @@ class NWebImpl : public NWeb { 36931 36932 std::shared_ptr<NWebDelegateInterface> nweb_delegate_ = nullptr; 36933 std::list<std::string> web_engine_args_; 36934+ float device_pixel_ratio_ = 0.f; 36935 }; 36936 } // namespace OHOS::NWeb 36937 36938diff --git a/src/ohos_nweb/src/nweb_inputmethod_handler.cc b/src/ohos_nweb/src/nweb_inputmethod_handler.cc 36939index a6edba00d76cd..e781746ea40c9 36940--- a/src/ohos_nweb/src/nweb_inputmethod_handler.cc 36941+++ b/src/ohos_nweb/src/nweb_inputmethod_handler.cc 36942@@ -79,6 +79,10 @@ class OnTextChangedListenerImpl : public OnTextChangedListener { 36943 handler_->MoveCursor(direction); 36944 } 36945 36946+ void HandleSetSelection(int32_t start, int32_t end) override {}; 36947+ void HandleExtendAction(int32_t action) override {}; 36948+ void HandleSelect(int32_t keyCode, int32_t cursorMoveSkip) override {}; 36949+ 36950 private: 36951 NWebInputMethodHandler* handler_; 36952 }; 36953@@ -113,8 +117,14 @@ void NWebInputMethodHandler::Attach(CefRefPtr<CefBrowser> browser, 36954 if (inputmethod_listener_ == nullptr) { 36955 inputmethod_listener_ = new OnTextChangedListenerImpl(this); 36956 } 36957- InputMethodController::GetInstance()->Attach(inputmethod_listener_, 36958- show_keyboard); 36959+ 36960+ if (show_keyboard && isAttached_) { 36961+ LOG(INFO) << "Attach ShowCurrentInput" ; 36962+ InputMethodController::GetInstance()->ShowCurrentInput(); 36963+ } else { 36964+ InputMethodController::GetInstance()->Attach(inputmethod_listener_, show_keyboard); 36965+ isAttached_ = true; 36966+ } 36967 } 36968 36969 void NWebInputMethodHandler::ShowTextInput() { 36970@@ -122,9 +132,13 @@ void NWebInputMethodHandler::ShowTextInput() { 36971 } 36972 36973 void NWebInputMethodHandler::HideTextInput() { 36974- LOG(INFO) << "NWebInputMethodHandler::HideTextInput " << ime_shown_; 36975+ if (!isAttached_) { 36976+ LOG(INFO) << "keyboard is not attach"; 36977+ return; 36978+ } 36979 InputMethodController::GetInstance()->HideTextInput(); 36980 InputMethodController::GetInstance()->Close(); 36981+ isAttached_ = false; 36982 } 36983 36984 void NWebInputMethodHandler::OnTextSelectionChanged( 36985@@ -141,10 +155,6 @@ void NWebInputMethodHandler::OnTextSelectionChanged( 36986 selected_to_ = selected_range.to; 36987 ime_text_composing_ = false; 36988 composing_text_.clear(); 36989- 36990- std::lock_guard<std::mutex> lock(textSelectMutex_); 36991- isTextSelectReady_ = true; 36992- textSelectCv_.notify_all(); 36993 } 36994 36995 void NWebInputMethodHandler::SetIMEStatus(bool status) { 36996@@ -162,14 +172,6 @@ void NWebInputMethodHandler::InsertText(const std::u16string& text) { 36997 } 36998 36999 if (browser_ != nullptr && browser_->GetHost() != nullptr) { 37000- std::unique_lock<std::mutex> lock(textSelectMutex_); 37001- bool isNormal = textSelectCv_.wait_for( 37002- lock, std::chrono::seconds(1), [this] { return isTextSelectReady_; }); 37003- if (!isNormal) { 37004- LOG(ERROR) << "InsertText wait_for timeout"; 37005- } 37006- isTextSelectReady_ = false; 37007- 37008 CefRefPtr<CefTask> insert_task = new InputMethodTask(base::BindOnce( 37009 &NWebInputMethodHandler::InsertTextHandlerOnUI, this, std::move(text))); 37010 browser_->GetHost()->PostTaskToUIThread(insert_task); 37011@@ -186,16 +188,6 @@ void NWebInputMethodHandler::DeleteBackward(int32_t length) { 37012 37013 void NWebInputMethodHandler::DeleteForward(int32_t length) { 37014 if (browser_ != nullptr && browser_->GetHost() != nullptr) { 37015- if (selected_to_ != 0) { 37016- std::unique_lock<std::mutex> lock(textSelectMutex_); 37017- bool isNormal = textSelectCv_.wait_for( 37018- lock, std::chrono::seconds(1), [this] { return isTextSelectReady_; }); 37019- if (!isNormal) { 37020- LOG(ERROR) << "DeleteForward wait_for timeout"; 37021- } 37022- isTextSelectReady_ = false; 37023- } 37024- 37025 CefRefPtr<CefTask> delete_task = new InputMethodTask(base::BindOnce( 37026 &NWebInputMethodHandler::DeleteForwardHandlerOnUI, this, length)); 37027 browser_->GetHost()->PostTaskToUIThread(delete_task); 37028@@ -217,26 +209,29 @@ void NWebInputMethodHandler::InsertTextHandlerOnUI(const std::u16string& text) { 37029 return; 37030 } 37031 37032+ CefKeyEvent keyEvent; 37033+ keyEvent.windows_key_code = ui::VKEY_PROCESSKEY; 37034+ keyEvent.modifiers = 0; 37035+ keyEvent.is_system_key = false; 37036+ keyEvent.type = KEYEVENT_RAWKEYDOWN; 37037+ browser_->GetHost()->SendKeyEvent(keyEvent); 37038+ 37039 if (!ime_text_composing_) { 37040 ime_text_composing_ = true; 37041 composing_text_.clear(); 37042 } 37043 composing_text_.append(text); 37044+ browser_->GetHost()->ImeCommitText(composing_text_, 37045+ CefRange(UINT32_MAX, UINT32_MAX), 0); 37046 37047- std::vector<CefCompositionUnderline> underlines; 37048- CefRange new_range(0, static_cast<int>(composing_text_.length())); 37049- cef_composition_underline_t line = {new_range, 0xFF000000, 0, false}; 37050- underlines.push_back(line); 37051- CefRange replacement_range(selected_from_, selected_to_); 37052- CefRange selection_range(0, static_cast<int>(composing_text_.length())); 37053- browser_->GetHost()->ImeSetComposition(CefString(composing_text_), underlines, 37054- replacement_range, selection_range); 37055 // no selection 37056- browser_->GetHost()->ImeFinishComposingText(false); 37057 ime_text_composing_ = false; 37058 selected_from_ += static_cast<int>(composing_text_.length()); 37059 selected_to_ += static_cast<int>(composing_text_.length()); 37060 composing_text_.clear(); 37061+ 37062+ keyEvent.type = KEYEVENT_KEYUP; 37063+ browser_->GetHost()->SendKeyEvent(keyEvent); 37064 } 37065 37066 void NWebInputMethodHandler::DeleteBackwardHandlerOnUI(int32_t length) { 37067diff --git a/src/ohos_nweb/src/nweb_inputmethod_handler.h b/src/ohos_nweb/src/nweb_inputmethod_handler.h 37068index 4f9af714e2911..de7a41abafc08 37069--- a/src/ohos_nweb/src/nweb_inputmethod_handler.h 37070+++ b/src/ohos_nweb/src/nweb_inputmethod_handler.h 37071@@ -58,10 +58,7 @@ class NWebInputMethodHandler : public NWebInputMethodClient { 37072 int selected_to_; 37073 OHOS::sptr<OHOS::MiscServices::OnTextChangedListener> inputmethod_listener_ = 37074 nullptr; 37075- 37076- bool isTextSelectReady_ = true; 37077- std::mutex textSelectMutex_; 37078- std::condition_variable textSelectCv_; 37079+ bool isAttached_ = false; 37080 37081 IMPLEMENT_REFCOUNTING(NWebInputMethodHandler); 37082 }; 37083diff --git a/src/pdf/features.gni b/src/pdf/features.gni 37084index 67ce26d618975..c321ba7cdcca5 37085--- a/src/pdf/features.gni 37086+++ b/src/pdf/features.gni 37087@@ -21,5 +21,6 @@ declare_args() { 37088 # currently depends on PPAPI. It does not make sense to port PPAPI, which is 37089 # being deprecated, to Fuchsia. Once the PDF Viewer no longer uses PPAPI, the 37090 # PDF Viewer should be enabled on Fuchsia, like on other desktop platforms. 37091- enable_pdf = !is_android && !is_ios && !is_chromecast && !is_fuchsia 37092+ enable_pdf = 37093+ !is_android && !is_ios && !is_chromecast && !is_fuchsia && !is_ohos 37094 } 37095diff --git a/src/pdf/ui/document_properties.cc b/src/pdf/ui/document_properties.cc 37096index d6c9e9078d284..e265dfcf79e83 37097--- a/src/pdf/ui/document_properties.cc 37098+++ b/src/pdf/ui/document_properties.cc 37099@@ -17,6 +17,10 @@ 37100 #include "ui/base/l10n/l10n_util.h" 37101 #include "ui/gfx/geometry/size.h" 37102 37103+#if BUILDFLAG(IS_OHOS) 37104+#include "ppapi/buildflags/buildflags.h" 37105+#endif 37106+ 37107 using printing::kMicronsPerInch; 37108 using printing::kPointsPerInch; 37109 37110@@ -24,6 +28,7 @@ namespace chrome_pdf { 37111 37112 namespace { 37113 37114+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 37115 // Scales `length_points` to be in inches instead of points. 37116 constexpr float ConvertPointsToInches(int length_points) { 37117 constexpr float kInchesPerPoint = 1.0f / kPointsPerInch; 37118@@ -72,10 +77,12 @@ bool ShowInches() { 37119 // On error, assume the units are SI. 37120 return U_SUCCESS(error_code) && system == UMS_US; 37121 } 37122+#endif 37123 37124 } // namespace 37125 37126 std::u16string FormatPageSize(const absl::optional<gfx::Size>& size_points) { 37127+#if BUILDFLAG(IS_OHOS) && BUILDFLAG(ENABLE_PLUGINS) 37128 if (!size_points.has_value()) 37129 return l10n_util::GetStringUTF16(IDS_PDF_PROPERTIES_PAGE_SIZE_VARIABLE); 37130 37131@@ -93,6 +100,9 @@ std::u16string FormatPageSize(const absl::optional<gfx::Size>& size_points) { 37132 FormatLengthInMillimeters(size_points.value().width()), 37133 FormatLengthInMillimeters(size_points.value().height()), 37134 GetOrientation(size_points.value())); 37135+#else 37136+ return u""; 37137+#endif 37138 } 37139 37140 std::string FormatPdfVersion(PdfVersion version) { 37141diff --git a/src/ppapi/buildflags/buildflags.gni b/src/ppapi/buildflags/buildflags.gni 37142index 560d1ecaecbdf..72d1a5917be45 37143--- a/src/ppapi/buildflags/buildflags.gni 37144+++ b/src/ppapi/buildflags/buildflags.gni 37145@@ -7,5 +7,6 @@ import("//build/config/chromecast_build.gni") 37146 import("//build/config/features.gni") 37147 37148 declare_args() { 37149- enable_plugins = !is_android && !is_ios && !is_chromecast && !is_fuchsia 37150+ enable_plugins = 37151+ !is_android && !is_ios && !is_chromecast && !is_fuchsia && !is_ohos 37152 } 37153diff --git a/src/printing/buildflags/buildflags.gni b/src/printing/buildflags/buildflags.gni 37154index 422abea3f1ea1..68f202491b801 37155--- a/src/printing/buildflags/buildflags.gni 37156+++ b/src/printing/buildflags/buildflags.gni 37157@@ -15,7 +15,7 @@ declare_args() { 37158 37159 declare_args() { 37160 # Enable printing with print preview. 37161- enable_print_preview = enable_basic_printing && !is_android 37162+ enable_print_preview = enable_basic_printing && !is_android && !is_ohos 37163 37164 if (use_fuzzing_engine && (is_linux || is_chromeos)) { 37165 # For fuzzing, just restrict to chromeos and linux. 37166@@ -29,7 +29,7 @@ declare_args() { 37167 # `enable_print_preview`, do not base this definition upon that. This 37168 # feature could still be appropriate for some build configurations which 37169 # explicitly disable print preview. 37170- enable_oop_printing = enable_basic_printing && !is_android 37171+ enable_oop_printing = enable_basic_printing && !is_android && !is_ohos 37172 } 37173 37174 declare_args() { 37175diff --git a/src/services/audio/local_muter.h b/src/services/audio/local_muter.h 37176index b70c04b4d3496..577802e7416bb 37177--- a/src/services/audio/local_muter.h 37178+++ b/src/services/audio/local_muter.h 37179@@ -7,6 +7,7 @@ 37180 37181 #include "base/callback.h" 37182 #include "base/memory/raw_ptr.h" 37183+#include "base/memory/weak_ptr.h" 37184 #include "base/sequence_checker.h" 37185 #include "base/unguessable_token.h" 37186 #include "media/mojo/mojom/audio_stream_factory.mojom.h" 37187@@ -44,6 +45,8 @@ class LocalMuter final : public media::mojom::LocalMuter, 37188 void OnMemberJoinedGroup(LoopbackGroupMember* member) final; 37189 void OnMemberLeftGroup(LoopbackGroupMember* member) final; 37190 37191+ base::WeakPtr<LocalMuter> GetWeakPtr() { return weak_factory_.GetWeakPtr(); } 37192+ 37193 private: 37194 // Runs the |all_bindings_lost_callback_| when |bindings_| becomes empty. 37195 void OnBindingLost(); 37196@@ -55,6 +58,8 @@ class LocalMuter final : public media::mojom::LocalMuter, 37197 base::OnceClosure all_bindings_lost_callback_; 37198 37199 SEQUENCE_CHECKER(sequence_checker_); 37200+ 37201+ base::WeakPtrFactory<LocalMuter> weak_factory_{this}; 37202 }; 37203 37204 } // namespace audio 37205diff --git a/src/services/audio/stream_factory.cc b/src/services/audio/stream_factory.cc 37206index c84a403722a39..2a831c4e06c0e 37207--- a/src/services/audio/stream_factory.cc 37208+++ b/src/services/audio/stream_factory.cc 37209@@ -174,8 +174,9 @@ void StreamFactory::BindMuter( 37210 if (it == muters_.end()) { 37211 auto muter_ptr = std::make_unique<LocalMuter>(&coordinator_, group_id); 37212 muter = muter_ptr.get(); 37213- muter->SetAllBindingsLostCallback(base::BindOnce( 37214- &StreamFactory::DestroyMuter, base::Unretained(this), muter)); 37215+ muter->SetAllBindingsLostCallback( 37216+ base::BindRepeating(&StreamFactory::DestroyMuter, 37217+ base::Unretained(this), muter_ptr->GetWeakPtr())); 37218 muters_.emplace_back(std::move(muter_ptr)); 37219 } else { 37220 muter = it->get(); 37221@@ -247,9 +248,10 @@ void StreamFactory::DestroyOutputStream(OutputStream* stream) { 37222 DCHECK_EQ(1u, erased); 37223 } 37224 37225-void StreamFactory::DestroyMuter(LocalMuter* muter) { 37226+void StreamFactory::DestroyMuter(base::WeakPtr<LocalMuter> muter) { 37227 DCHECK_CALLED_ON_VALID_SEQUENCE(owning_sequence_); 37228- DCHECK(muter); 37229+ if (!muter) 37230+ return; 37231 37232 // Output streams have a task posting before destruction (see the OnError 37233 // function in output_stream.cc). To ensure that stream destruction and 37234@@ -258,13 +260,10 @@ void StreamFactory::DestroyMuter(LocalMuter* muter) { 37235 // Otherwise, a "destroy all streams, then destroy the muter" sequence may 37236 // result in a brief blip of audio. 37237 auto do_destroy = [](base::WeakPtr<StreamFactory> weak_this, 37238- LocalMuter* muter) { 37239- if (weak_this) { 37240- 37241- const auto it = 37242- std::find_if(weak_this->muters_.begin(), weak_this->muters_.end(), 37243- base::MatchesUniquePtr(muter)); 37244- DCHECK(it != weak_this->muters_.end()); 37245+ base::WeakPtr<LocalMuter> muter) { 37246+ if (weak_this && muter) { 37247+ const auto it = base::ranges::find_if( 37248+ weak_this->muters_, base::MatchesUniquePtr(muter.get())); 37249 weak_this->muters_.erase(it); 37250 } 37251 }; 37252diff --git a/src/services/audio/stream_factory.h b/src/services/audio/stream_factory.h 37253index 234af1020d487..106d68dae9bf6 37254--- a/src/services/audio/stream_factory.h 37255+++ b/src/services/audio/stream_factory.h 37256@@ -104,7 +104,7 @@ class StreamFactory final : public media::mojom::AudioStreamFactory { 37257 37258 void DestroyInputStream(InputStream* stream); 37259 void DestroyOutputStream(OutputStream* stream); 37260- void DestroyMuter(LocalMuter* muter); 37261+ void DestroyMuter(base::WeakPtr<LocalMuter> muter); 37262 void DestroyLoopbackStream(LoopbackStream* stream); 37263 37264 SEQUENCE_CHECKER(owning_sequence_); 37265diff --git a/src/services/device/geolocation/location_arbitrator.cc b/src/services/device/geolocation/location_arbitrator.cc 37266index 98bcc64fe3372..cedf1d2b2fd8e 37267--- a/src/services/device/geolocation/location_arbitrator.cc 37268+++ b/src/services/device/geolocation/location_arbitrator.cc 37269@@ -161,8 +161,7 @@ LocationArbitrator::NewNetworkLocationProvider( 37270 37271 std::unique_ptr<LocationProvider> 37272 LocationArbitrator::NewSystemLocationProvider() { 37273-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) || \ 37274- BUILDFLAG(IS_OHOS) 37275+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) 37276 return nullptr; 37277 #else 37278 return device::NewSystemLocationProvider(main_task_runner_, 37279diff --git a/src/services/device/geolocation/ohos/location_provider_ohos.cc b/src/services/device/geolocation/ohos/location_provider_ohos.cc 37280index a4b69fed8f32d..a2b16ceddb3ce 37281--- a/src/services/device/geolocation/ohos/location_provider_ohos.cc 37282+++ b/src/services/device/geolocation/ohos/location_provider_ohos.cc 37283@@ -14,7 +14,7 @@ 37284 #include "base/memory/singleton.h" 37285 37286 namespace device { 37287- 37288+class GeolocationManager; 37289 // LocationProviderOhos 37290 LocationProviderOhos::LocationProviderOhos() { 37291 locator_callback_ = new LocationProviderCallback(); 37292@@ -102,10 +102,15 @@ void LocationProviderOhos::RequestLocationUpdate(bool high_accuracy) { 37293 return; 37294 } 37295 37296- locator_->EnableAbility(true); 37297 std::unique_ptr<OHOS::Location::RequestConfig> requestConfig = 37298 std::make_unique<OHOS::Location::RequestConfig>(); 37299 SetRequestConfig(requestConfig, high_accuracy); 37300+ if (locator_->GetSwitchState() != 1) { 37301+ LOG(ERROR) << "geolocation setting is not turned on"; 37302+ locator_callback_->OnErrorReport( 37303+ LocationProviderCallback::LOCATION_GET_FAILED); 37304+ return; 37305+ } 37306 OHOS::sptr<OHOS::Location::ILocatorCallback> locator_call_back = 37307 locator_callback_; 37308 int ret = locator_->StartLocating(requestConfig, locator_call_back, "location.ILocator", 37309@@ -190,7 +195,9 @@ void LocationProviderCallback::OnErrorReport(const int errorCode) { 37310 } 37311 37312 // static 37313-std::unique_ptr<LocationProvider> NewSystemLocationProvider() { 37314+std::unique_ptr<LocationProvider> NewSystemLocationProvider( 37315+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 37316+ GeolocationManager* geolocation_manager) { 37317 return base::WrapUnique(new LocationProviderOhos); 37318 } 37319 37320diff --git a/src/services/network/cors/cors_util.cc b/src/services/network/cors/cors_util.cc 37321index 14fb9d818978c..761c6a0de1a31 37322--- a/src/services/network/cors/cors_util.cc 37323+++ b/src/services/network/cors/cors_util.cc 37324@@ -21,7 +21,7 @@ std::vector<std::string> CorsUnsafeNotForbiddenRequestHeaderNames( 37325 size_t safe_list_value_size = 0; 37326 37327 for (const auto& header : headers) { 37328- if (!net::HttpUtil::IsSafeHeader(header.key)) 37329+ if (!net::HttpUtil::IsSafeHeader(header.key, header.value)) 37330 continue; 37331 37332 const std::string name = base::ToLowerASCII(header.key); 37333diff --git a/src/services/network/public/mojom/network_context.mojom b/src/services/network/public/mojom/network_context.mojom 37334index 958c2c27211f7..7b41da79f02a3 37335--- a/src/services/network/public/mojom/network_context.mojom 37336+++ b/src/services/network/public/mojom/network_context.mojom 37337@@ -526,11 +526,11 @@ struct NetworkConditions { 37338 // response received. 37339 mojo_base.mojom.TimeDelta latency; 37340 37341- // Maximal aggregated download throughput (bytes/sec). 0 disables download 37342+ // Maximal aggregated download throughput (bytes/sec). <=0 disables download 37343 // throttling. 37344 double download_throughput; 37345 37346- // Maximal aggregated upload throughput (bytes/sec). 0 disables upload 37347+ // Maximal aggregated upload throughput (bytes/sec). <=0 disables upload 37348 // throttling. 37349 double upload_throughput; 37350 }; 37351diff --git a/src/services/network/throttling/network_conditions.cc b/src/services/network/throttling/network_conditions.cc 37352index 71cd4ac0e52cc..18b2b6e0efdc2 37353--- a/src/services/network/throttling/network_conditions.cc 37354+++ b/src/services/network/throttling/network_conditions.cc 37355@@ -4,6 +4,8 @@ 37356 37357 #include "services/network/throttling/network_conditions.h" 37358 37359+#include <algorithm> 37360+ 37361 namespace network { 37362 37363 NetworkConditions::NetworkConditions() : NetworkConditions(false) {} 37364@@ -16,9 +18,9 @@ NetworkConditions::NetworkConditions(bool offline, 37365 double download_throughput, 37366 double upload_throughput) 37367 : offline_(offline), 37368- latency_(latency), 37369- download_throughput_(download_throughput), 37370- upload_throughput_(upload_throughput) {} 37371+ latency_(std::max(latency, 0.0)), 37372+ download_throughput_(std::max(download_throughput, 0.0)), 37373+ upload_throughput_(std::max(upload_throughput, 0.0)) {} 37374 37375 NetworkConditions::~NetworkConditions() {} 37376 37377diff --git a/src/services/network/throttling/network_conditions.h b/src/services/network/throttling/network_conditions.h 37378index f8c8214b34baf..c5232231d308b 37379--- a/src/services/network/throttling/network_conditions.h 37380+++ b/src/services/network/throttling/network_conditions.h 37381@@ -28,6 +28,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkConditions { 37382 bool IsThrottling() const; 37383 37384 bool offline() const { return offline_; } 37385+ 37386+ // These are 0 if the corresponding throttle is disabled, >0 otherwise. 37387 double latency() const { return latency_; } 37388 double download_throughput() const { return download_throughput_; } 37389 double upload_throughput() const { return upload_throughput_; } 37390diff --git a/src/services/network/throttling/throttling_controller_unittest.cc b/src/services/network/throttling/throttling_controller_unittest.cc 37391index 6be9f572ed131..5c3b87df6ea5d 37392--- a/src/services/network/throttling/throttling_controller_unittest.cc 37393+++ b/src/services/network/throttling/throttling_controller_unittest.cc 37394@@ -298,7 +298,7 @@ TEST(ThrottlingControllerTest, DownloadOnly) { 37395 ThrottlingControllerTestHelper helper; 37396 TestCallback* callback = helper.callback(); 37397 37398- helper.SetNetworkState(false, 10000000, 0); 37399+ helper.SetNetworkState(false, 10000000, -1); 37400 int rv = helper.Start(false); 37401 EXPECT_EQ(rv, net::ERR_IO_PENDING); 37402 helper.FastForwardUntilNoTasksRemain(); 37403@@ -317,7 +317,7 @@ TEST(ThrottlingControllerTest, UploadOnly) { 37404 ThrottlingControllerTestHelper helper; 37405 TestCallback* callback = helper.callback(); 37406 37407- helper.SetNetworkState(false, 0, 1000000); 37408+ helper.SetNetworkState(false, -2, 1000000); 37409 int rv = helper.Start(true); 37410 EXPECT_EQ(rv, net::OK); 37411 helper.FastForwardUntilNoTasksRemain(); 37412diff --git a/src/services/network/websocket.cc b/src/services/network/websocket.cc 37413index 3da24fc1be25a..9cd1fbdb1ee2d 37414--- a/src/services/network/websocket.cc 37415+++ b/src/services/network/websocket.cc 37416@@ -625,7 +625,7 @@ void WebSocket::AddChannel( 37417 for (const auto& header : additional_headers) { 37418 if (net::HttpUtil::IsValidHeaderName(header->name) && 37419 net::HttpUtil::IsValidHeaderValue(header->value) && 37420- (net::HttpUtil::IsSafeHeader(header->name) || 37421+ (net::HttpUtil::IsSafeHeader(header->name, header->value) || 37422 base::EqualsCaseInsensitiveASCII( 37423 header->name, net::HttpRequestHeaders::kUserAgent) || 37424 base::EqualsCaseInsensitiveASCII(header->name, 37425diff --git a/src/storage/browser/database/database_tracker.cc b/src/storage/browser/database/database_tracker.cc 37426index b56eb0727550f..c5ccadca3566f 37427--- a/src/storage/browser/database/database_tracker.cc 37428+++ b/src/storage/browser/database/database_tracker.cc 37429@@ -64,10 +64,9 @@ const base::FilePath::CharType kTemporaryDirectoryPattern[] = 37430 FILE_PATH_LITERAL("DeleteMe*"); 37431 37432 #if BUILDFLAG(IS_OHOS) 37433-const std::u16string baseDatabaseDir = 37434+static const std::u16string kBaseDatabaseDir = 37435 base::UTF8ToUTF16("/data/storage/el2/base/"); 37436-const std::u16string divisionStr = base::UTF8ToUTF16("/"); 37437-const std::u16string suffixStr = base::UTF8ToUTF16(".db"); 37438+static const std::u16string kSuffixStr = base::UTF8ToUTF16(".db"); 37439 #endif 37440 37441 OriginInfo::OriginInfo() : total_size_(0) {} 37442@@ -340,20 +339,35 @@ base::FilePath DatabaseTracker::GetOriginDirectory( 37443 incognito_origin_directories_[origin_identifier] = origin_directory; 37444 } 37445 } 37446- 37447+#if BUILDFLAG(IS_OHOS) 37448+ return base::FilePath::FromUTF16Unsafe(kBaseDatabaseDir + origin_directory); 37449+#else 37450 return db_dir_.Append(base::FilePath::FromUTF16Unsafe(origin_directory)); 37451+#endif 37452 } 37453 37454+#if BUILDFLAG(IS_OHOS) 37455 base::FilePath DatabaseTracker::GetFullDBFilePath( 37456 const std::string& origin_identifier, 37457- const std::u16string& database_name) { 37458-#if BUILDFLAG(IS_OHOS) 37459+ const std::u16string& database_name, 37460+ bool suffix) { 37461+ DCHECK(task_runner_->RunsTasksInCurrentSequence()); 37462 DCHECK(!origin_identifier.empty()); 37463- std::u16string origin_directory = base::UTF8ToUTF16(origin_identifier); 37464- std::u16string filename = baseDatabaseDir + origin_directory + divisionStr + 37465- database_name + suffixStr; 37466- return base::FilePath::FromUTF16Unsafe(filename); 37467+ if (!LazyInit()) 37468+ return base::FilePath(); 37469+ 37470+ int64_t id = 37471+ databases_table_->GetDatabaseID(origin_identifier, database_name); 37472+ if (id < 0) 37473+ return base::FilePath(); 37474+ 37475+ return GetOriginDirectory(origin_identifier) 37476+ .AppendASCII((suffix? base::UTF16ToASCII(database_name + kSuffixStr): base::UTF16ToASCII(database_name))); 37477+} 37478 #else 37479+base::FilePath DatabaseTracker::GetFullDBFilePath( 37480+ const std::string& origin_identifier, 37481+ const std::u16string& database_name) { 37482 DCHECK(task_runner_->RunsTasksInCurrentSequence()); 37483 DCHECK(!origin_identifier.empty()); 37484 if (!LazyInit()) 37485@@ -366,8 +380,8 @@ base::FilePath DatabaseTracker::GetFullDBFilePath( 37486 37487 return GetOriginDirectory(origin_identifier) 37488 .AppendASCII(base::NumberToString(id)); 37489-#endif 37490 } 37491+#endif 37492 37493 bool DatabaseTracker::GetOriginInfo(const std::string& origin_identifier, 37494 OriginInfo* info) { 37495@@ -655,7 +669,11 @@ DatabaseTracker::CachedOriginInfo* DatabaseTracker::MaybeGetCachedOriginInfo( 37496 origin_info.SetDatabaseSize(db.database_name, db_file_size); 37497 37498 base::FilePath path = 37499+ #if BUILDFLAG(IS_OHOS) 37500+ GetFullDBFilePath(origin_identifier, db.database_name, true); 37501+ #else 37502 GetFullDBFilePath(origin_identifier, db.database_name); 37503+ #endif 37504 base::File::Info file_info; 37505 // TODO(jsbell): Avoid duplicate base::GetFileInfo calls between this and 37506 // the GetDBFileSize() call above. 37507@@ -672,7 +690,11 @@ int64_t DatabaseTracker::GetDBFileSize(const std::string& origin_identifier, 37508 const std::u16string& database_name) { 37509 DCHECK(task_runner_->RunsTasksInCurrentSequence()); 37510 base::FilePath db_file_name = 37511+ #if BUILDFLAG(IS_OHOS) 37512+ GetFullDBFilePath(origin_identifier, database_name, true); 37513+ #else 37514 GetFullDBFilePath(origin_identifier, database_name); 37515+ #endif 37516 int64_t db_file_size = 0; 37517 if (!base::GetFileSize(db_file_name, &db_file_size)) 37518 db_file_size = 0; 37519@@ -797,7 +819,11 @@ void DatabaseTracker::DeleteDataModifiedSince( 37520 rv = net::ERR_FAILED; 37521 } 37522 for (const DatabaseDetails& db : details) { 37523+ #if BUILDFLAG(IS_OHOS) 37524+ base::FilePath db_file = GetFullDBFilePath(origin, db.database_name, true); 37525+ #else 37526 base::FilePath db_file = GetFullDBFilePath(origin, db.database_name); 37527+ #endif 37528 base::File::Info file_info; 37529 base::GetFileInfo(db_file, &file_info); 37530 if (file_info.last_modified < cutoff) 37531diff --git a/src/storage/browser/database/database_tracker.h b/src/storage/browser/database/database_tracker.h 37532index 63d2c3acc8663..b7c5aaeab1cec 37533--- a/src/storage/browser/database/database_tracker.h 37534+++ b/src/storage/browser/database/database_tracker.h 37535@@ -138,9 +138,14 @@ class COMPONENT_EXPORT(STORAGE_BROWSER) DatabaseTracker 37536 37537 // Thread-safe getter. 37538 const base::FilePath& database_directory() const { return db_dir_; } 37539- 37540+#if BUILDFLAG(IS_OHOS) 37541+ base::FilePath GetFullDBFilePath(const std::string& origin_identifier, 37542+ const std::u16string& database_name, 37543+ bool suffix = false); 37544+#else 37545 base::FilePath GetFullDBFilePath(const std::string& origin_identifier, 37546 const std::u16string& database_name); 37547+#endif 37548 37549 // virtual for unit-testing only 37550 virtual bool GetOriginInfo(const std::string& origin_id, OriginInfo* info); 37551diff --git a/src/storage/browser/database/database_util.cc b/src/storage/browser/database/database_util.cc 37552index 5742c252f93e5..3ddd3400a51b5 37553--- a/src/storage/browser/database/database_util.cc 37554+++ b/src/storage/browser/database/database_util.cc 37555@@ -39,6 +39,41 @@ bool DatabaseUtil::CrackVfsFileName(const std::u16string& vfs_file_name, 37556 // 'vfs_file_name' is of the form <origin_identifier>/<db_name>#<suffix>. 37557 // <suffix> is optional. 37558 DCHECK(!vfs_file_name.empty()); 37559+#if BUILDFLAG(IS_OHOS) 37560+ size_t first_slash_index = vfs_file_name.rfind('/'); 37561+ if (first_slash_index == std::u16string::npos) { 37562+ LOG(ERROR) << "DatabaseUtil::CrackVfsFileName not find /"; 37563+ return false; 37564+ } 37565+ std::u16string dbnameAndSuffix = vfs_file_name.substr( 37566+ first_slash_index + 1, vfs_file_name.length() - first_slash_index - 1); 37567+ size_t last_pound_index = dbnameAndSuffix.rfind('.'); 37568+ if (last_pound_index == std::u16string::npos) { 37569+ LOG(ERROR) << "DatabaseUtil::CrackVfsFileName not find ."; 37570+ return false; 37571+ } 37572+ std::u16string suffix = dbnameAndSuffix.substr(last_pound_index, dbnameAndSuffix.length() - last_pound_index); 37573+ if (!IsSafeSuffix(suffix)) { 37574+ LOG(ERROR) << "DatabaseUtil::CrackVfsFileName IsSafeSuffix failed"; 37575+ return false; 37576+ } 37577+ std::u16string path = vfs_file_name.substr(0, first_slash_index); 37578+ first_slash_index = path.rfind('/'); 37579+ if (first_slash_index == std::u16string::npos) { 37580+ LOG(ERROR) << "DatabaseUtil::CrackVfsFileName not find /"; 37581+ return false; 37582+ } 37583+ std::u16string name = dbnameAndSuffix.substr(0, last_pound_index); 37584+ std::string origin_id = base::UTF16ToASCII(path.substr(first_slash_index + 1, path.length() - first_slash_index - 1)); 37585+ if (!IsValidOriginIdentifier(origin_id)) { 37586+ LOG(ERROR) << "DatabaseUtil::CrackVfsFileName IsValidOriginIdentifier failed"; 37587+ return false; 37588+ } 37589+ if (sqlite_suffix) *sqlite_suffix = suffix; 37590+ if (database_name) *database_name = name; 37591+ if (origin_identifier) *origin_identifier = origin_id; 37592+ return true; 37593+#else 37594 size_t first_slash_index = vfs_file_name.find('/'); 37595 size_t last_pound_index = vfs_file_name.rfind('#'); 37596 // '/' and '#' must be present in the string. Also, the string cannot start 37597@@ -71,6 +106,7 @@ bool DatabaseUtil::CrackVfsFileName(const std::u16string& vfs_file_name, 37598 *sqlite_suffix = suffix; 37599 37600 return true; 37601+#endif 37602 } 37603 37604 base::FilePath DatabaseUtil::GetFullFilePathForVfsFile( 37605diff --git a/src/storage/browser/quota/quota_manager_impl.cc b/src/storage/browser/quota/quota_manager_impl.cc 37606index 49aeefc797ad8..ea56592db0e58 37607--- a/src/storage/browser/quota/quota_manager_impl.cc 37608+++ b/src/storage/browser/quota/quota_manager_impl.cc 37609@@ -1295,7 +1295,6 @@ void QuotaManagerImpl::GetStorageKeysForType(blink::mojom::StorageType type, 37610 GetStorageKeysCallback callback) { 37611 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 37612 EnsureDatabaseOpened(); 37613- 37614 if (db_disabled_) { 37615 std::move(callback).Run(std::set<StorageKey>()); 37616 return; 37617diff --git a/src/third_party/blink/common/BUILD.gn b/src/third_party/blink/common/BUILD.gn 37618index bdba2399c662f..7a17b8a0211e9 37619--- a/src/third_party/blink/common/BUILD.gn 37620+++ b/src/third_party/blink/common/BUILD.gn 37621@@ -262,7 +262,7 @@ source_set("common") { 37622 deps += [ "//media" ] 37623 } 37624 37625- if (is_android || is_win) { 37626+ if (is_android || is_win || is_ohos) { 37627 sources += [ 37628 "font_unique_name_lookup/font_table_matcher.cc", 37629 "font_unique_name_lookup/font_table_persistence.cc", 37630diff --git a/src/third_party/blink/common/context_menu_data/context_menu_params_builder.cc b/src/third_party/blink/common/context_menu_data/context_menu_params_builder.cc 37631index 2e3afe39e2299..e464ba68c3269 37632--- a/src/third_party/blink/common/context_menu_data/context_menu_params_builder.cc 37633+++ b/src/third_party/blink/common/context_menu_data/context_menu_params_builder.cc 37634@@ -64,6 +64,16 @@ UntrustworthyContextMenuParams ContextMenuParamsBuilder::Build( 37635 params.suggested_filename = base::UTF8ToUTF16(data.suggested_filename); 37636 params.input_field_type = data.input_field_type; 37637 params.opened_from_highlight = data.opened_from_highlight; 37638+#if BUILDFLAG(IS_OHOS) 37639+ params.source_type = static_cast<ui::MenuSourceType>(data.source_type); 37640+ 37641+ LOG(DEBUG) << "ContextMenuParamsBuilder::Build [params] " 37642+ << "is_editable = " << params.is_editable 37643+ << ", edit_flags = " << params.edit_flags 37644+ << ", input_field_type = " << params.input_field_type 37645+ << ", source_type = " << params.source_type 37646+ << ", media_type = " << params.media_type; 37647+#endif 37648 37649 for (const auto& suggestion : data.dictionary_suggestions) 37650 params.dictionary_suggestions.push_back(suggestion); 37651diff --git a/src/third_party/blink/common/features.cc b/src/third_party/blink/common/features.cc 37652index d5b0e1e2b3455..446554b1497d7 37653--- a/src/third_party/blink/common/features.cc 37654+++ b/src/third_party/blink/common/features.cc 37655@@ -242,6 +242,11 @@ bool IsFencedFramesMPArchBased() { 37656 blink::features::FencedFramesImplementationType::kMPArch; 37657 } 37658 37659+bool IsFencedFramesShadowDOMBased() { 37660+ return blink::features::kFencedFramesImplementationTypeParam.Get() == 37661+ blink::features::FencedFramesImplementationType::kShadowDOM; 37662+} 37663+ 37664 const base::Feature kInitialNavigationEntry{"InitialNavigationEntry", 37665 base::FEATURE_DISABLED_BY_DEFAULT}; 37666 37667@@ -460,7 +465,13 @@ const base::Feature kWebFontsCacheAwareTimeoutAdaption { 37668 // Enabled to block programmatic focus in subframes when not triggered by user 37669 // activation (see htpps://crbug.com/954349). 37670 const base::Feature kBlockingFocusWithoutUserActivation{ 37671- "BlockingFocusWithoutUserActivation", base::FEATURE_DISABLED_BY_DEFAULT}; 37672+ "BlockingFocusWithoutUserActivation", 37673+#if defined(OS_OHOS) 37674+ base::FEATURE_ENABLED_BY_DEFAULT 37675+#else 37676+ base::FEATURE_DISABLED_BY_DEFAULT 37677+#endif 37678+}; 37679 37680 // A server-side switch for the REALTIME_AUDIO thread priority of 37681 // RealtimeAudioWorkletThread object. This can be controlled by a field trial, 37682diff --git a/src/third_party/blink/common/messaging/string_message_codec.cc b/src/third_party/blink/common/messaging/string_message_codec.cc 37683index 85ff7e230499e..fbb5a2e555d3d 37684--- a/src/third_party/blink/common/messaging/string_message_codec.cc 37685+++ b/src/third_party/blink/common/messaging/string_message_codec.cc 37686@@ -8,17 +8,34 @@ 37687 37688 #include "base/containers/buffer_iterator.h" 37689 #include "base/logging.h" 37690+#if BUILDFLAG(IS_OHOS) 37691+#include "base/notreached.h" 37692+#include "mojo/public/cpp/base/big_buffer.h" 37693+#include "third_party/blink/public/mojom/array_buffer/array_buffer_contents.mojom.h" 37694+#endif 37695 37696 namespace blink { 37697 namespace { 37698 37699+// Template helpers for visiting std::variant. 37700+template <class... Ts> 37701+struct overloaded : Ts... { 37702+ using Ts::operator()...; 37703+}; 37704+template <class... Ts> 37705+overloaded(Ts...) -> overloaded<Ts...>; 37706+ 37707 const uint32_t kVarIntShift = 7; 37708 const uint32_t kVarIntMask = (1 << kVarIntShift) - 1; 37709 37710 const uint8_t kVersionTag = 0xFF; 37711 const uint8_t kPaddingTag = '\0'; 37712+ 37713+// serialization_tag, see v8/src/objects/value-serializer.cc 37714 const uint8_t kOneByteStringTag = '"'; 37715 const uint8_t kTwoByteStringTag = 'c'; 37716+const uint8_t kArrayBuffer = 'B'; 37717+const uint8_t kArrayBufferTransferTag = 't'; 37718 37719 const uint32_t kVersion = 10; 37720 37721@@ -144,5 +161,129 @@ bool DecodeStringMessage(base::span<const uint8_t> encoded_data, 37722 DLOG(WARNING) << "Unexpected tag: " << tag; 37723 return false; 37724 } 37725+TransferableMessage EncodeWebMessagePayload(const WebMessagePayload& payload) { 37726+ TransferableMessage message; 37727+ std::vector<uint8_t> buffer; 37728+ WriteUint8(kVersionTag, &buffer); 37729+ WriteUint32(kVersion, &buffer); 37730+ 37731+ absl::visit( 37732+ overloaded{ 37733+ [&](const std::u16string& str) { 37734+ if (ContainsOnlyLatin1(str)) { 37735+ std::string data_latin1(str.cbegin(), str.cend()); 37736+ WriteUint8(kOneByteStringTag, &buffer); 37737+ WriteUint32(data_latin1.size(), &buffer); 37738+ WriteBytes(data_latin1.c_str(), data_latin1.size(), &buffer); 37739+ } else { 37740+ size_t num_bytes = str.size() * sizeof(char16_t); 37741+ if ((buffer.size() + 1 + BytesNeededForUint32(num_bytes)) & 1) 37742+ WriteUint8(kPaddingTag, &buffer); 37743+ WriteUint8(kTwoByteStringTag, &buffer); 37744+ WriteUint32(num_bytes, &buffer); 37745+ WriteBytes(reinterpret_cast<const char*>(str.data()), num_bytes, 37746+ &buffer); 37747+ } 37748+ }, 37749+ [&](const std::vector<uint8_t>& array_buffer) { 37750+ WriteUint8(kArrayBufferTransferTag, &buffer); 37751+ // Write at the first slot. 37752+ WriteUint32(0, &buffer); 37753+ 37754+ mojo_base::BigBuffer big_buffer(array_buffer); 37755+ message.array_buffer_contents_array.push_back( 37756+ mojom::SerializedArrayBufferContents::New( 37757+ std::move(big_buffer))); 37758+ }}, 37759+ payload); 37760+ 37761+ message.owned_encoded_message = std::move(buffer); 37762+ message.encoded_message = message.owned_encoded_message; 37763+ 37764+ return message; 37765+} 37766+ 37767+absl::optional<WebMessagePayload> DecodeToWebMessagePayload( 37768+ const TransferableMessage& message) { 37769+ base::BufferIterator<const uint8_t> iter(message.encoded_message); 37770+ uint8_t tag = 0; 37771+ 37772+ // Discard the outer envelope, including trailer info if applicable. 37773+ if (!ReadUint8(iter, &tag)) 37774+ return absl::nullopt; 37775+ if (tag == kVersionTag) { 37776+ uint32_t version = 0; 37777+ if (!ReadUint32(iter, &version)) 37778+ return absl::nullopt; 37779+ static constexpr uint32_t kMinWireFormatVersionWithTrailer = 21; 37780+ if (version >= kMinWireFormatVersionWithTrailer) { 37781+ // In these versions, we expect kTrailerOffsetTag (0xFE) followed by an 37782+ // offset and size. 37783+ // See details in v8/serialization/serialization_tag.h 37784+ auto span = iter.Span<uint8_t>(1 + sizeof(uint64_t) + sizeof(uint32_t)); 37785+ if (span.empty() || span[0] != 0xFE) { 37786+ LOG(ERROR) << "Span is empty or span[0] not correct"; 37787+ return absl::nullopt; 37788+ } 37789+ } 37790+ if (!ReadUint8(iter, &tag)) { 37791+ return absl::nullopt; 37792+ } 37793+ } 37794+ 37795+ // Discard any leading version and padding tags. 37796+ while (tag == kVersionTag || tag == kPaddingTag) { 37797+ uint32_t version; 37798+ if (tag == kVersionTag && !ReadUint32(iter, &version)) { 37799+ LOG(ERROR) << "Read tag or version failed, tag:" << (int)tag; 37800+ return absl::nullopt; 37801+ } 37802+ if (!ReadUint8(iter, &tag)) { 37803+ LOG(ERROR) << "ReadUint8 failed"; 37804+ return absl::nullopt; 37805+ } 37806+ } 37807 37808+ switch (tag) { 37809+ case kOneByteStringTag: { 37810+ // Use of unsigned char rather than char here matters, so that Latin-1 37811+ // characters are zero-extended rather than sign-extended 37812+ uint32_t num_bytes; 37813+ if (!ReadUint32(iter, &num_bytes)) { 37814+ LOG(ERROR) << "ReadUint32 failed"; 37815+ return absl::nullopt; 37816+ } 37817+ auto span = iter.Span<unsigned char>(num_bytes / sizeof(unsigned char)); 37818+ std::u16string str(span.begin(), span.end()); 37819+ return span.size_bytes() == num_bytes 37820+ ? absl::make_optional(WebMessagePayload(std::move(str))) 37821+ : absl::nullopt; 37822+ } 37823+ case kTwoByteStringTag: { 37824+ uint32_t num_bytes; 37825+ if (!ReadUint32(iter, &num_bytes)) { 37826+ LOG(ERROR) << "ReadUint32 failed"; 37827+ return absl::nullopt; 37828+ } 37829+ auto span = iter.Span<char16_t>(num_bytes / sizeof(char16_t)); 37830+ std::u16string str(span.begin(), span.end()); 37831+ return span.size_bytes() == num_bytes 37832+ ? absl::make_optional(WebMessagePayload(std::move(str))) 37833+ : absl::nullopt; 37834+ } 37835+ case kArrayBuffer: { 37836+ uint32_t num_bytes; 37837+ if (!ReadUint32(iter, &num_bytes)) 37838+ return absl::nullopt; 37839+ auto span = iter.Span<uint8_t>(num_bytes); 37840+ std::vector<uint8_t> array_buf(span.begin(), span.end()); 37841+ return span.size_bytes() == num_bytes 37842+ ? absl::make_optional( 37843+ WebMessagePayload(std::move(array_buf))) 37844+ : absl::nullopt; 37845+ } 37846+ } 37847+ LOG(ERROR) << "Unexpected tag:"<< tag; 37848+ return absl::nullopt; 37849+} 37850 } // namespace blink 37851diff --git a/src/third_party/blink/common/messaging/web_message_port.cc b/src/third_party/blink/common/messaging/web_message_port.cc 37852index 88adf1bf32a79..48dba36367fbb 37853--- a/src/third_party/blink/common/messaging/web_message_port.cc 37854+++ b/src/third_party/blink/common/messaging/web_message_port.cc 37855@@ -4,6 +4,7 @@ 37856 37857 #include "third_party/blink/public/common/messaging/web_message_port.h" 37858 37859+#include "base/logging.h" 37860 #include "base/memory/ptr_util.h" 37861 #include "third_party/blink/public/common/messaging/message_port_channel.h" 37862 #include "third_party/blink/public/common/messaging/string_message_codec.h" 37863@@ -22,6 +23,11 @@ WebMessagePort::Message::~Message() = default; 37864 37865 WebMessagePort::Message::Message(const std::u16string& data) : data(data) {} 37866 37867+#if BUILDFLAG(IS_OHOS) 37868+WebMessagePort::Message::Message(std::vector<uint8_t> array_buffer) 37869+ : array_buffer(std::move(array_buffer)) {} 37870+#endif 37871+ 37872 WebMessagePort::Message::Message(std::vector<WebMessagePort> ports) 37873 : ports(std::move(ports)) {} 37874 37875@@ -152,11 +158,12 @@ bool WebMessagePort::PostMessage(Message&& message) { 37876 // Build the message. 37877 // TODO(chrisha): Finally kill off MessagePortChannel, once 37878 // MessagePortDescriptor more thoroughly plays that role. 37879- blink::TransferableMessage transferable_message; 37880- transferable_message.owned_encoded_message = 37881- blink::EncodeStringMessage(message.data); 37882- transferable_message.encoded_message = 37883- transferable_message.owned_encoded_message; 37884+ blink::TransferableMessage transferable_message = 37885+ blink::EncodeWebMessagePayload( 37886+ message.array_buffer.size() != 0 ? 37887+ WebMessagePayload(std::move(message.array_buffer)) : 37888+ WebMessagePayload(std::move(message.data))); 37889+ 37890 transferable_message.ports = 37891 blink::MessagePortChannel::CreateFromHandles(std::move(ports)); 37892 37893@@ -228,9 +235,20 @@ bool WebMessagePort::Accept(mojo::Message* mojo_message) { 37894 37895 // Decode the string portion of the message. 37896 Message message; 37897- if (!blink::DecodeStringMessage(transferable_message.encoded_message, 37898- &message.data)) { 37899- return false; 37900+ absl::optional<WebMessagePayload> optional_payload = 37901+ blink::DecodeToWebMessagePayload(transferable_message); 37902+ if (!optional_payload) { 37903+ LOG(ERROR) << "WebMessagePort::Accept DecodeToWebMessagePayload failed"; 37904+ return true; 37905+ } 37906+ auto& payload = optional_payload.value(); 37907+ if (auto* str = absl::get_if<std::u16string>(&payload)) { 37908+ message.data = std::move(*str); 37909+ } else if (auto* array_buffer = absl::get_if<std::vector<uint8_t>>(&payload)) { 37910+ message.array_buffer = std::move(*array_buffer); 37911+ } else { 37912+ LOG(INFO) << "WebMessagePort::Accept Get string or arraybuffer failed"; 37913+ return true; 37914 } 37915 37916 // Convert raw handles to MessagePorts. 37917diff --git a/src/third_party/blink/common/web_preferences/web_preferences.cc b/src/third_party/blink/common/web_preferences/web_preferences.cc 37918index f9e653d370fe9..9b870d8a82f8e 37919--- a/src/third_party/blink/common/web_preferences/web_preferences.cc 37920+++ b/src/third_party/blink/common/web_preferences/web_preferences.cc 37921@@ -80,6 +80,10 @@ WebPreferences::WebPreferences() 37922 privileged_webgl_extensions_enabled(false), 37923 webgl_errors_to_console_enabled(true), 37924 hide_scrollbars(false), 37925+#if BUILDFLAG(IS_OHOS) 37926+ hide_vertical_scrollbars(false), 37927+ hide_horizontal_scrollbars(false), 37928+#endif 37929 accelerated_2d_canvas_enabled(false), 37930 new_canvas_2d_api_enabled(false), 37931 antialiased_2d_canvas_disabled(false), 37932@@ -127,7 +131,11 @@ WebPreferences::WebPreferences() 37933 #if defined(OS_ANDROID) || BUILDFLAG(IS_OHOS) 37934 viewport_meta_enabled(true), 37935 shrinks_viewport_contents_to_fit(true), 37936+#if BUILDFLAG(IS_OHOS) 37937+ viewport_style(mojom::ViewportStyle::kDefault), 37938+#else 37939 viewport_style(mojom::ViewportStyle::kMobile), 37940+#endif 37941 always_show_context_menu_on_touch(false), 37942 smooth_scroll_for_find_enabled(true), 37943 main_frame_resizes_are_orientation_changes(true), 37944@@ -198,8 +206,8 @@ WebPreferences::WebPreferences() 37945 default_minimum_page_scale_factor(1.f), 37946 default_maximum_page_scale_factor(3.f), 37947 #elif BUILDFLAG(IS_OHOS) 37948- default_minimum_page_scale_factor(2.f), 37949- default_maximum_page_scale_factor(4.f), 37950+ default_minimum_page_scale_factor(0.25f), 37951+ default_maximum_page_scale_factor(2.f), 37952 #else 37953 default_minimum_page_scale_factor(1.f), 37954 default_maximum_page_scale_factor(4.f), 37955@@ -225,28 +233,6 @@ WebPreferences::WebPreferences() 37956 sans_serif_font_family_map[web_pref::kCommonScript] = u"Arial"; 37957 cursive_font_family_map[web_pref::kCommonScript] = u"Script"; 37958 fantasy_font_family_map[web_pref::kCommonScript] = u"Impact"; 37959- 37960-#if BUILDFLAG(IS_OHOS) 37961- std::unique_ptr<OHOS::NWeb::DisplayManagerAdapter> display_manager_adapter = 37962- OHOS::NWeb::OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 37963- if (display_manager_adapter == nullptr) { 37964- LOG(ERROR) << "display_manager_adapter is nullptr."; 37965- return; 37966- } 37967- std::shared_ptr<OHOS::NWeb::DisplayAdapter> display = 37968- display_manager_adapter->GetDefaultDisplay(); 37969- if (display == nullptr) { 37970- LOG(ERROR) << "display is nullptr."; 37971- return; 37972- } 37973- float ratio = display->GetVirtualPixelRatio(); 37974- if (ratio <= 0.0f) { 37975- LOG(ERROR) << "get virtual pixel ratio error."; 37976- return; 37977- } 37978- default_minimum_page_scale_factor = ratio; 37979- default_maximum_page_scale_factor = ratio * 2; 37980-#endif 37981 } 37982 37983 WebPreferences::WebPreferences(const WebPreferences& other) = default; 37984diff --git a/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc 37985index 381c5180ce7de..8546be13bbf80 37986--- a/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc 37987+++ b/src/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc 37988@@ -94,6 +94,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView, 37989 data.privileged_webgl_extensions_enabled(); 37990 out->webgl_errors_to_console_enabled = data.webgl_errors_to_console_enabled(); 37991 out->hide_scrollbars = data.hide_scrollbars(); 37992+#if BUILDFLAG(IS_OHOS) 37993+ out->hide_vertical_scrollbars = data.hide_vertical_scrollbars(); 37994+ out->hide_horizontal_scrollbars = data.hide_horizontal_scrollbars(); 37995+#endif 37996 out->accelerated_2d_canvas_enabled = data.accelerated_2d_canvas_enabled(); 37997 out->new_canvas_2d_api_enabled = data.new_canvas_2d_api_enabled(); 37998 out->canvas_2d_layers_enabled = data.canvas_2d_layers_enabled(); 37999diff --git a/src/third_party/blink/public/common/BUILD.gn b/src/third_party/blink/public/common/BUILD.gn 38000index 8a9134a87b2e4..bae7b4d127606 38001--- a/src/third_party/blink/public/common/BUILD.gn 38002+++ b/src/third_party/blink/public/common/BUILD.gn 38003@@ -300,7 +300,7 @@ source_set("headers") { 38004 public_deps += [ "//media/mojo/mojom" ] 38005 } 38006 38007- if (is_android || is_win) { 38008+ if (is_android || is_win || is_ohos) { 38009 sources += [ 38010 "font_unique_name_lookup/font_table_matcher.h", 38011 "font_unique_name_lookup/font_table_persistence.h", 38012@@ -318,7 +318,7 @@ source_set("headers") { 38013 } 38014 } 38015 38016-if (is_android || is_win) { 38017+if (is_android || is_win || is_ohos) { 38018 proto_library("font_unique_name_table_proto") { 38019 sources = [ "font_unique_name_lookup/font_unique_name_table.proto" ] 38020 } 38021diff --git a/src/third_party/blink/public/common/features.h b/src/third_party/blink/public/common/features.h 38022index 5eb6f0b297af5..88bade5382fc0 38023--- a/src/third_party/blink/public/common/features.h 38024+++ b/src/third_party/blink/public/common/features.h 38025@@ -92,6 +92,7 @@ BLINK_COMMON_EXPORT bool IsPrerender2Enabled(); 38026 // Fenced Frames: 38027 BLINK_COMMON_EXPORT bool IsFencedFramesEnabled(); 38028 BLINK_COMMON_EXPORT bool IsFencedFramesMPArchBased(); 38029+BLINK_COMMON_EXPORT bool IsFencedFramesShadowDOMBased(); 38030 38031 // Whether we will create initial NavigationEntry or not on FrameTree creation, 38032 // which also impacts the session history replacement decisions made in the 38033diff --git a/src/third_party/blink/public/common/messaging/string_message_codec.h b/src/third_party/blink/public/common/messaging/string_message_codec.h 38034index c17506bc8ab74..48b0a5ad6de03 38035--- a/src/third_party/blink/public/common/messaging/string_message_codec.h 38036+++ b/src/third_party/blink/public/common/messaging/string_message_codec.h 38037@@ -8,7 +8,14 @@ 38038 #include <string> 38039 #include <vector> 38040 #include "base/containers/span.h" 38041+#if BUILDFLAG(IS_OHOS) 38042+#include "third_party/abseil-cpp/absl/types/optional.h" 38043+#include "third_party/abseil-cpp/absl/types/variant.h" 38044+#endif 38045 #include "third_party/blink/public/common/common_export.h" 38046+#if BUILDFLAG(IS_OHOS) 38047+#include "third_party/blink/public/common/messaging/transferable_message.h" 38048+#endif 38049 38050 namespace blink { 38051 38052@@ -29,6 +36,15 @@ BLINK_COMMON_EXPORT bool DecodeStringMessage( 38053 base::span<const uint8_t> encoded_data, 38054 std::u16string* result); 38055 38056+#if BUILDFLAG(IS_OHOS) 38057+using WebMessagePayload = absl::variant<std::u16string, std::vector<uint8_t>>; 38058+BLINK_COMMON_EXPORT TransferableMessage 38059+EncodeWebMessagePayload(const WebMessagePayload& payload); 38060+ 38061+BLINK_COMMON_EXPORT absl::optional<WebMessagePayload> DecodeToWebMessagePayload( 38062+ const TransferableMessage& message); 38063+#endif 38064+ 38065 } // namespace blink 38066 38067 #endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_MESSAGING_STRING_MESSAGE_CODEC_H_ 38068diff --git a/src/third_party/blink/public/common/messaging/web_message_port.h b/src/third_party/blink/public/common/messaging/web_message_port.h 38069index 254698d73120e..665c684870cc0 38070--- a/src/third_party/blink/public/common/messaging/web_message_port.h 38071+++ b/src/third_party/blink/public/common/messaging/web_message_port.h 38072@@ -192,6 +192,11 @@ struct BLINK_COMMON_EXPORT WebMessagePort::Message { 38073 // Creates a message with the given |data|. 38074 explicit Message(const std::u16string& data); 38075 38076+ #if BUILDFLAG(IS_OHOS) 38077+ // Creates a message with the given |array_buffer|. 38078+ explicit Message(std::vector<uint8_t> array_buffer); 38079+ #endif 38080+ 38081 // Creates a message with the given collection of |ports| to be transferred. 38082 explicit Message(std::vector<WebMessagePort> ports); 38083 38084@@ -208,6 +213,11 @@ struct BLINK_COMMON_EXPORT WebMessagePort::Message { 38085 // A UTF-16 message. 38086 std::u16string data; 38087 38088+ #if BUILDFLAG(IS_OHOS) 38089+ // std::vector<uint8_t>: the ArrayBuffer. 38090+ std::vector<uint8_t> array_buffer; 38091+ #endif 38092+ 38093 // Other message ports that are to be transmitted as part of this message. 38094 std::vector<WebMessagePort> ports; 38095 }; 38096diff --git a/src/third_party/blink/public/common/web_preferences/web_preferences.h b/src/third_party/blink/public/common/web_preferences/web_preferences.h 38097index 7e52226b871ac..f3c469e00b158 38098--- a/src/third_party/blink/public/common/web_preferences/web_preferences.h 38099+++ b/src/third_party/blink/public/common/web_preferences/web_preferences.h 38100@@ -94,6 +94,10 @@ struct BLINK_COMMON_EXPORT WebPreferences { 38101 bool privileged_webgl_extensions_enabled; 38102 bool webgl_errors_to_console_enabled; 38103 bool hide_scrollbars; 38104+#if BUILDFLAG(IS_OHOS) 38105+ bool hide_vertical_scrollbars; 38106+ bool hide_horizontal_scrollbars; 38107+#endif 38108 bool accelerated_2d_canvas_enabled; 38109 bool canvas_2d_layers_enabled = false; 38110 bool canvas_context_lost_in_background_enabled = false; 38111diff --git a/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h 38112index 8a60777eefdda..178bcd6e60134 38113--- a/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h 38114+++ b/src/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h 38115@@ -771,6 +771,16 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView, 38116 return r.pinch_smooth_mode; 38117 } 38118 38119+#if BUILDFLAG(IS_OHOS) 38120+ static bool hide_vertical_scrollbars(const blink::web_pref::WebPreferences& r) { 38121+ return r.hide_vertical_scrollbars; 38122+ } 38123+ 38124+ static bool hide_horizontal_scrollbars(const blink::web_pref::WebPreferences& r) { 38125+ return r.hide_horizontal_scrollbars; 38126+ } 38127+#endif 38128+ 38129 static bool Read(blink::mojom::WebPreferencesDataView r, 38130 blink::web_pref::WebPreferences* out); 38131 }; 38132diff --git a/src/third_party/blink/public/mojom/frame/policy_container.mojom b/src/third_party/blink/public/mojom/frame/policy_container.mojom 38133index 69a7a379298ce..ba6ab15b0f9d5 38134--- a/src/third_party/blink/public/mojom/frame/policy_container.mojom 38135+++ b/src/third_party/blink/public/mojom/frame/policy_container.mojom 38136@@ -12,6 +12,7 @@ struct PolicyContainerPolicies { 38137 network.mojom.ReferrerPolicy referrer_policy = network.mojom.ReferrerPolicy.kDefault; 38138 network.mojom.IPAddressSpace ip_address_space = network.mojom.IPAddressSpace.kUnknown; 38139 array<network.mojom.ContentSecurityPolicy> content_security_policies; 38140+ bool can_navigate_top_without_user_gesture = true; 38141 }; 38142 38143 // This interface is implemented in the browser process. It defines methods to 38144diff --git a/src/third_party/blink/public/mojom/input/focus_type.mojom b/src/third_party/blink/public/mojom/input/focus_type.mojom 38145index 207adda4ce349..fad19126fb01f 38146--- a/src/third_party/blink/public/mojom/input/focus_type.mojom 38147+++ b/src/third_party/blink/public/mojom/input/focus_type.mojom 38148@@ -5,8 +5,10 @@ 38149 module blink.mojom; 38150 38151 enum FocusType { 38152- // Element::focus(), etc. 38153+ // Catch-all focus type. Includes accessibility-based focusing. 38154 kNone = 0, 38155+ // element.focus()/element.blur() in JavaScript 38156+ kScript, 38157 // Sequential navigation with TAB, or Shift + TAB. 38158 kForward, 38159 kBackward, 38160diff --git a/src/third_party/blink/public/mojom/input/input_handler.mojom b/src/third_party/blink/public/mojom/input/input_handler.mojom 38161index 8fa77f86ee7de..9dbd8452c9978 38162--- a/src/third_party/blink/public/mojom/input/input_handler.mojom 38163+++ b/src/third_party/blink/public/mojom/input/input_handler.mojom 38164@@ -425,7 +425,10 @@ interface WidgetInputHandler { 38165 TouchActionOptional? touch_action); 38166 38167 [EnableIf=is_ohos] 38168- StartFling(); 38169+ TryStartFling(); 38170+ 38171+ [EnableIf=is_ohos] 38172+ TryFinishFling(); 38173 38174 // Sends a non-blocking input event to the render widget. The behaviour 38175 // of this API is the same as DispatchEvent just that there is no callback 38176diff --git a/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom 38177index 7872cd0dafc85..4d2af1424accf 38178--- a/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom 38179+++ b/src/third_party/blink/public/mojom/webpreferences/web_preferences.mojom 38180@@ -150,6 +150,8 @@ struct WebPreferences { 38181 bool privileged_webgl_extensions_enabled; 38182 bool webgl_errors_to_console_enabled; 38183 bool hide_scrollbars; 38184+ bool hide_vertical_scrollbars; 38185+ bool hide_horizontal_scrollbars; 38186 bool accelerated_2d_canvas_enabled; 38187 bool canvas_context_lost_in_background_enabled; 38188 bool new_canvas_2d_api_enabled; 38189diff --git a/src/third_party/blink/public/platform/web_policy_container.h b/src/third_party/blink/public/platform/web_policy_container.h 38190index b4eaac0716408..e8ed3f2383bc9 38191--- a/src/third_party/blink/public/platform/web_policy_container.h 38192+++ b/src/third_party/blink/public/platform/web_policy_container.h 38193@@ -20,6 +20,7 @@ struct WebPolicyContainerPolicies { 38194 network::mojom::ReferrerPolicy referrer_policy; 38195 network::mojom::IPAddressSpace ip_address_space; 38196 WebVector<WebContentSecurityPolicy> content_security_policies; 38197+ bool can_navigate_top_without_user_gesture = true; 38198 }; 38199 38200 // TODO(antoniosartori): Remove this when CommitNavigation IPC will be handled 38201diff --git a/src/third_party/blink/public/web/web_settings.h b/src/third_party/blink/public/web/web_settings.h 38202index 35e1ee688b31b..9a924f0bb6096 38203--- a/src/third_party/blink/public/web/web_settings.h 38204+++ b/src/third_party/blink/public/web/web_settings.h 38205@@ -171,6 +171,10 @@ class WebSettings { 38206 virtual void SetMinimumFontSize(int) = 0; 38207 virtual void SetMinimumLogicalFontSize(int) = 0; 38208 virtual void SetHideScrollbars(bool) = 0; 38209+#if BUILDFLAG(IS_OHOS) 38210+ virtual void SetVerticalHideScrollbars(bool) = 0; 38211+ virtual void SetHorizontalHideScrollbars(bool) = 0; 38212+#endif 38213 virtual void SetPasswordEchoDurationInSeconds(double) = 0; 38214 virtual void SetPasswordEchoEnabled(bool) = 0; 38215 virtual void SetPluginsEnabled(bool) = 0; 38216diff --git a/src/third_party/blink/public/web/web_view.h b/src/third_party/blink/public/web/web_view.h 38217index fc574edaaa2ad..655f075c3d9fe 38218--- a/src/third_party/blink/public/web/web_view.h 38219+++ b/src/third_party/blink/public/web/web_view.h 38220@@ -470,6 +470,12 @@ class WebView { 38221 // Returns whether this WebView represents a fenced frame root or not. 38222 virtual bool IsFencedFrameRoot() const = 0; 38223 38224+#if BUILDFLAG(IS_OHOS) 38225+ virtual gfx::PointF GetScrollOffset() = 0; 38226+ virtual float GetScrollBottom() = 0; 38227+ virtual void SetScrollOffset(const gfx::PointF point) = 0; 38228+#endif 38229+ 38230 // Misc ------------------------------------------------------------- 38231 38232 // Returns the number of live WebView instances in this process. 38233diff --git a/src/third_party/blink/renderer/core/css/style_engine.cc b/src/third_party/blink/renderer/core/css/style_engine.cc 38234index e157b5b645eda..85268203bf6d1 38235--- a/src/third_party/blink/renderer/core/css/style_engine.cc 38236+++ b/src/third_party/blink/renderer/core/css/style_engine.cc 38237@@ -2435,6 +2435,7 @@ void StyleEngine::RecalcStyle(StyleRecalcChange change, 38238 const StyleRecalcContext& style_recalc_context) { 38239 DCHECK(GetDocument().documentElement()); 38240 HasMatchedCacheScope has_matched_cache_scope(&GetDocument()); 38241+ SkipStyleRecalcScope skip_scope(*this); 38242 Element& root_element = style_recalc_root_.RootElement(); 38243 Element* parent = FlatTreeTraversal::ParentElement(root_element); 38244 38245@@ -2997,4 +2998,17 @@ void StyleEngine::MarkForLayoutTreeChangesAfterDetach() { 38246 parent_for_detached_subtree_ = nullptr; 38247 } 38248 38249+bool StyleEngine::AllowSkipStyleRecalcForScope() const { 38250+ if (InContainerQueryStyleRecalc()) 38251+ return true; 38252+ if (LocalFrameView* view = GetDocument().View()) { 38253+ // Existing layout roots before starting style recalc may end up being 38254+ // inside skipped subtrees if we allowed skipping. If we start out with an 38255+ // empty list, any added ones will be a result of an element style recalc, 38256+ // which means the will not be inside a skipped subtree. 38257+ return !view->IsSubtreeLayout(); 38258+ } 38259+ return true; 38260+} 38261+ 38262 } // namespace blink 38263diff --git a/src/third_party/blink/renderer/core/css/style_engine.h b/src/third_party/blink/renderer/core/css/style_engine.h 38264index f9867e203b9a8..862b269a6e7d3 38265--- a/src/third_party/blink/renderer/core/css/style_engine.h 38266+++ b/src/third_party/blink/renderer/core/css/style_engine.h 38267@@ -163,6 +163,20 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected<StyleEngine>, 38268 base::AutoReset<bool> allow_marking_; 38269 }; 38270 38271+ // Set up the condition for allowing to skip style recalc before starting 38272+ // RecalcStyle(). 38273+ class SkipStyleRecalcScope { 38274+ STACK_ALLOCATED(); 38275+ 38276+ public: 38277+ explicit SkipStyleRecalcScope(StyleEngine& engine) 38278+ : allow_skip_(&engine.allow_skip_style_recalc_, 38279+ engine.AllowSkipStyleRecalcForScope()) {} 38280+ 38281+ private: 38282+ base::AutoReset<bool> allow_skip_; 38283+ }; 38284+ 38285 explicit StyleEngine(Document&); 38286 ~StyleEngine() override; 38287 38288@@ -323,6 +337,10 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected<StyleEngine>, 38289 void UpdateStyleRecalcRoot(ContainerNode* ancestor, Node* dirty_node); 38290 void UpdateLayoutTreeRebuildRoot(ContainerNode* ancestor, Node* dirty_node); 38291 38292+ // Returns true if we can skip style recalc for a size container subtree and 38293+ // resume it during layout. 38294+ bool SkipStyleRecalcAllowed() const { return allow_skip_style_recalc_; } 38295+ 38296 CSSFontSelector* GetFontSelector() { return font_selector_; } 38297 38298 void RemoveFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&); 38299@@ -673,6 +691,9 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected<StyleEngine>, 38300 // container. 38301 void RebuildFieldSetContainer(HTMLFieldSetElement& fieldset); 38302 38303+ // Initialization value for SkipStyleRecalcScope. 38304+ bool AllowSkipStyleRecalcForScope() const; 38305+ 38306 Member<Document> document_; 38307 38308 // Tracks the number of currently loading top-level stylesheets. Sheets loaded 38309@@ -746,6 +767,9 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected<StyleEngine>, 38310 // AllowMarkStyleDirtyFromRecalcScope. 38311 bool allow_mark_for_reattach_from_rebuild_layout_tree_{false}; 38312 38313+ // Set to true if we are allowed to skip recalc for a size container subtree. 38314+ bool allow_skip_style_recalc_{false}; 38315+ 38316 VisionDeficiency vision_deficiency_{VisionDeficiency::kNoVisionDeficiency}; 38317 Member<ReferenceFilterOperation> vision_deficiency_filter_; 38318 38319diff --git a/src/third_party/blink/renderer/core/dom/document.cc b/src/third_party/blink/renderer/core/dom/document.cc 38320index f6cb04deef8bb..398acdbcdb891 38321--- a/src/third_party/blink/renderer/core/dom/document.cc 38322+++ b/src/third_party/blink/renderer/core/dom/document.cc 38323@@ -4788,8 +4788,10 @@ bool Document::SetFocusedElement(Element* new_focused_element, 38324 focused_element_ = new_focused_element; 38325 SetSequentialFocusNavigationStartingPoint(focused_element_.Get()); 38326 38327- // Keep track of last focus from user interaction, ignoring focus from code. 38328- if (params.type != mojom::blink::FocusType::kNone) 38329+ // Keep track of last focus from user interaction, ignoring focus from code 38330+ // and other non-user internal interventions. 38331+ if (params.type != mojom::blink::FocusType::kNone && 38332+ params.type != mojom::blink::FocusType::kScript) 38333 last_focus_type_ = params.type; 38334 38335 focused_element_->SetFocused(true, params.type); 38336diff --git a/src/third_party/blink/renderer/core/dom/element.cc b/src/third_party/blink/renderer/core/dom/element.cc 38337index 7903efdbcfab6..92ae9e773fd3a 38338--- a/src/third_party/blink/renderer/core/dom/element.cc 38339+++ b/src/third_party/blink/renderer/core/dom/element.cc 38340@@ -2904,6 +2904,10 @@ bool Element::SkipStyleRecalcForContainer( 38341 const ComputedStyle& style, 38342 const StyleRecalcChange& child_change) { 38343 DCHECK(RuntimeEnabledFeatures::CSSContainerSkipStyleRecalcEnabled()); 38344+ 38345+ if (!GetDocument().GetStyleEngine().SkipStyleRecalcAllowed()) 38346+ return false; 38347+ 38348 if (!child_change.TraversePseudoElements(*this)) { 38349 // If none of the children or pseudo elements need to be traversed for style 38350 // recalc, there is no point in marking the subtree as skipped. 38351@@ -4391,13 +4395,21 @@ Element* Element::GetFocusableArea() const { 38352 return FocusController::FindFocusableElementInShadowHost(*this); 38353 } 38354 38355+void Element::focusForBindings(const FocusOptions* options) { 38356+ focus(FocusParams(SelectionBehaviorOnFocus::kRestore, 38357+ mojom::blink::FocusType::kScript, 38358+ /*capabilities=*/nullptr, options, 38359+ /*gate_on_user_activation=*/true)); 38360+} 38361+ 38362 void Element::focus() { 38363 focus(FocusParams()); 38364 } 38365 38366 void Element::focus(const FocusOptions* options) { 38367 focus(FocusParams(SelectionBehaviorOnFocus::kRestore, 38368- mojom::blink::FocusType::kNone, nullptr, options)); 38369+ mojom::blink::FocusType::kNone, /*capabilities=*/nullptr, 38370+ options)); 38371 } 38372 38373 void Element::focus(const FocusParams& params) { 38374@@ -4418,6 +4430,37 @@ void Element::focus(const FocusParams& params) { 38375 frame_owner_element->contentDocument()->UnloadStarted()) 38376 return; 38377 38378+ FocusOptions* focus_options = nullptr; 38379+ if (params.gate_on_user_activation) { 38380+ LocalFrame& frame = *GetDocument().GetFrame(); 38381+ if (!frame.AllowFocusWithoutUserActivation() && 38382+ !LocalFrame::HasTransientUserActivation(&frame)) { 38383+ return; 38384+ } 38385+ 38386+ // Fenced frame focusing should not auto-scroll, since that behavior can 38387+ // be observed by an embedder. 38388+ if (frame.IsInFencedFrameTree()) { 38389+ focus_options = FocusOptions::Create(); 38390+ focus_options->setPreventScroll(true); 38391+ } 38392+ 38393+ // Fenced frames should consume user activation when attempting to pull 38394+ // focus across a fenced boundary into itself. 38395+ // TODO(crbug.com/848778) Right now the browser can't verify that the 38396+ // renderer properly consumed user activation. When user activation code is 38397+ // migrated to the browser, move this logic to the browser as well. 38398+ if (!frame.AllowFocusWithoutUserActivation() && 38399+ frame.IsInFencedFrameTree()) { 38400+ LocalFrame::ConsumeTransientUserActivation(&frame); 38401+ } 38402+ } 38403+ 38404+ FocusParams params_to_use = FocusParams( 38405+ params.selection_behavior, params.type, params.source_capabilities, 38406+ focus_options ? focus_options : params.options, 38407+ params.gate_on_user_activation); 38408+ 38409 // Ensure we have clean style (including forced display locks). 38410 GetDocument().UpdateStyleAndLayoutTreeForNode(this); 38411 38412@@ -4428,23 +4471,24 @@ void Element::focus(const FocusParams& params) { 38413 if (Element* new_focus_target = GetFocusableArea()) { 38414 // Unlike the specification, we re-run focus() for new_focus_target 38415 // because we can't change |this| in a member function. 38416- new_focus_target->focus(FocusParams(SelectionBehaviorOnFocus::kReset, 38417- mojom::blink::FocusType::kForward, 38418- nullptr, params.options)); 38419+ new_focus_target->focus(FocusParams( 38420+ SelectionBehaviorOnFocus::kReset, mojom::blink::FocusType::kForward, 38421+ /*capabilities=*/nullptr, params_to_use.options)); 38422 } 38423 // 2. If new focus target is null, then: 38424 // 2.1. If no fallback target was specified, then return. 38425 return; 38426 } 38427- // If script called focus(), then the type would be none. This means we are 38428- // activating because of a script action (kScriptFocus). Otherwise, this is a 38429- // user activation (kUserFocus). 38430- ActivateDisplayLockIfNeeded(params.type == mojom::blink::FocusType::kNone 38431+ // If a script called focus(), then the type would be kScript. This means 38432+ // we are activating because of a script action (kScriptFocus). Otherwise, 38433+ // this is a user activation (kUserFocus). 38434+ ActivateDisplayLockIfNeeded(params_to_use.type == 38435+ mojom::blink::FocusType::kScript 38436 ? DisplayLockActivationReason::kScriptFocus 38437 : DisplayLockActivationReason::kUserFocus); 38438 38439 if (!GetDocument().GetPage()->GetFocusController().SetFocusedElement( 38440- this, GetDocument().GetFrame(), params)) 38441+ this, GetDocument().GetFrame(), params_to_use)) 38442 return; 38443 38444 if (GetDocument().FocusedElement() == this) { 38445@@ -4465,15 +4509,16 @@ void Element::focus(const FocusParams& params) { 38446 // Trigger a tooltip to show for the newly focused element only when the 38447 // focus was set resulting from a keyboard action. 38448 // 38449- // TODO(bebeaudr): To also trigger a tooltip when the |params.type| is 38450- // kSpatialNavigation, we'll first have to ensure that the fake mouse move 38451- // event fired by `SpatialNavigationController::DispatchMouseMoveEvent` does 38452- // not lead to a cursor triggered tooltip update. The only tooltip update 38453- // that there should be in that case is the one triggered from the spatial 38454- // navigation keypress. This issue is tracked in https://crbug.com/1206446. 38455+ // TODO(bebeaudr): To also trigger a tooltip when the |params_to_use.type| 38456+ // is kSpatialNavigation, we'll first have to ensure that the fake mouse 38457+ // move event fired by `SpatialNavigationController::DispatchMouseMoveEvent` 38458+ // does not lead to a cursor triggered tooltip update. The only tooltip 38459+ // update that there should be in that case is the one triggered from the 38460+ // spatial navigation keypress. This issue is tracked in 38461+ // https://crbug.com/1206446. 38462 bool is_focused_from_keypress = false; 38463- switch (params.type) { 38464- case mojom::blink::FocusType::kNone: 38465+ switch (params_to_use.type) { 38466+ case mojom::blink::FocusType::kScript: 38467 if (GetDocument() 38468 .GetFrame() 38469 ->LocalFrameRoot() 38470diff --git a/src/third_party/blink/renderer/core/dom/element.h b/src/third_party/blink/renderer/core/dom/element.h 38471index 7ac352e3cdf40..28a045bd9cb2a 38472--- a/src/third_party/blink/renderer/core/dom/element.h 38473+++ b/src/third_party/blink/renderer/core/dom/element.h 38474@@ -690,6 +690,11 @@ class CORE_EXPORT Element : public ContainerNode, public Animatable { 38475 // delegatesFocus flag. 38476 bool DelegatesFocus() const; 38477 Element* GetFocusableArea() const; 38478+ // Element focus function called through IDL (i.e. element.focus() in JS) 38479+ // Delegates to Focus() with focus type set to kScript 38480+ void focusForBindings(const FocusOptions*); 38481+ // Element focus function called from outside IDL (user focus, 38482+ // accessibility, etc...) 38483 virtual void focus(const FocusParams&); 38484 void focus(); 38485 void focus(const FocusOptions*); 38486diff --git a/src/third_party/blink/renderer/core/dom/events/event_dispatcher.cc b/src/third_party/blink/renderer/core/dom/events/event_dispatcher.cc 38487index f7ce838a77e45..0e3aab7a26af9 38488--- a/src/third_party/blink/renderer/core/dom/events/event_dispatcher.cc 38489+++ b/src/third_party/blink/renderer/core/dom/events/event_dispatcher.cc 38490@@ -359,8 +359,13 @@ inline void EventDispatcher::DispatchEventPostProcess( 38491 // Call default event handlers. While the DOM does have a concept of 38492 // preventing default handling, the detail of which handlers are called is an 38493 // internal implementation detail and not part of the DOM. 38494+#if BUILDFLAG(IS_OHOS) 38495+ if ((event_->type() == event_type_names::kClick || !event_->defaultPrevented()) 38496+ && !event_->DefaultHandled() && is_trusted_or_click) { 38497+#elif 38498 if (!event_->defaultPrevented() && !event_->DefaultHandled() && 38499 is_trusted_or_click) { 38500+#endif 38501 // Non-bubbling events call only one default event handler, the one for the 38502 // target. 38503 node_->DefaultEventHandler(*event_); 38504diff --git a/src/third_party/blink/renderer/core/dom/focus_params.h b/src/third_party/blink/renderer/core/dom/focus_params.h 38505index c6245bcd9ea3f..4ea14c48fdb3f 38506--- a/src/third_party/blink/renderer/core/dom/focus_params.h 38507+++ b/src/third_party/blink/renderer/core/dom/focus_params.h 38508@@ -17,14 +17,19 @@ struct FocusParams { 38509 38510 public: 38511 FocusParams() : options(FocusOptions::Create()) {} 38512+ explicit FocusParams(bool gate_on_user_activation) 38513+ : options(FocusOptions::Create()), 38514+ gate_on_user_activation(gate_on_user_activation) {} 38515 FocusParams(SelectionBehaviorOnFocus selection, 38516 mojom::blink::FocusType focus_type, 38517 InputDeviceCapabilities* capabilities, 38518- const FocusOptions* focus_options = FocusOptions::Create()) 38519+ const FocusOptions* focus_options = FocusOptions::Create(), 38520+ bool gate_on_user_activation = false) 38521 : selection_behavior(selection), 38522 type(focus_type), 38523 source_capabilities(capabilities), 38524- options(focus_options) {} 38525+ options(focus_options), 38526+ gate_on_user_activation(gate_on_user_activation) {} 38527 38528 SelectionBehaviorOnFocus selection_behavior = 38529 SelectionBehaviorOnFocus::kRestore; 38530@@ -32,6 +37,7 @@ struct FocusParams { 38531 InputDeviceCapabilities* source_capabilities = nullptr; 38532 const FocusOptions* options = nullptr; 38533 bool omit_blur_events = false; 38534+ bool gate_on_user_activation = false; 38535 }; 38536 38537 } // namespace blink 38538diff --git a/src/third_party/blink/renderer/core/exported/web_settings_impl.cc b/src/third_party/blink/renderer/core/exported/web_settings_impl.cc 38539index b5415691e3d7f..e690b6db1f07b 38540--- a/src/third_party/blink/renderer/core/exported/web_settings_impl.cc 38541+++ b/src/third_party/blink/renderer/core/exported/web_settings_impl.cc 38542@@ -463,6 +463,16 @@ void WebSettingsImpl::SetHideScrollbars(bool enabled) { 38543 dev_tools_emulator_->SetHideScrollbars(enabled); 38544 } 38545 38546+#if BUILDFLAG(IS_OHOS) 38547+void WebSettingsImpl::SetVerticalHideScrollbars(bool enabled) { 38548+ settings_->SetVerticalHideScrollbars(enabled); 38549+} 38550+ 38551+void WebSettingsImpl::SetHorizontalHideScrollbars(bool enabled) { 38552+ settings_->SetHorizontalHideScrollbars(enabled); 38553+} 38554+#endif 38555+ 38556 void WebSettingsImpl::SetMockGestureTapHighlightsEnabled(bool enabled) { 38557 settings_->SetMockGestureTapHighlightsEnabled(enabled); 38558 } 38559diff --git a/src/third_party/blink/renderer/core/exported/web_settings_impl.h b/src/third_party/blink/renderer/core/exported/web_settings_impl.h 38560index 910d094b33358..30018f7be038f 38561--- a/src/third_party/blink/renderer/core/exported/web_settings_impl.h 38562+++ b/src/third_party/blink/renderer/core/exported/web_settings_impl.h 38563@@ -122,6 +122,10 @@ class CORE_EXPORT WebSettingsImpl final : public WebSettings { 38564 void SetMinimumFontSize(int) override; 38565 void SetMinimumLogicalFontSize(int) override; 38566 void SetHideScrollbars(bool) override; 38567+#if BUILDFLAG(IS_OHOS) 38568+ void SetVerticalHideScrollbars(bool) override; 38569+ void SetHorizontalHideScrollbars(bool) override; 38570+#endif 38571 void SetPasswordEchoDurationInSeconds(double) override; 38572 void SetPasswordEchoEnabled(bool) override; 38573 void SetPluginsEnabled(bool) override; 38574diff --git a/src/third_party/blink/renderer/core/exported/web_view_impl.cc b/src/third_party/blink/renderer/core/exported/web_view_impl.cc 38575index c47b95908fc0d..b4a7a145ddd91 38576--- a/src/third_party/blink/renderer/core/exported/web_view_impl.cc 38577+++ b/src/third_party/blink/renderer/core/exported/web_view_impl.cc 38578@@ -629,7 +629,6 @@ bool WebViewImpl::StartPageScaleAnimation(const gfx::Point& target_position, 38579 // compositing. 38580 DCHECK(MainFrameImpl()); 38581 DCHECK(does_composite_); 38582- 38583 VisualViewport& visual_viewport = GetPage()->GetVisualViewport(); 38584 gfx::Point clamped_point = target_position; 38585 if (!use_anchor) { 38586@@ -1483,6 +1482,11 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, 38587 38588 settings->SetHideScrollbars(prefs.hide_scrollbars); 38589 38590+#if BUILDFLAG(IS_OHOS) 38591+ settings->SetVerticalHideScrollbars(prefs.hide_vertical_scrollbars); 38592+ settings->SetHorizontalHideScrollbars(prefs.hide_horizontal_scrollbars); 38593+#endif 38594+ 38595 // Enable gpu-accelerated 2d canvas if requested on the command line. 38596 RuntimeEnabledFeatures::SetAccelerated2dCanvasEnabled( 38597 prefs.accelerated_2d_canvas_enabled); 38598@@ -2076,6 +2080,34 @@ void WebViewImpl::SmoothScroll(int target_x, 38599 StartPageScaleAnimation(target_position, false, PageScaleFactor(), duration); 38600 } 38601 38602+#if BUILDFLAG(IS_OHOS) 38603+gfx::PointF WebViewImpl::GetScrollOffset() { 38604+ DCHECK(MainFrameImpl()); 38605+ DCHECK(MainFrameImpl()->GetFrameView()); 38606+ LocalFrameView* view = MainFrameImpl()->GetFrameView(); 38607+ DCHECK(view->GetScrollableArea()); 38608+ ScrollOffset offset = view->GetScrollableArea()->GetScrollOffset(); 38609+ return view->GetScrollableArea()->ScrollOffsetToPosition(offset); 38610+} 38611+ 38612+float WebViewImpl::GetScrollBottom() { 38613+ ScrollableArea* root_viewport = 38614+ MainFrameImpl()->GetFrame()->View()->GetScrollableArea(); 38615+ if (!root_viewport) { 38616+ return -1.0; 38617+ } 38618+ return root_viewport->MaximumScrollOffset().y(); 38619+} 38620+ 38621+void WebViewImpl::SetScrollOffset(const gfx::PointF point) { 38622+ DCHECK(MainFrameImpl()); 38623+ DCHECK(MainFrameImpl()->GetFrameView()); 38624+ LocalFrameView* view = MainFrameImpl()->GetFrameView(); 38625+ DCHECK(view->GetScrollableArea()); 38626+ view->GetScrollableArea()->SetScrollOffset(gfx::Vector2dF(point.OffsetFromOrigin()), mojom::blink::ScrollType::kProgrammatic); 38627+} 38628+#endif 38629+ 38630 void WebViewImpl::ComputeScaleAndScrollForEditableElementRects( 38631 const gfx::Rect& element_bounds_in_document, 38632 const gfx::Rect& caret_bounds_in_document, 38633diff --git a/src/third_party/blink/renderer/core/exported/web_view_impl.h b/src/third_party/blink/renderer/core/exported/web_view_impl.h 38634index 0ecba5732b21a..fbed3cc646da6 38635--- a/src/third_party/blink/renderer/core/exported/web_view_impl.h 38636+++ b/src/third_party/blink/renderer/core/exported/web_view_impl.h 38637@@ -591,6 +591,12 @@ class CORE_EXPORT WebViewImpl final : public WebView, 38638 // words, after the frame has painted something. 38639 void DidFirstVisuallyNonEmptyPaint(); 38640 38641+#if BUILDFLAG(IS_OHOS) 38642+ gfx::PointF GetScrollOffset() override; 38643+ float GetScrollBottom() override; 38644+ void SetScrollOffset(const gfx::PointF point) override; 38645+#endif 38646+ 38647 private: 38648 FRIEND_TEST_ALL_PREFIXES(WebFrameTest, DivScrollIntoEditableTest); 38649 FRIEND_TEST_ALL_PREFIXES(WebFrameTest, 38650diff --git a/src/third_party/blink/renderer/core/fetch/headers.cc b/src/third_party/blink/renderer/core/fetch/headers.cc 38651index 9b6c76500e70b..395ad05df0c15 38652--- a/src/third_party/blink/renderer/core/fetch/headers.cc 38653+++ b/src/third_party/blink/renderer/core/fetch/headers.cc 38654@@ -96,7 +96,7 @@ void Headers::append(const String& name, 38655 } 38656 // "4. Otherwise, if guard is |request| and |name| is a forbidden header 38657 // name, return." 38658- if (guard_ == kRequestGuard && cors::IsForbiddenHeaderName(name)) 38659+ if (guard_ == kRequestGuard && cors::IsForbiddenRequestHeader(name, value)) 38660 return; 38661 // 5. Otherwise, if guard is |request-no-cors|: 38662 if (guard_ == kRequestNoCorsGuard) { 38663@@ -145,9 +145,9 @@ void Headers::remove(const String& name, ExceptionState& exception_state) { 38664 exception_state.ThrowTypeError("Headers are immutable"); 38665 return; 38666 } 38667- // "3. Otherwise, if guard is |request| and |name| is a forbidden header 38668- // name, return." 38669- if (guard_ == kRequestGuard && cors::IsForbiddenHeaderName(name)) 38670+ // "3. Otherwise, if guard is |request| and (|name|, '') is a forbidden 38671+ // request header, return." 38672+ if (guard_ == kRequestGuard && cors::IsForbiddenRequestHeader(name, "")) 38673 return; 38674 // "4. Otherwise, if the context object’s guard is |request-no-cors|, |name| 38675 // is not a no-CORS-safelisted request-header name, and |name| is not a 38676@@ -222,9 +222,9 @@ void Headers::set(const String& name, 38677 exception_state.ThrowTypeError("Headers are immutable"); 38678 return; 38679 } 38680- // "4. Otherwise, if guard is |request| and |name| is a forbidden header 38681- // name, return." 38682- if (guard_ == kRequestGuard && cors::IsForbiddenHeaderName(name)) 38683+ // "4. Otherwise, if guard is |request| and (|name|, |value|) is a forbidden 38684+ // request header, return." 38685+ if (guard_ == kRequestGuard && cors::IsForbiddenRequestHeader(name, value)) 38686 return; 38687 // "5. Otherwise, if guard is |request-no-CORS| and |name|/|value| is not a 38688 // no-CORS-safelisted header, return." 38689diff --git a/src/third_party/blink/renderer/core/frame/dom_window.cc b/src/third_party/blink/renderer/core/frame/dom_window.cc 38690index de0e82d3fc66c..c09d5d365b643 38691--- a/src/third_party/blink/renderer/core/frame/dom_window.cc 38692+++ b/src/third_party/blink/renderer/core/frame/dom_window.cc 38693@@ -439,6 +439,18 @@ void DOMWindow::focus(v8::Isolate* isolate) { 38694 if (!page) 38695 return; 38696 38697+ if (!frame->AllowFocusWithoutUserActivation()) { 38698+ // Disallow script focus that crosses a fenced frame boundary on a 38699+ // frame that doesn't have transient user activation. Note: all calls to 38700+ // DOMWindow::focus come from JavaScript calls in the web platform 38701+ if (!frame->HasTransientUserActivation()) 38702+ return; 38703+ // Fenced frames should consume user activation when attempting to pull 38704+ // focus across a fenced boundary into itself. 38705+ if (frame->IsInFencedFrameTree()) 38706+ LocalFrame::ConsumeTransientUserActivation(DynamicTo<LocalFrame>(frame)); 38707+ } 38708+ 38709 RecordWindowProxyAccessMetrics( 38710 WebFeature::kWindowProxyCrossOriginAccessFocus, 38711 WebFeature::kWindowProxyCrossOriginAccessFromOtherPageFocus); 38712diff --git a/src/third_party/blink/renderer/core/frame/frame.cc b/src/third_party/blink/renderer/core/frame/frame.cc 38713index 4a1d747aa1ea4..be44da94f7375 38714--- a/src/third_party/blink/renderer/core/frame/frame.cc 38715+++ b/src/third_party/blink/renderer/core/frame/frame.cc 38716@@ -334,10 +334,12 @@ void Frame::RenderFallbackContentWithResourceTiming( 38717 } 38718 38719 bool Frame::IsInFencedFrameTree() const { 38720- if (!blink::features::IsFencedFramesEnabled()) 38721+ DCHECK(!IsDetached()); 38722+ const auto& ff_impl = GetPage()->FencedFramesImplementationType(); 38723+ if (!ff_impl) 38724 return false; 38725 38726- switch (blink::features::kFencedFramesImplementationTypeParam.Get()) { 38727+ switch (ff_impl.value()) { 38728 case blink::features::FencedFramesImplementationType::kMPArch: 38729 return GetPage()->IsMainFrameFencedFrameRoot(); 38730 case blink::features::FencedFramesImplementationType::kShadowDOM: 38731@@ -582,6 +584,38 @@ Frame* Frame::FirstChild(FrameTreeBoundary frame_tree_boundary) const { 38732 return first_child_; 38733 } 38734 38735+bool Frame::FocusCrossesFencedBoundary() { 38736+ DCHECK(blink::features::IsFencedFramesShadowDOMBased()); 38737+ 38738+ if (Frame* focused_frame = GetPage()->GetFocusController().FocusedFrame()) { 38739+ if (!focused_frame->IsInFencedFrameTree() && !IsInFencedFrameTree()) 38740+ return false; 38741+ 38742+ return Tree().Top(FrameTreeBoundary::kFenced) != 38743+ focused_frame->Tree().Top(FrameTreeBoundary::kFenced); 38744+ } 38745+ 38746+ return false; 38747+} 38748+ 38749+bool Frame::AllowFocusWithoutUserActivation() { 38750+ const auto& ff_impl = GetPage()->FencedFramesImplementationType(); 38751+ if (!ff_impl) 38752+ return true; 38753+ 38754+ switch (ff_impl.value()) { 38755+ case blink::features::FencedFramesImplementationType::kMPArch: 38756+ // For a newly-loaded page, no page will have focus. We allow a non-fenced 38757+ // frame to get the first focus before enforcing if a page already has 38758+ // focus. 38759+ return (!GetPage()->GetFocusController().IsActive() && 38760+ !IsInFencedFrameTree()) || 38761+ GetPage()->GetFocusController().IsFocused(); 38762+ case blink::features::FencedFramesImplementationType::kShadowDOM: 38763+ return !FocusCrossesFencedBoundary(); 38764+ } 38765+} 38766+ 38767 bool Frame::Swap(WebFrame* new_web_frame) { 38768 DCHECK(IsAttached()); 38769 38770diff --git a/src/third_party/blink/renderer/core/frame/frame.h b/src/third_party/blink/renderer/core/frame/frame.h 38771index 0c1b8d618245d..1ad6c387903c1 38772--- a/src/third_party/blink/renderer/core/frame/frame.h 38773+++ b/src/third_party/blink/renderer/core/frame/frame.h 38774@@ -192,6 +192,14 @@ class CORE_EXPORT Frame : public GarbageCollected<Frame> { 38775 void SetIsLoading(bool is_loading) { is_loading_ = is_loading; } 38776 bool IsLoading() const { return is_loading_; } 38777 38778+ // Determines if the frame should be allowed to pull focus without receiving 38779+ // user activation. A frame cannot pull focus without user activation if 38780+ // doing so would cross a fenced frame boundary. 38781+ // Note: the only time focus can be pulled across a fence without the target 38782+ // frame having user activation is in the case of tab-focusing. In that case, 38783+ // this function is not called and focus is blanket allowed. 38784+ bool AllowFocusWithoutUserActivation(); 38785+ 38786 // Tells the frame to check whether its load has completed, based on the state 38787 // of its subframes, etc. 38788 virtual void CheckCompleted() = 0; 38789@@ -456,6 +464,12 @@ class CORE_EXPORT Frame : public GarbageCollected<Frame> { 38790 // null. The child frame's parent must be set in the constructor. 38791 void InsertAfter(Frame* new_child, Frame* previous_sibling); 38792 38793+ // Returns true if this frame pulling focus will cause focus to traverse 38794+ // across a fenced frame boundary. This handles checking for focus entering 38795+ // a fenced frame, as well as focus leaving a fenced frames. 38796+ // Note: This is only called if fenced frames are enabled with ShadowDOM 38797+ bool FocusCrossesFencedBoundary(); 38798+ 38799 Member<FrameClient> client_; 38800 const Member<WindowProxyManager> window_proxy_manager_; 38801 FrameLifecycle lifecycle_; 38802diff --git a/src/third_party/blink/renderer/core/frame/local_dom_window.cc b/src/third_party/blink/renderer/core/frame/local_dom_window.cc 38803index 8603b70eac90a..53e32c5940986 38804--- a/src/third_party/blink/renderer/core/frame/local_dom_window.cc 38805+++ b/src/third_party/blink/renderer/core/frame/local_dom_window.cc 38806@@ -143,9 +143,6 @@ 38807 #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" 38808 #include "ui/display/screen_info.h" 38809 #include "v8/include/v8.h" 38810-#if BUILDFLAG(IS_OHOS) 38811-#include "ohos_adapter_helper.h" 38812-#endif 38813 namespace blink { 38814 38815 namespace { 38816@@ -1599,35 +1596,10 @@ ScriptPromise LocalDOMWindow::getComputedAccessibleNode( 38817 } 38818 38819 double LocalDOMWindow::devicePixelRatio() const { 38820-#if BUILDFLAG(IS_OHOS) 38821- static double ratio = 0; 38822- if (!ratio) { 38823- auto display_manager_adapter = 38824- OHOS::NWeb::OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 38825- if (display_manager_adapter == nullptr) { 38826- LOG(ERROR) << "display_manager_adapter is nullptr."; 38827- return 0.0; 38828- } 38829- auto display = display_manager_adapter->GetDefaultDisplay(); 38830- if (display == nullptr) { 38831- LOG(ERROR) << "display is nullptr."; 38832- return 0.0; 38833- } 38834- ratio = display->GetVirtualPixelRatio(); 38835- if (ratio <= 0) { 38836- LOG(ERROR) << "invalid ratio, ratio = " << ratio; 38837- ratio = 0; 38838- return 0.0; 38839- } 38840- } 38841- 38842- return ratio; 38843-#else 38844 if (!GetFrame()) 38845 return 0.0; 38846 38847 return GetFrame()->DevicePixelRatio(); 38848-#endif 38849 } 38850 38851 void LocalDOMWindow::scrollBy(double x, double y) const { 38852diff --git a/src/third_party/blink/renderer/core/frame/local_frame.cc b/src/third_party/blink/renderer/core/frame/local_frame.cc 38853index 1ab6e2fe3876a..897202c75cb87 38854--- a/src/third_party/blink/renderer/core/frame/local_frame.cc 38855+++ b/src/third_party/blink/renderer/core/frame/local_frame.cc 38856@@ -1570,60 +1570,40 @@ static bool CanAccessAncestor(const SecurityOrigin& active_security_origin, 38857 return false; 38858 } 38859 38860-// `initiating_frame` - The frame that CanNavigate was initially requested for. 38861-// `source_frame` - The frame that is currently being tested to see if it can 38862-// navigate `target_frame`. 38863-// `target_frame` - The frame to be navigated. 38864-// `destination_url` - The URL to navigate to on `target_frame`. 38865-static bool CanNavigateHelper(LocalFrame& initiating_frame, 38866- const Frame& source_frame, 38867- const Frame& target_frame, 38868- const KURL& destination_url) { 38869- // The only time the helper is called with a different `initiating_frame` from 38870- // its `source_frame` is to recursively check if ancestors can navigate the 38871- // top frame. 38872- DCHECK(&initiating_frame == &source_frame || 38873- target_frame == initiating_frame.Tree().Top()); 38874- 38875- // Only report navigation blocking on the initial call to CanNavigateHelper, 38876- // not the recursive calls. 38877- bool should_report = &initiating_frame == &source_frame; 38878- 38879- if (&target_frame == &source_frame) 38880+bool LocalFrame::CanNavigate(const Frame& target_frame, 38881+ const KURL& destination_url) { 38882+ // https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-navigate 38883+ // If source is target, then return true. 38884+ if (&target_frame == this) 38885 return true; 38886 38887 // Navigating window.opener cross origin, without user activation. See 38888 // https://crbug.com/813643. 38889- if (should_report && source_frame.Opener() == target_frame && 38890- !source_frame.HasTransientUserActivation() && 38891+ if (Opener() == target_frame && !HasTransientUserActivation(this) && 38892 !target_frame.GetSecurityContext()->GetSecurityOrigin()->CanAccess( 38893 SecurityOrigin::Create(destination_url).get())) { 38894- UseCounter::Count(initiating_frame.GetDocument(), 38895+ UseCounter::Count(GetDocument(), 38896 WebFeature::kOpenerNavigationWithoutGesture); 38897 } 38898 38899 if (destination_url.ProtocolIsJavaScript() && 38900- !source_frame.GetSecurityContext()->GetSecurityOrigin()->CanAccess( 38901+ !GetSecurityContext()->GetSecurityOrigin()->CanAccess( 38902 target_frame.GetSecurityContext()->GetSecurityOrigin())) { 38903- if (should_report) { 38904- initiating_frame.PrintNavigationErrorMessage( 38905- target_frame, 38906- "The frame attempting navigation must be same-origin with the target " 38907- "if navigating to a javascript: url"); 38908- } 38909+ PrintNavigationErrorMessage( 38910+ target_frame, 38911+ "The frame attempting navigation must be same-origin with the target " 38912+ "if navigating to a javascript: url"); 38913 return false; 38914 } 38915 38916- if (source_frame.GetSecurityContext()->IsSandboxed( 38917+ if (GetSecurityContext()->IsSandboxed( 38918 network::mojom::blink::WebSandboxFlags::kNavigation)) { 38919- if (!target_frame.Tree().IsDescendantOf(&source_frame) && 38920+ if (!target_frame.Tree().IsDescendantOf(this) && 38921 !target_frame.IsMainFrame()) { 38922- if (should_report) { 38923- initiating_frame.PrintNavigationErrorMessage( 38924- target_frame, 38925- "The frame attempting navigation is sandboxed, and is therefore " 38926- "disallowed from navigating its ancestors."); 38927- } 38928+ PrintNavigationErrorMessage( 38929+ target_frame, 38930+ "The frame attempting navigation is sandboxed, and is therefore " 38931+ "disallowed from navigating its ancestors."); 38932 return false; 38933 } 38934 38935@@ -1631,91 +1611,80 @@ static bool CanNavigateHelper(LocalFrame& initiating_frame, 38936 // 'allow-sandbox-escape-via-popup' flag is specified, or if 38937 // 'allow-popups' flag is specified, or if the 38938 if (target_frame.IsMainFrame() && 38939- target_frame != source_frame.Tree().Top() && 38940- source_frame.GetSecurityContext()->IsSandboxed( 38941+ target_frame != Tree().Top() && 38942+ GetSecurityContext()->IsSandboxed( 38943 network::mojom::blink::WebSandboxFlags:: 38944 kPropagatesToAuxiliaryBrowsingContexts) && 38945- (source_frame.GetSecurityContext()->IsSandboxed( 38946+ (GetSecurityContext()->IsSandboxed( 38947 network::mojom::blink::WebSandboxFlags::kPopups) || 38948- target_frame.Opener() != &source_frame)) { 38949- if (should_report) { 38950- initiating_frame.PrintNavigationErrorMessage( 38951- target_frame, 38952- "The frame attempting navigation is sandboxed and is trying " 38953- "to navigate a popup, but is not the popup's opener and is not " 38954- "set to propagate sandboxing to popups."); 38955- } 38956+ target_frame.Opener() != this)) { 38957+ PrintNavigationErrorMessage( 38958+ target_frame, 38959+ "The frame attempting navigation is sandboxed and is trying " 38960+ "to navigate a popup, but is not the popup's opener and is not " 38961+ "set to propagate sandboxing to popups."); 38962 return false; 38963 } 38964 38965 // Top navigation is forbidden in sandboxed frames unless opted-in, and only 38966 // then if the ancestor chain allowed to navigate the top frame. 38967- if (target_frame == source_frame.Tree().Top()) { 38968- if (source_frame.GetSecurityContext()->IsSandboxed( 38969+ if (target_frame == Tree().Top()) { 38970+ if (GetSecurityContext()->IsSandboxed( 38971 network::mojom::blink::WebSandboxFlags::kTopNavigation) && 38972- source_frame.GetSecurityContext()->IsSandboxed( 38973+ GetSecurityContext()->IsSandboxed( 38974 network::mojom::blink::WebSandboxFlags:: 38975 kTopNavigationByUserActivation)) { 38976- if (should_report) { 38977- initiating_frame.PrintNavigationErrorMessage( 38978- target_frame, 38979- "The frame attempting navigation of the top-level window is " 38980- "sandboxed, but the flag of 'allow-top-navigation' or " 38981- "'allow-top-navigation-by-user-activation' is not set."); 38982- } 38983+ PrintNavigationErrorMessage( 38984+ target_frame, 38985+ "The frame attempting navigation of the top-level window is " 38986+ "sandboxed, but the flag of 'allow-top-navigation' or " 38987+ "'allow-top-navigation-by-user-activation' is not set."); 38988 return false; 38989 } 38990 38991- if (source_frame.GetSecurityContext()->IsSandboxed( 38992+ if (GetSecurityContext()->IsSandboxed( 38993 network::mojom::blink::WebSandboxFlags::kTopNavigation) && 38994- !source_frame.GetSecurityContext()->IsSandboxed( 38995+ !GetSecurityContext()->IsSandboxed( 38996 network::mojom::blink::WebSandboxFlags:: 38997 kTopNavigationByUserActivation) && 38998- !source_frame.HasTransientUserActivation()) { 38999- if (should_report) { 39000- // With only 'allow-top-navigation-by-user-activation' (but not 39001- // 'allow-top-navigation'), top navigation requires a user gesture. 39002- initiating_frame.GetLocalFrameHostRemote().DidBlockNavigation( 39003- destination_url, initiating_frame.GetDocument()->Url(), 39004+ !HasTransientUserActivation(this)) { 39005+ GetLocalFrameHostRemote().DidBlockNavigation( 39006+ destination_url, GetDocument()->Url(), 39007 mojom::NavigationBlockedReason:: 39008 kRedirectWithNoUserGestureSandbox); 39009- initiating_frame.PrintNavigationErrorMessage( 39010+ PrintNavigationErrorMessage( 39011 target_frame, 39012 "The frame attempting navigation of the top-level window is " 39013 "sandboxed with the 'allow-top-navigation-by-user-activation' " 39014 "flag, but has no user activation (aka gesture). See " 39015 "https://www.chromestatus.com/feature/5629582019395584."); 39016- } 39017 return false; 39018 } 39019 39020- // If the nearest non-sandboxed ancestor frame is not allowed to navigate, 39021- // then this sandboxed frame can't either. This prevents a cross-origin 39022- // frame from embedding a sandboxed iframe with kTopNavigate from 39023- // navigating the top frame. See (crbug.com/1145553) 39024- if (Frame* parent_frame = source_frame.Tree().Parent()) { 39025- bool parent_can_navigate = CanNavigateHelper( 39026- initiating_frame, *parent_frame, target_frame, destination_url); 39027- if (!parent_can_navigate) { 39028- if (should_report) { 39029- String message = 39030- "The frame attempting navigation of the top-level window is " 39031- "sandboxed and is not allowed to navigate since its ancestor " 39032- "frame " + 39033- FrameDescription(*parent_frame) + 39034- " is unable to navigate the top frame.\n"; 39035- initiating_frame.PrintNavigationErrorMessage(target_frame, message); 39036- } 39037- return false; 39038- } 39039+ // This is a "last line of defense" to prevent a cross-origin document 39040+ // from escalating its own top-navigation privileges. See 39041+ // `PolicyContainerPolicies::can_navigate_top_without_user_gesture` 39042+ // for the cases where this would be allowed or disallowed. 39043+ // See (crbug.com/1145553) and (crbug.com/1251790). 39044+ if (!DomWindow() 39045+ ->GetExecutionContext() 39046+ ->GetPolicyContainer() 39047+ ->GetPolicies() 39048+ .can_navigate_top_without_user_gesture && 39049+ !HasStickyUserActivation()) { 39050+ String message = 39051+ "The frame attempting to navigate the top-level window is " 39052+ "cross-origin and either it or one of its ancestors is not " 39053+ "allowed to navigate the top frame.\n"; 39054+ PrintNavigationErrorMessage(target_frame, message); 39055+ return false; 39056 } 39057 return true; 39058 } 39059 } 39060 39061- DCHECK(source_frame.GetSecurityContext()->GetSecurityOrigin()); 39062- const SecurityOrigin& origin = 39063- *source_frame.GetSecurityContext()->GetSecurityOrigin(); 39064+ DCHECK(GetSecurityContext()->GetSecurityOrigin()); 39065+ const SecurityOrigin& origin = *GetSecurityContext()->GetSecurityOrigin(); 39066 39067 // This is the normal case. A document can navigate its decendant frames, 39068 // or, more generally, a document can navigate a frame if the document is 39069@@ -1739,17 +1708,17 @@ static bool CanNavigateHelper(LocalFrame& initiating_frame, 39070 // and/or "parent" relation). Requiring some sort of relation prevents a 39071 // document from navigating arbitrary, unrelated top-level frames. 39072 if (!target_frame.Tree().Parent()) { 39073- if (target_frame == source_frame.Opener()) 39074+ if (target_frame == Opener()) 39075 return true; 39076 if (CanAccessAncestor(origin, target_frame.Opener())) 39077 return true; 39078 } 39079 39080- if (target_frame == source_frame.Tree().Top()) { 39081+ if (target_frame == Tree().Top()) { 39082 // A frame navigating its top may blocked if the document initiating 39083 // the navigation has never received a user gesture and the navigation 39084 // isn't same-origin with the target. 39085- if (source_frame.HasStickyUserActivation() || 39086+ if (HasStickyUserActivation() || 39087 target_frame.GetSecurityContext()->GetSecurityOrigin()->CanAccess( 39088 SecurityOrigin::Create(destination_url).get())) { 39089 return true; 39090@@ -1769,44 +1738,29 @@ static bool CanNavigateHelper(LocalFrame& initiating_frame, 39091 return true; 39092 } 39093 39094- // We skip this check for recursive calls on remote frames, in which case 39095- // we're less permissive. 39096- if (const LocalFrame* local_frame = DynamicTo<LocalFrame>(&source_frame)) { 39097- if (auto* settings_client = 39098- local_frame->Client()->GetContentSettingsClient()) { 39099- if (settings_client->AllowPopupsAndRedirects(false /* default_value*/)) 39100- return true; 39101- } 39102- } 39103- 39104- if (should_report) { 39105- initiating_frame.PrintNavigationErrorMessage( 39106- target_frame, 39107- "The frame attempting navigation is targeting its top-level window, " 39108- "but is neither same-origin with its target nor has it received a " 39109- "user gesture. See " 39110- "https://www.chromestatus.com/feature/5851021045661696."); 39111- initiating_frame.GetLocalFrameHostRemote().DidBlockNavigation( 39112- destination_url, initiating_frame.GetDocument()->Url(), 39113- mojom::NavigationBlockedReason::kRedirectWithNoUserGesture); 39114+ if (auto* settings_client = Client()->GetContentSettingsClient()) { 39115+ if (settings_client->AllowPopupsAndRedirects(false /* default_value*/)) 39116+ return true; 39117 } 39118+ PrintNavigationErrorMessage( 39119+ target_frame, 39120+ "The frame attempting navigation is targeting its top-level window, " 39121+ "but is neither same-origin with its target nor has it received a " 39122+ "user gesture. See " 39123+ "https://www.chromestatus.com/feature/5851021045661696."); 39124+ GetLocalFrameHostRemote().DidBlockNavigation( 39125+ destination_url, GetDocument()->Url(), 39126+ mojom::blink::NavigationBlockedReason::kRedirectWithNoUserGesture); 39127 39128 } else { 39129- if (should_report) { 39130- initiating_frame.PrintNavigationErrorMessage( 39131- target_frame, 39132- "The frame attempting navigation is neither same-origin with the " 39133- "target, nor is it the target's parent or opener."); 39134- } 39135+ PrintNavigationErrorMessage( 39136+ target_frame, 39137+ "The frame attempting navigation is neither same-origin with the " 39138+ "target, nor is it the target's parent or opener."); 39139 } 39140 return false; 39141 } 39142 39143-bool LocalFrame::CanNavigate(const Frame& target_frame, 39144- const KURL& destination_url) { 39145- return CanNavigateHelper(*this, *this, target_frame, destination_url); 39146-} 39147- 39148 ContentCaptureManager* LocalFrame::GetContentCaptureManager() { 39149 DCHECK(Client()); 39150 if (!IsLocalRoot()) 39151diff --git a/src/third_party/blink/renderer/core/frame/local_frame_view.cc b/src/third_party/blink/renderer/core/frame/local_frame_view.cc 39152index ec423d63e46c7..c9b41913f754a 39153--- a/src/third_party/blink/renderer/core/frame/local_frame_view.cc 39154+++ b/src/third_party/blink/renderer/core/frame/local_frame_view.cc 39155@@ -230,47 +230,13 @@ constexpr int kCommitDelayDefaultInMs = 500; // 30 frames @ 60hz 39156 // returning. 39157 static const unsigned kMaxUpdatePluginsIterations = 2; 39158 39159-#if BUILDFLAG(IS_OHOS) 39160-void LocalFrameView::SetInitalLayoutRatio() { 39161- static double ratio = 0; 39162- if (!ratio) { 39163- display_manager_adapter_ = 39164- OHOS::NWeb::OhosAdapterHelper::GetInstance().CreateDisplayMgrAdapter(); 39165- if (display_manager_adapter_ == nullptr) { 39166- LOG(ERROR) << "display_manager_adapter is nullptr."; 39167- return; 39168- } 39169- std::shared_ptr<OHOS::NWeb::DisplayAdapter> display = 39170- display_manager_adapter_->GetDefaultDisplay(); 39171- if (display == nullptr) { 39172- LOG(ERROR) << "display is nullptr."; 39173- return; 39174- } 39175- ratio = display->GetVirtualPixelRatio(); 39176- if (ratio <= 0) { 39177- LOG(ERROR) << "invalid ratio."; 39178- ratio = 0; 39179- return; 39180- } 39181- LOG(INFO) << "SetInitalLayoutRatio ratio = " << ratio; 39182- } 39183- initial_layout_size_ratio_ = ratio; 39184-} 39185-#endif 39186- 39187 LocalFrameView::LocalFrameView(LocalFrame& frame) 39188 : LocalFrameView(frame, gfx::Rect()) { 39189-#if BUILDFLAG(IS_OHOS) 39190- SetInitalLayoutRatio(); 39191-#endif 39192 Show(); 39193 } 39194 39195 LocalFrameView::LocalFrameView(LocalFrame& frame, const gfx::Size& initial_size) 39196 : LocalFrameView(frame, gfx::Rect(gfx::Point(), initial_size)) { 39197-#if BUILDFLAG(IS_OHOS) 39198- SetInitalLayoutRatio(); 39199-#endif 39200 SetLayoutSizeInternal(initial_size); 39201 Show(); 39202 } 39203@@ -331,9 +297,6 @@ LocalFrameView::LocalFrameView(LocalFrame& frame, gfx::Rect frame_rect) 39204 is_updating_layout_(false) 39205 #endif 39206 { 39207-#if BUILDFLAG(IS_OHOS) 39208- SetInitalLayoutRatio(); 39209-#endif 39210 // Propagate the marginwidth/height and scrolling modes to the view. 39211 if (frame_->Owner() && frame_->Owner()->ScrollbarMode() == 39212 mojom::blink::ScrollbarMode::kAlwaysOff) 39213@@ -1411,12 +1374,7 @@ void LocalFrameView::SetLayoutSize(const gfx::Size& size) { 39214 frame_->GetDocument()->Lifecycle().LifecyclePostponed()) 39215 return; 39216 39217-#if BUILDFLAG(IS_OHOS) 39218- SetLayoutSizeInternal(gfx::Size(size.width() / initial_layout_size_ratio_, 39219- size.height() / initial_layout_size_ratio_)); 39220-#else 39221 SetLayoutSizeInternal(size); 39222-#endif 39223 } 39224 39225 void LocalFrameView::SetLayoutSizeFixedToFrameSize(bool is_fixed) { 39226diff --git a/src/third_party/blink/renderer/core/frame/policy_container.cc b/src/third_party/blink/renderer/core/frame/policy_container.cc 39227index e70464d5ef04f..9dd007a677608 39228--- a/src/third_party/blink/renderer/core/frame/policy_container.cc 39229+++ b/src/third_party/blink/renderer/core/frame/policy_container.cc 39230@@ -37,7 +37,8 @@ std::unique_ptr<PolicyContainer> PolicyContainer::CreateFromWebPolicyContainer( 39231 container->policies.referrer_policy, 39232 container->policies.ip_address_space, 39233 ConvertToMojoBlink( 39234- std::move(container->policies.content_security_policies))); 39235+ std::move(container->policies.content_security_policies)), 39236+ container->policies.can_navigate_top_without_user_gesture); 39237 return std::make_unique<PolicyContainer>(std::move(container->remote), 39238 std::move(policies)); 39239 } 39240diff --git a/src/third_party/blink/renderer/core/frame/policy_container_test.cc b/src/third_party/blink/renderer/core/frame/policy_container_test.cc 39241index b093dbc5a6bd8..a62965150efe1 39242--- a/src/third_party/blink/renderer/core/frame/policy_container_test.cc 39243+++ b/src/third_party/blink/renderer/core/frame/policy_container_test.cc 39244@@ -16,7 +16,8 @@ TEST(PolicyContainerTest, MembersAreSetDuringConstruction) { 39245 auto policies = mojom::blink::PolicyContainerPolicies::New( 39246 network::mojom::blink::ReferrerPolicy::kNever, 39247 network::mojom::blink::IPAddressSpace::kPrivate, 39248- Vector<network::mojom::blink::ContentSecurityPolicyPtr>()); 39249+ Vector<network::mojom::blink::ContentSecurityPolicyPtr>(), 39250+ /*can_navigate_top_without_user_gesture=*/true); 39251 PolicyContainer policy_container(host.BindNewEndpointAndPassDedicatedRemote(), 39252 std::move(policies)); 39253 39254@@ -31,7 +32,8 @@ TEST(PolicyContainerTest, UpdateReferrerPolicyIsPropagated) { 39255 auto policies = mojom::blink::PolicyContainerPolicies::New( 39256 network::mojom::blink::ReferrerPolicy::kAlways, 39257 network::mojom::blink::IPAddressSpace::kPublic, 39258- Vector<network::mojom::blink::ContentSecurityPolicyPtr>()); 39259+ Vector<network::mojom::blink::ContentSecurityPolicyPtr>(), 39260+ /*can_navigate_top_without_user_gesture=*/true); 39261 PolicyContainer policy_container(host.BindNewEndpointAndPassDedicatedRemote(), 39262 std::move(policies)); 39263 39264diff --git a/src/third_party/blink/renderer/core/frame/settings.h b/src/third_party/blink/renderer/core/frame/settings.h 39265index a4d0d886b379f..f2739a6a9e749 39266--- a/src/third_party/blink/renderer/core/frame/settings.h 39267+++ b/src/third_party/blink/renderer/core/frame/settings.h 39268@@ -67,6 +67,21 @@ class CORE_EXPORT Settings { 39269 39270 SETTINGS_GETTERS_AND_SETTERS 39271 39272+#if BUILDFLAG(IS_OHOS) 39273+ void SetVerticalHideScrollbars(bool hide_vertical_scrollbars) { 39274+ hide_vertical_scrollbars_ = hide_vertical_scrollbars; 39275+ } 39276+ void SetHorizontalHideScrollbars(bool hide_horizontal_scrollbars) { 39277+ hide_horizontal_scrollbars_ = hide_horizontal_scrollbars; 39278+ } 39279+ bool GetVerticalHideScrollbars() { 39280+ return hide_vertical_scrollbars_; 39281+ } 39282+ bool GetHorizontalHideScrollbars() { 39283+ return hide_horizontal_scrollbars_; 39284+ } 39285+#endif 39286+ 39287 void SetDelegate(SettingsDelegate*); 39288 39289 private: 39290@@ -77,6 +92,11 @@ class CORE_EXPORT Settings { 39291 GenericFontFamilySettings generic_font_family_settings_; 39292 39293 SETTINGS_MEMBER_VARIABLES 39294+ 39295+#if BUILDFLAG(IS_OHOS) 39296+ bool hide_vertical_scrollbars_ = true; 39297+ bool hide_horizontal_scrollbars_ = true; 39298+#endif 39299 }; 39300 39301 } // namespace blink 39302diff --git a/src/third_party/blink/renderer/core/frame/visual_viewport.cc b/src/third_party/blink/renderer/core/frame/visual_viewport.cc 39303index 4d63c50a1374d..cef756a84342c 39304--- a/src/third_party/blink/renderer/core/frame/visual_viewport.cc 39305+++ b/src/third_party/blink/renderer/core/frame/visual_viewport.cc 39306@@ -644,11 +644,23 @@ void VisualViewport::InitializeScrollbars() { 39307 39308 scrollbar_layer_horizontal_ = nullptr; 39309 scrollbar_layer_vertical_ = nullptr; 39310+#if BUILDFLAG(IS_OHOS) 39311+ if (VisualViewportSuppliesScrollbars() && 39312+ !GetPage().GetSettings().GetHideScrollbars()) { 39313+ if (!GetPage().GetSettings().GetVerticalHideScrollbars()) { 39314+ UpdateScrollbarLayer(kVerticalScrollbar); 39315+ } 39316+ if (!GetPage().GetSettings().GetHorizontalHideScrollbars()) { 39317+ UpdateScrollbarLayer(kHorizontalScrollbar); 39318+ } 39319+ } 39320+#else 39321 if (VisualViewportSuppliesScrollbars() && 39322 !GetPage().GetSettings().GetHideScrollbars()) { 39323 UpdateScrollbarLayer(kHorizontalScrollbar); 39324 UpdateScrollbarLayer(kVerticalScrollbar); 39325 } 39326+#endif 39327 39328 // Ensure existing LocalFrameView scrollbars are removed if the visual 39329 // viewport scrollbars are now supplied, or created if the visual viewport no 39330@@ -1134,7 +1146,32 @@ void VisualViewport::Paint(GraphicsContext& context) const { 39331 DisplayItem::kForeignLayerViewportScroll, scroll_layer_, 39332 gfx::Point(), &state); 39333 } 39334+#if BUILDFLAG(IS_OHOS) 39335+ if (scrollbar_layer_horizontal_ && !GetPage().GetSettings().GetHorizontalHideScrollbars()) { 39336+ auto state = parent_property_tree_state_; 39337+ state.SetEffect(*horizontal_scrollbar_effect_node_); 39338+ DEFINE_STATIC_LOCAL(Persistent<LiteralDebugNameClient>, debug_name_client, 39339+ (MakeGarbageCollected<LiteralDebugNameClient>( 39340+ "Inner Viewport Horizontal Scrollbar"))); 39341+ RecordForeignLayer(context, *debug_name_client, 39342+ DisplayItem::kForeignLayerViewportScrollbar, 39343+ scrollbar_layer_horizontal_, 39344+ gfx::Point(0, size_.height() - ScrollbarThickness()), 39345+ &state); 39346+ } 39347 39348+ if (scrollbar_layer_vertical_ && !GetPage().GetSettings().GetVerticalHideScrollbars()) { 39349+ auto state = parent_property_tree_state_; 39350+ state.SetEffect(*vertical_scrollbar_effect_node_); 39351+ DEFINE_STATIC_LOCAL(Persistent<LiteralDebugNameClient>, debug_name_client, 39352+ (MakeGarbageCollected<LiteralDebugNameClient>( 39353+ "Inner Viewport Vertical Scrollbar"))); 39354+ RecordForeignLayer( 39355+ context, *debug_name_client, 39356+ DisplayItem::kForeignLayerViewportScrollbar, scrollbar_layer_vertical_, 39357+ gfx::Point(size_.width() - ScrollbarThickness(), 0), &state); 39358+ } 39359+#else 39360 if (scrollbar_layer_horizontal_) { 39361 auto state = parent_property_tree_state_; 39362 state.SetEffect(*horizontal_scrollbar_effect_node_); 39363@@ -1159,6 +1196,7 @@ void VisualViewport::Paint(GraphicsContext& context) const { 39364 DisplayItem::kForeignLayerViewportScrollbar, scrollbar_layer_vertical_, 39365 gfx::Point(size_.width() - ScrollbarThickness(), 0), &state); 39366 } 39367+#endif 39368 } 39369 39370 } // namespace blink 39371diff --git a/src/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc b/src/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc 39372index 63a7a291c771b..d0e1377c7ec9b 39373--- a/src/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc 39374+++ b/src/third_party/blink/renderer/core/html/forms/multiple_fields_temporal_input_type_view.cc 39375@@ -448,13 +448,10 @@ void MultipleFieldsTemporalInputTypeView::HandleFocusInEvent( 39376 if (GetElement().GetDocument().GetPage()) 39377 GetElement().GetDocument().GetPage()->GetFocusController().AdvanceFocus( 39378 type); 39379- } else if (type == mojom::blink::FocusType::kNone || 39380- type == mojom::blink::FocusType::kMouse || 39381- type == mojom::blink::FocusType::kPage || 39382- type == mojom::blink::FocusType::kAccessKey) { 39383- edit->FocusByOwner(old_focused_element); 39384- } else { 39385+ } else if (type == mojom::blink::FocusType::kForward) { 39386 edit->FocusByOwner(); 39387+ } else { 39388+ edit->FocusByOwner(old_focused_element); 39389 } 39390 } 39391 39392diff --git a/src/third_party/blink/renderer/core/html/html_or_foreign_element.idl b/src/third_party/blink/renderer/core/html/html_or_foreign_element.idl 39393index e15efe2f853d1..2036817c21cac 39394--- a/src/third_party/blink/renderer/core/html/html_or_foreign_element.idl 39395+++ b/src/third_party/blink/renderer/core/html/html_or_foreign_element.idl 39396@@ -11,6 +11,6 @@ interface mixin HTMLOrForeignElement { 39397 39398 [CEReactions, Reflect] attribute boolean autofocus; 39399 [CEReactions] attribute long tabIndex; 39400- void focus(optional FocusOptions options = {}); 39401+ [ImplementedAs=focusForBindings] void focus(optional FocusOptions options = {}); 39402 void blur(); 39403 }; 39404diff --git a/src/third_party/blink/renderer/core/inspector/inspector_media_context_impl.cc b/src/third_party/blink/renderer/core/inspector/inspector_media_context_impl.cc 39405index c0965693783d5..6e89262ca229b 39406--- a/src/third_party/blink/renderer/core/inspector/inspector_media_context_impl.cc 39407+++ b/src/third_party/blink/renderer/core/inspector/inspector_media_context_impl.cc 39408@@ -109,9 +109,13 @@ void MediaInspectorContextImpl::TrimPlayer(const WebString& playerId) { 39409 39410 void MediaInspectorContextImpl::CullPlayers(const WebString& prefer_keep) { 39411 // Erase all the dead players, but only erase the required number of others. 39412- for (const auto& playerId : dead_players_) 39413+ while (!dead_players_.IsEmpty()) { 39414+ auto playerId = dead_players_.back(); 39415+ // remove it first, since |RemovePlayer| can cause a GC event which can 39416+ // potentially caues more players to get added to |dead_players_|. 39417+ dead_players_.pop_back(); 39418 RemovePlayer(playerId); 39419- dead_players_.clear(); 39420+ } 39421 39422 while (!expendable_players_.IsEmpty()) { 39423 if (total_event_count_ <= kMaxCachedPlayerEvents) 39424diff --git a/src/third_party/blink/renderer/core/loader/frame_loader_test.cc b/src/third_party/blink/renderer/core/loader/frame_loader_test.cc 39425index a0dce40840771..acd12bea8de97 39426--- a/src/third_party/blink/renderer/core/loader/frame_loader_test.cc 39427+++ b/src/third_party/blink/renderer/core/loader/frame_loader_test.cc 39428@@ -147,7 +147,8 @@ TEST_F(FrameLoaderTest, PolicyContainerIsStoredOnCommitNavigation) { 39429 EXPECT_EQ(*mojom::blink::PolicyContainerPolicies::New( 39430 network::mojom::ReferrerPolicy::kAlways, 39431 network::mojom::IPAddressSpace::kPublic, 39432- Vector<network::mojom::blink::ContentSecurityPolicyPtr>()), 39433+ Vector<network::mojom::blink::ContentSecurityPolicyPtr>(), 39434+ /*can_navigate_top_without_user_gesture=*/true), 39435 local_frame->DomWindow()->GetPolicyContainer()->GetPolicies()); 39436 } 39437 39438diff --git a/src/third_party/blink/renderer/core/loader/web_associated_url_loader_impl.cc b/src/third_party/blink/renderer/core/loader/web_associated_url_loader_impl.cc 39439index 4de2d8c49cb6e..21f11a9a76f2b 39440--- a/src/third_party/blink/renderer/core/loader/web_associated_url_loader_impl.cc 39441+++ b/src/third_party/blink/renderer/core/loader/web_associated_url_loader_impl.cc 39442@@ -88,7 +88,7 @@ class HTTPRequestHeaderValidator : public WebHTTPHeaderVisitor { 39443 void HTTPRequestHeaderValidator::VisitHeader(const WebString& name, 39444 const WebString& value) { 39445 is_safe_ = is_safe_ && IsValidHTTPToken(name) && 39446- !cors::IsForbiddenHeaderName(name) && 39447+ !cors::IsForbiddenRequestHeader(name, value) && 39448 IsValidHTTPHeaderValue(value); 39449 } 39450 39451@@ -377,7 +377,7 @@ void WebAssociatedURLLoaderImpl::LoadAsynchronously( 39452 // consult it separately, if set. 39453 if (request.ReferrerString() != 39454 blink::WebString(Referrer::ClientReferrerString())) { 39455- DCHECK(cors::IsForbiddenHeaderName("Referer")); 39456+ DCHECK(cors::IsForbiddenRequestHeader("Referer", "")); 39457 // `Referer` is a forbidden header name, so we must disallow this to 39458 // load. 39459 allow_load = false; 39460diff --git a/src/third_party/blink/renderer/core/page/focus_controller.cc b/src/third_party/blink/renderer/core/page/focus_controller.cc 39461index 9d76b0642bc8c..95e5f3d4d3741 39462--- a/src/third_party/blink/renderer/core/page/focus_controller.cc 39463+++ b/src/third_party/blink/renderer/core/page/focus_controller.cc 39464@@ -1305,6 +1305,7 @@ bool FocusController::SetFocusedElement(Element* element, 39465 SetFocusedFrame(nullptr); 39466 return false; 39467 } 39468+ 39469 SetFocusedFrame(new_focused_frame); 39470 39471 if (new_document) { 39472diff --git a/src/third_party/blink/renderer/core/page/page.cc b/src/third_party/blink/renderer/core/page/page.cc 39473index 321818f9dbf4d..5dfffea91de43 39474--- a/src/third_party/blink/renderer/core/page/page.cc 39475+++ b/src/third_party/blink/renderer/core/page/page.cc 39476@@ -104,6 +104,7 @@ const int kMaxNumberOfFrames = 1000; 39477 const int kTenFrames = 10; 39478 39479 bool g_limit_max_frames_to_ten_for_testing = false; 39480+ 39481 } // namespace 39482 39483 // Function defined in third_party/blink/public/web/blink.h. 39484@@ -189,6 +190,11 @@ Page::Page(base::PassKey<Page>, 39485 bool is_ordinary) 39486 : SettingsDelegate(std::make_unique<Settings>()), 39487 main_frame_(nullptr), 39488+ fenced_frames_impl_( 39489+ features::IsFencedFramesEnabled() 39490+ ? absl::optional<features::FencedFramesImplementationType>( 39491+ features::kFencedFramesImplementationTypeParam.Get()) 39492+ : absl::nullopt), 39493 agent_group_scheduler_(agent_group_scheduler), 39494 animator_(MakeGarbageCollected<PageAnimator>(*this)), 39495 autoscroll_controller_(MakeGarbageCollected<AutoscrollController>(*this)), 39496@@ -628,10 +634,10 @@ void CheckFrameCountConsistency(int expected_frame_count, Frame* frame) { 39497 // a fenced frame and creates a new ``DocumentFencedFrames`` object). 39498 if (features::IsFencedFramesMPArchBased()) { 39499 if (auto* local_frame = DynamicTo<LocalFrame>(frame)) { 39500- actual_frame_count += static_cast<int>( 39501- DocumentFencedFrames::From(*local_frame->GetDocument()) 39502- .GetFencedFrames() 39503- .size()); 39504+ actual_frame_count += static_cast<int>( 39505+ DocumentFencedFrames::From(*local_frame->GetDocument()) 39506+ .GetFencedFrames() 39507+ .size()); 39508 } 39509 } 39510 } 39511diff --git a/src/third_party/blink/renderer/core/page/page.h b/src/third_party/blink/renderer/core/page/page.h 39512index f3231c1cbda4a..a83a1aa7fb1bf 39513--- a/src/third_party/blink/renderer/core/page/page.h 39514+++ b/src/third_party/blink/renderer/core/page/page.h 39515@@ -27,6 +27,8 @@ 39516 39517 #include "base/dcheck_is_on.h" 39518 #include "base/types/pass_key.h" 39519+#include "third_party/abseil-cpp/absl/types/optional.h" 39520+#include "third_party/blink/public/common/features.h" 39521 #include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-blink-forward.h" 39522 #include "third_party/blink/public/mojom/frame/text_autosizer_page_info.mojom-blink.h" 39523 #include "third_party/blink/public/mojom/page/page.mojom-blink.h" 39524@@ -208,6 +210,11 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>, 39525 return window_features_; 39526 } 39527 39528+ const absl::optional<features::FencedFramesImplementationType>& 39529+ FencedFramesImplementationType() const { 39530+ return fenced_frames_impl_; 39531+ } 39532+ 39533 PageScaleConstraintsSet& GetPageScaleConstraintsSet(); 39534 const PageScaleConstraintsSet& GetPageScaleConstraintsSet() const; 39535 39536@@ -418,6 +425,9 @@ class CORE_EXPORT Page final : public GarbageCollected<Page>, 39537 // longer needed. 39538 Member<Frame> main_frame_; 39539 39540+ // The type of fenced frames being used. 39541+ absl::optional<features::FencedFramesImplementationType> fenced_frames_impl_; 39542+ 39543 scheduler::WebAgentGroupScheduler& agent_group_scheduler_; 39544 Member<PageAnimator> animator_; 39545 const Member<AutoscrollController> autoscroll_controller_; 39546diff --git a/src/third_party/blink/renderer/core/page/scrolling/element_fragment_anchor.cc b/src/third_party/blink/renderer/core/page/scrolling/element_fragment_anchor.cc 39547index 25a286558b65c..de3628676a5e5 39548--- a/src/third_party/blink/renderer/core/page/scrolling/element_fragment_anchor.cc 39549+++ b/src/third_party/blink/renderer/core/page/scrolling/element_fragment_anchor.cc 39550@@ -9,6 +9,7 @@ 39551 #include "third_party/blink/renderer/core/display_lock/display_lock_context.h" 39552 #include "third_party/blink/renderer/core/dom/document.h" 39553 #include "third_party/blink/renderer/core/dom/element.h" 39554+#include "third_party/blink/renderer/core/dom/focus_params.h" 39555 #include "third_party/blink/renderer/core/dom/events/event.h" 39556 #include "third_party/blink/renderer/core/dom/node.h" 39557 #include "third_party/blink/renderer/core/editing/frame_selection.h" 39558@@ -199,7 +200,7 @@ void ElementFragmentAnchor::ApplyFocusIfNeeded() { 39559 // clear focus, which matches the behavior of other browsers. 39560 auto* element = DynamicTo<Element>(anchor_node_.Get()); 39561 if (element && element->IsFocusable()) { 39562- element->focus(); 39563+ element->focus(FocusParams(/*gate_on_user_activation=*/true)); 39564 } else { 39565 frame_->GetDocument()->SetSequentialFocusNavigationStartingPoint( 39566 anchor_node_); 39567diff --git a/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc b/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc 39568index b026292ddefd5..1ee39994b0069 39569--- a/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc 39570+++ b/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc 39571@@ -84,6 +84,8 @@ ValidationMessageOverlayDelegate::~ValidationMessageOverlayDelegate() { 39572 EventDispatchForbiddenScope::AllowUserAgentEvents allow_events; 39573 page_->WillBeDestroyed(); 39574 } 39575+ if (destroyed_ptr_) 39576+ *destroyed_ptr_ = true; 39577 } 39578 39579 LocalFrameView& ValidationMessageOverlayDelegate::FrameView() const { 39580@@ -164,7 +166,18 @@ void ValidationMessageOverlayDelegate::CreatePage(const FrameOverlay& overlay) { 39581 // Propagate deprecated DSF for platforms without use-zoom-for-dsf. 39582 page_->SetDeviceScaleFactorDeprecated( 39583 main_page_->DeviceScaleFactorDeprecated()); 39584+ 39585+ // ForceSynchronousDocumentInstall can cause another call to 39586+ // ValidationMessageClientImpl::ShowValidationMessage, which will hide this 39587+ // validation message and may even delete this. In order to avoid continuing 39588+ // when this is destroyed, |destroyed| will be set to true in the destructor. 39589+ bool destroyed = false; 39590+ DCHECK(!destroyed_ptr_); 39591+ destroyed_ptr_ = &destroyed; 39592 frame->ForceSynchronousDocumentInstall("text/html", data); 39593+ if (destroyed) 39594+ return; 39595+ destroyed_ptr_ = nullptr; 39596 39597 Element& main_message = GetElementById("main-message"); 39598 main_message.setTextContent(message_); 39599diff --git a/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.h b/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.h 39600index e9ed36969ccbc..06bdfd2f63742 39601--- a/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.h 39602+++ b/src/third_party/blink/renderer/core/page/validation_message_overlay_delegate.h 39603@@ -71,6 +71,10 @@ class CORE_EXPORT ValidationMessageOverlayDelegate 39604 String sub_message_; 39605 TextDirection message_dir_; 39606 TextDirection sub_message_dir_; 39607+ 39608+ // Used by CreatePage() to determine if this has been deleted in the middle of 39609+ // the function. 39610+ bool* destroyed_ptr_ = nullptr; 39611 }; 39612 39613 } // namespace blink 39614diff --git a/src/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc b/src/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc 39615index a9b0ec0580666..6c219b6b4395d 39616--- a/src/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc 39617+++ b/src/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc 39618@@ -1484,6 +1484,7 @@ bool PaintLayerScrollableArea::NeedsScrollbarReconstruction() const { 39619 return false; 39620 } 39621 39622+#if BUILDFLAG(IS_OHOS) 39623 void PaintLayerScrollableArea::ComputeScrollbarExistence( 39624 bool& needs_horizontal_scrollbar, 39625 bool& needs_vertical_scrollbar, 39626@@ -1499,7 +1500,108 @@ void PaintLayerScrollableArea::ComputeScrollbarExistence( 39627 needs_vertical_scrollbar = false; 39628 return; 39629 } 39630+ mojom::blink::ScrollbarMode h_mode = mojom::blink::ScrollbarMode::kAuto; 39631+ mojom::blink::ScrollbarMode v_mode = mojom::blink::ScrollbarMode::kAuto; 39632+ bool is_vertical_scrollbars_hide = GetLayoutBox()->GetFrame()->GetSettings()->GetVerticalHideScrollbars(); 39633+ bool is_horizontal_scrollbars_hide = GetLayoutBox()->GetFrame()->GetSettings()->GetHorizontalHideScrollbars(); 39634+ 39635+ // First, determine what behavior the scrollbars say they should have. 39636+ { 39637+ if (auto* layout_view = DynamicTo<LayoutView>(GetLayoutBox())) { 39638+ // LayoutView is special as there's various quirks and settings that 39639+ // style doesn't account for. 39640+ layout_view->CalculateScrollbarModes(h_mode, v_mode); 39641+ h_mode = is_vertical_scrollbars_hide ? mojom::blink::ScrollbarMode::kAlwaysOff : h_mode; 39642+ v_mode = is_horizontal_scrollbars_hide ? mojom::blink::ScrollbarMode::kAlwaysOff : v_mode; 39643+ } else { 39644+ auto overflow_x = GetLayoutBox()->StyleRef().OverflowX(); 39645+ if (overflow_x == EOverflow::kScroll) { 39646+ h_mode = is_horizontal_scrollbars_hide ? mojom::blink::ScrollbarMode::kAlwaysOff : mojom::blink::ScrollbarMode::kAlwaysOn; 39647+ } else if (overflow_x == EOverflow::kHidden || 39648+ overflow_x == EOverflow::kVisible) { 39649+ h_mode = mojom::blink::ScrollbarMode::kAlwaysOff; 39650+ } 39651+ 39652+ auto overflow_y = GetLayoutBox()->StyleRef().OverflowY(); 39653+ if (overflow_y == EOverflow::kScroll) { 39654+ v_mode = is_vertical_scrollbars_hide ? mojom::blink::ScrollbarMode::kAlwaysOff : mojom::blink::ScrollbarMode::kAlwaysOn; 39655+ } else if (overflow_y == EOverflow::kHidden || 39656+ overflow_y == EOverflow::kVisible) { 39657+ v_mode = mojom::blink::ScrollbarMode::kAlwaysOff; 39658+ } 39659+ } 39660 39661+ // Since overlay scrollbars (the fade-in/out kind, not overflow: overlay) 39662+ // only appear when scrolling, we don't create them if there isn't overflow 39663+ // to scroll. Thus, overlay scrollbars can't be "always on". i.e. 39664+ // |overlay:scroll| behaves like |overlay:auto|. 39665+ bool has_custom_scrollbar_style = ScrollbarStyleSource(*GetLayoutBox()) 39666+ .StyleRef() 39667+ .HasCustomScrollbarStyle(); 39668+ bool will_be_overlay = GetPageScrollbarTheme().UsesOverlayScrollbars() && 39669+ !has_custom_scrollbar_style; 39670+ if (will_be_overlay) { 39671+ if (!is_horizontal_scrollbars_hide && h_mode == mojom::blink::ScrollbarMode::kAlwaysOn) 39672+ h_mode = mojom::blink::ScrollbarMode::kAuto; 39673+ if (!is_vertical_scrollbars_hide && v_mode == mojom::blink::ScrollbarMode::kAlwaysOn) 39674+ v_mode = mojom::blink::ScrollbarMode::kAuto; 39675+ } 39676+ } 39677+ 39678+ // By default, don't make any changes. 39679+ needs_horizontal_scrollbar = is_horizontal_scrollbars_hide ? false : HasHorizontalScrollbar(); 39680+ needs_vertical_scrollbar = is_vertical_scrollbars_hide ? false : HasVerticalScrollbar(); 39681+ // If the behavior doesn't depend on overflow or any other information, we 39682+ // can set it now. 39683+ { 39684+ if (h_mode == mojom::blink::ScrollbarMode::kAlwaysOn) 39685+ needs_horizontal_scrollbar = true; 39686+ else if (h_mode == mojom::blink::ScrollbarMode::kAlwaysOff) 39687+ needs_horizontal_scrollbar = false; 39688+ 39689+ if (v_mode == mojom::blink::ScrollbarMode::kAlwaysOn) 39690+ needs_vertical_scrollbar = true; 39691+ else if (v_mode == mojom::blink::ScrollbarMode::kAlwaysOff) 39692+ needs_vertical_scrollbar = false; 39693+ } 39694+ 39695+ // If this is being performed before layout, we want to only update scrollbar 39696+ // existence if its based on purely style based reasons. 39697+ if (option == kOverflowIndependent) 39698+ return; 39699+ 39700+ // If we have clean layout, we can make a decision on any scrollbars that 39701+ // depend on overflow. 39702+ { 39703+ if (!is_horizontal_scrollbars_hide && h_mode == mojom::blink::ScrollbarMode::kAuto) { 39704+ // Don't add auto scrollbars if the box contents aren't visible. 39705+ needs_horizontal_scrollbar = 39706+ GetLayoutBox()->IsRooted() && HasHorizontalOverflow() && 39707+ VisibleContentRect(kIncludeScrollbars).height(); 39708+ } 39709+ if (!is_vertical_scrollbars_hide && v_mode == mojom::blink::ScrollbarMode::kAuto) { 39710+ needs_vertical_scrollbar = GetLayoutBox()->IsRooted() && 39711+ HasVerticalOverflow() && 39712+ VisibleContentRect(kIncludeScrollbars).width(); 39713+ } 39714+ } 39715+} 39716+#else 39717+void PaintLayerScrollableArea::ComputeScrollbarExistence( 39718+ bool& needs_horizontal_scrollbar, 39719+ bool& needs_vertical_scrollbar, 39720+ ComputeScrollbarExistenceOption option) const { 39721+ // Scrollbars may be hidden or provided by visual viewport or frame instead. 39722+ DCHECK(GetLayoutBox()->GetFrame()->GetSettings()); 39723+ if (VisualViewportSuppliesScrollbars() || 39724+ !CanHaveOverflowScrollbars(*GetLayoutBox()) || 39725+ GetLayoutBox()->GetFrame()->GetSettings()->GetHideScrollbars() || 39726+ GetLayoutBox()->IsLayoutNGFieldset() || 39727+ GetLayoutBox()->StyleRef().ScrollbarWidth() == EScrollbarWidth::kNone) { 39728+ needs_horizontal_scrollbar = false; 39729+ needs_vertical_scrollbar = false; 39730+ return; 39731+ } 39732 mojom::blink::ScrollbarMode h_mode = mojom::blink::ScrollbarMode::kAuto; 39733 mojom::blink::ScrollbarMode v_mode = mojom::blink::ScrollbarMode::kAuto; 39734 39735@@ -1583,7 +1685,7 @@ void PaintLayerScrollableArea::ComputeScrollbarExistence( 39736 } 39737 } 39738 } 39739- 39740+#endif 39741 bool PaintLayerScrollableArea::TryRemovingAutoScrollbars( 39742 const bool& needs_horizontal_scrollbar, 39743 const bool& needs_vertical_scrollbar) { 39744diff --git a/src/third_party/blink/renderer/core/workers/threaded_worklet_test.cc b/src/third_party/blink/renderer/core/workers/threaded_worklet_test.cc 39745index a4058d1da8461..45f8ab84a1531 39746--- a/src/third_party/blink/renderer/core/workers/threaded_worklet_test.cc 39747+++ b/src/third_party/blink/renderer/core/workers/threaded_worklet_test.cc 39748@@ -234,6 +234,7 @@ class ThreadedWorkletMessagingProxyForTest 39749 39750 private: 39751 friend class ThreadedWorkletTest; 39752+ FRIEND_TEST_ALL_PREFIXES(ThreadedWorkletTest, NestedRunLoopTermination); 39753 39754 std::unique_ptr<WorkerThread> CreateWorkerThread() final { 39755 return std::make_unique<ThreadedWorkletThreadForTest>(WorkletObjectProxy()); 39756@@ -280,6 +281,16 @@ class ThreadedWorkletTest : public testing::Test { 39757 } 39758 Document& GetDocument() { return page_->GetDocument(); } 39759 39760+ void WaitForReady(WorkerThread* worker_thread) { 39761+ base::WaitableEvent child_waitable; 39762+ PostCrossThreadTask( 39763+ *worker_thread->GetTaskRunner(TaskType::kInternalTest), FROM_HERE, 39764+ CrossThreadBindOnce(&base::WaitableEvent::Signal, 39765+ CrossThreadUnretained(&child_waitable))); 39766+ 39767+ child_waitable.Wait(); 39768+ } 39769+ 39770 private: 39771 std::unique_ptr<DummyPageHolder> page_; 39772 Persistent<ThreadedWorkletMessagingProxyForTest> messaging_proxy_; 39773@@ -403,4 +414,40 @@ TEST_F(ThreadedWorkletTest, TaskRunner) { 39774 test::EnterRunLoop(); 39775 } 39776 39777+TEST_F(ThreadedWorkletTest, NestedRunLoopTermination) { 39778+ MessagingProxy()->Start(); 39779+ 39780+ ThreadedWorkletMessagingProxyForTest* second_messaging_proxy = 39781+ MakeGarbageCollected<ThreadedWorkletMessagingProxyForTest>( 39782+ GetExecutionContext()); 39783+ 39784+ // Get a nested event loop where the first one is on the stack 39785+ // and the second is still alive. 39786+ second_messaging_proxy->Start(); 39787+ 39788+ // Wait until the workers are setup and ready to accept work before we 39789+ // pause them. 39790+ WaitForReady(GetWorkerThread()); 39791+ WaitForReady(second_messaging_proxy->GetWorkerThread()); 39792+ 39793+ // Pause the second worker, then the first. 39794+ second_messaging_proxy->GetWorkerThread()->Pause(); 39795+ GetWorkerThread()->Pause(); 39796+ 39797+ // Resume then terminate the second worker. 39798+ second_messaging_proxy->GetWorkerThread()->Resume(); 39799+ second_messaging_proxy->GetWorkerThread()->Terminate(); 39800+ second_messaging_proxy = nullptr; 39801+ 39802+ // Now resume the first worker. 39803+ GetWorkerThread()->Resume(); 39804+ 39805+ // Make sure execution still works without crashing. 39806+ PostCrossThreadTask( 39807+ *GetWorkerThread()->GetTaskRunner(TaskType::kInternalTest), FROM_HERE, 39808+ CrossThreadBindOnce(&ThreadedWorkletThreadForTest::TestTaskRunner, 39809+ CrossThreadUnretained(GetWorkerThread()))); 39810+ test::EnterRunLoop(); 39811+} 39812+ 39813 } // namespace blink 39814diff --git a/src/third_party/blink/renderer/core/workers/worker_thread.cc b/src/third_party/blink/renderer/core/workers/worker_thread.cc 39815index 3d29142e7e9d6..369252c3ea49c 39816--- a/src/third_party/blink/renderer/core/workers/worker_thread.cc 39817+++ b/src/third_party/blink/renderer/core/workers/worker_thread.cc 39818@@ -589,6 +589,7 @@ void WorkerThread::InitializeOnWorkerThread( 39819 const absl::optional<WorkerBackingThreadStartupData>& thread_startup_data, 39820 std::unique_ptr<WorkerDevToolsParams> devtools_params) { 39821 DCHECK(IsCurrentThread()); 39822+ backing_thread_weak_factory_.emplace(this); 39823 worker_reporting_proxy_.WillInitializeWorkerContext(); 39824 { 39825 TRACE_EVENT0("blink.worker", "WorkerThread::InitializeWorkerContext"); 39826@@ -724,11 +725,13 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { 39827 SetThreadState(ThreadState::kReadyToShutdown); 39828 } 39829 39830+ backing_thread_weak_factory_ = absl::nullopt; 39831 if (pause_or_freeze_count_ > 0) { 39832 DCHECK(nested_runner_); 39833 pause_or_freeze_count_ = 0; 39834 nested_runner_->QuitNow(); 39835 } 39836+ pause_handle_.reset(); 39837 39838 if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::From(GetIsolate())) 39839 debugger->WorkerThreadDestroyed(this); 39840@@ -873,8 +876,7 @@ void WorkerThread::PauseOrFreezeOnWorkerThread( 39841 if (pause_or_freeze_count_ > 1) 39842 return; 39843 39844- std::unique_ptr<scheduler::WorkerScheduler::PauseHandle> pause_handle = 39845- GetScheduler()->Pause(); 39846+ pause_handle_ = GetScheduler()->Pause(); 39847 { 39848 // Since the nested message loop runner needs to be created and destroyed on 39849 // the same thread we allocate and destroy a new message loop runner each 39850@@ -882,13 +884,20 @@ void WorkerThread::PauseOrFreezeOnWorkerThread( 39851 // the worker thread such that the resume/terminate can quit this runner. 39852 std::unique_ptr<Platform::NestedMessageLoopRunner> nested_runner = 39853 Platform::Current()->CreateNestedMessageLoopRunner(); 39854- base::AutoReset<Platform::NestedMessageLoopRunner*> nested_runner_autoreset( 39855- &nested_runner_, nested_runner.get()); 39856+ auto weak_this = backing_thread_weak_factory_->GetWeakPtr(); 39857+ nested_runner_ = nested_runner.get(); 39858 nested_runner->Run(); 39859+ 39860+ // Careful `this` may be destroyed. 39861+ if (!weak_this) { 39862+ return; 39863+ } 39864+ nested_runner_ = nullptr; 39865 } 39866 GlobalScope()->SetDefersLoadingForResourceFetchers(LoaderFreezeMode::kNone); 39867 GlobalScope()->SetIsInBackForwardCache(false); 39868 GlobalScope()->SetLifecycleState(mojom::blink::FrameLifecycleState::kRunning); 39869+ pause_handle_.reset(); 39870 } 39871 39872 void WorkerThread::ResumeOnWorkerThread() { 39873diff --git a/src/third_party/blink/renderer/core/workers/worker_thread.h b/src/third_party/blink/renderer/core/workers/worker_thread.h 39874index 223545216b296..abc812d93ffc7 39875--- a/src/third_party/blink/renderer/core/workers/worker_thread.h 39876+++ b/src/third_party/blink/renderer/core/workers/worker_thread.h 39877@@ -31,6 +31,7 @@ 39878 39879 #include "base/gtest_prod_util.h" 39880 #include "base/memory/scoped_refptr.h" 39881+#include "base/memory/weak_ptr.h" 39882 #include "base/synchronization/waitable_event.h" 39883 #include "base/task/single_thread_task_runner.h" 39884 #include "base/thread_annotations.h" 39885@@ -77,7 +78,7 @@ struct WorkerMainScriptLoadParameters; 39886 // abstract class. Multiple WorkerThreads may share one WorkerBackingThread for 39887 // worklets. 39888 // 39889-// WorkerThread start and termination must be initiated on the main thread and 39890+// WorkerThread start and termination must be initiated on the parent thread and 39891 // an actual task is executed on the worker thread. 39892 // 39893 // When termination starts, (debugger) tasks on WorkerThread are handled as 39894@@ -100,7 +101,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39895 ~WorkerThread() override; 39896 39897 // Starts the underlying thread and creates the global scope. Called on the 39898- // main thread. 39899+ // parent thread. 39900 // Startup data for WorkerBackingThread is absl::nullopt if |this| doesn't own 39901 // the underlying WorkerBackingThread. 39902 // TODO(nhiroki): We could separate WorkerBackingThread initialization from 39903@@ -112,14 +113,14 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39904 std::unique_ptr<WorkerDevToolsParams>); 39905 39906 // Posts a task to evaluate a top-level classic script on the worker thread. 39907- // Called on the main thread after Start(). 39908+ // Called on the parent thread after Start(). 39909 void EvaluateClassicScript(const KURL& script_url, 39910 const String& source_code, 39911 std::unique_ptr<Vector<uint8_t>> cached_meta_data, 39912 const v8_inspector::V8StackTraceId& stack_id); 39913 39914 // Posts a task to fetch and run a top-level classic script on the worker 39915- // thread. Called on the main thread after Start(). 39916+ // thread. Called on the parent thread after Start(). 39917 void FetchAndRunClassicScript( 39918 const KURL& script_url, 39919 std::unique_ptr<WorkerMainScriptLoadParameters> 39920@@ -130,7 +131,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39921 const v8_inspector::V8StackTraceId& stack_id); 39922 39923 // Posts a task to fetch and run a top-level module script on the worker 39924- // thread. Called on the main thread after Start(). 39925+ // thread. Called on the parent thread after Start(). 39926 void FetchAndRunModuleScript( 39927 const KURL& script_url, 39928 std::unique_ptr<WorkerMainScriptLoadParameters> 39929@@ -151,7 +152,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39930 // Terminates the worker thread. Subclasses of WorkerThread can override this 39931 // to do cleanup. The default behavior is to call Terminate() and 39932 // synchronously call EnsureScriptExecutionTerminates() to ensure the thread 39933- // is quickly terminated. Called on the main thread. 39934+ // is quickly terminated. Called on the parent thread. 39935 virtual void TerminateForTesting(); 39936 39937 // Thread::TaskObserver. 39938@@ -178,7 +179,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39939 void DebuggerTaskStarted(); 39940 void DebuggerTaskFinished(); 39941 39942- // Callable on both the main thread and the worker thread. 39943+ // Callable on both the parent thread and the worker thread. 39944 const base::UnguessableToken& GetDevToolsWorkerToken() const { 39945 return devtools_worker_token_; 39946 } 39947@@ -322,7 +323,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39948 // already shutting down. Does not terminate if a debugger task is running, 39949 // because the debugger task is guaranteed to finish and it heavily uses V8 39950 // API calls which would crash after forcible script termination. Called on 39951- // the main thread. 39952+ // the parent thread. 39953 void EnsureScriptExecutionTerminates(ExitCode) LOCKS_EXCLUDED(mutex_); 39954 39955 // These are called in this order during worker thread startup. 39956@@ -407,7 +408,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39957 // A unique identifier among all WorkerThreads. 39958 const int worker_thread_id_; 39959 39960- // Set on the main thread. 39961+ // Set on the parent thread. 39962 bool requested_to_terminate_ GUARDED_BY(mutex_) = false; 39963 39964 ThreadState thread_state_ GUARDED_BY(mutex_) = ThreadState::kNotStarted; 39965@@ -441,7 +442,7 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39966 TaskTypeTraits>; 39967 TaskRunnerHashMap worker_task_runners_; 39968 39969- // This lock protects shared states between the main thread and the worker 39970+ // This lock protects shared states between the parent thread and the worker 39971 // thread. See thread-safety annotations (e.g., GUARDED_BY) in this header 39972 // file. 39973 Mutex mutex_; 39974@@ -450,6 +451,10 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39975 // only on the worker thread. 39976 int pause_or_freeze_count_ = 0; 39977 39978+ // The `PauseHandle` needs to be destroyed before the scheduler is destroyed 39979+ // otherwise we will hit a DCHECK. 39980+ std::unique_ptr<scheduler::WorkerScheduler::PauseHandle> pause_handle_; 39981+ 39982 // A nested message loop for handling pausing. Pointer is not owned. Used only 39983 // on the worker thread. 39984 Platform::NestedMessageLoopRunner* nested_runner_ = nullptr; 39985@@ -476,6 +481,12 @@ class CORE_EXPORT WorkerThread : public Thread::TaskObserver { 39986 HashSet<std::unique_ptr<InterruptData>> pending_interrupts_ 39987 GUARDED_BY(mutex_); 39988 39989+ // Since the WorkerThread is allocated and deallocated on the parent thread, 39990+ // we need a WeakPtrFactory that is allocated and cleared on the backing 39991+ // thread. 39992+ absl::optional<base::WeakPtrFactory<WorkerThread>> 39993+ backing_thread_weak_factory_; 39994+ 39995 THREAD_CHECKER(parent_thread_checker_); 39996 }; 39997 39998diff --git a/src/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc b/src/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc 39999index c9e167094da06..206f0bfb80117 40000--- a/src/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc 40001+++ b/src/third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc 40002@@ -1394,9 +1394,10 @@ void XMLHttpRequest::setRequestHeader(const AtomicString& name, 40003 return; 40004 } 40005 40006- // "5. Terminate these steps if |name| is a forbidden header name." 40007+ // "5. Terminate these steps if (|name|, |value|) is a forbidden request 40008+ // header." 40009 // No script (privileged or not) can set unsafe headers. 40010- if (cors::IsForbiddenHeaderName(name)) { 40011+ if (cors::IsForbiddenRequestHeader(name, value)) { 40012 LogConsoleError(GetExecutionContext(), 40013 "Refused to set unsafe header \"" + name + "\""); 40014 return; 40015diff --git a/src/third_party/blink/renderer/modules/webcodecs/video_encoder.cc b/src/third_party/blink/renderer/modules/webcodecs/video_encoder.cc 40016index 9c7cc65e32507..4135a8bbfb907 40017--- a/src/third_party/blink/renderer/modules/webcodecs/video_encoder.cc 40018+++ b/src/third_party/blink/renderer/modules/webcodecs/video_encoder.cc 40019@@ -97,16 +97,6 @@ namespace { 40020 constexpr const char kCategory[] = "media"; 40021 constexpr int kMaxActiveEncodes = 5; 40022 40023-// Use this function in cases when we can't immediately delete |ptr| because 40024-// there might be its methods on the call stack. 40025-template <typename T> 40026-void DeleteLater(ScriptState* state, std::unique_ptr<T> ptr) { 40027- DCHECK(state->ContextIsValid()); 40028- auto* context = ExecutionContext::From(state); 40029- auto runner = context->GetTaskRunner(TaskType::kInternalDefault); 40030- runner->DeleteSoon(FROM_HERE, std::move(ptr)); 40031-} 40032- 40033 bool IsAcceleratedConfigurationSupported( 40034 media::VideoCodecProfile profile, 40035 const media::VideoEncoder::Options& options, 40036@@ -985,6 +975,7 @@ void VideoEncoder::ResetInternal() { 40037 } 40038 40039 static void isConfigSupportedWithSoftwareOnly( 40040+ ScriptState* script_state, 40041 ScriptPromiseResolver* resolver, 40042 VideoEncoderSupport* support, 40043 VideoEncoderTraits::ParsedConfig* config) { 40044@@ -1009,22 +1000,25 @@ static void isConfigSupportedWithSoftwareOnly( 40045 return; 40046 } 40047 40048- auto done_callback = [](std::unique_ptr<media::VideoEncoder> sw_encoder, 40049+ auto done_callback = [](std::unique_ptr<media::VideoEncoder> encoder, 40050 ScriptPromiseResolver* resolver, 40051+ scoped_refptr<base::SingleThreadTaskRunner> runner, 40052 VideoEncoderSupport* support, 40053 media::EncoderStatus status) { 40054 support->setSupported(status.is_ok()); 40055 resolver->Resolve(support); 40056- DeleteLater(resolver->GetScriptState(), std::move(sw_encoder)); 40057+ runner->DeleteSoon(FROM_HERE, std::move(encoder)); 40058 }; 40059 40060+ auto* context = ExecutionContext::From(script_state); 40061+ auto runner = context->GetTaskRunner(TaskType::kInternalDefault); 40062 auto* software_encoder_raw = software_encoder.get(); 40063 software_encoder_raw->Initialize( 40064 config->profile, config->options, base::DoNothing(), 40065- ConvertToBaseOnceCallback( 40066- CrossThreadBindOnce(done_callback, std::move(software_encoder), 40067- WrapCrossThreadPersistent(resolver), 40068- WrapCrossThreadPersistent(support)))); 40069+ ConvertToBaseOnceCallback(CrossThreadBindOnce( 40070+ done_callback, std::move(software_encoder), 40071+ WrapCrossThreadPersistent(resolver), std::move(runner), 40072+ WrapCrossThreadPersistent(support)))); 40073 } 40074 40075 static void isConfigSupportedWithHardwareOnly( 40076@@ -1111,7 +1105,8 @@ ScriptPromise VideoEncoder::isConfigSupported(ScriptState* script_state, 40077 promises.push_back(resolver->Promise()); 40078 auto* support = VideoEncoderSupport::Create(); 40079 support->setConfig(config_copy); 40080- isConfigSupportedWithSoftwareOnly(resolver, support, parsed_config); 40081+ isConfigSupportedWithSoftwareOnly(script_state, resolver, support, 40082+ parsed_config); 40083 } 40084 40085 // Wait for all |promises| to resolve and check if any of them have 40086diff --git a/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc b/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc 40087index 4ccc6fbce329f..b35b16647701f 40088--- a/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc 40089+++ b/src/third_party/blink/renderer/modules/webdatabase/sqlite/sqlite_database.cc 40090@@ -46,14 +46,10 @@ std::tuple<int, sqlite3*> OpenDatabase(const String& filename) { 40091 /*make_default=*/false); 40092 40093 sqlite3* connection; 40094-#if BUILDFLAG(IS_OHOS) 40095- int status = sqlite3_open(filename.Utf8().c_str(), &connection); 40096-#else 40097 constexpr int open_flags = 40098 SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_PRIVATECACHE; 40099 int status = sqlite3_open_v2(filename.Utf8().c_str(), &connection, open_flags, 40100 kSqliteVfsName); 40101-#endif 40102 if (status != SQLITE_OK) { 40103 // SQLite creates a connection handle in most cases where open fails. 40104 if (connection) { 40105diff --git a/src/third_party/blink/renderer/platform/BUILD.gn b/src/third_party/blink/renderer/platform/BUILD.gn 40106index 2a0a9c27a7eff..43d84d8c29028 40107--- a/src/third_party/blink/renderer/platform/BUILD.gn 40108+++ b/src/third_party/blink/renderer/platform/BUILD.gn 40109@@ -1752,7 +1752,11 @@ component("platform") { 40110 } 40111 40112 if (is_ohos) { 40113- sources += [ "fonts/android/font_cache_android.cc" ] 40114+ sources += [ 40115+ "fonts/android/font_cache_android.cc", 40116+ "fonts/ohos/font_unique_name_lookup_ohos.cc", 40117+ "fonts/ohos/font_unique_name_lookup_ohos.h", 40118+ ] 40119 } 40120 40121 if (is_android) { 40122diff --git a/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc b/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc 40123index 2fa363a2a4e7b..6db06babe48b5 40124--- a/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc 40125+++ b/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.cc 40126@@ -11,6 +11,8 @@ 40127 #include "third_party/blink/renderer/platform/fonts/linux/font_unique_name_lookup_linux.h" 40128 #elif defined(OS_WIN) 40129 #include "third_party/blink/renderer/platform/fonts/win/font_unique_name_lookup_win.h" 40130+#elif BUILDFLAG(IS_OHOS) 40131+#include "third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.h" 40132 #endif 40133 40134 namespace blink { 40135@@ -26,6 +28,8 @@ FontUniqueNameLookup::GetPlatformUniqueNameLookup() { 40136 return std::make_unique<FontUniqueNameLookupLinux>(); 40137 #elif defined(OS_WIN) 40138 return std::make_unique<FontUniqueNameLookupWin>(); 40139+#elif BUILDFLAG(IS_OHOS) 40140+ return std::make_unique<FontUniqueNameLookupOhos>(); 40141 #else 40142 return nullptr; 40143 #endif 40144diff --git a/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h b/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h 40145index 8b265ad1f08ed..89115d77f4795 40146--- a/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h 40147+++ b/src/third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h 40148@@ -12,7 +12,7 @@ 40149 #include "third_party/skia/include/core/SkRefCnt.h" 40150 #include "third_party/skia/include/core/SkTypeface.h" 40151 40152-#if defined(OS_ANDROID) || defined(OS_WIN) 40153+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_OHOS) 40154 #include "third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h" 40155 #endif 40156 40157@@ -65,7 +65,7 @@ class FontUniqueNameLookup { 40158 40159 // Windows and Android share the concept of connecting to a Mojo service for 40160 // retrieving a ReadOnlySharedMemoryRegion with the lookup table in it. 40161-#if defined(OS_WIN) || defined(OS_ANDROID) 40162+#if defined(OS_WIN) || defined(OS_ANDROID) || BUILDFLAG(IS_OHOS) 40163 std::unique_ptr<FontTableMatcher> font_table_matcher_; 40164 #endif 40165 }; 40166diff --git a/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.cc b/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.cc 40167new file mode 100755 40168index 0000000000000..165eb7a6c8c6d 40169--- /dev/null 40170+++ b/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.cc 40171@@ -0,0 +1,104 @@ 40172+// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. 40173+// Use of this source code is governed by a BSD-style license that can be 40174+// found in the LICENSE file. 40175+ 40176+#include "third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.h" 40177+ 40178+#include "base/files/file.h" 40179+#include "base/logging.h" 40180+#include "base/metrics/histogram_macros.h" 40181+#include "base/timer/elapsed_timer.h" 40182+#include "third_party/blink/public/common/features.h" 40183+#include "third_party/blink/public/common/font_unique_name_lookup/icu_fold_case_util.h" 40184+#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h" 40185+#include "third_party/blink/public/platform/platform.h" 40186+#include "third_party/blink/renderer/platform/instrumentation/histogram.h" 40187+#include "third_party/blink/renderer/platform/runtime_enabled_features.h" 40188+#include "third_party/skia/include/core/SkData.h" 40189+#include "third_party/skia/include/core/SkRefCnt.h" 40190+#include "third_party/skia/include/core/SkTypeface.h" 40191+ 40192+#include "base/logging.h" 40193+ 40194+namespace blink { 40195+ 40196+FontUniqueNameLookupOhos::~FontUniqueNameLookupOhos() = default; 40197+ 40198+sk_sp<SkTypeface> FontUniqueNameLookupOhos::MatchUniqueName( 40199+ const String& font_unique_name) { 40200+ if (!IsFontUniqueNameLookupReadyForSyncLookup()) 40201+ return nullptr; 40202+ absl::optional<FontTableMatcher::MatchResult> match_result = 40203+ font_table_matcher_->MatchName(font_unique_name.Utf8().c_str()); 40204+ if (!match_result) 40205+ return nullptr; 40206+ return SkTypeface::MakeFromFile(match_result->font_path.c_str(), 40207+ match_result->ttc_index); 40208+} 40209+ 40210+void FontUniqueNameLookupOhos::Init() { 40211+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 40212+ EnsureServiceConnected(); 40213+} 40214+ 40215+bool FontUniqueNameLookupOhos::IsFontUniqueNameLookupReadyForSyncLookup() { 40216+ if (!RuntimeEnabledFeatures::FontSrcLocalMatchingEnabled()) 40217+ return true; 40218+ 40219+ EnsureServiceConnected(); 40220+ 40221+ if (font_table_matcher_.get()) 40222+ return true; 40223+ 40224+ if (sync_available_.has_value()) 40225+ return sync_available_.value(); 40226+ 40227+ bool sync_available_from_mojo = false; 40228+ base::ReadOnlySharedMemoryRegion shared_memory_region; 40229+ ohos_font_lookup_service_->GetUniqueNameLookupTableIfAvailable( 40230+ &sync_available_from_mojo, &shared_memory_region); 40231+ sync_available_ = sync_available_from_mojo; 40232+ 40233+ if (*sync_available_) { 40234+ DCHECK_EQ(pending_callbacks_.size(), 0u); 40235+ ReceiveReadOnlySharedMemoryRegion(std::move(shared_memory_region)); 40236+ } 40237+ 40238+ return *sync_available_; 40239+} 40240+ 40241+void FontUniqueNameLookupOhos::PrepareFontUniqueNameLookup( 40242+ NotifyFontUniqueNameLookupReady callback) { 40243+ DCHECK(!font_table_matcher_.get()); 40244+ DCHECK(RuntimeEnabledFeatures::FontSrcLocalMatchingEnabled()); 40245+ 40246+ pending_callbacks_.push_back(std::move(callback)); 40247+ 40248+ if (pending_callbacks_.size() > 1) 40249+ return; 40250+ 40251+ EnsureServiceConnected(); 40252+ 40253+ ohos_font_lookup_service_->GetUniqueNameLookupTable(base::BindOnce( 40254+ &FontUniqueNameLookupOhos::ReceiveReadOnlySharedMemoryRegion, 40255+ base::Unretained(this))); 40256+} 40257+ 40258+void FontUniqueNameLookupOhos::EnsureServiceConnected() { 40259+ if (!ohos_font_lookup_service_) { 40260+ Platform::Current()->GetBrowserInterfaceBroker()->GetInterface( 40261+ ohos_font_lookup_service_.BindNewPipeAndPassReceiver()); 40262+ } 40263+} 40264+ 40265+void FontUniqueNameLookupOhos::ReceiveReadOnlySharedMemoryRegion( 40266+ base::ReadOnlySharedMemoryRegion shared_memory_region) { 40267+ font_table_matcher_ = 40268+ std::make_unique<FontTableMatcher>(shared_memory_region.Map()); 40269+ while (!pending_callbacks_.IsEmpty()) { 40270+ NotifyFontUniqueNameLookupReady callback = pending_callbacks_.TakeFirst(); 40271+ std::move(callback).Run(); 40272+ } 40273+} 40274+ 40275+} // namespace blink 40276diff --git a/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.h b/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.h 40277new file mode 100755 40278index 0000000000000..5b5892c9c6b98 40279--- /dev/null 40280+++ b/src/third_party/blink/renderer/platform/fonts/ohos/font_unique_name_lookup_ohos.h 40281@@ -0,0 +1,49 @@ 40282+// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. 40283+// Use of this source code is governed by a BSD-style license that can be 40284+// found in the LICENSE file. 40285+ 40286+#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_LINUX_FONT_UNIQUE_NAME_LOOKUP_OHOS_H_ 40287+#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_LINUX_FONT_UNIQUE_NAME_LOOKUP_OHOS_H_ 40288+ 40289+#include "base/sequence_checker.h" 40290+#include "mojo/public/cpp/bindings/remote.h" 40291+#include "third_party/blink/public/common/font_unique_name_lookup/font_table_matcher.h" 40292+#include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom-blink.h" 40293+#include "third_party/blink/public/mojom/font_unique_name_lookup/font_unique_name_lookup.mojom-blink.h" 40294+#include "third_party/blink/renderer/platform/fonts/font_unique_name_lookup.h" 40295+#include "third_party/blink/renderer/platform/wtf/deque.h" 40296+ 40297+namespace blink { 40298+ 40299+class FontUniqueNameLookupOhos : public FontUniqueNameLookup { 40300+ public: 40301+ FontUniqueNameLookupOhos() = default; 40302+ FontUniqueNameLookupOhos(const FontUniqueNameLookupOhos&) = delete; 40303+ FontUniqueNameLookupOhos& operator=(const FontUniqueNameLookupOhos&) = delete; 40304+ ~FontUniqueNameLookupOhos() override; 40305+ 40306+ bool IsFontUniqueNameLookupReadyForSyncLookup() override; 40307+ 40308+ void PrepareFontUniqueNameLookup( 40309+ NotifyFontUniqueNameLookupReady callback) override; 40310+ 40311+ sk_sp<SkTypeface> MatchUniqueName(const String& font_unique_name) override; 40312+ 40313+ void Init() override; 40314+ 40315+ private: 40316+ void EnsureServiceConnected(); 40317+ 40318+ void ReceiveReadOnlySharedMemoryRegion( 40319+ base::ReadOnlySharedMemoryRegion shared_memory_region); 40320+ 40321+ mojo::Remote<mojom::blink::FontUniqueNameLookup> ohos_font_lookup_service_; 40322+ WTF::Deque<NotifyFontUniqueNameLookupReady> pending_callbacks_; 40323+ absl::optional<bool> sync_available_; 40324+ 40325+ SEQUENCE_CHECKER(sequence_checker_); 40326+}; 40327+ 40328+} // namespace blink 40329+ 40330+#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_LINUX_FONT_UNIQUE_NAME_LOOKUP_OHOS_H_ 40331diff --git a/src/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc b/src/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc 40332index 55a6f844bfd49..ded092c7de514 40333--- a/src/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc 40334+++ b/src/third_party/blink/renderer/platform/fonts/skia/font_cache_skia.cc 40335@@ -200,7 +200,6 @@ sk_sp<SkTypeface> FontCache::CreateTypeface( 40336 std::string& name) { 40337 #if !defined(OS_WIN) && !defined(OS_ANDROID) && !defined(OS_FUCHSIA) 40338 // TODO(fuchsia): Revisit this and other font code for Fuchsia. 40339- 40340 if (creation_params.CreationType() == kCreateFontByFciIdAndTtcIndex) { 40341 if (Platform::Current()->GetSandboxSupport()) { 40342 return SkTypeface_Factory::FromFontConfigInterfaceIdAndTtcIndex( 40343@@ -242,6 +241,7 @@ sk_sp<SkTypeface> FontCache::CreateTypeface( 40344 // the embedder provided font Manager rather than calling 40345 // SkTypeface::CreateFromName which may redirect the call to the default font 40346 // Manager. On Windows the font manager is always present. 40347+ 40348 if (font_manager_) { 40349 auto tf = sk_sp<SkTypeface>(font_manager_->matchFamilyStyle( 40350 name.c_str(), font_description.SkiaFontStyle())); 40351@@ -264,7 +264,7 @@ std::unique_ptr<FontPlatformData> FontCache::CreateFontPlatformData( 40352 std::string name; 40353 40354 sk_sp<SkTypeface> typeface; 40355-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) 40356+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_OHOS) 40357 bool noto_color_emoji_from_gmscore = false; 40358 #if defined(OS_ANDROID) 40359 // Use the unique local matching pathway for fetching Noto Color Emoji Compat 40360diff --git a/src/third_party/blink/renderer/platform/loader/cors/cors.cc b/src/third_party/blink/renderer/platform/loader/cors/cors.cc 40361index 3062b4be0819f..94aed1c793d17 40362--- a/src/third_party/blink/renderer/platform/loader/cors/cors.cc 40363+++ b/src/third_party/blink/renderer/platform/loader/cors/cors.cc 40364@@ -136,8 +136,8 @@ PLATFORM_EXPORT Vector<String> PrivilegedNoCorsHeaderNames() { 40365 return header_names; 40366 } 40367 40368-bool IsForbiddenHeaderName(const String& name) { 40369- return !net::HttpUtil::IsSafeHeader(name.Latin1()); 40370+bool IsForbiddenRequestHeader(const String& name, const String& value) { 40371+ return !net::HttpUtil::IsSafeHeader(name.Latin1(), value.Latin1()); 40372 } 40373 40374 bool ContainsOnlyCorsSafelistedHeaders(const HTTPHeaderMap& header_map) { 40375diff --git a/src/third_party/blink/renderer/platform/loader/cors/cors.h b/src/third_party/blink/renderer/platform/loader/cors/cors.h 40376index 1f1bdbc079d2b..c4eb638e74139 40377--- a/src/third_party/blink/renderer/platform/loader/cors/cors.h 40378+++ b/src/third_party/blink/renderer/platform/loader/cors/cors.h 40379@@ -39,7 +39,8 @@ PLATFORM_EXPORT bool IsNoCorsSafelistedHeader(const String& name, 40380 PLATFORM_EXPORT bool IsPrivilegedNoCorsHeaderName(const String& name); 40381 PLATFORM_EXPORT bool IsNoCorsSafelistedHeaderName(const String& name); 40382 PLATFORM_EXPORT Vector<String> PrivilegedNoCorsHeaderNames(); 40383-PLATFORM_EXPORT bool IsForbiddenHeaderName(const String& name); 40384+PLATFORM_EXPORT bool IsForbiddenRequestHeader(const String& name, 40385+ const String& value); 40386 PLATFORM_EXPORT bool ContainsOnlyCorsSafelistedHeaders(const HTTPHeaderMap&); 40387 40388 PLATFORM_EXPORT bool IsOkStatus(int status); 40389diff --git a/src/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/src/third_party/blink/renderer/platform/runtime_enabled_features.json5 40390index ffce9bb7d9bd3..8478e2da3e625 40391--- a/src/third_party/blink/renderer/platform/runtime_enabled_features.json5 40392+++ b/src/third_party/blink/renderer/platform/runtime_enabled_features.json5 40393@@ -1599,7 +1599,8 @@ 40394 }, 40395 { 40396 name: "OrientationEvent", 40397- status: {"Android": "stable"}, 40398+ // BUILDFLAG(IS_OHOS) 40399+ status: "stable", 40400 }, 40401 { 40402 name: "OriginIsolationHeader", 40403diff --git a/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.cc b/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.cc 40404index e8ea6cd4f553f..861c39cba08f8 40405--- a/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.cc 40406+++ b/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.cc 40407@@ -151,8 +151,12 @@ void WidgetInputHandlerImpl::DispatchEvent( 40408 } 40409 40410 #if BUILDFLAG(IS_OHOS) 40411-void WidgetInputHandlerImpl::StartFling() { 40412- soc_perf::SocPerUtil::ApplySocConfig(); 40413+void WidgetInputHandlerImpl::TryStartFling() { 40414+ soc_perf::SocPerUtil::EnableFlingBoost(); 40415+} 40416+ 40417+void WidgetInputHandlerImpl::TryFinishFling() { 40418+ soc_perf::SocPerUtil::DisableFlingBoost(); 40419 } 40420 #endif 40421 40422diff --git a/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.h b/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.h 40423index de2ef56ee3a36..8f4598b6a7d95 40424--- a/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.h 40425+++ b/src/third_party/blink/renderer/platform/widget/input/widget_input_handler_impl.h 40426@@ -62,7 +62,8 @@ class WidgetInputHandlerImpl : public mojom::blink::WidgetInputHandler { 40427 void DispatchEvent(std::unique_ptr<WebCoalescedInputEvent>, 40428 DispatchEventCallback callback) override; 40429 #if BUILDFLAG(IS_OHOS) 40430- void StartFling() override; 40431+ void TryStartFling() override; 40432+ void TryFinishFling() override; 40433 #endif 40434 void DispatchNonBlockingEvent( 40435 std::unique_ptr<WebCoalescedInputEvent>) override; 40436diff --git a/src/third_party/blink/renderer/platform/widget/widget_base.cc b/src/third_party/blink/renderer/platform/widget/widget_base.cc 40437index 1b5aff93b708b..7980b4b20fc90 40438--- a/src/third_party/blink/renderer/platform/widget/widget_base.cc 40439+++ b/src/third_party/blink/renderer/platform/widget/widget_base.cc 40440@@ -819,8 +819,14 @@ void WidgetBase::BeginMainFrame(base::TimeTicks frame_time) { 40441 if (ShouldRecordBeginMainFrameMetrics()) { 40442 raf_aligned_input_start_time = base::TimeTicks::Now(); 40443 } 40444+ 40445+ auto weak_this = weak_ptr_factory_.GetWeakPtr(); 40446 widget_input_handler_manager_->input_event_queue()->DispatchRafAlignedInput( 40447 frame_time); 40448+ // DispatchRafAlignedInput could have detached the frame. 40449+ if (!weak_this) 40450+ return; 40451+ 40452 if (ShouldRecordBeginMainFrameMetrics()) { 40453 client_->RecordDispatchRafAlignedInputTime(raf_aligned_input_start_time); 40454 } 40455diff --git a/src/third_party/blink/web_tests/TestExpectations b/src/third_party/blink/web_tests/TestExpectations 40456index dbda152b7a2ee..875d185af57dd 40457--- a/src/third_party/blink/web_tests/TestExpectations 40458+++ b/src/third_party/blink/web_tests/TestExpectations 40459@@ -7609,3 +7609,6 @@ crbug.com/1282347 [ Mac ] virtual/clipboard-custom-formats/clipboard/async-clipb 40460 40461 # Sheriff 2022-01-25 40462 crbug.com/1289992 virtual/document-transition/document-transition/paint-order.html [ Skip ] 40463+ 40464+crbug.com/1295980 [ Mac ] virtual/fenced-frame-mparch/wpt_internal/fenced_frame/script-focus.https.html [ Pass Timeout ] 40465+crbug.com/1295980 [ Mac ] virtual/fenced-frame-shadow-dom/wpt_internal/fenced_frame/script-focus.https.html [ Pass Timeout ] 40466\ No newline at end of file 40467diff --git a/src/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html b/src/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html 40468new file mode 100644 40469index 0000000000000..e3e709a240bd8 40470--- /dev/null 40471+++ b/src/third_party/blink/web_tests/external/wpt/css/css-contain/container-queries/crashtests/chrome-layout-root-crash.html 40472@@ -0,0 +1,17 @@ 40473+<!doctype html> 40474+<html class="reftest-wait"> 40475+<link rel="help" href="https://crbug.com/1371820"> 40476+<style> 40477+ body, div, img { container-type: size; } 40478+</style> 40479+<p>Pass if no crash.</p> 40480+<div id="div"><img id="img" alt="a"></div> 40481+<script> 40482+ requestAnimationFrame(() => requestAnimationFrame(() => { 40483+ // Adds a layout root inside the div size container. 40484+ img.alt = img.src = "b"; 40485+ // Marks div size container for layout which skips style recalc for the sub-tree. 40486+ div.style.width = "500px"; 40487+ document.documentElement.classList.remove("reftest-wait"); 40488+ })); 40489+</script> 40490diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js 40491new file mode 100644 40492index 0000000000000..7792c26130958 40493--- /dev/null 40494+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/resources/sandbox-top-navigation-helper.js 40495@@ -0,0 +1,78 @@ 40496+// To use this file, use the following imports: 40497+// // META: script=/common/dispatcher/dispatcher.js 40498+// // META: script=/common/get-host-info.sub.js 40499+// // META: script=/common/utils.js 40500+// // META: script=/resources/testdriver.js 40501+// // META: script=/resources/testdriver-vendor.js 40502+// // META: script=/resources/testharness.js 40503+// // META: script=/resources/testharnessreport.js 40504+// // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 40505+// // META: script=./resources/sandbox-top-navigation-helper.js 40506+ 40507+// Helper file that provides various functions to test top-level navigation 40508+// with various frame and sandbox flag configurations. 40509+ 40510+async function createNestedIframe(parent, origin, frame_sandbox, header_sandbox) 40511+{ 40512+ let headers = []; 40513+ if (header_sandbox) { 40514+ headers.push([ 40515+ "Content-Security-Policy", 40516+ "sandbox allow-scripts " + header_sandbox 40517+ ]); 40518+ } 40519+ let iframe_attributes = {}; 40520+ if (frame_sandbox) { 40521+ iframe_attributes.sandbox = "allow-scripts " + frame_sandbox; 40522+ } 40523+ return parent.addIframe({ 40524+ origin: origin, 40525+ scripts: [ 40526+ '/resources/testdriver.js', 40527+ '/resources/testdriver-driver.js', 40528+ '/resources/testdriver-vendor.js' 40529+ ], 40530+ headers: headers, 40531+ }, iframe_attributes); 40532+} 40533+ 40534+async function attemptTopNavigation(iframe, should_succeed) { 40535+ let did_succeed; 40536+ try { 40537+ await iframe.executeScript(() => { 40538+ window.top.location.href = "https://google.com"; 40539+ }); 40540+ did_succeed = true; 40541+ } catch (e) { 40542+ did_succeed = false; 40543+ } 40544+ 40545+ assert_equals(did_succeed, should_succeed, 40546+ should_succeed ? 40547+ "The navigation should succeed." : 40548+ "The navigation should fail."); 40549+} 40550+ 40551+async function setupTest() { 40552+ const rcHelper = new RemoteContextHelper(); 40553+ return rcHelper.addWindow(/*config=*/ null, /*options=*/ {}); 40554+} 40555+ 40556+async function activate(iframe) { 40557+ return iframe.executeScript(async () => { 40558+ let b = document.createElement("button"); 40559+ document.body.appendChild(b); 40560+ 40561+ // Since test_driver.bless() does not play nicely with the remote context 40562+ // helper, this is a workaround to trigger user activation in the iframe. 40563+ // This adds a button to the iframe and then simulates hitting the 'tab' key 40564+ // twice. Once to focus on the button, and once to trigger user activation 40565+ // in the iframe (user activation is given to the frame that has focus when 40566+ // the tab key is pressed, not the frame that ends up getting focus). Note 40567+ // that this will result in both the parent and this frame getting user 40568+ // activation. Note that this currently only works for iframes nested 1 40569+ // level deep. 40570+ test_driver.set_test_context(window.top); 40571+ return test_driver.send_keys(document.body, "\uE004\uE004"); 40572+ }); 40573+} 40574diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js 40575new file mode 100644 40576index 0000000000000..a9ea9e4723238 40577--- /dev/null 40578+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child-special-cases.tentative.sub.window.js 40579@@ -0,0 +1,49 @@ 40580+// META: title=Top-level navigation tests with cross origin & user activated child frames 40581+// META: script=/common/dispatcher/dispatcher.js 40582+// META: script=/common/get-host-info.sub.js 40583+// META: script=/common/utils.js 40584+// META: script=/resources/testdriver.js 40585+// META: script=/resources/testdriver-vendor.js 40586+// META: script=/resources/testharness.js 40587+// META: script=/resources/testharnessreport.js 40588+// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 40589+// META: script=./resources/sandbox-top-navigation-helper.js 40590+ 40591+'use strict'; 40592+ 40593+/* ------------------------- USER ACTIVATION TESTS ------------------------- */ 40594+ 40595+promise_test(async t => { 40596+ const main = await setupTest(); 40597+ const iframe_1 = await createNestedIframe(main, 40598+ "HTTP_ORIGIN", "allow-top-navigation-by-user-activation", ""); 40599+ await activate(iframe_1); 40600+ 40601+ await attemptTopNavigation(iframe_1, true); 40602+}, "Allow top with user activation + user activation"); 40603+ 40604+promise_test(async t => { 40605+ const main = await setupTest(); 40606+ const iframe_1 = await createNestedIframe(main, 40607+ "HTTP_ORIGIN", "allow-top-navigation-by-user-activation", ""); 40608+ 40609+ await attemptTopNavigation(iframe_1, false); 40610+}, "allow-top-navigation-by-user-activation set but no sticky activation"); 40611+ 40612+/* ---------------------- CROSS ORIGIN (A -> B) TESTS ---------------------- */ 40613+ 40614+promise_test(async t => { 40615+ const main = await setupTest(); 40616+ const iframe_1 = await createNestedIframe(main, 40617+ "HTTP_REMOTE_ORIGIN", "allow-top-navigation", ""); 40618+ 40619+ await attemptTopNavigation(iframe_1, true); 40620+}, "A cross-origin frame with frame sandbox flags can navigate top"); 40621+ 40622+promise_test(async t => { 40623+ const main = await setupTest(); 40624+ const iframe_1 = await createNestedIframe(main, 40625+ "HTTP_REMOTE_ORIGIN", "", "allow-top-navigation"); 40626+ 40627+ await attemptTopNavigation(iframe_1, false); 40628+}, "A cross-origin frame with delivered sandbox flags can not navigate top"); 40629diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js 40630new file mode 100644 40631index 0000000000000..58133456970a7 40632--- /dev/null 40633+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-child.tentative.sub.window.js 40634@@ -0,0 +1,58 @@ 40635+// META: title=Top-level navigation tests with child frames 40636+// META: script=/common/dispatcher/dispatcher.js 40637+// META: script=/common/get-host-info.sub.js 40638+// META: script=/common/utils.js 40639+// META: script=/resources/testdriver.js 40640+// META: script=/resources/testdriver-vendor.js 40641+// META: script=/resources/testharness.js 40642+// META: script=/resources/testharnessreport.js 40643+// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 40644+// META: script=./resources/sandbox-top-navigation-helper.js 40645+ 40646+'use strict'; 40647+ 40648+/* ----------------------- SAME ORIGIN (A -> A) TESTS ----------------------- */ 40649+ 40650+promise_test(async t => { 40651+ const main = await setupTest(); 40652+ const iframe_1 = await createNestedIframe(main, 40653+ "HTTP_ORIGIN", "", "allow-top-navigation allow-same-origin"); 40654+ 40655+ await attemptTopNavigation(iframe_1, true); 40656+}, "A same-origin frame with delivered sandbox flags can navigate top"); 40657+ 40658+promise_test(async t => { 40659+ const main = await setupTest(); 40660+ const iframe_1 = await createNestedIframe(main, 40661+ "HTTP_ORIGIN", "allow-top-navigation allow-same-origin", ""); 40662+ 40663+ await attemptTopNavigation(iframe_1, true); 40664+}, "A same-origin frame with frame sandbox flags can navigate top"); 40665+ 40666+promise_test(async t => { 40667+ const main = await setupTest(); 40668+ const iframe_1 = await createNestedIframe(main, 40669+ "HTTP_ORIGIN", "", ""); 40670+ 40671+ await attemptTopNavigation(iframe_1, true); 40672+}, "A same-origin unsandboxed frame can navigate top"); 40673+ 40674+promise_test(async t => { 40675+ const main = await setupTest(); 40676+ const iframe_1 = await createNestedIframe(main, 40677+ "HTTP_ORIGIN", "", 40678+ "allow-top-navigation allow-top-navigation-by-user-activation allow-same-origin"); 40679+ 40680+ await attemptTopNavigation(iframe_1, true); 40681+}, "A frame with both top navigation delivered sandbox flags uses the less \ 40682+ restrictive one"); 40683+ 40684+promise_test(async t => { 40685+ const main = await setupTest(); 40686+ const iframe_1 = await createNestedIframe(main, 40687+ "HTTP_ORIGIN", 40688+ "allow-top-navigation allow-top-navigation-by-user-activation", ""); 40689+ 40690+ await attemptTopNavigation(iframe_1, true); 40691+}, "A frame with both top navigation frame sandbox flags uses the less \ 40692+ restrictive one"); 40693diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js 40694new file mode 100644 40695index 0000000000000..999f056f334db 40696--- /dev/null 40697+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-escalate-privileges.tentative.sub.window.js 40698@@ -0,0 +1,65 @@ 40699+// META: title=Top-level navigation tests with frames that try to give themselves top-nav permission 40700+// META: script=/common/dispatcher/dispatcher.js 40701+// META: script=/common/get-host-info.sub.js 40702+// META: script=/common/utils.js 40703+// META: script=/resources/testdriver.js 40704+// META: script=/resources/testdriver-vendor.js 40705+// META: script=/resources/testharness.js 40706+// META: script=/resources/testharnessreport.js 40707+// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 40708+// META: script=./resources/sandbox-top-navigation-helper.js 40709+ 40710+'use strict'; 40711+ 40712+promise_test(async t => { 40713+ const main = await setupTest(); 40714+ const iframe_1 = await createNestedIframe(main, 40715+ "HTTP_REMOTE_ORIGIN", "", ""); 40716+ const iframe_2 = await createNestedIframe(iframe_1, 40717+ "HTTP_REMOTE_ORIGIN", "allow-top-navigation", ""); 40718+ 40719+ await attemptTopNavigation(iframe_2, false); 40720+}, "A cross origin unsandboxed frame can't escalate privileges in a child \ 40721+ frame"); 40722+ 40723+promise_test(async t => { 40724+ const main = await setupTest(); 40725+ const iframe_1 = await createNestedIframe(main, 40726+ "HTTP_REMOTE_ORIGIN", "allow-top-navigation", ""); 40727+ const iframe_2 = await createNestedIframe(iframe_1, 40728+ "OTHER_ORIGIN", "", ""); 40729+ 40730+ await attemptTopNavigation(iframe_2, true); 40731+}, "An unsandboxed grandchild inherits its parents ability to navigate top."); 40732+ 40733+promise_test(async t => { 40734+ const main = await setupTest(); 40735+ const iframe_1 = await createNestedIframe(main, 40736+ "HTTP_ORIGIN", "", ""); 40737+ const iframe_2 = await createNestedIframe(iframe_1, 40738+ "HTTP_ORIGIN", "allow-top-navigation", ""); 40739+ 40740+ await attemptTopNavigation(iframe_2, true); 40741+}, "A same-origin grandchild with frame allow-top can navigate top"); 40742+ 40743+promise_test(async t => { 40744+ const main = await setupTest(); 40745+ const iframe_1 = await createNestedIframe(main, 40746+ "HTTP_ORIGIN", "", ""); 40747+ const iframe_2 = await createNestedIframe(iframe_1, 40748+ "HTTP_ORIGIN", "", "allow-top-navigation"); 40749+ 40750+ await attemptTopNavigation(iframe_2, false); 40751+}, "A sandboxed same-origin grandchild without allow-same-origin can't \ 40752+ escalate its own top-nav privileges"); 40753+ 40754+promise_test(async t => { 40755+ const main = await setupTest(); 40756+ const iframe_1 = await createNestedIframe(main, 40757+ "HTTP_ORIGIN", "", ""); 40758+ const iframe_2 = await createNestedIframe(iframe_1, 40759+ "HTTP_ORIGIN", "", "allow-same-origin allow-top-navigation"); 40760+ 40761+ await attemptTopNavigation(iframe_2, true); 40762+}, "A sandboxed same-origin grandchild with allow-same-origin can \ 40763+ give itself top-nav privileges"); 40764diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js 40765new file mode 100644 40766index 0000000000000..519efc94e516d 40767--- /dev/null 40768+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/sandbox-top-navigation-grandchild.tentative.sub.window.js 40769@@ -0,0 +1,52 @@ 40770+// META: title=Top-level navigation tests with grandchild frames 40771+// META: script=/common/dispatcher/dispatcher.js 40772+// META: script=/common/get-host-info.sub.js 40773+// META: script=/common/utils.js 40774+// META: script=/resources/testdriver.js 40775+// META: script=/resources/testdriver-vendor.js 40776+// META: script=/resources/testharness.js 40777+// META: script=/resources/testharnessreport.js 40778+// META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 40779+// META: script=./resources/sandbox-top-navigation-helper.js 40780+ 40781+'use strict'; 40782+ 40783+promise_test(async t => { 40784+ const main = await setupTest(); 40785+ const iframe_1 = await createNestedIframe(main, 40786+ "HTTP_ORIGIN", "", ""); 40787+ const iframe_2 = await createNestedIframe(iframe_1, 40788+ "HTTP_ORIGIN", "allow-scripts", ""); 40789+ 40790+ await attemptTopNavigation(iframe_2, false); 40791+}, "A fully sandboxed same-origin grandchild can't navigate top"); 40792+ 40793+promise_test(async t => { 40794+ const main = await setupTest(); 40795+ const iframe_1 = await createNestedIframe(main, 40796+ "HTTP_ORIGIN", "", ""); 40797+ const iframe_2 = await createNestedIframe(iframe_1, 40798+ "HTTP_ORIGIN", "", ""); 40799+ 40800+ await attemptTopNavigation(iframe_2, true); 40801+}, "An unsandboxed same-origin grandchild can navigate top"); 40802+ 40803+promise_test(async t => { 40804+ const main = await setupTest(); 40805+ const iframe_1 = await createNestedIframe(main, 40806+ "HTTP_REMOTE_ORIGIN", "", ""); 40807+ const iframe_2 = await createNestedIframe(iframe_1, 40808+ "HTTP_ORIGIN", "", ""); 40809+ 40810+ await attemptTopNavigation(iframe_2, true); 40811+}, "A same-origin grandchild in a cross-origin parent can navigate top"); 40812+ 40813+promise_test(async t => { 40814+ const main = await setupTest(); 40815+ const iframe_1 = await createNestedIframe(main, 40816+ "HTTP_REMOTE_ORIGIN", "", ""); 40817+ const iframe_2 = await createNestedIframe(iframe_1, 40818+ "HTTP_ORIGIN", "allow-top-navigation allow-same-origin", ""); 40819+ 40820+ await attemptTopNavigation(iframe_2, true); 40821+}, "A same-origin sandboxed grandchild in a cross-origin parent can navigate top"); 40822\ No newline at end of file 40823diff --git a/src/third_party/blink/web_tests/external/wpt/html/semantics/forms/constraints/reportValidity-crash.html b/src/third_party/blink/web_tests/external/wpt/html/semantics/forms/constraints/reportValidity-crash.html 40824new file mode 100644 40825index 0000000000000..d6bab924adc9f 40826--- /dev/null 40827+++ b/src/third_party/blink/web_tests/external/wpt/html/semantics/forms/constraints/reportValidity-crash.html 40828@@ -0,0 +1,37 @@ 40829+<!DOCTYPE html> 40830+<html> 40831+ 40832+<head> 40833+<script> 40834+Object.prototype.__defineGetter__('then', prom); 40835+var prom_count = 0; 40836+function prom() { 40837+prom_count++; 40838+if (prom_count > 2) return; 40839+var v14 = x37.animate({},100); 40840+v14.reverse(); 40841+v14.ready; 40842+v14.currentTime = 0; 40843+x57.reportValidity(); 40844+} 40845+function f0() { 40846+var v38 = x37.animate({},300); 40847+v38.ready; 40848+x57.prepend(x78); 40849+} 40850+function f1() { 40851+var x57 = document.getElementById("x57"); 40852+x57.disabled = false; 40853+} 40854+</script> 40855+</head> 40856+ 40857+<body> 40858+<fieldset id="x37"> 40859+<canvas onfocusin="f0()" > 40860+<input id="x78" autofocus="" onfocusout="f1()" > 40861+</canvas> 40862+<select id="x57" disabled="" required=""></select> 40863+</body> 40864+ 40865+</html> 40866diff --git a/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt b/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt 40867deleted file mode 100644 40868index 7648d5e97300d..0000000000000 40869--- a/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt 40870+++ /dev/null 40871@@ -1,6 +0,0 @@ 40872-CONSOLE ERROR: Unsafe attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation.html' from frame with URL 'https://localhost:8443/security/frameNavigation/resources/failed-top-navigation.html'. The frame attempting navigation of the top-level window is sandboxed and is not allowed to navigate since its ancestor frame with URL 'http://localhost:8080/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-sandboxed-frame.html' is unable to navigate the top frame. 40873- 40874- 40875-This tests that an iframe in sandbox with 'allow-top-navigation' can't navigate the top level page if its ancestor can't. 40876- 40877-DOMAIN 40878diff --git a/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt b/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt 40879deleted file mode 100644 40880index 9d4da3a1c8422..0000000000000 40881--- a/src/third_party/blink/web_tests/flag-specific/disable-site-isolation-trials/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt 40882+++ /dev/null 40883@@ -1,6 +0,0 @@ 40884-CONSOLE ERROR: Unsafe attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox.html' from frame with URL 'https://localhost:8443/security/frameNavigation/resources/failed-top-navigation.html'. The frame attempting navigation of the top-level window is sandboxed and is not allowed to navigate since its ancestor frame with URL 'http://localhost:8080/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-sandboxed-frame.html' is unable to navigate the top frame. 40885- 40886- 40887-This tests that an iframe in a nested sandbox with 'allow-top-navigation' can't navigate the top level page if its ancestor can't. 40888- 40889-DOMAIN 40890diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-nested-sandboxed-frame.html b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-nested-sandboxed-frame.html 40891deleted file mode 100644 40892index 1de9f51f53a4c..0000000000000 40893--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-nested-sandboxed-frame.html 40894+++ /dev/null 40895@@ -1,10 +0,0 @@ 40896-<html> 40897- 40898-<body> 40899- This should create a sandboxed iframe. 40900- 40901- <iframe sandbox="allow-scripts allow-top-navigation" src="cross-iframe-that-performs-top-navigation-in-sandboxed-frame.html"></iframe> 40902- The navigation should fail. This text should be visible. 40903-</body> 40904- 40905-</html> 40906diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags-expected.txt b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags-expected.txt 40907deleted file mode 100644 40908index 9968bd11ac101..0000000000000 40909--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags-expected.txt 40910+++ /dev/null 40911@@ -1,3 +0,0 @@ 40912-localhost 40913- 40914-PASSED: Navigation succeeded. 40915diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags.html b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags.html 40916deleted file mode 100644 40917index 4a497cfbcfb8a..0000000000000 40918--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-two-flags.html 40919+++ /dev/null 40920@@ -1,28 +0,0 @@ 40921-<html> 40922-<head> 40923- <style> 40924- iframe { width: 400px; height: 200px;} 40925- </style> 40926- <script> 40927- if (window.testRunner) { 40928- testRunner.dumpAsText(); 40929- testRunner.waitUntilDone(); 40930- } 40931- 40932- function loaded() 40933- { 40934- document.getElementsByTagName('h4')[0].innerHTML = document.domain; 40935- var iframe = document.getElementById("i"); 40936- // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates. 40937- // Because the iframe is cross-origin, it can't get the offsets itself, so leak them. 40938- frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "*"); 40939- } 40940- </script> 40941-</head> 40942-<body onload="loaded();"> 40943- <p>This tests that an iframe in sandbox with both 'allow-top-navigation' and 'allow-top-navigation-by-user-activation' 40944- can navigate the top level page with a user gesture: Basically the later flag is ignored.</p> 40945- <h4>DOMAIN</h4> 40946- <iframe id="i" sandbox="allow-scripts allow-top-navigation allow-top-navigation-by-user-activation" src="resources/iframe-that-performs-parent-navigation.html"></iframe> 40947-</body> 40948-</html> 40949diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-expected.txt b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-expected.txt 40950deleted file mode 100644 40951index 9968bd11ac101..0000000000000 40952--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture-expected.txt 40953+++ /dev/null 40954@@ -1,3 +0,0 @@ 40955-localhost 40956- 40957-PASSED: Navigation succeeded. 40958diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html 40959deleted file mode 100644 40960index f2d93da4dc64a..0000000000000 40961--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-ALLOWED-top-navigation-with-user-gesture.html 40962+++ /dev/null 40963@@ -1,28 +0,0 @@ 40964-<html> 40965-<head> 40966- <style> 40967- iframe { width: 400px; height: 200px;} 40968- </style> 40969- <script> 40970- if (window.testRunner) { 40971- testRunner.dumpAsText(); 40972- testRunner.waitUntilDone(); 40973- } 40974- 40975- function loaded() 40976- { 40977- document.getElementsByTagName('h4')[0].innerHTML = document.domain; 40978- var iframe = document.getElementById("i"); 40979- // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates. 40980- // Because the iframe is cross-origin, it can't get the offsets itself, so leak them. 40981- frames[0].postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "*"); 40982- } 40983- </script> 40984-</head> 40985-<body onload="loaded();"> 40986- <p>This tests that an iframe in sandbox with 'allow-top-navigation-by-user-activation' 40987- can navigate the top level page, if it is trigged by a user gesture.</p> 40988- <h4>DOMAIN</h4> 40989- <iframe id="i" sandbox="allow-scripts allow-top-navigation-by-user-activation" src="resources/iframe-that-performs-parent-navigation.html"></iframe> 40990-</body> 40991-</html> 40992diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt 40993deleted file mode 100644 40994index 0700a107dc2e0..0000000000000 40995--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-expected.txt 40996+++ /dev/null 40997@@ -1,6 +0,0 @@ 40998-CONSOLE ERROR: Unsafe attempt to initiate navigation for frame with origin 'http://127.0.0.1:8000' from frame with URL 'https://localhost:8443/security/frameNavigation/resources/failed-top-navigation.html'. The frame attempting navigation of the top-level window is sandboxed and is not allowed to navigate since its ancestor frame with origin 'http://localhost:8080' is unable to navigate the top frame. 40999- 41000- 41001-This tests that an iframe in sandbox with 'allow-top-navigation' can't navigate the top level page if its ancestor can't. 41002- 41003-DOMAIN 41004diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt 41005deleted file mode 100644 41006index e2d0b476cfa88..0000000000000 41007--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox-expected.txt 41008+++ /dev/null 41009@@ -1,6 +0,0 @@ 41010-CONSOLE ERROR: Unsafe attempt to initiate navigation for frame with origin 'http://127.0.0.1:8000' from frame with URL 'https://localhost:8443/security/frameNavigation/resources/failed-top-navigation.html'. The frame attempting navigation of the top-level window is sandboxed and is not allowed to navigate since its ancestor frame with origin 'null' is unable to navigate the top frame. 41011- 41012- 41013-This tests that an iframe in a nested sandbox with 'allow-top-navigation' can't navigate the top level page if its ancestor can't. 41014- 41015-DOMAIN 41016diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox.html b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox.html 41017deleted file mode 100644 41018index 183f4c49cf825..0000000000000 41019--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation-nested-sandbox.html 41020+++ /dev/null 41021@@ -1,32 +0,0 @@ 41022-<html> 41023- 41024-<head> 41025- <style> 41026- iframe { 41027- width: 400px; 41028- height: 200px; 41029- } 41030- </style> 41031- <script> 41032- if (window.testRunner) { 41033- testRunner.dumpAsText(); 41034- testRunner.waitUntilDone(); 41035- } 41036- window.addEventListener("message", e => { 41037- if (e.data == "PASS") 41038- testRunner.notifyDone(); 41039- else 41040- testRunner.testFailed("'top.location' didn't throw."); 41041- }); 41042- </script> 41043-</head> 41044- 41045-<body> 41046- <p>This tests that an iframe in a nested sandbox with 'allow-top-navigation' 41047- can't navigate the top level page if its ancestor can't.</p> 41048- <h4>DOMAIN</h4> 41049- <iframe 41050- src="http://localhost:8080/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-nested-sandboxed-frame.html"></iframe> 41051-</body> 41052- 41053-</html> 41054diff --git a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation.html b/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation.html 41055deleted file mode 100644 41056index d174414760739..0000000000000 41057--- a/src/third_party/blink/web_tests/http/tests/security/frameNavigation/sandbox-DENIED-cross-origin-top-navigation.html 41058+++ /dev/null 41059@@ -1,32 +0,0 @@ 41060-<html> 41061- 41062-<head> 41063- <style> 41064- iframe { 41065- width: 400px; 41066- height: 200px; 41067- } 41068- </style> 41069- <script> 41070- if (window.testRunner) { 41071- testRunner.dumpAsText(); 41072- testRunner.waitUntilDone(); 41073- } 41074- window.addEventListener("message", e => { 41075- if (e.data == "PASS") 41076- testRunner.notifyDone(); 41077- else 41078- testRunner.testFailed("'top.location' didn't throw."); 41079- }); 41080- </script> 41081-</head> 41082- 41083-<body> 41084- <p>This tests that an iframe in sandbox with 'allow-top-navigation' 41085- can't navigate the top level page if its ancestor can't.</p> 41086- <h4>DOMAIN</h4> 41087- <iframe 41088- src="http://localhost:8080/security/frameNavigation/resources/cross-iframe-that-performs-top-navigation-in-sandboxed-frame.html"></iframe> 41089-</body> 41090- 41091-</html> 41092diff --git a/src/third_party/blink/web_tests/wpt_internal/fenced_frame/anchor-focus.https.html b/src/third_party/blink/web_tests/wpt_internal/fenced_frame/anchor-focus.https.html 41093new file mode 100644 41094index 0000000000000..82794d4666d21 41095--- /dev/null 41096+++ b/src/third_party/blink/web_tests/wpt_internal/fenced_frame/anchor-focus.https.html 41097@@ -0,0 +1,47 @@ 41098+<!DOCTYPE html> 41099+<title>Anchor based focusing across a fenced frame boundary</title> 41100+<script src="/resources/testdriver.js"></script> 41101+<script src="/resources/testdriver-actions.js"></script> 41102+<script src="/resources/testdriver-vendor.js"></script> 41103+<script src="/resources/testharness.js"></script> 41104+<script src="/resources/testharnessreport.js"></script> 41105+<script src="/common/utils.js"></script> 41106+<script src="/common/dispatcher/dispatcher.js"></script> 41107+<script src="resources/utils.js"></script> 41108+ 41109+<body> 41110+<script> 41111+function attemptAutofocus(frame) { 41112+ return frame.execute(async () => { 41113+ let autofocusInput = document.createElement('input'); 41114+ autofocusInput.id = "myinput"; 41115+ document.body.appendChild(autofocusInput); 41116+ document.location.href = document.location.href + "#myinput"; 41117+ await new Promise(resolve => requestAnimationFrame(resolve)); 41118+ return document.activeElement == autofocusInput; 41119+ }); 41120+} 41121+ 41122+promise_test(async () => { 41123+ const frame = attachFencedFrameContext(); 41124+ let autofocusIsFocused = await attemptAutofocus(frame); 41125+ assert_false(autofocusIsFocused, 41126+ "element should not get focus through anchor focusing"); 41127+}, "Anchor focusing is blocked on an element in a fenced frame " + 41128+ "without user activation."); 41129+ 41130+promise_test(async () => { 41131+ const frame = attachFencedFrameContext(); 41132+ const actions = new test_driver.Actions(); 41133+ await actions.pointerMove(0, 0, {origin: frame.element}) 41134+ .pointerDown() 41135+ .pointerUp() 41136+ .send(); 41137+ let autofocusIsFocused = await attemptAutofocus(frame); 41138+ assert_true(autofocusIsFocused, 41139+ "element should get focus through anchor focusing"); 41140+}, "Anchor focusing is allowed on an element in a fenced frame " + 41141+ "with user activation."); 41142+</script> 41143+</body> 41144+</html> 41145\ No newline at end of file 41146diff --git a/src/third_party/blink/web_tests/wpt_internal/fenced_frame/script-focus.https.html b/src/third_party/blink/web_tests/wpt_internal/fenced_frame/script-focus.https.html 41147new file mode 100644 41148index 0000000000000..14eae553efc1a 41149--- /dev/null 41150+++ b/src/third_party/blink/web_tests/wpt_internal/fenced_frame/script-focus.https.html 41151@@ -0,0 +1,205 @@ 41152+<!DOCTYPE html> 41153+<title>Test Script-Based Focus for Fenced Frames</title> 41154+<script src="/resources/testharness.js"></script> 41155+<script src="/resources/testharnessreport.js"></script> 41156+<script src="/resources/testdriver.js"></script> 41157+<script src="/resources/testdriver-actions.js"></script> 41158+<script src="/resources/testdriver-vendor.js"></script> 41159+<script src="/common/utils.js"></script> 41160+<script src="resources/utils.js"></script> 41161+<script src="/common/dispatcher/dispatcher.js"></script> 41162+ 41163+<script src="/common/get-host-info.sub.js"></script> 41164+ 41165+<body> 41166+<script> 41167+async function AttemptButtonFocus(frame, expecting_focus) { 41168+ await frame.execute(async (expecting_focus) => { 41169+ const button = document.createElement("button"); 41170+ document.body.append(button); 41171+ button.focus(); 41172+ assert_equals(document.activeElement == button, expecting_focus, 41173+ "Button's focus should match expected focus"); 41174+ }, [expecting_focus]); 41175+} 41176+ 41177+async function ClickOn(element, actions) { 41178+ // Wait until the window size is initialized. 41179+ while (window.innerWidth == 0) { 41180+ await new Promise(resolve => requestAnimationFrame(resolve)); 41181+ } 41182+ await actions.pointerMove(0, 0, {origin: element}) 41183+ .pointerDown() 41184+ .pointerUp() 41185+ .send(); 41186+} 41187+ 41188+async function SetupTest(click=true) { 41189+ // Clean up any leftover frames from prior tests. 41190+ document.querySelectorAll("fencedframe").forEach(e => { 41191+ e.remove(); 41192+ }) 41193+ 41194+ const actions = new test_driver.Actions(); 41195+ 41196+ const frame = attachFencedFrameContext(); 41197+ const fencedframe_element = frame.element; 41198+ 41199+ if (click) 41200+ await ClickOn(document.body, actions); 41201+ 41202+ return [actions, frame, fencedframe_element]; 41203+} 41204+ 41205+promise_test(async () => { 41206+ const [actions, ff1, ff1_element] = await SetupTest(false); 41207+ 41208+ await ClickOn(ff1_element, actions); 41209+ await AttemptButtonFocus(ff1, true); 41210+ 41211+ const button = document.createElement("button"); 41212+ document.body.append(button); 41213+ button.focus(); 41214+ assert_false(document.activeElement == button, 41215+ "The button should not have focus"); 41216+ assert_false(navigator.userActivation.isActive, 41217+ "Window should not have user activation"); 41218+}, "An embedder cannot pull focus out of a fenced frame"); 41219+ 41220+promise_test(async () => { 41221+ const [actions, frame, fencedframe_element] = await SetupTest(); 41222+ 41223+ await AttemptButtonFocus(frame, false); 41224+ await ClickOn(fencedframe_element, actions); 41225+ await AttemptButtonFocus(frame, true); 41226+}, "Fenced frames can't pull script focus until getting user activation"); 41227+ 41228+promise_test(async () => { 41229+ const [actions, frame, fencedframe_element] = await SetupTest(); 41230+ 41231+ await ClickOn(fencedframe_element, actions); 41232+ await ClickOn(document.body, actions); 41233+ 41234+ await AttemptButtonFocus(frame, true); 41235+ 41236+ // Give the browser time to receive the focus event before attempting 41237+ // another focus. 41238+ await setTimeout(async () => {await AttemptButtonFocus(frame, true);}, 20); 41239+}, "Focused fenced frames can move programmatic focus within frame"); 41240+ 41241+promise_test(async () => { 41242+ const [actions, frame, fencedframe_element] = await SetupTest(); 41243+ 41244+ await ClickOn(fencedframe_element, actions); 41245+ await ClickOn(document.body, actions); 41246+ 41247+ // This will pull focus across a frame boundary and consume user activation. 41248+ await AttemptButtonFocus(frame, true); 41249+ 41250+ await ClickOn(document.body, actions); 41251+ await AttemptButtonFocus(frame, false); 41252+}, "Script focus into a fenced frame consumes user activation"); 41253+ 41254+promise_test(async () => { 41255+ const [actions, ff1, ff1_element] = await SetupTest(); 41256+ 41257+ const ff2 = attachFencedFrameContext(); 41258+ const ff2_element = ff2.element; 41259+ 41260+ await ClickOn(ff1_element, actions); 41261+ 41262+ await AttemptButtonFocus(ff1, true); 41263+ await AttemptButtonFocus(ff2, false); 41264+}, "Another fenced frame cannot pull focus out of a focused fenced frame"); 41265+ 41266+promise_test(async () => { 41267+ const [actions, ff1, ff1_element] = await SetupTest(); 41268+ 41269+ await ClickOn(ff1_element, actions); 41270+ await AttemptButtonFocus(ff1, true); 41271+ 41272+ await ff1.execute(async () => { 41273+ const ff2 = attachFencedFrameContext(); 41274+ 41275+ await ff2.execute(async () => { 41276+ const button = document.createElement("button"); 41277+ document.body.append(button); 41278+ button.focus(); 41279+ assert_false(document.activeElement == button, 41280+ "The button should not have focus"); 41281+ assert_false(navigator.userActivation.isActive, 41282+ "The fenced frame should not have user activation"); 41283+ }); 41284+ }); 41285+}, "A fenced frame nested in another fenced frame cannot pull focus"); 41286+ 41287+promise_test(async () => { 41288+ const [actions, ff1, ff1_element] = await SetupTest(); 41289+ 41290+ await ClickOn(document.body, actions); 41291+ 41292+ const button = document.createElement("button"); 41293+ document.body.append(button); 41294+ button.focus(); 41295+ assert_equals(document.activeElement, button, 41296+ "The button in the main page should have focus."); 41297+ 41298+ await ff1.execute(async () => { 41299+ assert_false(navigator.userActivation.isActive, 41300+ "The fenced frame should not have user activation."); 41301+ window.focus(); 41302+ }); 41303+ 41304+ assert_equals(document.activeElement, button, 41305+ "The button in the main page should still have focus."); 41306+}, "A fenced frame cannot pull window.focus() without user activation"); 41307+ 41308+promise_test(async () => { 41309+ const [actions, ff1, ff1_element] = await SetupTest(); 41310+ 41311+ await ClickOn(ff1_element, actions); 41312+ await ClickOn(document.body, actions); 41313+ 41314+ const button = document.createElement("button"); 41315+ document.body.append(button); 41316+ button.focus(); 41317+ assert_equals(document.activeElement, button, 41318+ "The button should have focus."); 41319+ 41320+ await ff1.execute(async () => { 41321+ assert_true(navigator.userActivation.isActive, 41322+ "The fenced frame should have user activation."); 41323+ window.focus(); 41324+ assert_false(navigator.userActivation.isActive, 41325+ "The fenced frame's user activation should be consumed by the focus"); 41326+ }); 41327+ 41328+ assert_equals(document.activeElement, document.body, 41329+ "The main page's focus should be pulled away from the button."); 41330+}, "A fenced frame can pull window.focus() after user activation"); 41331+ 41332+promise_test(async () => { 41333+ var actions = new test_driver.Actions(); 41334+ 41335+ const frame = attachIFrameContext( 41336+ {origin: get_host_info().HTTPS_REMOTE_ORIGIN}); 41337+ const iframe_element = 41338+ document.body.getElementsByTagName('iframe')[0]; 41339+ 41340+ await frame.execute(async () => { 41341+ const button = document.createElement("button"); 41342+ document.body.append(button); 41343+ button.focus(); 41344+ assert_equals(document.activeElement, button, 41345+ "The button in the iframe should have focus."); 41346+ }, [true]); 41347+ 41348+ const button = document.createElement("button"); 41349+ document.body.append(button); 41350+ button.focus(); 41351+ assert_equals(document.activeElement, button, 41352+ "The button in the main page should have focus."); 41353+}, "An cross-origin iframe can pull focus back and forth without activation"); 41354+ 41355+</script> 41356+</body> 41357\ No newline at end of file 41358diff --git a/src/third_party/crashpad/crashpad/util/linux/ptrace_client.cc b/src/third_party/crashpad/crashpad/util/linux/ptrace_client.cc 41359index 9a34722ae2b53..d2b6638099450 41360--- a/src/third_party/crashpad/crashpad/util/linux/ptrace_client.cc 41361+++ b/src/third_party/crashpad/crashpad/util/linux/ptrace_client.cc 41362@@ -331,6 +331,11 @@ ssize_t PtraceClient::ReadUpTo(VMAddress address, size_t size, void* buffer) { 41363 return total_read; 41364 } 41365 41366+ if (static_cast<size_t>(bytes_read) > size) { 41367+ LOG(ERROR) << "invalid size " << bytes_read; 41368+ return -1; 41369+ } 41370+ 41371 if (!LoggingReadFileExactly(sock_, buffer_c, bytes_read)) { 41372 return -1; 41373 } 41374diff --git a/src/third_party/devtools-frontend/src/front_end/core/host/ResourceLoader.ts b/src/third_party/devtools-frontend/src/front_end/core/host/ResourceLoader.ts 41375index e4798d1a02a01..1623c308e2312 41376--- a/src/third_party/devtools-frontend/src/front_end/core/host/ResourceLoader.ts 41377+++ b/src/third_party/devtools-frontend/src/front_end/core/host/ResourceLoader.ts 41378@@ -105,9 +105,10 @@ export let load = function( 41379 arg0: boolean, arg1: { 41380 [x: string]: string, 41381 }, 41382- arg2: string, arg3: LoadErrorDescription) => void): void { 41383+ arg2: string, arg3: LoadErrorDescription) => void, 41384+ allowRemoteFilePaths: boolean): void { 41385 const stream = new Common.StringOutputStream.StringOutputStream(); 41386- loadAsStream(url, headers, stream, mycallback); 41387+ loadAsStream(url, headers, stream, mycallback, allowRemoteFilePaths); 41388 41389 function mycallback( 41390 success: boolean, headers: { 41391@@ -233,6 +234,15 @@ const loadXHR = (url: string): Promise<string> => { 41392 }); 41393 }; 41394 41395+function canBeRemoteFilePath(url: string): boolean { 41396+ try { 41397+ const urlObject = new URL(url); 41398+ return urlObject.protocol === 'file:' && urlObject.host !== ''; 41399+ } catch (exception) { 41400+ return false; 41401+ } 41402+} 41403+ 41404 export const loadAsStream = function( 41405 url: string, headers: { 41406 [x: string]: string, 41407@@ -242,7 +252,8 @@ export const loadAsStream = function( 41408 ((arg0: boolean, arg1: { 41409 [x: string]: string, 41410 }, 41411- arg2: LoadErrorDescription) => void)): void { 41412+ arg2: LoadErrorDescription) => void), 41413+ allowRemoteFilePaths?: boolean): void { 41414 const streamId = _bindOutputStream(stream); 41415 const parsedURL = new Common.ParsedURL.ParsedURL(url); 41416 if (parsedURL.isDataURL()) { 41417@@ -250,6 +261,19 @@ export const loadAsStream = function( 41418 return; 41419 } 41420 41421+ if (!allowRemoteFilePaths && canBeRemoteFilePath(url)) { 41422+ // Remote file paths can cause security problems, see crbug.com/1342722. 41423+ if (callback) { 41424+ callback(/* success */ false, /* headers */ {}, { 41425+ statusCode: 400, // BAD_REQUEST 41426+ netError: -20, // BLOCKED_BY_CLIENT 41427+ netErrorName: 'net::BLOCKED_BY_CLIENT', 41428+ message: 'Loading from a remote file path is prohibited for security reasons.', 41429+ }); 41430+ } 41431+ return; 41432+ } 41433+ 41434 const rawHeaders = []; 41435 if (headers) { 41436 for (const key in headers) { 41437diff --git a/src/third_party/devtools-frontend/src/front_end/core/i18n/DevToolsLocale.ts b/src/third_party/devtools-frontend/src/front_end/core/i18n/DevToolsLocale.ts 41438index ca742c9476dbe..589133b13533f 41439--- a/src/third_party/devtools-frontend/src/front_end/core/i18n/DevToolsLocale.ts 41440+++ b/src/third_party/devtools-frontend/src/front_end/core/i18n/DevToolsLocale.ts 41441@@ -55,6 +55,10 @@ export class DevToolsLocale { 41442 return devToolsLocaleInstance as DevToolsLocale; 41443 } 41444 41445+ static removeInstance(): void { 41446+ devToolsLocaleInstance = null; 41447+ } 41448+ 41449 forceFallbackLocale(): void { 41450 // Locale is 'readonly', this is the only case where we want to forceably 41451 // overwrite the locale. 41452diff --git a/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-US.json b/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-US.json 41453index 71fb5dab8441c..2bfc75c6aef02 41454--- a/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-US.json 41455+++ b/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-US.json 41456@@ -692,6 +692,9 @@ 41457 "core/sdk/sdk-meta.ts | enableNetworkRequestBlocking": { 41458 "message": "Enable network request blocking" 41459 }, 41460+ "core/sdk/sdk-meta.ts | enableRemoteFileLoading": { 41461+ "message": "Allow DevTools to load resources, such as source maps, from remote file paths. Disabled by default for security reasons." 41462+ }, 41463 "core/sdk/sdk-meta.ts | enableWebpFormat": { 41464 "message": "Enable WebP format" 41465 }, 41466diff --git a/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-XL.json b/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-XL.json 41467index b4cab385aae68..299cf99653c59 41468--- a/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-XL.json 41469+++ b/src/third_party/devtools-frontend/src/front_end/core/i18n/locales/en-XL.json 41470@@ -692,6 +692,9 @@ 41471 "core/sdk/sdk-meta.ts | enableNetworkRequestBlocking": { 41472 "message": "Êńâb́l̂é n̂ét̂ẃôŕk̂ ŕêq́ûéŝt́ b̂ĺôćk̂ín̂ǵ" 41473 }, 41474+ "core/sdk/sdk-meta.ts | enableRemoteFileLoading": { 41475+ "message": "Âĺl̂óŵ DevTools t́ô ĺôád̂ ŕêśôúr̂ćêś, ŝúĉh́ âś ŝóûŕĉé m̂áp̂ś, f̂ŕôḿ r̂ém̂ót̂é f̂íl̂é p̂át̂h́ŝ. D́îśâb́l̂éd̂ b́ŷ d́êf́âúl̂t́ f̂ór̂ śêćûŕît́ŷ ŕêáŝón̂ś." 41476+ }, 41477 "core/sdk/sdk-meta.ts | enableWebpFormat": { 41478 "message": "Êńâb́l̂é WebP f̂ór̂ḿât́" 41479 }, 41480diff --git a/src/third_party/devtools-frontend/src/front_end/core/sdk/NetworkManager.ts b/src/third_party/devtools-frontend/src/front_end/core/sdk/NetworkManager.ts 41481index 51504a3685397..3313544f1201c 41482--- a/src/third_party/devtools-frontend/src/front_end/core/sdk/NetworkManager.ts 41483+++ b/src/third_party/devtools-frontend/src/front_end/core/sdk/NetworkManager.ts 41484@@ -1442,10 +1442,13 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe 41485 headers['Cache-Control'] = 'no-cache'; 41486 } 41487 41488+ const allowRemoteFilePaths = 41489+ Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get(); 41490+ 41491 return new Promise( 41492 resolve => Host.ResourceLoader.load(url, headers, (success, _responseHeaders, content, errorDescription) => { 41493 resolve({success, content, errorDescription}); 41494- })); 41495+ }, allowRemoteFilePaths)); 41496 } 41497 } 41498 41499diff --git a/src/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts b/src/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts 41500index 51965731f4158..1808d192246e9 41501--- a/src/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts 41502+++ b/src/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts 41503@@ -314,6 +314,11 @@ const UIStrings = { 41504 * emulates that the webpage is in auto dark mode. 41505 */ 41506 emulateAutoDarkMode: 'Emulate auto dark mode', 41507+ /** 41508+ * @description Label of a checkbox in the DevTools settings UI. 41509+ */ 41510+ enableRemoteFileLoading: 41511+ 'Allow `DevTools` to load resources, such as source maps, from remote file paths. Disabled by default for security reasons.', 41512 }; 41513 const str_ = i18n.i18n.registerUIStrings('core/sdk/sdk-meta.ts', UIStrings); 41514 const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_); 41515@@ -1033,3 +1038,12 @@ Common.Settings.registerSettingExtension({ 41516 storageType: Common.Settings.SettingStorageType.Session, 41517 defaultValue: false, 41518 }); 41519+ 41520+Common.Settings.registerSettingExtension({ 41521+ category: Common.Settings.SettingCategory.SOURCES, 41522+ storageType: Common.Settings.SettingStorageType.Synced, 41523+ title: i18nLazyString(UIStrings.enableRemoteFileLoading), 41524+ settingName: 'network.enable-remote-file-loading', 41525+ settingType: Common.Settings.SettingType.BOOLEAN, 41526+ defaultValue: false, 41527+}); 41528diff --git a/src/third_party/devtools-frontend/src/front_end/panels/timeline/TimelineLoader.ts b/src/third_party/devtools-frontend/src/front_end/panels/timeline/TimelineLoader.ts 41529index c00d1e4099e84..87f38defe9107 41530--- a/src/third_party/devtools-frontend/src/front_end/panels/timeline/TimelineLoader.ts 41531+++ b/src/third_party/devtools-frontend/src/front_end/panels/timeline/TimelineLoader.ts 41532@@ -79,17 +79,8 @@ export class TimelineLoader implements Common.StringOutputStream.OutputStream { 41533 41534 static loadFromEvents(events: SDK.TracingManager.EventPayload[], client: Client): TimelineLoader { 41535 const loader = new TimelineLoader(client); 41536- 41537 window.setTimeout(async () => { 41538- const eventsPerChunk = 5000; 41539- client.loadingStarted(); 41540- for (let i = 0; i < events.length; i += eventsPerChunk) { 41541- const chunk = events.slice(i, i + eventsPerChunk); 41542- (loader.tracingModel as SDK.TracingModel.TracingModel).addEvents(chunk); 41543- client.loadingProgress((i + chunk.length) / events.length); 41544- await new Promise(r => window.setTimeout(r)); // Yield event loop to paint. 41545- } 41546- void loader.close(); 41547+ void loader.addEvents(events); 41548 }); 41549 41550 return loader; 41551@@ -97,10 +88,39 @@ export class TimelineLoader implements Common.StringOutputStream.OutputStream { 41552 41553 static loadFromURL(url: string, client: Client): TimelineLoader { 41554 const loader = new TimelineLoader(client); 41555- Host.ResourceLoader.loadAsStream(url, null, loader); 41556+ const stream = new Common.StringOutputStream.StringOutputStream(); 41557+ client.loadingStarted(); 41558+ 41559+ const allowRemoteFilePaths = 41560+ Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get(); 41561+ Host.ResourceLoader.loadAsStream(url, null, stream, finishedCallback, allowRemoteFilePaths); 41562+ 41563+ function finishedCallback( 41564+ success: boolean, _headers: {[x: string]: string}, 41565+ errorDescription: Host.ResourceLoader.LoadErrorDescription): void { 41566+ if (!success) { 41567+ return loader.reportErrorAndCancelLoading(errorDescription.message); 41568+ } 41569+ const txt = stream.data(); 41570+ const events = JSON.parse(txt); 41571+ void loader.addEvents(events); 41572+ } 41573+ 41574 return loader; 41575 } 41576 41577+ async addEvents(events: SDK.TracingManager.EventPayload[]): Promise<void> { 41578+ this.client?.loadingStarted(); 41579+ const eventsPerChunk = 5000; 41580+ for (let i = 0; i < events.length; i += eventsPerChunk) { 41581+ const chunk = events.slice(i, i + eventsPerChunk); 41582+ (this.tracingModel as SDK.TracingModel.TracingModel).addEvents(chunk); 41583+ this.client?.loadingProgress((i + chunk.length) / events.length); 41584+ await new Promise(r => window.setTimeout(r)); // Yield event loop to paint. 41585+ } 41586+ void this.close(); 41587+ } 41588+ 41589 cancel(): void { 41590 this.tracingModel = null; 41591 this.backingStorage.reset(); 41592diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/PageResourceLoader_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/PageResourceLoader_test.ts 41593index 70d667decad2b..c072b3195ca08 41594--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/PageResourceLoader_test.ts 41595+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/PageResourceLoader_test.ts 41596@@ -4,9 +4,12 @@ 41597 41598 const {assert} = chai; 41599 41600-import type * as Host from '../../../../../front_end/core/host/host.js'; 41601+import * as Common from '../../../../../front_end/core/common/common.js'; 41602+import * as Host from '../../../../../front_end/core/host/host.js'; 41603 import * as SDK from '../../../../../front_end/core/sdk/sdk.js'; 41604+import * as Platform from '../../../../../front_end/core/platform/platform.js'; 41605 import type * as Protocol from '../../../../../front_end/generated/protocol.js'; 41606+import {describeWithEnvironment, describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 41607 41608 interface LoadResult { 41609 success: boolean; 41610@@ -14,7 +17,13 @@ interface LoadResult { 41611 errorDescription: Host.ResourceLoader.LoadErrorDescription; 41612 } 41613 41614-describe('PageResourceLoader', () => { 41615+const initiator = { 41616+ target: null, 41617+ frameId: '123' as Protocol.Page.FrameId, 41618+ initiatorUrl: '' 41619+}; 41620+ 41621+describeWithLocale('PageResourceLoader', () => { 41622 const loads: Array<{url: string}> = []; 41623 const load = (url: string): Promise<LoadResult> => { 41624 loads.push({url}); 41625@@ -26,8 +35,6 @@ describe('PageResourceLoader', () => { 41626 }); 41627 }; 41628 41629- const initiator = {target: null, frameId: '123' as Protocol.Page.FrameId, initiatorUrl: ''}; 41630- 41631 beforeEach(() => { 41632 loads.length = 0; 41633 }); 41634@@ -120,3 +127,85 @@ describe('PageResourceLoader', () => { 41635 assert.isTrue(resources.every(x => x.success)); 41636 }); 41637 }); 41638+ 41639+// Loading via host bindings requires the settings infra to be booted. 41640+describeWithEnvironment('PageResourceLoader', () => { 41641+ it('blocks UNC file paths with the default setting', async () => { 41642+ if (!Host.Platform.isWin()) { 41643+ return; 41644+ } 41645+ 41646+ const loader = SDK.PageResourceLoader.PageResourceLoader.instance( 41647+ {forceNew: true, loadOverride: null, maxConcurrentLoads: 1, loadTimeout: 30_000}); 41648+ 41649+ const message = 41650+ await loader 41651+ .loadResource('file:////127.0.0.1/share/source-map.js.map' as Platform.DevToolsPath.UrlString, initiator) 41652+ .catch(e => e.message); 41653+ 41654+ assert.include(message, 'remote file'); 41655+ }); 41656+ 41657+ it('blocks remote file paths with the default setting', async () => { 41658+ const loader = SDK.PageResourceLoader.PageResourceLoader.instance( 41659+ {forceNew: true, loadOverride: null, maxConcurrentLoads: 1, loadTimeout: 30_000}); 41660+ 41661+ const message = 41662+ await loader.loadResource('file://host/source-map.js.map' as Platform.DevToolsPath.UrlString, initiator) 41663+ .catch(e => e.message); 41664+ 41665+ assert.include(message, 'remote file'); 41666+ }); 41667+ 41668+ it('blocks UNC file paths with a backslash on Windows with the default setting', async () => { 41669+ if (!Host.Platform.isWin()) { 41670+ return; 41671+ } 41672+ 41673+ const loader = SDK.PageResourceLoader.PageResourceLoader.instance( 41674+ {forceNew: true, loadOverride: null, maxConcurrentLoads: 1, loadTimeout: 30_000}); 41675+ 41676+ const message = 41677+ await loader 41678+ .loadResource('file:///\\127.0.0.1/share/source-map.js.map' as Platform.DevToolsPath.UrlString, initiator) 41679+ .catch(e => e.message); 41680+ 41681+ assert.include(message, 'remote file'); 41682+ }); 41683+ 41684+ it('allows remote file paths with the setting enabled', async () => { 41685+ const loader = SDK.PageResourceLoader.PageResourceLoader.instance( 41686+ {forceNew: true, loadOverride: null, maxConcurrentLoads: 1, loadTimeout: 30_000}); 41687+ sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'loadNetworkResource') 41688+ .callsFake((_url, _headers, streamId, callback) => { 41689+ Host.ResourceLoader.streamWrite(streamId, 'content of the source map'); 41690+ callback({statusCode: 200}); 41691+ }); 41692+ 41693+ Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').set(true); 41694+ const response = 41695+ await loader.loadResource('file://host/source-map.js.map' as Platform.DevToolsPath.UrlString, initiator); 41696+ 41697+ assert.strictEqual(response.content, 'content of the source map'); 41698+ }); 41699+ 41700+ it('allows UNC paths on Windows with the setting enabled', async () => { 41701+ if (!Host.Platform.isWin()) { 41702+ return; 41703+ } 41704+ 41705+ const loader = SDK.PageResourceLoader.PageResourceLoader.instance( 41706+ {forceNew: true, loadOverride: null, maxConcurrentLoads: 1, loadTimeout: 30_000}); 41707+ sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'loadNetworkResource') 41708+ .callsFake((_url, _headers, streamId, callback) => { 41709+ Host.ResourceLoader.streamWrite(streamId, 'content of the source map'); 41710+ callback({statusCode: 200}); 41711+ }); 41712+ 41713+ Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').set(true); 41714+ const response = await loader.loadResource( 41715+ 'file:////127.0.0.1/share/source-map.js.map' as Platform.DevToolsPath.UrlString, initiator); 41716+ 41717+ assert.strictEqual(response.content, 'content of the source map'); 41718+ }); 41719+}); 41720diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/ServerTiming_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/ServerTiming_test.ts 41721index d3c9ca762a25e..c30c5d30a2bda 41722--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/ServerTiming_test.ts 41723+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/ServerTiming_test.ts 41724@@ -5,6 +5,7 @@ 41725 const {assert} = chai; 41726 41727 import * as SDK from '../../../../../front_end/core/sdk/sdk.js'; 41728+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 41729 41730 describe('ServerTiming', () => { 41731 it('can be instantiated correctly', () => { 41732@@ -15,7 +16,7 @@ describe('ServerTiming', () => { 41733 }); 41734 }); 41735 41736-describe('SDK.ServerTiming.ServerTiming.createFromHeaderValue', () => { 41737+describeWithLocale('SDK.ServerTiming.ServerTiming.createFromHeaderValue', () => { 41738 it('parses headers correctly', () => { 41739 // A real-world-like example with some edge cases. 41740 const actual = SDK.ServerTiming.ServerTiming.createFromHeaderValue( 41741diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/helpers/EnvironmentHelpers.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/helpers/EnvironmentHelpers.ts 41742index d67800bfdd23e..940e78e39dc2a 41743--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/helpers/EnvironmentHelpers.ts 41744+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/helpers/EnvironmentHelpers.ts 41745@@ -48,25 +48,7 @@ const REGISTERED_EXPERIMENTS = [ 41746 ]; 41747 41748 export async function initializeGlobalVars({reset = true} = {}) { 41749- // Expose the locale. 41750- i18n.DevToolsLocale.DevToolsLocale.instance({ 41751- create: true, 41752- data: { 41753- navigatorLanguage: 'en-US', 41754- settingLanguage: 'en-US', 41755- lookupClosestDevToolsLocale: () => 'en-US', 41756- }, 41757- }); 41758- 41759- // Load the strings from the resource file. 41760- const locale = i18n.DevToolsLocale.DevToolsLocale.instance().locale; 41761- // proxied call. 41762- try { 41763- await i18n.i18n.fetchAndRegisterLocaleData(locale); 41764- } catch (error) { 41765- // eslint-disable-next-line no-console 41766- console.warn('EnvironmentHelper: Loading en-US locale failed', error.message); 41767- } 41768+ await initializeGlobalLocaleVars(); 41769 41770 // Create the appropriate settings needed to boot. 41771 const settings = [ 41772@@ -150,6 +132,9 @@ export async function initializeGlobalVars({reset = true} = {}) { 41773 Common.Settings.SettingCategory.APPEARANCE, 'uiTheme', 'systemPreferred', Common.Settings.SettingType.ENUM), 41774 createSettingValue( 41775 Common.Settings.SettingCategory.APPEARANCE, 'language', 'en-US', Common.Settings.SettingType.ENUM), 41776+ createSettingValue( 41777+ Common.Settings.SettingCategory.SOURCES, 'network.enable-remote-file-loading', false, 41778+ Common.Settings.SettingType.BOOLEAN), 41779 ]; 41780 41781 Common.Settings.registerSettingsForTest(settings, reset); 41782@@ -185,6 +170,7 @@ export async function deinitializeGlobalVars() { 41783 Root.Runtime.experiments.clearForTest(); 41784 41785 // Remove instances. 41786+ await deinitializeGlobalLocaleVars(); 41787 SDK.TargetManager.TargetManager.removeInstance(); 41788 Root.Runtime.Runtime.removeInstance(); 41789 Common.Settings.Settings.removeInstance(); 41790@@ -210,6 +196,40 @@ export function describeWithEnvironment(title: string, fn: (this: Mocha.Suite) = 41791 }); 41792 } 41793 41794+export async function initializeGlobalLocaleVars() { 41795+ // Expose the locale. 41796+ i18n.DevToolsLocale.DevToolsLocale.instance({ 41797+ create: true, 41798+ data: { 41799+ navigatorLanguage: 'en-US', 41800+ settingLanguage: 'en-US', 41801+ lookupClosestDevToolsLocale: () => 'en-US', 41802+ }, 41803+ }); 41804+ 41805+ // Load the strings from the resource file. 41806+ const locale = i18n.DevToolsLocale.DevToolsLocale.instance().locale; 41807+ // proxied call. 41808+ try { 41809+ await i18n.i18n.fetchAndRegisterLocaleData(locale); 41810+ } catch (error) { 41811+ // eslint-disable-next-line no-console 41812+ console.warn('EnvironmentHelper: Loading en-US locale failed', error.message); 41813+ } 41814+} 41815+ 41816+export function deinitializeGlobalLocaleVars() { 41817+ i18n.DevToolsLocale.DevToolsLocale.removeInstance(); 41818+} 41819+ 41820+export function describeWithLocale(title: string, fn: (this: Mocha.Suite) => void) { 41821+ return describe(`locale-${title}`, () => { 41822+ before(async () => await initializeGlobalLocaleVars()); 41823+ after(deinitializeGlobalLocaleVars); 41824+ describe(title, fn); 41825+ }); 41826+} 41827+ 41828 export function createFakeSetting<T>(name: string, defaultValue: T): Common.Settings.Setting<T> { 41829 const storage = new Common.Settings.SettingsStorage({}, Common.Settings.NOOP_STORAGE, 'test'); 41830 return new Common.Settings.Setting(name, defaultValue, new Common.ObjectWrapper.ObjectWrapper(), storage); 41831diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/models/har/HARWriter_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/models/har/HARWriter_test.ts 41832index 27fd0f46921f5..7c6c9a374dc3b 41833--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/models/har/HARWriter_test.ts 41834+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/models/har/HARWriter_test.ts 41835@@ -9,6 +9,7 @@ import * as SDK from '../../../../../front_end/core/sdk/sdk.js'; 41836 import * as UI from '../../../../../front_end/ui/legacy/legacy.js'; 41837 import * as HAR from '../../../../../front_end/models/har/har.js'; 41838 import type * as Protocol from '../../../../../front_end/generated/protocol.js'; 41839+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 41840 41841 const simulateRequestWithStartTime = (startTime: number): SDK.NetworkRequest.NetworkRequest => { 41842 const requestId = 'r0' as Protocol.Network.RequestId; 41843@@ -18,7 +19,7 @@ const simulateRequestWithStartTime = (startTime: number): SDK.NetworkRequest.Net 41844 return request; 41845 }; 41846 41847-describe('HARWriter', () => { 41848+describeWithLocale('HARWriter', () => { 41849 it('can correctly sort exported requests logs', async () => { 41850 const req1Time = new Date(2020, 0, 3); 41851 const req2Time = new Date(2020, 1, 3); 41852diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/ServiceWorkerUpdateCycleView_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/ServiceWorkerUpdateCycleView_test.ts 41853index db346b014fa37..30aa50e1fe083 41854--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/ServiceWorkerUpdateCycleView_test.ts 41855+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/ServiceWorkerUpdateCycleView_test.ts 41856@@ -7,10 +7,11 @@ const {assert} = chai; 41857 import type * as SDKModule from '../../../../../front_end/core/sdk/sdk.js'; 41858 import * as Resources from '../../../../../front_end/panels/application/application.js'; 41859 import * as Protocol from '../../../../../front_end/generated/protocol.js'; 41860+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 41861 41862 import View = Resources.ServiceWorkerUpdateCycleView; 41863 41864-describe('ServiceWorkerUpdateCycleView', () => { 41865+describeWithLocale('ServiceWorkerUpdateCycleView', () => { 41866 let versionId = 0; 41867 let SDK: typeof SDKModule; 41868 before(async () => { 41869diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/EndpointsGrid_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/EndpointsGrid_test.ts 41870index 99e9e8fb39f5e..e2f98b8e87b83 41871--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/EndpointsGrid_test.ts 41872+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/EndpointsGrid_test.ts 41873@@ -6,6 +6,7 @@ import * as ApplicationComponents from '../../../../../../front_end/panels/appli 41874 import * as DataGrid from '../../../../../../front_end/ui/components/data_grid/data_grid.js'; 41875 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 41876 import {assertShadowRoot, getElementWithinComponent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41877+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41878 import {getHeaderCells, getValuesOfAllBodyRows} from '../../../ui/components/DataGridHelpers.js'; 41879 41880 const {assert} = chai; 41881@@ -38,7 +39,7 @@ const getHeaderText = (cell: HTMLTableCellElement): string|null => { 41882 cell.querySelector('devtools-resources-endpoints-grid-status-header')?.shadowRoot?.textContent?.trim() || null; 41883 }; 41884 41885-describe('EndpointsGrid', async () => { 41886+describeWithLocale('EndpointsGrid', async () => { 41887 it('displays placeholder text if no data', async () => { 41888 const component = new ApplicationComponents.EndpointsGrid.EndpointsGrid(); 41889 renderElementIntoDOM(component); 41890diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/OriginTrialTreeView_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/OriginTrialTreeView_test.ts 41891index 476dd2cc7f43f..2e2e3febbee82 41892--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/OriginTrialTreeView_test.ts 41893+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/OriginTrialTreeView_test.ts 41894@@ -7,6 +7,7 @@ import * as ApplicationComponents from '../../../../../../front_end/panels/appli 41895 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 41896 import * as TreeOutline from '../../../../../../front_end/ui/components/tree_outline/tree_outline.js'; 41897 import {assertElement, assertShadowRoot, getElementWithinComponent, renderElementIntoDOM, stripLitHtmlCommentNodes} from '../../../helpers/DOMHelpers.js'; 41898+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41899 41900 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 41901 41902@@ -204,7 +205,7 @@ async function waitForRenderedTreeNodeCount(shadowRoot: ShadowRoot, expectedNode 41903 }); 41904 } 41905 41906-describe('OriginTrialTreeView', () => { 41907+describeWithLocale('OriginTrialTreeView', () => { 41908 it('renders trial names as root tree nodes', async () => { 41909 const {shadowRoot} = await renderOriginTrialTreeViewTreeOutline({ 41910 trials: [ 41911diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/StackTrace_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/StackTrace_test.ts 41912index 570f29a5e451f..0256dc4c788bf 41913--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/StackTrace_test.ts 41914+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/StackTrace_test.ts 41915@@ -8,6 +8,7 @@ import * as ExpandableList from '../../../../../../front_end/ui/components/expan 41916 import * as Components from '../../../../../../front_end/ui/legacy/components/utils/utils.js'; 41917 import type * as Protocol from '../../../../../../front_end/generated/protocol.js'; 41918 import {assertElement, assertShadowRoot, dispatchClickEvent, getCleanTextContentFromElements, getElementWithinComponent, getElementsWithinComponent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41919+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41920 41921 const {assert} = chai; 41922 41923@@ -40,7 +41,7 @@ function mockBuildStackTraceRows( 41924 41925 const fakeScriptId = '1' as Protocol.Runtime.ScriptId; 41926 41927-describe('StackTrace', () => { 41928+describeWithLocale('StackTrace', () => { 41929 it('does not generate rows when there is no data', () => { 41930 const component = new ApplicationComponents.StackTrace.StackTrace(); 41931 const rows = component.createRowTemplates(); 41932diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/TrustTokensView_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/TrustTokensView_test.ts 41933index ecef6ea6f9186..97bbfe2bdb1be 41934--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/TrustTokensView_test.ts 41935+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/application/components/TrustTokensView_test.ts 41936@@ -8,6 +8,7 @@ import * as Coordinator from '../../../../../../front_end/ui/components/render_c 41937 import type * as Protocol from '../../../../../../front_end/generated/protocol.js'; 41938 import {assertElement, assertShadowRoot, dispatchClickEvent, getElementWithinComponent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41939 import {getCellByIndexes, getValuesOfAllBodyRows} from '../../../ui/components/DataGridHelpers.js'; 41940+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41941 41942 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 41943 41944@@ -35,7 +36,7 @@ function getInternalDataGridShadowRoot(component: ApplicationComponents.TrustTok 41945 return dataGrid.shadowRoot; 41946 } 41947 41948-describe('TrustTokensView', () => { 41949+describeWithLocale('TrustTokensView', () => { 41950 it('renders trust token data', async () => { 41951 const component = await renderTrustTokensView([ 41952 {issuerOrigin: 'foo.com', count: 42}, 41953diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/AccessibilityTreeNode_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/AccessibilityTreeNode_test.ts 41954index f677eb6e05d1a..4425fc4a8a966 41955--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/AccessibilityTreeNode_test.ts 41956+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/AccessibilityTreeNode_test.ts 41957@@ -5,10 +5,11 @@ 41958 import * as ElementsComponents from '../../../../../../front_end/panels/elements/components/components.js'; 41959 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 41960 import {assertShadowRoot, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41961+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41962 41963 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 41964 41965-describe('AccessibilityTreeNode', () => { 41966+describeWithLocale('AccessibilityTreeNode', () => { 41967 it('renders role and name correctly for unignored nodes', async () => { 41968 const component = new ElementsComponents.AccessibilityTreeNode.AccessibilityTreeNode(); 41969 renderElementIntoDOM(component); 41970diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/LayoutPane_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/LayoutPane_test.ts 41971index 6a11386234a04..11d7571a6fb80 41972--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/LayoutPane_test.ts 41973+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/LayoutPane_test.ts 41974@@ -5,10 +5,11 @@ 41975 import * as Common from '../../../../../../front_end/core/common/common.js'; 41976 import * as ElementsComponents from '../../../../../../front_end/panels/elements/components/components.js'; 41977 import {assertElement, assertShadowRoot, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41978+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41979 41980 const {assert} = chai; 41981 41982-describe('LayoutPane', async () => { 41983+describeWithLocale('LayoutPane', async () => { 41984 function queryLabels(component: HTMLElement, selector: string) { 41985 assertShadowRoot(component.shadowRoot); 41986 return Array.from(component.shadowRoot.querySelectorAll(selector)).map(label => { 41987diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/StylePropertyEditor_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/StylePropertyEditor_test.ts 41988index bf8b02367840e..7c37b78806923 41989--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/StylePropertyEditor_test.ts 41990+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/StylePropertyEditor_test.ts 41991@@ -4,10 +4,11 @@ 41992 41993 import * as ElementsComponents from '../../../../../../front_end/panels/elements/components/components.js'; 41994 import {assertElement, assertShadowRoot, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 41995+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 41996 41997 const {assert} = chai; 41998 41999-describe('StylePropertyEditor', async () => { 42000+describeWithLocale('StylePropertyEditor', async () => { 42001 function assertValues(component: HTMLElement, values: string[]) { 42002 assertShadowRoot(component.shadowRoot); 42003 const propertyElements = component.shadowRoot.querySelectorAll('.property'); 42004diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/issues/GenericIssue_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/issues/GenericIssue_test.ts 42005index 17731d050b3d7..9c05056dfca7e 42006--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/issues/GenericIssue_test.ts 42007+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/issues/GenericIssue_test.ts 42008@@ -8,8 +8,9 @@ import * as IssuesManager from '../../../../../front_end/models/issues_manager/i 42009 import type * as SDK from '../../../../../front_end/core/sdk/sdk.js'; 42010 import {MockIssuesModel} from '../../models/issues_manager/MockIssuesModel.js'; 42011 import * as Protocol from '../../../../../front_end/generated/protocol.js'; 42012+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 42013 42014-describe('GenericIssue', async () => { 42015+describeWithLocale('GenericIssue', async () => { 42016 const mockModel = new MockIssuesModel([]) as unknown as SDK.IssuesModel.IssuesModel; 42017 42018 function createProtocolIssueWithoutDetails(): Protocol.Audits.InspectorIssue { 42019diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/network/components/RequestTrustTokensView_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/network/components/RequestTrustTokensView_test.ts 42020index 4bad3af24c994..5818b66c1c5b3 42021--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/network/components/RequestTrustTokensView_test.ts 42022+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/network/components/RequestTrustTokensView_test.ts 42023@@ -6,10 +6,11 @@ import {assertNotNullOrUndefined} from '../../../../../../front_end/core/platfor 42024 import * as Protocol from '../../../../../../front_end/generated/protocol.js'; 42025 import * as NetworkComponents from '../../../../../../front_end/panels/network/components/components.js'; 42026 import {getElementsWithinComponent, getElementWithinComponent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42027+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42028 42029 const {assert} = chai; 42030 42031-describe('RequestTrustTokensView', () => { 42032+describeWithLocale('RequestTrustTokensView', () => { 42033 const mockId = 'mockId' as Protocol.Network.RequestId; 42034 42035 const renderRequestTrustTokensView = () => { 42036diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/settings/emulation/components/UserAgentClientHintsForm_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/settings/emulation/components/UserAgentClientHintsForm_test.ts 42037index 577cf7d306f9c..802270f0329d0 42038--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/settings/emulation/components/UserAgentClientHintsForm_test.ts 42039+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/settings/emulation/components/UserAgentClientHintsForm_test.ts 42040@@ -4,10 +4,11 @@ 42041 import * as EmulationComponents from '../../../../../../../front_end/panels/settings/emulation/components/components.js'; 42042 import * as Buttons from '../../../../../../../front_end/ui/components/buttons/buttons.js'; 42043 import {getElementsWithinComponent, getElementWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../../helpers/DOMHelpers.js'; 42044+import {describeWithLocale} from '../../../../helpers/EnvironmentHelpers.js'; 42045 42046 const {assert} = chai; 42047 42048-describe('UserAgentClientHintsForm', () => { 42049+describeWithLocale('UserAgentClientHintsForm', () => { 42050 const testMetaData = { 42051 brands: [ 42052 { 42053diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/components/WebVitalsTimeline_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/components/WebVitalsTimeline_test.ts 42054index 42534f5f955ee..28a6391bf00b8 42055--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/components/WebVitalsTimeline_test.ts 42056+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/components/WebVitalsTimeline_test.ts 42057@@ -3,10 +3,11 @@ 42058 // found in the LICENSE file. 42059 42060 import * as TimelineComponents from '../../../../../../front_end/panels/timeline/components/components.js'; 42061+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42062 42063 const {assert} = chai; 42064 42065-describe('WebVitalsTimeline', () => { 42066+describeWithLocale('WebVitalsTimeline', () => { 42067 it('should instantiate without problems', () => { 42068 const node = new TimelineComponents.WebVitalsTimeline.WebVitalsTimeline(); 42069 assert.instanceOf(node, TimelineComponents.WebVitalsTimeline.WebVitalsTimeline); 42070diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/ListWidget_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/ListWidget_test.ts 42071index b9ca80afdc02f..c917a10fef72d 42072--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/ListWidget_test.ts 42073+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/ListWidget_test.ts 42074@@ -5,8 +5,9 @@ 42075 const {assert} = chai; 42076 42077 import * as UI from '../../../../front_end/ui/legacy/legacy.js'; 42078+import {describeWithLocale} from '../helpers/EnvironmentHelpers.js'; 42079 42080-describe('ListWidget', () => { 42081+describeWithLocale('ListWidget', () => { 42082 it('Cancel button triggers on mouse click event', () => { 42083 const editor = new UI.ListWidget.Editor<string>(); 42084 document.body.appendChild(editor.element); 42085diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/Linkifier_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/Linkifier_test.ts 42086index a65ca46e7a867..8e26ffab83110 42087--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/Linkifier_test.ts 42088+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/Linkifier_test.ts 42089@@ -4,13 +4,14 @@ 42090 42091 import * as Linkifier from '../../../../../front_end/ui/components/linkifier/linkifier.js'; 42092 import * as Coordinator from '../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42093+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 42094 42095 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 42096 42097 import {assertElement, assertShadowRoot, dispatchClickEvent, getEventPromise, renderElementIntoDOM} from '../../helpers/DOMHelpers.js'; 42098 const {assert} = chai; 42099 42100-describe('Linkifier', () => { 42101+describeWithLocale('Linkifier', () => { 42102 it('renders a link when given a URL', async () => { 42103 const component = new Linkifier.Linkifier.Linkifier(); 42104 component.data = { 42105diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/SurveyLink_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/SurveyLink_test.ts 42106index c69af412b7c14..5ebe0bb59ad57 42107--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/SurveyLink_test.ts 42108+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/SurveyLink_test.ts 42109@@ -8,6 +8,7 @@ import * as SurveyLink from '../../../../../front_end/ui/components/survey_link/ 42110 import * as Common from '../../../../../front_end/core/common/common.js'; 42111 import {assertNotNullOrUndefined} from '../../../../../front_end/core/platform/platform.js'; 42112 import {assertShadowRoot, renderElementIntoDOM} from '../../helpers/DOMHelpers.js'; 42113+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 42114 42115 function canShowSuccessfulCallback(trigger: string, callback: SurveyLink.SurveyLink.CanShowSurveyCallback) { 42116 callback({canShowSurvey: true}); 42117@@ -24,7 +25,7 @@ function showFailureCallback(trigger: string, callback: SurveyLink.SurveyLink.Sh 42118 42119 const empty = Common.UIString.LocalizedEmptyString; 42120 42121-describe('SurveyLink', async () => { 42122+describeWithLocale('SurveyLink', async () => { 42123 it('shows no link when canShowSurvey is still pending', () => { 42124 const link = new SurveyLink.SurveyLink.SurveyLink(); 42125 link.data = {trigger: 'test trigger', promptText: empty, canShowSurvey: () => {}, showSurvey: () => {}}; 42126diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/BUILD.gn b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/BUILD.gn 42127index 583f97bcc8c3b..5e9f4b2bf187d 42128--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/BUILD.gn 42129+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/BUILD.gn 42130@@ -11,5 +11,6 @@ ts_library("diff_view") { 42131 deps = [ 42132 "../../../../../../front_end/third_party/diff:bundle", 42133 "../../../../../../front_end/ui/components/diff_view:bundle", 42134+ "../../../helpers", 42135 ] 42136 } 42137diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/DiffView_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/DiffView_test.ts 42138index 5b4f9c23d9386..8223642fbeffc 42139--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/DiffView_test.ts 42140+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/diff_view/DiffView_test.ts 42141@@ -6,6 +6,7 @@ const {assert} = chai; 42142 42143 import * as DiffView from '../../../../../../front_end/ui/components/diff_view/diff_view.js'; 42144 import * as Diff from '../../../../../../front_end/third_party/diff/diff.js'; 42145+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42146 42147 function buildDiff(original: string, updated: string): Promise<DocumentFragment> { 42148 const diff = Diff.Diff.DiffWrapper.lineDiff(original.split('\n'), updated.split('\n')); 42149@@ -35,7 +36,7 @@ function text(elt: Node): string { 42150 return ''; 42151 } 42152 42153-describe('DiffView', () => { 42154+describeWithLocale('DiffView', () => { 42155 it('renders the proper content', async () => { 42156 const output = await simpleDiff(); 42157 const lines = Array.from(output.querySelectorAll('.diff-line-content')); 42158diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueCounter_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueCounter_test.ts 42159index ed74e953e3ec4..4ba96593820d1 42160--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueCounter_test.ts 42161+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueCounter_test.ts 42162@@ -7,6 +7,7 @@ import * as IssuesManager from '../../../../../../front_end/models/issues_manage 42163 import * as IconButton from '../../../../../../front_end/ui/components/icon_button/icon_button.js'; 42164 import * as IssueCounter from '../../../../../../front_end/ui/components/issue_counter/issue_counter.js'; 42165 import {assertElement, assertElements, assertShadowRoot, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42166+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42167 import {MockIssuesManager} from '../../../models/issues_manager/MockIssuesManager.js'; 42168 42169 const {assert} = chai; 42170@@ -50,7 +51,7 @@ export const extractButton = (shadowRoot: ShadowRoot): HTMLButtonElement => { 42171 return button; 42172 }; 42173 42174-describe('IssueCounter', () => { 42175+describeWithLocale('IssueCounter', () => { 42176 describe('with omitting zero-count issue kinds', () => { 42177 it('renders correctly', () => { 42178 const issuesManager = new MockIssuesManager([]); 42179@@ -216,7 +217,7 @@ describe('IssueCounter', () => { 42180 }); 42181 }); 42182 42183-describe('getIssueCountsEnumeration', () => { 42184+describeWithLocale('getIssueCountsEnumeration', () => { 42185 it('formats issue counts correctly', () => { 42186 const issuesManager = new MockIssuesManager([]); 42187 const string = IssueCounter.IssueCounter.getIssueCountsEnumeration( 42188diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueLinkIcon_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueLinkIcon_test.ts 42189index 498dfb23f694a..6e3237c1ce027 42190--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueLinkIcon_test.ts 42191+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/issue_counter/IssueLinkIcon_test.ts 42192@@ -8,6 +8,7 @@ import * as IconButton from '../../../../../../front_end/ui/components/icon_butt 42193 import * as IssueCounter from '../../../../../../front_end/ui/components/issue_counter/issue_counter.js'; 42194 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42195 import {assertElement, assertShadowRoot, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42196+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42197 42198 import type * as Protocol from '../../../../../../front_end/generated/protocol.js'; 42199 import * as IssuesManager from '../../../../../../front_end/models/issues_manager/issues_manager.js'; 42200@@ -92,7 +93,7 @@ class MockIssueResolver { 42201 } 42202 } 42203 42204-describe('IssueLinkIcon', () => { 42205+describeWithLocale('IssueLinkIcon', () => { 42206 const issueId = 'issue1' as Protocol.Audits.IssueId; 42207 const defaultIcon = {iconName: 'issue-questionmark-icon', color: 'var(--color-text-secondary)'}; 42208 const breakingChangeIcon = 42209diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector_test.ts 42210index f1a916cb9431e..adc899ad2a420 42211--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector_test.ts 42212+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector_test.ts 42213@@ -4,6 +4,7 @@ 42214 42215 import * as LinearMemoryInspectorModule from '../../../../../../front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js'; 42216 import {dispatchClickEvent, getElementsWithinComponent, getElementWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42217+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42218 42219 import {NAVIGATOR_ADDRESS_SELECTOR, NAVIGATOR_HISTORY_BUTTON_SELECTOR, NAVIGATOR_PAGE_BUTTON_SELECTOR} from './LinearMemoryNavigator_test.js'; 42220 import {ENDIANNESS_SELECTOR} from './LinearMemoryValueInterpreter_test.js'; 42221@@ -16,7 +17,7 @@ const NAVIGATOR_SELECTOR = 'devtools-linear-memory-inspector-navigator'; 42222 const VIEWER_SELECTOR = 'devtools-linear-memory-inspector-viewer'; 42223 const INTERPRETER_SELECTOR = 'devtools-linear-memory-inspector-interpreter'; 42224 42225-describe('LinearMemoryInspector', () => { 42226+describeWithLocale('LinearMemoryInspector', () => { 42227 function getViewer(component: LinearMemoryInspectorModule.LinearMemoryInspector.LinearMemoryInspector) { 42228 return getElementWithinComponent( 42229 component, VIEWER_SELECTOR, LinearMemoryInspectorModule.LinearMemoryViewer.LinearMemoryViewer); 42230diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator_test.ts 42231index ff712a3c2e142..a0838fc4f4bc1 42232--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator_test.ts 42233+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator_test.ts 42234@@ -4,6 +4,7 @@ 42235 42236 import * as LinearMemoryInspector from '../../../../../../front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js'; 42237 import {assertElement, assertElements, assertShadowRoot, getElementsWithinComponent, getElementWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42238+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42239 42240 const {assert} = chai; 42241 42242@@ -12,7 +13,7 @@ export const NAVIGATOR_PAGE_BUTTON_SELECTOR = '[data-button=pagenavigation]'; 42243 export const NAVIGATOR_HISTORY_BUTTON_SELECTOR = '[data-button=historynavigation]'; 42244 export const NAVIGATOR_REFRESH_BUTTON_SELECTOR = '[data-button=refreshrequested]'; 42245 42246-describe('LinearMemoryNavigator', () => { 42247+describeWithLocale('LinearMemoryNavigator', () => { 42248 let component: LinearMemoryInspector.LinearMemoryNavigator.LinearMemoryNavigator; 42249 42250 beforeEach(renderNavigator); 42251diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter_test.ts 42252index ad0f05f4ae589..47d086133878c 42253--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter_test.ts 42254+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter_test.ts 42255@@ -4,6 +4,7 @@ 42256 42257 import * as LinearMemoryInspector from '../../../../../../front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js'; 42258 import {getElementWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42259+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42260 42261 const {assert} = chai; 42262 42263@@ -30,7 +31,7 @@ function clickSettingsButton( 42264 settingsButton.click(); 42265 } 42266 42267-describe('LinearMemoryValueInterpreter', () => { 42268+describeWithLocale('LinearMemoryValueInterpreter', () => { 42269 function setUpComponent() { 42270 const buffer = new Uint8Array([34, 234, 12, 3]).buffer; 42271 const component = new LinearMemoryInspector.LinearMemoryValueInterpreter.LinearMemoryValueInterpreter(); 42272diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay_test.ts 42273index 375c549d59be2..ed97e54e12a18 42274--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay_test.ts 42275+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay_test.ts 42276@@ -4,12 +4,13 @@ 42277 42278 import * as LinearMemoryInspector from '../../../../../../front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js'; 42279 import {dispatchClickEvent, getElementsWithinComponent, getElementWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42280+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42281 42282 export const DISPLAY_JUMP_TO_POINTER_BUTTON_SELECTOR = '[data-jump]'; 42283 42284 const {assert} = chai; 42285 42286-describe('ValueInterpreterDisplay', () => { 42287+describeWithLocale('ValueInterpreterDisplay', () => { 42288 const combinationsForNumbers = [ 42289 {endianness: LinearMemoryInspector.ValueInterpreterDisplayUtils.Endianness.Little, signed: true}, 42290 {endianness: LinearMemoryInspector.ValueInterpreterDisplayUtils.Endianness.Little, signed: false}, 42291diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings_test.ts 42292index c69ceb8c2e5d7..54e11960df30e 42293--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings_test.ts 42294+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings_test.ts 42295@@ -4,6 +4,7 @@ 42296 42297 import * as LinearMemoryInspector from '../../../../../../front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js'; 42298 import {assertElement, getElementsWithinComponent, getEventPromise, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42299+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42300 42301 const {assert} = chai; 42302 42303@@ -11,7 +12,7 @@ const SETTINGS_INPUT_SELECTOR = '[data-input]'; 42304 const SETTINGS_TITLE_SELECTOR = '[data-title]'; 42305 const SETTINGS_LABEL_SELECTOR = '.type-label'; 42306 42307-describe('ValueInterpreterSettings', () => { 42308+describeWithLocale('ValueInterpreterSettings', () => { 42309 function setUpComponent() { 42310 const component = new LinearMemoryInspector.ValueInterpreterSettings.ValueInterpreterSettings(); 42311 const data = { 42312diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/feedback_button_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/feedback_button_test.ts 42313index 2934702e4af4f..234794fdaff6f 42314--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/feedback_button_test.ts 42315+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/feedback_button_test.ts 42316@@ -6,10 +6,11 @@ import * as Host from '../../../../../../front_end/core/host/host.js'; 42317 import * as PanelFeedback from '../../../../../../front_end/ui/components/panel_feedback/panel_feedback.js'; 42318 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42319 import {assertElement, assertShadowRoot, dispatchClickEvent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42320+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42321 42322 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 42323 42324-describe('Feedback button', () => { 42325+describeWithLocale('Feedback button', () => { 42326 it('calls out to the Host API to open the link in a new tab', async () => { 42327 const openInNewTabStub = sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'openInNewTab'); 42328 const component = new PanelFeedback.FeedbackButton.FeedbackButton(); 42329diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/panel_feedback_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/panel_feedback_test.ts 42330index 5c0176e4aad0f..bf4c5d66ce5d6 42331--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/panel_feedback_test.ts 42332+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/panel_feedback_test.ts 42333@@ -5,10 +5,11 @@ 42334 import * as PanelFeedback from '../../../../../../front_end/ui/components/panel_feedback/panel_feedback.js'; 42335 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42336 import {assertShadowRoot, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42337+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42338 42339 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 42340 42341-describe('Panel Feedback', () => { 42342+describeWithLocale('Panel Feedback', () => { 42343 async function renderFeedbackComponent(): Promise<PanelFeedback.PanelFeedback.PanelFeedback> { 42344 const component = new PanelFeedback.PanelFeedback.PanelFeedback(); 42345 component.data = { 42346diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/preview_toggle_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/preview_toggle_test.ts 42347index 8b5038463b26d..adb40c741a21e 42348--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/preview_toggle_test.ts 42349+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/panel_feedback/preview_toggle_test.ts 42350@@ -6,10 +6,11 @@ import * as Root from '../../../../../../front_end/core/root/root.js'; 42351 import * as PanelFeedback from '../../../../../../front_end/ui/components/panel_feedback/panel_feedback.js'; 42352 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42353 import {assertElement, assertShadowRoot, dispatchClickEvent, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42354+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42355 42356 const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance(); 42357 42358-describe('Preview toggle', () => { 42359+describeWithLocale('Preview toggle', () => { 42360 it('calls out correctly to enable experiment', async () => { 42361 const isEnabledStub = sinon.stub(Root.Runtime.experiments, 'isEnabled'); 42362 isEnabledStub.callsFake(() => false); 42363diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/request_link_icon/RequestLinkIcon_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/request_link_icon/RequestLinkIcon_test.ts 42364index 68ab1f8ccad36..7a032572abf66 42365--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/request_link_icon/RequestLinkIcon_test.ts 42366+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/components/request_link_icon/RequestLinkIcon_test.ts 42367@@ -11,6 +11,7 @@ import * as IconButton from '../../../../../../front_end/ui/components/icon_butt 42368 import {assertElement, assertShadowRoot, renderElementIntoDOM} from '../../../helpers/DOMHelpers.js'; 42369 import * as Coordinator from '../../../../../../front_end/ui/components/render_coordinator/render_coordinator.js'; 42370 import type * as Protocol from '../../../../../../front_end/generated/protocol.js'; 42371+import {describeWithLocale} from '../../../helpers/EnvironmentHelpers.js'; 42372 42373 const {assert} = chai; 42374 42375@@ -104,7 +105,7 @@ class MockRequestResolver { 42376 } 42377 } 42378 42379-describe('RequestLinkIcon', () => { 42380+describeWithLocale('RequestLinkIcon', () => { 42381 const requestId1 = 'r1' as Protocol.Network.RequestId; 42382 const requestId2 = 'r2' as Protocol.Network.RequestId; 42383 42384diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/SuggestBox_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/SuggestBox_test.ts 42385index c59fc7963de8d..91032a4043e87 42386--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/SuggestBox_test.ts 42387+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/SuggestBox_test.ts 42388@@ -3,6 +3,7 @@ 42389 // found in the LICENSE file. 42390 42391 import * as UI from '../../../../../front_end/ui/legacy/legacy.js'; 42392+import {describeWithLocale} from '../../helpers/EnvironmentHelpers.js'; 42393 42394 const {assert} = chai; 42395 42396@@ -34,7 +35,7 @@ class MockSuggestBoxDelegate implements UI.SuggestBox.SuggestBoxDelegate { 42397 42398 const createKeyEvent = (key: string) => new KeyboardEvent('keydown', {bubbles: true, cancelable: true, key}); 42399 42400-describe('SuggestBox', () => { 42401+describeWithLocale('SuggestBox', () => { 42402 let delegate: MockSuggestBoxDelegate; 42403 let div: HTMLElement; 42404 let suggestBox: UI.SuggestBox.SuggestBox; 42405diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/CSSVarSwatch_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/CSSVarSwatch_test.ts 42406index 5e46665edae83..33b8d32083f3e 42407--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/CSSVarSwatch_test.ts 42408+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/CSSVarSwatch_test.ts 42409@@ -5,6 +5,7 @@ 42410 import {assertNotNullOrUndefined} from '../../../../../../../front_end/core/platform/platform.js'; 42411 import * as InlineEditor from '../../../../../../../front_end/ui/legacy/components/inline_editor/inline_editor.js'; 42412 import {assertShadowRoot, renderElementIntoDOM} from '../../../../helpers/DOMHelpers.js'; 42413+import {describeWithLocale} from '../../../../helpers/EnvironmentHelpers.js'; 42414 42415 const {assert} = chai; 42416 42417@@ -31,7 +32,7 @@ function assertSwatch(swatch: InlineEditor.CSSVarSwatch.CSSVarSwatch, expected: 42418 assert.strictEqual(link.textContent, expected.varText, 'The link has the right text content'); 42419 } 42420 42421-describe('CSSVarSwatch', () => { 42422+describeWithLocale('CSSVarSwatch', () => { 42423 it('can be instantiated successfully', () => { 42424 const component = new InlineEditor.CSSVarSwatch.CSSVarSwatch(); 42425 renderElementIntoDOM(component); 42426diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/ColorSwatch_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/ColorSwatch_test.ts 42427index db01f257c71dc..2d60353cb2837 42428--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/ColorSwatch_test.ts 42429+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/inline_editor/ColorSwatch_test.ts 42430@@ -6,6 +6,7 @@ import * as Common from '../../../../../../../front_end/core/common/common.js'; 42431 import {assertNotNullOrUndefined} from '../../../../../../../front_end/core/platform/platform.js'; 42432 import * as InlineEditor from '../../../../../../../front_end/ui/legacy/components/inline_editor/inline_editor.js'; 42433 import {assertElement, assertShadowRoot, dispatchClickEvent, renderElementIntoDOM} from '../../../../helpers/DOMHelpers.js'; 42434+import {describeWithLocale} from '../../../../helpers/EnvironmentHelpers.js'; 42435 42436 const {assert} = chai; 42437 42438@@ -45,7 +46,7 @@ function getClickTarget(swatch: InlineEditor.ColorSwatch.ColorSwatch) { 42439 return swatch.shadowRoot.querySelector('.color-swatch-inner') as HTMLElement; 42440 } 42441 42442-describe('ColorSwatch', () => { 42443+describeWithLocale('ColorSwatch', () => { 42444 it('accepts colors as text', () => { 42445 const swatch = createSwatch('red'); 42446 42447diff --git a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/perf_ui/PieChart_test.ts b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/perf_ui/PieChart_test.ts 42448index aac10c6ecc8b8..5604dcd6d1917 42449--- a/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/perf_ui/PieChart_test.ts 42450+++ b/src/third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/perf_ui/PieChart_test.ts 42451@@ -5,6 +5,7 @@ 42452 import {assertNotNullOrUndefined} from '../../../../../../../front_end/core/platform/platform.js'; 42453 import * as PerfUI from '../../../../../../../front_end/ui/legacy/components/perf_ui/perf_ui.js'; 42454 import {assertShadowRoot, renderElementIntoDOM} from '../../../../helpers/DOMHelpers.js'; 42455+import {describeWithLocale} from '../../../../helpers/EnvironmentHelpers.js'; 42456 42457 const {assert} = chai; 42458 42459@@ -26,7 +27,7 @@ const testChartNoLegendData = { 42460 slices: [{value: 75, color: 'crimson', title: 'Filling'}, {value: 25, color: 'burlywood', title: 'Crust'}], 42461 }; 42462 42463-describe('PieChart', () => { 42464+describeWithLocale('PieChart', () => { 42465 describe('with legend', () => { 42466 it('is labelled by the chart name', () => { 42467 const chart = new PerfUI.PieChart.PieChart(); 42468diff --git a/src/third_party/icu/BUILD.gn b/src/third_party/icu/BUILD.gn 42469index daf8b97df5346..482e5b7db65c5 42470--- a/src/third_party/icu/BUILD.gn 42471+++ b/src/third_party/icu/BUILD.gn 42472@@ -364,7 +364,7 @@ if (is_android && enable_java_templates) { 42473 } 42474 } 42475 42476-if (is_android) { 42477+if (is_android || is_ohos) { 42478 # Use android_small for now to keep the size till we decide to switch to the new one. 42479 data_dir = "android_small" 42480 } else if (is_ios) { 42481diff --git a/src/third_party/libphonenumber/BUILD.gn b/src/third_party/libphonenumber/BUILD.gn 42482index 3386fcafbb5ba..7d492055be972 42483--- a/src/third_party/libphonenumber/BUILD.gn 42484+++ b/src/third_party/libphonenumber/BUILD.gn 42485@@ -2,6 +2,7 @@ 42486 # Use of this source code is governed by a BSD-style license that can be 42487 # found in the LICENSE file. 42488 42489+import("//testing/libfuzzer/fuzzer_test.gni") 42490 import("//testing/test.gni") 42491 import("//third_party/protobuf/proto_library.gni") 42492 42493@@ -116,3 +117,16 @@ test("libphonenumber_unittests") { 42494 "//third_party/icu", 42495 ] 42496 } 42497+ 42498+fuzzer_test("libphonenumber_fuzzer") { 42499+ sources = [ "libphonenumber_fuzzer.cc" ] 42500+ deps = [ 42501+ ":libphonenumber", 42502+ "//third_party/abseil-cpp:absl", 42503+ ] 42504+} 42505+ 42506+fuzzer_test("charntorune_fuzzer") { 42507+ sources = [ "charntorune_fuzzer.cc" ] 42508+ deps = [ ":libphonenumber" ] 42509+} 42510diff --git a/src/third_party/libphonenumber/README.chromium b/src/third_party/libphonenumber/README.chromium 42511index e50686688b07f..c4a4e2c789f92 42512--- a/src/third_party/libphonenumber/README.chromium 42513+++ b/src/third_party/libphonenumber/README.chromium 42514@@ -19,6 +19,8 @@ Additional files, not in the original library: 42515 BUILD.gn 42516 README.chromium 42517 LICENSE # Taken from https://github.com/googlei18n/libphonenumber/ 42518+ charntorune_fuzzer.cc 42519+ libphonenumber_fuzzer.cc 42520 phonenumber_api.h 42521 42522 The library is mapped through the DEPS file into the Chromium sources root 42523diff --git a/src/third_party/libphonenumber/charntorune_fuzzer.cc b/src/third_party/libphonenumber/charntorune_fuzzer.cc 42524new file mode 100644 42525index 0000000000000..82a6d8a2b86b6 42526--- /dev/null 42527+++ b/src/third_party/libphonenumber/charntorune_fuzzer.cc 42528@@ -0,0 +1,15 @@ 42529+// Copyright 2022 The Chromium Authors 42530+// Use of this source code is governed by a BSD-style license that can be 42531+// found in the LICENSE file. 42532+ 42533+#include <string> 42534+ 42535+#include <fuzzer/FuzzedDataProvider.h> 42536+ 42537+#include "third_party/libphonenumber/dist/cpp/src/phonenumbers/utf/utf.h" 42538+ 42539+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 42540+ Rune rune; 42541+ charntorune(&rune, reinterpret_cast<const char*>(data), size); 42542+ return 0; 42543+} 42544\ No newline at end of file 42545diff --git a/src/third_party/libphonenumber/libphonenumber_fuzzer.cc b/src/third_party/libphonenumber/libphonenumber_fuzzer.cc 42546new file mode 100644 42547index 0000000000000..7fc0391a921bb 42548--- /dev/null 42549+++ b/src/third_party/libphonenumber/libphonenumber_fuzzer.cc 42550@@ -0,0 +1,22 @@ 42551+// Copyright 2022 The Chromium Authors 42552+// Use of this source code is governed by a BSD-style license that can be 42553+// found in the LICENSE file. 42554+ 42555+#include <string> 42556+ 42557+#include <fuzzer/FuzzedDataProvider.h> 42558+ 42559+#include "third_party/libphonenumber/phonenumber_api.h" 42560+ 42561+using ::i18n::phonenumbers::PhoneNumber; 42562+using ::i18n::phonenumbers::PhoneNumberUtil; 42563+ 42564+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 42565+ std::string input(reinterpret_cast<const char*>(data), size); 42566+ 42567+ PhoneNumber parsed_number; 42568+ PhoneNumberUtil* phone_number_util = PhoneNumberUtil::GetInstance(); 42569+ phone_number_util->Parse(input, "US", &parsed_number); 42570+ 42571+ return 0; 42572+} 42573\ No newline at end of file 42574diff --git a/src/third_party/tflite_support/README.chromium b/src/third_party/tflite_support/README.chromium 42575index 4995893eb475d..4f931abde86d9 42576--- a/src/third_party/tflite_support/README.chromium 42577+++ b/src/third_party/tflite_support/README.chromium 42578@@ -35,6 +35,7 @@ is a no-op in chromium builds and upsets clang. 42579 only available on POSIX systems. 42580 11) Run clang-format. 42581 12) Remove an unneeded static initializer. 42582+13) Remove whitespace tokenizer since it uses the unsafe function `chartorune`. 42583 42584 Update Process: 42585 1) Clone the tflite-support github repo at the desired commit into src/ 42586diff --git a/src/third_party/tflite_support/patches/0014-remove-whitespace-tokenizer.patch b/src/third_party/tflite_support/patches/0014-remove-whitespace-tokenizer.patch 42587new file mode 100644 42588index 0000000000000..d488455d929b6 42589--- /dev/null 42590+++ b/src/third_party/tflite_support/patches/0014-remove-whitespace-tokenizer.patch 42591@@ -0,0 +1,776 @@ 42592+From 3e2574d49dd6a93efef8de6c5256a428c9d9c784 Mon Sep 17 00:00:00 2001 42593+From: Robert Ogden <robertogden@chromium.org> 42594+Date: Mon, 17 Oct 2022 13:09:01 -0700 42595+Subject: [PATCH] remove whitespace tokenizer 42596+ 42597+--- 42598+ .../custom_ops/kernel/whitespace_tokenizer.cc | 227 ------------------ 42599+ .../custom_ops/kernel/whitespace_tokenizer.h | 31 --- 42600+ .../whitespace_tokenizer_op_resolver.cc | 32 --- 42601+ .../kernel/whitespace_tokenizer_op_resolver.h | 34 --- 42602+ ...hitespace_tokenizer_op_resolver_wrapper.cc | 29 --- 42603+ .../kernel/whitespace_tokenizer_test.cc | 189 --------------- 42604+ .../kernel/whitespace_tokenizer_test.py | 167 ------------- 42605+ 7 files changed, 709 deletions(-) 42606+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc 42607+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h 42608+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc 42609+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h 42610+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc 42611+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc 42612+ delete mode 100644 third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py 42613+ 42614+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc 42615+deleted file mode 100644 42616+index 8096a5008bd12..0000000000000 42617+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc 42618++++ /dev/null 42619+@@ -1,227 +0,0 @@ 42620+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 42621+- 42622+-Licensed under the Apache License, Version 2.0 (the "License"); 42623+-you may not use this file except in compliance with the License. 42624+-You may obtain a copy of the License at 42625+- 42626+- http://www.apache.org/licenses/LICENSE-2.0 42627+- 42628+-Unless required by applicable law or agreed to in writing, software 42629+-distributed under the License is distributed on an "AS IS" BASIS, 42630+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42631+-See the License for the specific language governing permissions and 42632+-limitations under the License. 42633+-==============================================================================*/ 42634+- 42635+-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 42636+- 42637+-#include <algorithm> 42638+-#include <utility> 42639+-#include <vector> 42640+- 42641+-#include "libutf/utf.h" 42642+-#include "tensorflow/lite/context.h" 42643+-#include "tensorflow/lite/kernels/kernel_util.h" 42644+-#include "tensorflow/lite/string_util.h" 42645+- 42646+-constexpr int kInput = 0; 42647+-constexpr int kOutputValues = 0; 42648+-constexpr int kOutputRowSplitsStart = 1; 42649+- 42650+-namespace tflite { 42651+-namespace ops { 42652+-namespace custom { 42653+-namespace whitespace_tokenizer { 42654+- 42655+-// This TFLite op implements a whitespace tokenizer, and can output the 42656+-// tokens as either a padded tensor or a ragged tensor. 42657+-// 42658+-// If we're outputting a padded tensor, our outputs are: 42659+-// * A string tensor 42660+-// 42661+-// If we're outputting a ragged tensor, our outputs are: 42662+-// * A string tensor (the innermost values of the ragged tensor) 42663+-// * N int64 tensors (the row_splits of the ragged tensor, where N is the 42664+-// rank of the input tensor) 42665+- 42666+-inline bool OutputIsPaddedTensor(TfLiteNode* node) { 42667+- return NumOutputs(node) == 1; 42668+-} 42669+- 42670+-inline int charntorune(Rune* r, const char* s, int n) { 42671+- const int bytes_read = chartorune(r, const_cast<char*>(s)); 42672+- if (bytes_read > n) { 42673+- *r = Runeerror; 42674+- return 0; 42675+- } 42676+- return bytes_read; 42677+-} 42678+- 42679+-std::vector<std::pair<const char*, int>> Tokenize(StringRef str) { 42680+- const char* p = str.str; 42681+- int n = str.len; 42682+- 42683+- std::vector<std::pair<const char*, int>> tokens; 42684+- const char* start = nullptr; 42685+- while (n > 0) { 42686+- Rune r; 42687+- int c = charntorune(&r, p, n); 42688+- if (r == Runeerror) 42689+- break; 42690+- 42691+- if (isspacerune(r)) { 42692+- if (start != nullptr) { 42693+- tokens.push_back({start, p - start}); 42694+- } 42695+- start = nullptr; 42696+- } else { 42697+- if (start == nullptr) { 42698+- start = p; 42699+- } 42700+- } 42701+- 42702+- p += c; 42703+- n -= c; 42704+- } 42705+- if (start != nullptr) { 42706+- tokens.push_back({start, p - start}); 42707+- } 42708+- 42709+- return tokens; 42710+-} 42711+- 42712+-TfLiteStatus WritePaddedOutput( 42713+- const std::vector<std::vector<std::pair<const char*, int>>>& list_of_tokens, 42714+- const TfLiteTensor* input, 42715+- TfLiteTensor* output_values) { 42716+- TfLiteIntArray* output_shape = TfLiteIntArrayCreate(NumDimensions(input) + 1); 42717+- for (int i = 0; i < NumDimensions(input); ++i) { 42718+- output_shape->data[i] = SizeOfDimension(input, i); 42719+- } 42720+- 42721+- size_t max_tokens = 0; 42722+- for (const auto& tokens : list_of_tokens) { 42723+- max_tokens = std::max(max_tokens, tokens.size()); 42724+- } 42725+- 42726+- output_shape->data[NumDimensions(input)] = max_tokens; 42727+- DynamicBuffer buffer; 42728+- for (const auto& tokens : list_of_tokens) { 42729+- for (const auto& token : tokens) { 42730+- buffer.AddString(token.first, token.second); 42731+- } 42732+- for (int i = tokens.size(); i < max_tokens; ++i) { 42733+- buffer.AddString(nullptr, 0); 42734+- } 42735+- } 42736+- buffer.WriteToTensor(output_values, output_shape); 42737+- return kTfLiteOk; 42738+-} 42739+- 42740+-TfLiteStatus WriteRaggedOutput( 42741+- const std::vector<std::vector<std::pair<const char*, int>>>& list_of_tokens, 42742+- const TfLiteTensor* input, 42743+- TfLiteTensor* output_values, 42744+- std::vector<TfLiteTensor*> nested_row_splits) { 42745+- // The outer dimensions of the ragged tensor are all non-ragged. 42746+- for (int i = 0; i < nested_row_splits.size() - 1; ++i) { 42747+- int row_splits_step = SizeOfDimension(input, i + 1); 42748+- TfLiteTensor* row_splits = nested_row_splits[i]; 42749+- for (int j = 0; j < SizeOfDimension(row_splits, 0); ++j) { 42750+- row_splits->data.i64[j] = j * row_splits_step; 42751+- } 42752+- } 42753+- 42754+- // Generate the innermost row_splits and values tensors. 42755+- TfLiteTensor* row_splits = nested_row_splits.back(); 42756+- TfLiteIntArray* output_shape = TfLiteIntArrayCreate(1); 42757+- DynamicBuffer buffer; 42758+- int token_index = 0; 42759+- int row_splits_index = 0; 42760+- for (const auto& tokens : list_of_tokens) { 42761+- row_splits->data.i64[row_splits_index] = token_index; 42762+- for (const auto& token : tokens) { 42763+- buffer.AddString(token.first, token.second); 42764+- ++token_index; 42765+- } 42766+- ++row_splits_index; 42767+- } 42768+- row_splits->data.i64[row_splits_index] = token_index; 42769+- output_shape->data[0] = token_index; 42770+- buffer.WriteToTensor(output_values, output_shape); 42771+- return kTfLiteOk; 42772+-} 42773+- 42774+-TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { 42775+- TfLiteTensor* output_values = GetOutput(context, node, kOutputValues); 42776+- SetTensorToDynamic(output_values); 42777+- 42778+- if (OutputIsPaddedTensor(node)) { 42779+- return kTfLiteOk; 42780+- } 42781+- 42782+- const TfLiteTensor* input = GetInput(context, node, kInput); 42783+- TF_LITE_ENSURE(context, NumDimensions(input) == 42784+- (NumOutputs(node) - kOutputRowSplitsStart)); 42785+- 42786+- // Resize the row_splits tensors. We're just adding a ragged inner 42787+- // dimension to the shape of the input tensor, so the size of the 42788+- // row_splits tensors can be calculated using the input tensor's shape. 42789+- int input_size = 1; 42790+- for (int i = 0; i < NumDimensions(input); ++i) { 42791+- input_size *= SizeOfDimension(input, i); 42792+- 42793+- TfLiteIntArray* row_splits_shape = TfLiteIntArrayCreate(1); 42794+- row_splits_shape->data[0] = input_size + 1; 42795+- TfLiteTensor* row_splits = 42796+- GetOutput(context, node, kOutputRowSplitsStart + i); 42797+- TF_LITE_ENSURE_STATUS( 42798+- context->ResizeTensor(context, row_splits, row_splits_shape)); 42799+- } 42800+- 42801+- return kTfLiteOk; 42802+-} 42803+- 42804+-TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { 42805+- const TfLiteTensor* input = GetInput(context, node, kInput); 42806+- int input_size = 1; 42807+- for (int i = 0; i < NumDimensions(input); ++i) { 42808+- input_size *= SizeOfDimension(input, i); 42809+- } 42810+- 42811+- std::vector<std::vector<std::pair<const char*, int>>> list_of_tokens; 42812+- list_of_tokens.reserve(input_size); 42813+- for (int i = 0; i < input_size; ++i) { 42814+- list_of_tokens.emplace_back(Tokenize(GetString(input, i))); 42815+- } 42816+- 42817+- TfLiteTensor* output_values = GetOutput(context, node, kOutputValues); 42818+- TF_LITE_ENSURE(context, IsDynamicTensor(output_values)); 42819+- 42820+- if (OutputIsPaddedTensor(node)) { 42821+- return WritePaddedOutput(list_of_tokens, input, output_values); 42822+- } 42823+- 42824+- std::vector<TfLiteTensor*> nested_row_splits; 42825+- nested_row_splits.reserve(NumDimensions(input)); 42826+- for (int i = 0; i < NumDimensions(input); ++i) { 42827+- TfLiteTensor* output_row_splits = 42828+- GetOutput(context, node, kOutputRowSplitsStart + i); 42829+- nested_row_splits.push_back(output_row_splits); 42830+- } 42831+- return WriteRaggedOutput(list_of_tokens, input, output_values, 42832+- nested_row_splits); 42833+-} 42834+- 42835+-} // namespace whitespace_tokenizer 42836+- 42837+-TfLiteRegistration* Register_tftext_WhitespaceTokenizer() { 42838+- static TfLiteRegistration r = {nullptr, nullptr, 42839+- whitespace_tokenizer::Prepare, 42840+- whitespace_tokenizer::Eval}; 42841+- return &r; 42842+-} 42843+- 42844+-} // namespace custom 42845+-} // namespace ops 42846+-} // namespace tflite 42847+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h 42848+deleted file mode 100644 42849+index b190248087d20..0000000000000 42850+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h 42851++++ /dev/null 42852+@@ -1,31 +0,0 @@ 42853+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 42854+- 42855+-Licensed under the Apache License, Version 2.0 (the "License"); 42856+-you may not use this file except in compliance with the License. 42857+-You may obtain a copy of the License at 42858+- 42859+- http://www.apache.org/licenses/LICENSE-2.0 42860+- 42861+-Unless required by applicable law or agreed to in writing, software 42862+-distributed under the License is distributed on an "AS IS" BASIS, 42863+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42864+-See the License for the specific language governing permissions and 42865+-limitations under the License. 42866+-==============================================================================*/ 42867+- 42868+-#ifndef TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 42869+-#define TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 42870+- 42871+-#include "tensorflow/lite/context.h" 42872+- 42873+-namespace tflite { 42874+-namespace ops { 42875+-namespace custom { 42876+- 42877+-TfLiteRegistration* Register_tftext_WhitespaceTokenizer(); 42878+- 42879+-} // namespace custom 42880+-} // namespace ops 42881+-} // namespace tflite 42882+- 42883+-#endif // TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 42884+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc 42885+deleted file mode 100644 42886+index 6166bc149bc00..0000000000000 42887+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc 42888++++ /dev/null 42889+@@ -1,32 +0,0 @@ 42890+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 42891+- 42892+-Licensed under the Apache License, Version 2.0 (the "License"); 42893+-you may not use this file except in compliance with the License. 42894+-You may obtain a copy of the License at 42895+- 42896+- http://www.apache.org/licenses/LICENSE-2.0 42897+- 42898+-Unless required by applicable law or agreed to in writing, software 42899+-distributed under the License is distributed on an "AS IS" BASIS, 42900+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42901+-See the License for the specific language governing permissions and 42902+-limitations under the License. 42903+-==============================================================================*/ 42904+- 42905+-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h" 42906+- 42907+-#include "tensorflow/lite/mutable_op_resolver.h" 42908+-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 42909+- 42910+-namespace tflite { 42911+-namespace ops { 42912+-namespace custom { 42913+- 42914+-void AddWhitespaceTokenizerCustomOp(MutableOpResolver* resolver) { 42915+- resolver->AddCustom("tftext:WhitespaceTokenizer", 42916+- Register_tftext_WhitespaceTokenizer()); 42917+-} 42918+- 42919+-} // namespace custom 42920+-} // namespace ops 42921+-} // namespace tflite 42922+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h 42923+deleted file mode 100644 42924+index 4f57d8d8010cb..0000000000000 42925+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h 42926++++ /dev/null 42927+@@ -1,34 +0,0 @@ 42928+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 42929+- 42930+-Licensed under the Apache License, Version 2.0 (the "License"); 42931+-you may not use this file except in compliance with the License. 42932+-You may obtain a copy of the License at 42933+- 42934+- http://www.apache.org/licenses/LICENSE-2.0 42935+- 42936+-Unless required by applicable law or agreed to in writing, software 42937+-distributed under the License is distributed on an "AS IS" BASIS, 42938+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42939+-See the License for the specific language governing permissions and 42940+-limitations under the License. 42941+-==============================================================================*/ 42942+- 42943+-#ifndef TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 42944+-#define TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 42945+- 42946+-#include "tensorflow/lite/mutable_op_resolver.h" 42947+- 42948+-namespace tflite { 42949+-namespace ops { 42950+-namespace custom { 42951+- 42952+-// Adds the WhitespaceTokenizer custom op to an op resolver. 42953+-// This function can be loaded using dlopen. Since C++ function names get 42954+-// mangled, declare this function as extern C, so its name is unchanged. 42955+-extern "C" void AddWhitespaceTokenizerCustomOp(MutableOpResolver* resolver); 42956+- 42957+-} // namespace custom 42958+-} // namespace ops 42959+-} // namespace tflite 42960+- 42961+-#endif // LETENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 42962+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc 42963+deleted file mode 100644 42964+index 03d3ba899395a..0000000000000 42965+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc 42966++++ /dev/null 42967+@@ -1,29 +0,0 @@ 42968+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 42969+- 42970+-Licensed under the Apache License, Version 2.0 (the "License"); 42971+-you may not use this file except in compliance with the License. 42972+-You may obtain a copy of the License at 42973+- 42974+- http://www.apache.org/licenses/LICENSE-2.0 42975+- 42976+-Unless required by applicable law or agreed to in writing, software 42977+-distributed under the License is distributed on an "AS IS" BASIS, 42978+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 42979+-See the License for the specific language governing permissions and 42980+-limitations under the License. 42981+-==============================================================================*/ 42982+- 42983+-#include "pybind11/pybind11.h" 42984+-#include "tensorflow/lite/mutable_op_resolver.h" 42985+-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h" 42986+- 42987+-PYBIND11_MODULE(_pywrap_whitespace_tokenizer_op_resolver, m) { 42988+- m.doc() = "_pywrap_whitespace_tokenizer_op_resolver"; 42989+- m.def( 42990+- "AddWhitespaceTokenizerCustomOp", 42991+- [](uintptr_t resolver) { 42992+- tflite::ops::custom::AddWhitespaceTokenizerCustomOp( 42993+- reinterpret_cast<tflite::MutableOpResolver*>(resolver)); 42994+- }, 42995+- "Op registerer function for the tftext:WhitespaceTokenizer custom op."); 42996+-} 42997+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc 42998+deleted file mode 100644 42999+index 4654e46c4a270..0000000000000 43000+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc 43001++++ /dev/null 43002+@@ -1,189 +0,0 @@ 43003+-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43004+- 43005+-Licensed under the Apache License, Version 2.0 (the "License"); 43006+-you may not use this file except in compliance with the License. 43007+-You may obtain a copy of the License at 43008+- 43009+- http://www.apache.org/licenses/LICENSE-2.0 43010+- 43011+-Unless required by applicable law or agreed to in writing, software 43012+-distributed under the License is distributed on an "AS IS" BASIS, 43013+-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43014+-See the License for the specific language governing permissions and 43015+-limitations under the License. 43016+-==============================================================================*/ 43017+- 43018+-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 43019+- 43020+-#include <string> 43021+-#include <vector> 43022+- 43023+-#include <gmock/gmock.h> 43024+-#include <gtest/gtest.h> 43025+-#include "tensorflow/lite/kernels/test_util.h" 43026+-#include "tensorflow/lite/schema/schema_generated.h" 43027+-#include "tensorflow/lite/string_util.h" 43028+- 43029+-namespace tflite { 43030+-namespace ops { 43031+-namespace custom { 43032+-namespace whitespace_tokenizer { 43033+-namespace test { 43034+-namespace { 43035+- 43036+-using ::testing::ElementsAre; 43037+-using ::testing::ElementsAreArray; 43038+- 43039+-} // namespace 43040+- 43041+-enum OutputType { PADDED, RAGGED }; 43042+- 43043+-class WhitespaceTokenizerModel : public SingleOpModel { 43044+- public: 43045+- WhitespaceTokenizerModel(OutputType output_type, 43046+- const std::vector<std::string>& input_values, 43047+- const std::vector<int>& input_shape) 43048+- : input_shape_(input_shape) { 43049+- input_ = AddInput(TensorType_STRING); 43050+- output_values_ = AddOutput(TensorType_STRING); 43051+- if (output_type == RAGGED) { 43052+- for (int i = 0; i < input_shape_.size(); ++i) { 43053+- output_row_splits_.push_back(AddOutput(TensorType_INT64)); 43054+- } 43055+- } 43056+- SetCustomOp("WhitespaceTokenizer", {}, Register_tftext_WhitespaceTokenizer); 43057+- 43058+- BuildInterpreter({input_shape}); 43059+- PopulateStringTensor(input_, input_values); 43060+- Invoke(); 43061+- } 43062+- 43063+- std::vector<int> GetValuesTensorShape() { 43064+- return GetTensorShape(output_values_); 43065+- } 43066+- 43067+- std::vector<std::string> ExtractValuesTensorVector() { 43068+- std::vector<std::string> r; 43069+- TfLiteTensor* tensor = interpreter_->tensor(output_values_); 43070+- int n = GetStringCount(tensor); 43071+- for (int i = 0; i < n; ++i) { 43072+- StringRef ref = GetString(tensor, i); 43073+- r.emplace_back(ref.str, ref.len); 43074+- } 43075+- return r; 43076+- } 43077+- 43078+- void CheckRowSplits(const std::vector<int>& token_counts) { 43079+- int size = 1; 43080+- for (int i = 0; i < input_shape_.size(); ++i) { 43081+- size *= input_shape_[i]; 43082+- EXPECT_THAT(GetTensorShape(output_row_splits_[i]), ElementsAre(size + 1)) 43083+- << "row_splits " << i << " has the wrong shape"; 43084+- 43085+- std::vector<int64_t> expected_values(size + 1); 43086+- if (i == input_shape_.size() - 1) { 43087+- ASSERT_EQ(token_counts.size(), size); 43088+- 43089+- int index = 0; 43090+- expected_values[0] = index; 43091+- for (int j = 0; j < size; ++j) { 43092+- index += token_counts[j]; 43093+- expected_values[j + 1] = index; 43094+- } 43095+- } else { 43096+- for (int j = 0; j <= size; ++j) { 43097+- expected_values[j] = j * input_shape_[i + 1]; 43098+- } 43099+- } 43100+- EXPECT_THAT(ExtractVector<int64_t>(output_row_splits_[i]), 43101+- ElementsAreArray(expected_values)) 43102+- << "row_splits " << i << " has an incorrect value/index"; 43103+- } 43104+- } 43105+- 43106+- private: 43107+- int input_; 43108+- std::vector<int> input_shape_; 43109+- int output_values_; 43110+- std::vector<int> output_row_splits_; 43111+-}; // namespace test 43112+- 43113+-TEST(WhitespaceTokenizerTest, SingleStringPaddedOutput) { 43114+- WhitespaceTokenizerModel m(PADDED, {"this is a test"}, {1}); 43115+- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(1, 4)); 43116+- EXPECT_THAT(m.ExtractValuesTensorVector(), 43117+- ElementsAre("this", "is", "a", "test")); 43118+-} 43119+- 43120+-TEST(WhitespaceTokenizerTest, SingleStringRaggedOutput) { 43121+- WhitespaceTokenizerModel m(RAGGED, {"this is a test"}, {1}); 43122+- m.CheckRowSplits({4}); 43123+- EXPECT_THAT(m.ExtractValuesTensorVector(), 43124+- ElementsAre("this", "is", "a", "test")); 43125+-} 43126+- 43127+-TEST(WhitespaceTokenizerTest, VectorPaddedOutput) { 43128+- WhitespaceTokenizerModel m(PADDED, 43129+- {"this is a test", // 43130+- "three token sentence", // 43131+- "many more tokens than that sentence"}, 43132+- {3}); 43133+- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(3, 6)); 43134+- EXPECT_THAT( 43135+- m.ExtractValuesTensorVector(), 43136+- ElementsAre("this", "is", "a", "test", "", "", // 43137+- "three", "token", "sentence", "", "", "", // 43138+- "many", "more", "tokens", "than", "that", "sentence")); 43139+-} 43140+- 43141+-TEST(WhitespaceTokenizerTest, VectorRaggedOutput) { 43142+- WhitespaceTokenizerModel m(RAGGED, 43143+- {"this is a test", // 43144+- "three token sentence", // 43145+- "many more tokens than that sentence"}, 43146+- {3}); 43147+- m.CheckRowSplits({4, 3, 6}); 43148+- EXPECT_THAT( 43149+- m.ExtractValuesTensorVector(), 43150+- ElementsAre("this", "is", "a", "test", // 43151+- "three", "token", "sentence", // 43152+- "many", "more", "tokens", "than", "that", "sentence")); 43153+-} 43154+- 43155+-TEST(WhitespaceTokenizerTest, MatrixPaddedOutput) { 43156+- WhitespaceTokenizerModel m(PADDED, 43157+- {"a b c", "d e f", // 43158+- "g h", "i j k l", // 43159+- "m", "n o p q r"}, 43160+- {3, 2}); 43161+- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(3, 2, 5)); 43162+- EXPECT_THAT(m.ExtractValuesTensorVector(), 43163+- ElementsAre("a", "b", "c", "", "", // 43164+- "d", "e", "f", "", "", // 43165+- "g", "h", "", "", "", // 43166+- "i", "j", "k", "l", "", // 43167+- "m", "", "", "", "", // 43168+- "n", "o", "p", "q", "r")); 43169+-} 43170+- 43171+-TEST(WhitespaceTokenizerTest, MatrixRAGGEDOutput) { 43172+- WhitespaceTokenizerModel m(RAGGED, 43173+- {"a b c", "d e f", // 43174+- "g h", "i j k l", // 43175+- "m", "n o p q r"}, 43176+- {3, 2}); 43177+- m.CheckRowSplits({3, 3, 2, 4, 1, 5}); 43178+- EXPECT_THAT(m.ExtractValuesTensorVector(), 43179+- ElementsAre("a", "b", "c", // 43180+- "d", "e", "f", // 43181+- "g", "h", // 43182+- "i", "j", "k", "l", // 43183+- "m", // 43184+- "n", "o", "p", "q", "r")); 43185+-} 43186+- 43187+-} // namespace test 43188+-} // namespace whitespace_tokenizer 43189+-} // namespace custom 43190+-} // namespace ops 43191+-} // namespace tflite 43192+diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py 43193+deleted file mode 100644 43194+index 70de237a22dad..0000000000000 43195+--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py 43196++++ /dev/null 43197+@@ -1,167 +0,0 @@ 43198+-# Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43199+-# 43200+-# Licensed under the Apache License, Version 2.0 (the "License"); 43201+-# you may not use this file except in compliance with the License. 43202+-# You may obtain a copy of the License at 43203+-# 43204+-# http://www.apache.org/licenses/LICENSE-2.0 43205+-# 43206+-# Unless required by applicable law or agreed to in writing, software 43207+-# distributed under the License is distributed on an "AS IS" BASIS, 43208+-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43209+-# See the License for the specific language governing permissions and 43210+-# limitations under the License. 43211+-# ============================================================================== 43212+-"""Tests for tensorflow_lite_support.custom_ops.kernel.whitespace_tokenizer.""" 43213+- 43214+-import os 43215+-import sys 43216+-import timeit 43217+- 43218+-from absl import logging 43219+-from absl.testing import parameterized 43220+-import numpy as np 43221+-import tensorflow as tf 43222+-import tensorflow_text as tf_text 43223+-# pylint: disable=g-direct-tensorflow-import 43224+-from tensorflow.lite.python import interpreter as interpreter_wrapper 43225+-from tensorflow.python.platform import resource_loader 43226+- 43227+-# Force loaded shared object symbols to be globally visible. This is needed so 43228+-# that the interpreter_wrapper, in one .so file, can see the op resolver 43229+-# in a different .so file. Note that this may already be set by default. 43230+-# pylint: disable=g-import-not-at-top,g-bad-import-order,unused-import 43231+-if hasattr(sys, 'setdlopenflags') and hasattr(sys, 'getdlopenflags'): 43232+- sys.setdlopenflags(sys.getdlopenflags() | os.RTLD_GLOBAL) 43233+-from tensorflow_lite_support.custom_ops.kernel import _pywrap_whitespace_tokenizer_op_resolver 43234+- 43235+-TEST_CASES = [ 43236+- ['this is a test'], 43237+- ['extra spaces in here'], 43238+- ['a four token sentence', 'a five token sentence thing.'], 43239+- [['a multi dimensional test case', 'a b c d', 'e f g'], 43240+- ['h i j', 'k l m 2 3', 'n o p'], ['q r s 0 1', 't u v', 'w x y z']], 43241+-] 43242+- 43243+-INVOKES_FOR_SINGLE_OP_BENCHMARK = 1000 43244+-INVOKES_FOR_FLEX_DELEGATE_BENCHMARK = 10 43245+- 43246+- 43247+-@tf.function 43248+-def _call_whitespace_tokenizer_to_tensor(test_case): 43249+- tokenizer = tf_text.WhitespaceTokenizer() 43250+- return tokenizer.tokenize(test_case).to_tensor() 43251+- 43252+- 43253+-@tf.function 43254+-def _call_whitespace_tokenizer_to_ragged(test_case): 43255+- tokenizer = tf_text.WhitespaceTokenizer() 43256+- return tokenizer.tokenize(test_case) 43257+- 43258+- 43259+-class WhitespaceTokenizerTest(parameterized.TestCase): 43260+- 43261+- @parameterized.parameters([t] for t in TEST_CASES) 43262+- def testToTensorEquivalence(self, test_case): 43263+- tf_output = _call_whitespace_tokenizer_to_tensor(test_case) 43264+- 43265+- model_filename = resource_loader.get_path_to_datafile( 43266+- 'testdata/whitespace_tokenizer_to_tensor.tflite') 43267+- with open(model_filename, 'rb') as file: 43268+- model = file.read() 43269+- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 43270+- model_content=model, 43271+- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 43272+- 43273+- np_test_case = np.array(test_case, dtype=np.str) 43274+- interpreter.resize_tensor_input(0, np_test_case.shape) 43275+- interpreter.allocate_tensors() 43276+- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 43277+- np_test_case) 43278+- interpreter.invoke() 43279+- tflite_output = interpreter.get_tensor( 43280+- interpreter.get_output_details()[0]['index']) 43281+- 43282+- self.assertEqual(tf_output.numpy().tolist(), tflite_output.tolist()) 43283+- 43284+- @parameterized.parameters([t] for t in TEST_CASES) 43285+- def testToRaggedEquivalence(self, test_case): 43286+- tf_output = _call_whitespace_tokenizer_to_ragged(test_case) 43287+- 43288+- np_test_case = np.array(test_case, dtype=np.str) 43289+- rank = len(np_test_case.shape) 43290+- 43291+- model_filename = resource_loader.get_path_to_datafile( 43292+- 'testdata/whitespace_tokenizer_to_ragged_{}d_input.tflite'.format(rank)) 43293+- with open(model_filename, 'rb') as file: 43294+- model = file.read() 43295+- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 43296+- model_content=model, 43297+- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 43298+- interpreter.resize_tensor_input(0, np_test_case.shape) 43299+- interpreter.allocate_tensors() 43300+- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 43301+- np_test_case) 43302+- interpreter.invoke() 43303+- 43304+- # Traverse the nested row_splits/values of the ragged tensor. 43305+- for i in range(rank): 43306+- tflite_output_cur_row_splits = interpreter.get_tensor( 43307+- interpreter.get_output_details()[1 + i]['index']) 43308+- self.assertEqual(tf_output.row_splits.numpy().tolist(), 43309+- tflite_output_cur_row_splits.tolist()) 43310+- tf_output = tf_output.values 43311+- 43312+- tflite_output_values = interpreter.get_tensor( 43313+- interpreter.get_output_details()[0]['index']) 43314+- self.assertEqual(tf_output.numpy().tolist(), tflite_output_values.tolist()) 43315+- 43316+- def testSingleOpLatency(self): 43317+- model_filename = resource_loader.get_path_to_datafile( 43318+- 'testdata/whitespace_tokenizer_to_tensor.tflite') 43319+- with open(model_filename, 'rb') as file: 43320+- model = file.read() 43321+- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 43322+- model_content=model, 43323+- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 43324+- 43325+- latency = 0.0 43326+- for test_case in TEST_CASES: 43327+- np_test_case = np.array(test_case, dtype=np.str) 43328+- interpreter.resize_tensor_input(0, np_test_case.shape) 43329+- interpreter.allocate_tensors() 43330+- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 43331+- np_test_case) 43332+- start_time = timeit.default_timer() 43333+- for _ in range(INVOKES_FOR_SINGLE_OP_BENCHMARK): 43334+- interpreter.invoke() 43335+- latency = latency + timeit.default_timer() - start_time 43336+- 43337+- latency = latency / (INVOKES_FOR_SINGLE_OP_BENCHMARK * len(TEST_CASES)) 43338+- logging.info('Latency: %fms', latency * 1000.0) 43339+- 43340+- def testFlexDelegateLatency(self): 43341+- model_filename = resource_loader.get_path_to_datafile( 43342+- 'testdata/whitespace_tokenizer_flex_delegate.tflite') 43343+- with open(model_filename, 'rb') as file: 43344+- model = file.read() 43345+- interpreter = interpreter_wrapper.Interpreter(model_content=model) 43346+- 43347+- latency = 0.0 43348+- for test_case in TEST_CASES: 43349+- np_test_case = np.array(test_case, dtype=np.str) 43350+- interpreter.resize_tensor_input(0, np_test_case.shape) 43351+- interpreter.allocate_tensors() 43352+- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 43353+- np_test_case) 43354+- start_time = timeit.default_timer() 43355+- for _ in range(INVOKES_FOR_FLEX_DELEGATE_BENCHMARK): 43356+- interpreter.invoke() 43357+- latency = latency + timeit.default_timer() - start_time 43358+- 43359+- latency = latency / (INVOKES_FOR_FLEX_DELEGATE_BENCHMARK * len(TEST_CASES)) 43360+- logging.info('Latency: %fms', latency * 1000.0) 43361+- 43362+- 43363+-if __name__ == '__main__': 43364+- tf.test.main() 43365+-- 43366+2.38.0.413.g74048e4d9e-goog 43367+ 43368diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc 43369deleted file mode 100644 43370index 8096a5008bd12..0000000000000 43371--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.cc 43372+++ /dev/null 43373@@ -1,227 +0,0 @@ 43374-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43375- 43376-Licensed under the Apache License, Version 2.0 (the "License"); 43377-you may not use this file except in compliance with the License. 43378-You may obtain a copy of the License at 43379- 43380- http://www.apache.org/licenses/LICENSE-2.0 43381- 43382-Unless required by applicable law or agreed to in writing, software 43383-distributed under the License is distributed on an "AS IS" BASIS, 43384-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43385-See the License for the specific language governing permissions and 43386-limitations under the License. 43387-==============================================================================*/ 43388- 43389-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 43390- 43391-#include <algorithm> 43392-#include <utility> 43393-#include <vector> 43394- 43395-#include "libutf/utf.h" 43396-#include "tensorflow/lite/context.h" 43397-#include "tensorflow/lite/kernels/kernel_util.h" 43398-#include "tensorflow/lite/string_util.h" 43399- 43400-constexpr int kInput = 0; 43401-constexpr int kOutputValues = 0; 43402-constexpr int kOutputRowSplitsStart = 1; 43403- 43404-namespace tflite { 43405-namespace ops { 43406-namespace custom { 43407-namespace whitespace_tokenizer { 43408- 43409-// This TFLite op implements a whitespace tokenizer, and can output the 43410-// tokens as either a padded tensor or a ragged tensor. 43411-// 43412-// If we're outputting a padded tensor, our outputs are: 43413-// * A string tensor 43414-// 43415-// If we're outputting a ragged tensor, our outputs are: 43416-// * A string tensor (the innermost values of the ragged tensor) 43417-// * N int64 tensors (the row_splits of the ragged tensor, where N is the 43418-// rank of the input tensor) 43419- 43420-inline bool OutputIsPaddedTensor(TfLiteNode* node) { 43421- return NumOutputs(node) == 1; 43422-} 43423- 43424-inline int charntorune(Rune* r, const char* s, int n) { 43425- const int bytes_read = chartorune(r, const_cast<char*>(s)); 43426- if (bytes_read > n) { 43427- *r = Runeerror; 43428- return 0; 43429- } 43430- return bytes_read; 43431-} 43432- 43433-std::vector<std::pair<const char*, int>> Tokenize(StringRef str) { 43434- const char* p = str.str; 43435- int n = str.len; 43436- 43437- std::vector<std::pair<const char*, int>> tokens; 43438- const char* start = nullptr; 43439- while (n > 0) { 43440- Rune r; 43441- int c = charntorune(&r, p, n); 43442- if (r == Runeerror) 43443- break; 43444- 43445- if (isspacerune(r)) { 43446- if (start != nullptr) { 43447- tokens.push_back({start, p - start}); 43448- } 43449- start = nullptr; 43450- } else { 43451- if (start == nullptr) { 43452- start = p; 43453- } 43454- } 43455- 43456- p += c; 43457- n -= c; 43458- } 43459- if (start != nullptr) { 43460- tokens.push_back({start, p - start}); 43461- } 43462- 43463- return tokens; 43464-} 43465- 43466-TfLiteStatus WritePaddedOutput( 43467- const std::vector<std::vector<std::pair<const char*, int>>>& list_of_tokens, 43468- const TfLiteTensor* input, 43469- TfLiteTensor* output_values) { 43470- TfLiteIntArray* output_shape = TfLiteIntArrayCreate(NumDimensions(input) + 1); 43471- for (int i = 0; i < NumDimensions(input); ++i) { 43472- output_shape->data[i] = SizeOfDimension(input, i); 43473- } 43474- 43475- size_t max_tokens = 0; 43476- for (const auto& tokens : list_of_tokens) { 43477- max_tokens = std::max(max_tokens, tokens.size()); 43478- } 43479- 43480- output_shape->data[NumDimensions(input)] = max_tokens; 43481- DynamicBuffer buffer; 43482- for (const auto& tokens : list_of_tokens) { 43483- for (const auto& token : tokens) { 43484- buffer.AddString(token.first, token.second); 43485- } 43486- for (int i = tokens.size(); i < max_tokens; ++i) { 43487- buffer.AddString(nullptr, 0); 43488- } 43489- } 43490- buffer.WriteToTensor(output_values, output_shape); 43491- return kTfLiteOk; 43492-} 43493- 43494-TfLiteStatus WriteRaggedOutput( 43495- const std::vector<std::vector<std::pair<const char*, int>>>& list_of_tokens, 43496- const TfLiteTensor* input, 43497- TfLiteTensor* output_values, 43498- std::vector<TfLiteTensor*> nested_row_splits) { 43499- // The outer dimensions of the ragged tensor are all non-ragged. 43500- for (int i = 0; i < nested_row_splits.size() - 1; ++i) { 43501- int row_splits_step = SizeOfDimension(input, i + 1); 43502- TfLiteTensor* row_splits = nested_row_splits[i]; 43503- for (int j = 0; j < SizeOfDimension(row_splits, 0); ++j) { 43504- row_splits->data.i64[j] = j * row_splits_step; 43505- } 43506- } 43507- 43508- // Generate the innermost row_splits and values tensors. 43509- TfLiteTensor* row_splits = nested_row_splits.back(); 43510- TfLiteIntArray* output_shape = TfLiteIntArrayCreate(1); 43511- DynamicBuffer buffer; 43512- int token_index = 0; 43513- int row_splits_index = 0; 43514- for (const auto& tokens : list_of_tokens) { 43515- row_splits->data.i64[row_splits_index] = token_index; 43516- for (const auto& token : tokens) { 43517- buffer.AddString(token.first, token.second); 43518- ++token_index; 43519- } 43520- ++row_splits_index; 43521- } 43522- row_splits->data.i64[row_splits_index] = token_index; 43523- output_shape->data[0] = token_index; 43524- buffer.WriteToTensor(output_values, output_shape); 43525- return kTfLiteOk; 43526-} 43527- 43528-TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { 43529- TfLiteTensor* output_values = GetOutput(context, node, kOutputValues); 43530- SetTensorToDynamic(output_values); 43531- 43532- if (OutputIsPaddedTensor(node)) { 43533- return kTfLiteOk; 43534- } 43535- 43536- const TfLiteTensor* input = GetInput(context, node, kInput); 43537- TF_LITE_ENSURE(context, NumDimensions(input) == 43538- (NumOutputs(node) - kOutputRowSplitsStart)); 43539- 43540- // Resize the row_splits tensors. We're just adding a ragged inner 43541- // dimension to the shape of the input tensor, so the size of the 43542- // row_splits tensors can be calculated using the input tensor's shape. 43543- int input_size = 1; 43544- for (int i = 0; i < NumDimensions(input); ++i) { 43545- input_size *= SizeOfDimension(input, i); 43546- 43547- TfLiteIntArray* row_splits_shape = TfLiteIntArrayCreate(1); 43548- row_splits_shape->data[0] = input_size + 1; 43549- TfLiteTensor* row_splits = 43550- GetOutput(context, node, kOutputRowSplitsStart + i); 43551- TF_LITE_ENSURE_STATUS( 43552- context->ResizeTensor(context, row_splits, row_splits_shape)); 43553- } 43554- 43555- return kTfLiteOk; 43556-} 43557- 43558-TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { 43559- const TfLiteTensor* input = GetInput(context, node, kInput); 43560- int input_size = 1; 43561- for (int i = 0; i < NumDimensions(input); ++i) { 43562- input_size *= SizeOfDimension(input, i); 43563- } 43564- 43565- std::vector<std::vector<std::pair<const char*, int>>> list_of_tokens; 43566- list_of_tokens.reserve(input_size); 43567- for (int i = 0; i < input_size; ++i) { 43568- list_of_tokens.emplace_back(Tokenize(GetString(input, i))); 43569- } 43570- 43571- TfLiteTensor* output_values = GetOutput(context, node, kOutputValues); 43572- TF_LITE_ENSURE(context, IsDynamicTensor(output_values)); 43573- 43574- if (OutputIsPaddedTensor(node)) { 43575- return WritePaddedOutput(list_of_tokens, input, output_values); 43576- } 43577- 43578- std::vector<TfLiteTensor*> nested_row_splits; 43579- nested_row_splits.reserve(NumDimensions(input)); 43580- for (int i = 0; i < NumDimensions(input); ++i) { 43581- TfLiteTensor* output_row_splits = 43582- GetOutput(context, node, kOutputRowSplitsStart + i); 43583- nested_row_splits.push_back(output_row_splits); 43584- } 43585- return WriteRaggedOutput(list_of_tokens, input, output_values, 43586- nested_row_splits); 43587-} 43588- 43589-} // namespace whitespace_tokenizer 43590- 43591-TfLiteRegistration* Register_tftext_WhitespaceTokenizer() { 43592- static TfLiteRegistration r = {nullptr, nullptr, 43593- whitespace_tokenizer::Prepare, 43594- whitespace_tokenizer::Eval}; 43595- return &r; 43596-} 43597- 43598-} // namespace custom 43599-} // namespace ops 43600-} // namespace tflite 43601diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h 43602deleted file mode 100644 43603index b190248087d20..0000000000000 43604--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h 43605+++ /dev/null 43606@@ -1,31 +0,0 @@ 43607-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43608- 43609-Licensed under the Apache License, Version 2.0 (the "License"); 43610-you may not use this file except in compliance with the License. 43611-You may obtain a copy of the License at 43612- 43613- http://www.apache.org/licenses/LICENSE-2.0 43614- 43615-Unless required by applicable law or agreed to in writing, software 43616-distributed under the License is distributed on an "AS IS" BASIS, 43617-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43618-See the License for the specific language governing permissions and 43619-limitations under the License. 43620-==============================================================================*/ 43621- 43622-#ifndef TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 43623-#define TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 43624- 43625-#include "tensorflow/lite/context.h" 43626- 43627-namespace tflite { 43628-namespace ops { 43629-namespace custom { 43630- 43631-TfLiteRegistration* Register_tftext_WhitespaceTokenizer(); 43632- 43633-} // namespace custom 43634-} // namespace ops 43635-} // namespace tflite 43636- 43637-#endif // TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_H_ 43638diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc 43639deleted file mode 100644 43640index 6166bc149bc00..0000000000000 43641--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.cc 43642+++ /dev/null 43643@@ -1,32 +0,0 @@ 43644-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43645- 43646-Licensed under the Apache License, Version 2.0 (the "License"); 43647-you may not use this file except in compliance with the License. 43648-You may obtain a copy of the License at 43649- 43650- http://www.apache.org/licenses/LICENSE-2.0 43651- 43652-Unless required by applicable law or agreed to in writing, software 43653-distributed under the License is distributed on an "AS IS" BASIS, 43654-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43655-See the License for the specific language governing permissions and 43656-limitations under the License. 43657-==============================================================================*/ 43658- 43659-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h" 43660- 43661-#include "tensorflow/lite/mutable_op_resolver.h" 43662-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 43663- 43664-namespace tflite { 43665-namespace ops { 43666-namespace custom { 43667- 43668-void AddWhitespaceTokenizerCustomOp(MutableOpResolver* resolver) { 43669- resolver->AddCustom("tftext:WhitespaceTokenizer", 43670- Register_tftext_WhitespaceTokenizer()); 43671-} 43672- 43673-} // namespace custom 43674-} // namespace ops 43675-} // namespace tflite 43676diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h 43677deleted file mode 100644 43678index 4f57d8d8010cb..0000000000000 43679--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h 43680+++ /dev/null 43681@@ -1,34 +0,0 @@ 43682-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43683- 43684-Licensed under the Apache License, Version 2.0 (the "License"); 43685-you may not use this file except in compliance with the License. 43686-You may obtain a copy of the License at 43687- 43688- http://www.apache.org/licenses/LICENSE-2.0 43689- 43690-Unless required by applicable law or agreed to in writing, software 43691-distributed under the License is distributed on an "AS IS" BASIS, 43692-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43693-See the License for the specific language governing permissions and 43694-limitations under the License. 43695-==============================================================================*/ 43696- 43697-#ifndef TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 43698-#define TENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 43699- 43700-#include "tensorflow/lite/mutable_op_resolver.h" 43701- 43702-namespace tflite { 43703-namespace ops { 43704-namespace custom { 43705- 43706-// Adds the WhitespaceTokenizer custom op to an op resolver. 43707-// This function can be loaded using dlopen. Since C++ function names get 43708-// mangled, declare this function as extern C, so its name is unchanged. 43709-extern "C" void AddWhitespaceTokenizerCustomOp(MutableOpResolver* resolver); 43710- 43711-} // namespace custom 43712-} // namespace ops 43713-} // namespace tflite 43714- 43715-#endif // LETENSORFLOW_LITE_SUPPORT_CUSTOM_OPS_KERNEL_WHITESPACE_TOKENIZER_OP_RESOLVER_H_ 43716diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc 43717deleted file mode 100644 43718index 03d3ba899395a..0000000000000 43719--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver_wrapper.cc 43720+++ /dev/null 43721@@ -1,29 +0,0 @@ 43722-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43723- 43724-Licensed under the Apache License, Version 2.0 (the "License"); 43725-you may not use this file except in compliance with the License. 43726-You may obtain a copy of the License at 43727- 43728- http://www.apache.org/licenses/LICENSE-2.0 43729- 43730-Unless required by applicable law or agreed to in writing, software 43731-distributed under the License is distributed on an "AS IS" BASIS, 43732-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43733-See the License for the specific language governing permissions and 43734-limitations under the License. 43735-==============================================================================*/ 43736- 43737-#include "pybind11/pybind11.h" 43738-#include "tensorflow/lite/mutable_op_resolver.h" 43739-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_op_resolver.h" 43740- 43741-PYBIND11_MODULE(_pywrap_whitespace_tokenizer_op_resolver, m) { 43742- m.doc() = "_pywrap_whitespace_tokenizer_op_resolver"; 43743- m.def( 43744- "AddWhitespaceTokenizerCustomOp", 43745- [](uintptr_t resolver) { 43746- tflite::ops::custom::AddWhitespaceTokenizerCustomOp( 43747- reinterpret_cast<tflite::MutableOpResolver*>(resolver)); 43748- }, 43749- "Op registerer function for the tftext:WhitespaceTokenizer custom op."); 43750-} 43751diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc 43752deleted file mode 100644 43753index 4654e46c4a270..0000000000000 43754--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.cc 43755+++ /dev/null 43756@@ -1,189 +0,0 @@ 43757-/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43758- 43759-Licensed under the Apache License, Version 2.0 (the "License"); 43760-you may not use this file except in compliance with the License. 43761-You may obtain a copy of the License at 43762- 43763- http://www.apache.org/licenses/LICENSE-2.0 43764- 43765-Unless required by applicable law or agreed to in writing, software 43766-distributed under the License is distributed on an "AS IS" BASIS, 43767-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43768-See the License for the specific language governing permissions and 43769-limitations under the License. 43770-==============================================================================*/ 43771- 43772-#include "tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer.h" 43773- 43774-#include <string> 43775-#include <vector> 43776- 43777-#include <gmock/gmock.h> 43778-#include <gtest/gtest.h> 43779-#include "tensorflow/lite/kernels/test_util.h" 43780-#include "tensorflow/lite/schema/schema_generated.h" 43781-#include "tensorflow/lite/string_util.h" 43782- 43783-namespace tflite { 43784-namespace ops { 43785-namespace custom { 43786-namespace whitespace_tokenizer { 43787-namespace test { 43788-namespace { 43789- 43790-using ::testing::ElementsAre; 43791-using ::testing::ElementsAreArray; 43792- 43793-} // namespace 43794- 43795-enum OutputType { PADDED, RAGGED }; 43796- 43797-class WhitespaceTokenizerModel : public SingleOpModel { 43798- public: 43799- WhitespaceTokenizerModel(OutputType output_type, 43800- const std::vector<std::string>& input_values, 43801- const std::vector<int>& input_shape) 43802- : input_shape_(input_shape) { 43803- input_ = AddInput(TensorType_STRING); 43804- output_values_ = AddOutput(TensorType_STRING); 43805- if (output_type == RAGGED) { 43806- for (int i = 0; i < input_shape_.size(); ++i) { 43807- output_row_splits_.push_back(AddOutput(TensorType_INT64)); 43808- } 43809- } 43810- SetCustomOp("WhitespaceTokenizer", {}, Register_tftext_WhitespaceTokenizer); 43811- 43812- BuildInterpreter({input_shape}); 43813- PopulateStringTensor(input_, input_values); 43814- Invoke(); 43815- } 43816- 43817- std::vector<int> GetValuesTensorShape() { 43818- return GetTensorShape(output_values_); 43819- } 43820- 43821- std::vector<std::string> ExtractValuesTensorVector() { 43822- std::vector<std::string> r; 43823- TfLiteTensor* tensor = interpreter_->tensor(output_values_); 43824- int n = GetStringCount(tensor); 43825- for (int i = 0; i < n; ++i) { 43826- StringRef ref = GetString(tensor, i); 43827- r.emplace_back(ref.str, ref.len); 43828- } 43829- return r; 43830- } 43831- 43832- void CheckRowSplits(const std::vector<int>& token_counts) { 43833- int size = 1; 43834- for (int i = 0; i < input_shape_.size(); ++i) { 43835- size *= input_shape_[i]; 43836- EXPECT_THAT(GetTensorShape(output_row_splits_[i]), ElementsAre(size + 1)) 43837- << "row_splits " << i << " has the wrong shape"; 43838- 43839- std::vector<int64_t> expected_values(size + 1); 43840- if (i == input_shape_.size() - 1) { 43841- ASSERT_EQ(token_counts.size(), size); 43842- 43843- int index = 0; 43844- expected_values[0] = index; 43845- for (int j = 0; j < size; ++j) { 43846- index += token_counts[j]; 43847- expected_values[j + 1] = index; 43848- } 43849- } else { 43850- for (int j = 0; j <= size; ++j) { 43851- expected_values[j] = j * input_shape_[i + 1]; 43852- } 43853- } 43854- EXPECT_THAT(ExtractVector<int64_t>(output_row_splits_[i]), 43855- ElementsAreArray(expected_values)) 43856- << "row_splits " << i << " has an incorrect value/index"; 43857- } 43858- } 43859- 43860- private: 43861- int input_; 43862- std::vector<int> input_shape_; 43863- int output_values_; 43864- std::vector<int> output_row_splits_; 43865-}; // namespace test 43866- 43867-TEST(WhitespaceTokenizerTest, SingleStringPaddedOutput) { 43868- WhitespaceTokenizerModel m(PADDED, {"this is a test"}, {1}); 43869- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(1, 4)); 43870- EXPECT_THAT(m.ExtractValuesTensorVector(), 43871- ElementsAre("this", "is", "a", "test")); 43872-} 43873- 43874-TEST(WhitespaceTokenizerTest, SingleStringRaggedOutput) { 43875- WhitespaceTokenizerModel m(RAGGED, {"this is a test"}, {1}); 43876- m.CheckRowSplits({4}); 43877- EXPECT_THAT(m.ExtractValuesTensorVector(), 43878- ElementsAre("this", "is", "a", "test")); 43879-} 43880- 43881-TEST(WhitespaceTokenizerTest, VectorPaddedOutput) { 43882- WhitespaceTokenizerModel m(PADDED, 43883- {"this is a test", // 43884- "three token sentence", // 43885- "many more tokens than that sentence"}, 43886- {3}); 43887- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(3, 6)); 43888- EXPECT_THAT( 43889- m.ExtractValuesTensorVector(), 43890- ElementsAre("this", "is", "a", "test", "", "", // 43891- "three", "token", "sentence", "", "", "", // 43892- "many", "more", "tokens", "than", "that", "sentence")); 43893-} 43894- 43895-TEST(WhitespaceTokenizerTest, VectorRaggedOutput) { 43896- WhitespaceTokenizerModel m(RAGGED, 43897- {"this is a test", // 43898- "three token sentence", // 43899- "many more tokens than that sentence"}, 43900- {3}); 43901- m.CheckRowSplits({4, 3, 6}); 43902- EXPECT_THAT( 43903- m.ExtractValuesTensorVector(), 43904- ElementsAre("this", "is", "a", "test", // 43905- "three", "token", "sentence", // 43906- "many", "more", "tokens", "than", "that", "sentence")); 43907-} 43908- 43909-TEST(WhitespaceTokenizerTest, MatrixPaddedOutput) { 43910- WhitespaceTokenizerModel m(PADDED, 43911- {"a b c", "d e f", // 43912- "g h", "i j k l", // 43913- "m", "n o p q r"}, 43914- {3, 2}); 43915- EXPECT_THAT(m.GetValuesTensorShape(), ElementsAre(3, 2, 5)); 43916- EXPECT_THAT(m.ExtractValuesTensorVector(), 43917- ElementsAre("a", "b", "c", "", "", // 43918- "d", "e", "f", "", "", // 43919- "g", "h", "", "", "", // 43920- "i", "j", "k", "l", "", // 43921- "m", "", "", "", "", // 43922- "n", "o", "p", "q", "r")); 43923-} 43924- 43925-TEST(WhitespaceTokenizerTest, MatrixRAGGEDOutput) { 43926- WhitespaceTokenizerModel m(RAGGED, 43927- {"a b c", "d e f", // 43928- "g h", "i j k l", // 43929- "m", "n o p q r"}, 43930- {3, 2}); 43931- m.CheckRowSplits({3, 3, 2, 4, 1, 5}); 43932- EXPECT_THAT(m.ExtractValuesTensorVector(), 43933- ElementsAre("a", "b", "c", // 43934- "d", "e", "f", // 43935- "g", "h", // 43936- "i", "j", "k", "l", // 43937- "m", // 43938- "n", "o", "p", "q", "r")); 43939-} 43940- 43941-} // namespace test 43942-} // namespace whitespace_tokenizer 43943-} // namespace custom 43944-} // namespace ops 43945-} // namespace tflite 43946diff --git a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py b/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py 43947deleted file mode 100644 43948index b6a1a67d74ba2..0000000000000 43949--- a/src/third_party/tflite_support/src/tensorflow_lite_support/custom_ops/kernel/whitespace_tokenizer_test.py 43950+++ /dev/null 43951@@ -1,168 +0,0 @@ 43952-# Copyright 2020 The TensorFlow Authors. All Rights Reserved. 43953-# 43954-# Licensed under the Apache License, Version 2.0 (the "License"); 43955-# you may not use this file except in compliance with the License. 43956-# You may obtain a copy of the License at 43957-# 43958-# http://www.apache.org/licenses/LICENSE-2.0 43959-# 43960-# Unless required by applicable law or agreed to in writing, software 43961-# distributed under the License is distributed on an "AS IS" BASIS, 43962-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 43963-# See the License for the specific language governing permissions and 43964-# limitations under the License. 43965-# ============================================================================== 43966-# Lint as: python3 43967-"""Tests for tensorflow_lite_support.custom_ops.kernel.whitespace_tokenizer.""" 43968- 43969-import os 43970-import sys 43971-import timeit 43972- 43973-from absl import logging 43974-from absl.testing import parameterized 43975-import numpy as np 43976-import tensorflow as tf 43977-import tensorflow_text as tf_text 43978-# pylint: disable=g-direct-tensorflow-import 43979-from tensorflow.lite.python import interpreter as interpreter_wrapper 43980-from tensorflow.python.platform import resource_loader 43981- 43982-# Force loaded shared object symbols to be globally visible. This is needed so 43983-# that the interpreter_wrapper, in one .so file, can see the op resolver 43984-# in a different .so file. Note that this may already be set by default. 43985-# pylint: disable=g-import-not-at-top,g-bad-import-order,unused-import 43986-if hasattr(sys, 'setdlopenflags') and hasattr(sys, 'getdlopenflags'): 43987- sys.setdlopenflags(sys.getdlopenflags() | os.RTLD_GLOBAL) 43988-from tensorflow_lite_support.custom_ops.kernel import _pywrap_whitespace_tokenizer_op_resolver 43989- 43990-TEST_CASES = [ 43991- ['this is a test'], 43992- ['extra spaces in here'], 43993- ['a four token sentence', 'a five token sentence thing.'], 43994- [['a multi dimensional test case', 'a b c d', 'e f g'], 43995- ['h i j', 'k l m 2 3', 'n o p'], ['q r s 0 1', 't u v', 'w x y z']], 43996-] 43997- 43998-INVOKES_FOR_SINGLE_OP_BENCHMARK = 1000 43999-INVOKES_FOR_FLEX_DELEGATE_BENCHMARK = 10 44000- 44001- 44002-@tf.function 44003-def _call_whitespace_tokenizer_to_tensor(test_case): 44004- tokenizer = tf_text.WhitespaceTokenizer() 44005- return tokenizer.tokenize(test_case).to_tensor() 44006- 44007- 44008-@tf.function 44009-def _call_whitespace_tokenizer_to_ragged(test_case): 44010- tokenizer = tf_text.WhitespaceTokenizer() 44011- return tokenizer.tokenize(test_case) 44012- 44013- 44014-class WhitespaceTokenizerTest(parameterized.TestCase): 44015- 44016- @parameterized.parameters([t] for t in TEST_CASES) 44017- def testToTensorEquivalence(self, test_case): 44018- tf_output = _call_whitespace_tokenizer_to_tensor(test_case) 44019- 44020- model_filename = resource_loader.get_path_to_datafile( 44021- 'testdata/whitespace_tokenizer_to_tensor.tflite') 44022- with open(model_filename, 'rb') as file: 44023- model = file.read() 44024- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 44025- model_content=model, 44026- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 44027- 44028- np_test_case = np.array(test_case, dtype=np.str) 44029- interpreter.resize_tensor_input(0, np_test_case.shape) 44030- interpreter.allocate_tensors() 44031- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 44032- np_test_case) 44033- interpreter.invoke() 44034- tflite_output = interpreter.get_tensor( 44035- interpreter.get_output_details()[0]['index']) 44036- 44037- self.assertEqual(tf_output.numpy().tolist(), tflite_output.tolist()) 44038- 44039- @parameterized.parameters([t] for t in TEST_CASES) 44040- def testToRaggedEquivalence(self, test_case): 44041- tf_output = _call_whitespace_tokenizer_to_ragged(test_case) 44042- 44043- np_test_case = np.array(test_case, dtype=np.str) 44044- rank = len(np_test_case.shape) 44045- 44046- model_filename = resource_loader.get_path_to_datafile( 44047- 'testdata/whitespace_tokenizer_to_ragged_{}d_input.tflite'.format(rank)) 44048- with open(model_filename, 'rb') as file: 44049- model = file.read() 44050- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 44051- model_content=model, 44052- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 44053- interpreter.resize_tensor_input(0, np_test_case.shape) 44054- interpreter.allocate_tensors() 44055- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 44056- np_test_case) 44057- interpreter.invoke() 44058- 44059- # Traverse the nested row_splits/values of the ragged tensor. 44060- for i in range(rank): 44061- tflite_output_cur_row_splits = interpreter.get_tensor( 44062- interpreter.get_output_details()[1 + i]['index']) 44063- self.assertEqual(tf_output.row_splits.numpy().tolist(), 44064- tflite_output_cur_row_splits.tolist()) 44065- tf_output = tf_output.values 44066- 44067- tflite_output_values = interpreter.get_tensor( 44068- interpreter.get_output_details()[0]['index']) 44069- self.assertEqual(tf_output.numpy().tolist(), tflite_output_values.tolist()) 44070- 44071- def testSingleOpLatency(self): 44072- model_filename = resource_loader.get_path_to_datafile( 44073- 'testdata/whitespace_tokenizer_to_tensor.tflite') 44074- with open(model_filename, 'rb') as file: 44075- model = file.read() 44076- interpreter = interpreter_wrapper.InterpreterWithCustomOps( 44077- model_content=model, 44078- custom_op_registerers=['AddWhitespaceTokenizerCustomOp']) 44079- 44080- latency = 0.0 44081- for test_case in TEST_CASES: 44082- np_test_case = np.array(test_case, dtype=np.str) 44083- interpreter.resize_tensor_input(0, np_test_case.shape) 44084- interpreter.allocate_tensors() 44085- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 44086- np_test_case) 44087- start_time = timeit.default_timer() 44088- for _ in range(INVOKES_FOR_SINGLE_OP_BENCHMARK): 44089- interpreter.invoke() 44090- latency = latency + timeit.default_timer() - start_time 44091- 44092- latency = latency / (INVOKES_FOR_SINGLE_OP_BENCHMARK * len(TEST_CASES)) 44093- logging.info('Latency: %fms', latency * 1000.0) 44094- 44095- def testFlexDelegateLatency(self): 44096- model_filename = resource_loader.get_path_to_datafile( 44097- 'testdata/whitespace_tokenizer_flex_delegate.tflite') 44098- with open(model_filename, 'rb') as file: 44099- model = file.read() 44100- interpreter = interpreter_wrapper.Interpreter(model_content=model) 44101- 44102- latency = 0.0 44103- for test_case in TEST_CASES: 44104- np_test_case = np.array(test_case, dtype=np.str) 44105- interpreter.resize_tensor_input(0, np_test_case.shape) 44106- interpreter.allocate_tensors() 44107- interpreter.set_tensor(interpreter.get_input_details()[0]['index'], 44108- np_test_case) 44109- start_time = timeit.default_timer() 44110- for _ in range(INVOKES_FOR_FLEX_DELEGATE_BENCHMARK): 44111- interpreter.invoke() 44112- latency = latency + timeit.default_timer() - start_time 44113- 44114- latency = latency / (INVOKES_FOR_FLEX_DELEGATE_BENCHMARK * len(TEST_CASES)) 44115- logging.info('Latency: %fms', latency * 1000.0) 44116- 44117- 44118-if __name__ == '__main__': 44119- tf.test.main() 44120diff --git a/src/tools/metrics/histograms/enums.xml b/src/tools/metrics/histograms/enums.xml 44121index 6c9de291ba594..9b5cd62a72864 44122--- a/src/tools/metrics/histograms/enums.xml 44123+++ b/src/tools/metrics/histograms/enums.xml 44124@@ -8455,6 +8455,7 @@ Called by update_bad_message_reasons.py.--> 44125 <int value="16" label="EMF_INVALID_EXTENSION_ID_FOR_CONTENT_SCRIPT"/> 44126 <int value="17" label="EMF_INVALID_EXTENSION_ID_FOR_WORKER_CONTEXT"/> 44127 <int value="18" label="EMF_INVALID_PORT_CONTEXT"/> 44128+ <int value="21" label="EMF_INVALID_EXTENSION_ID_FOR_TAB_MSG"/> 44129 </enum> 44130 44131 <enum name="BadMessageReasonGuestView"> 44132diff --git a/src/ui/base/clipboard/ohos/clipboard_ohos.cc b/src/ui/base/clipboard/ohos/clipboard_ohos.cc 44133index ac7413b89d5ab..78f813d437643 44134--- a/src/ui/base/clipboard/ohos/clipboard_ohos.cc 44135+++ b/src/ui/base/clipboard/ohos/clipboard_ohos.cc 44136@@ -6,6 +6,7 @@ 44137 #include "ui/base/clipboard/ohos/clipboard_ohos_read_data.h" 44138 44139 #include "base/check_op.h" 44140+#include "base/command_line.h" 44141 #include "base/containers/contains.h" 44142 #include "base/feature_list.h" 44143 #include "base/files/file_util.h" 44144@@ -16,6 +17,7 @@ 44145 #include "base/synchronization/lock.h" 44146 #include "content/public/browser/browser_task_traits.h" 44147 #include "content/public/browser/browser_thread.h" 44148+#include "content/public/common/content_switches.h" 44149 #include "skia/ext/skia_utils_base.h" 44150 #include "third_party/skia/include/core/SkBitmap.h" 44151 #include "ui/base/clipboard/clipboard_constants.h" 44152@@ -29,6 +31,7 @@ 44153 44154 #include "base/logging.h" 44155 #include "ohos_adapter_helper.h" 44156+#include "ohos_resource_adapter.h" 44157 44158 #include <securec.h> 44159 #include <map> 44160@@ -45,6 +48,10 @@ namespace { 44161 const std::string kImgTagPattern = "<img.*?data-ohos=.*?>"; 44162 const std::string kImgTagSrcPattern = "src=*\"([^\"]+)"; 44163 const std::string kImgTagSrcHead = "src=\""; 44164+const std::string kResourcePathPrefix = "resources/"; 44165+const std::string kResourceResavePathPrefix = 44166+ "/data/storage/el2/base/cache/resource_resave/"; 44167+ 44168 using InstanceRegistry = std::set<const ClipboardOHOS*, std::less<>>; 44169 InstanceRegistry* GetInstanceRegistry() { 44170 static base::NoDestructor<InstanceRegistry> registry; 44171@@ -71,6 +78,14 @@ bool IsRegisteredInstance(const Clipboard* clipboard) { 44172 return base::Contains(*GetInstanceRegistry(), clipboard); 44173 } 44174 44175+std::string RemoveFileSchemePerfix(const std::string img_src) { 44176+ GURL img_url(img_src); 44177+ if (img_url.SchemeIsFile()) { 44178+ return img_url.path(); 44179+ } 44180+ return img_src; 44181+} 44182+ 44183 std::string GetImgLocalPath(const char* img_src) { 44184 if (!img_src) { 44185 return ""; 44186@@ -80,9 +95,12 @@ std::string GetImgLocalPath(const char* img_src) { 44187 img_url.SchemeIsBlob()) { 44188 return ""; 44189 } 44190+ if (img_url.SchemeIsOhosResource()) { 44191+ return std::string(img_src); 44192+ } 44193 if (img_url.SchemeIsFile() && 44194 base::PathExists(base::FilePath(img_url.path()))) { 44195- return img_url.path(); 44196+ return std::string(img_src); 44197 } 44198 if (base::PathExists(base::FilePath(img_src))) { 44199 return std::string(img_src); 44200@@ -126,6 +144,12 @@ class ClipboardOHOSInternal { 44201 .GetPasteBoard() 44202 .AddPasteboardChangedObserver(observer_); 44203 observer_->SetClipboardInternal(this); 44204+ std::string hapPath = 44205+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 44206+ switches::kOhosHapPath); 44207+ resource_adapter_ = 44208+ OHOS::NWeb::OhosAdapterHelper::GetInstance().GetResourceAdapter( 44209+ hapPath); 44210 } 44211 44212 ~ClipboardOHOSInternal() { 44213@@ -320,7 +344,6 @@ class ClipboardOHOSInternal { 44214 std::make_shared<std::string>(currentData->markup_data()); 44215 if (record->SetHtmlText(html)) { 44216 LOG(INFO) << "set html to record success"; 44217- 44218 } else { 44219 LOG(ERROR) << "set html to record failed"; 44220 } 44221@@ -348,8 +371,13 @@ class ClipboardOHOSInternal { 44222 std::vector<uint8_t> offset_list( 44223 offset_data, offset_data + it->second.size() * sizeof(int)); 44224 custom_data.insert(std::make_pair(it->first, offset_list)); 44225- if (uri_record->SetUri(it->first) && 44226+ std::string resave_path = it->first; 44227+ if (!ResaveResourceImg(it->first, resave_path)) { 44228+ continue; 44229+ } 44230+ if (uri_record->SetUri(RemoveFileSchemePerfix(resave_path)) && 44231 uri_record->SetCustomData(custom_data)) { 44232+ LOG(ERROR) << it->first; 44233 result_list.push_back(uri_record); 44234 } else { 44235 LOG(ERROR) << "WriteHTML extra record failed"; 44236@@ -405,6 +433,43 @@ class ClipboardOHOSInternal { 44237 return allFormat & static_cast<int>(format); 44238 } 44239 44240+ bool ResaveResourceImg(const std::string& img_src, std::string& resave_path) { 44241+ GURL resource_img_src(img_src); 44242+ if (!resource_img_src.SchemeIsOhosResource()) { 44243+ LOG(INFO) << "no need to resave"; 44244+ return true; 44245+ } 44246+ 44247+ std::string img_path = 44248+ kResourcePathPrefix + resource_img_src.host() + resource_img_src.path(); 44249+ if (!resource_adapter_ || !resource_adapter_->IsRawFileExist(img_path)) { 44250+ LOG(ERROR) << "resource_adapter is nullptr or " << img_path 44251+ << " is not exists"; 44252+ return false; 44253+ } 44254+ std::unique_ptr<uint8_t[]> data; 44255+ size_t length = 0; 44256+ if (!resource_adapter_->GetRawFileData(img_path, length, data, false)) { 44257+ LOG(ERROR) << "read " << img_path << " failed"; 44258+ return false; 44259+ } 44260+ LOG(INFO) << img_path << " length:" << length; 44261+ base::FilePath resave_root_path(kResourceResavePathPrefix); 44262+ resave_root_path = resave_root_path.Append(base::FilePath(img_path)); 44263+ LOG(ERROR) << "resave_root_path dir:" << resave_root_path.DirName(); 44264+ if (!base::DirectoryExists(resave_root_path.DirName()) && 44265+ !base::CreateDirectory(resave_root_path.DirName())) { 44266+ return false; 44267+ } 44268+ resave_path = resave_root_path.AsUTF8Unsafe(); 44269+ if (base::WriteFile(resave_root_path, reinterpret_cast<char*>(data.get()), 44270+ length) != length) { 44271+ LOG(ERROR) << "resave img resource failed"; 44272+ return false; 44273+ } 44274+ return true; 44275+ } 44276+ 44277 // Current ClipboardData. 44278 std::unique_ptr<ClipboardData> data_; 44279 44280@@ -413,6 +478,7 @@ class ClipboardOHOSInternal { 44281 std::shared_ptr<PasteboardObserverOhos> observer_; 44282 ClipboardState state_ = ClipboardState::kOutOfDate; 44283 std::shared_ptr<ClipboardOhosReadData> read_data_ = nullptr; 44284+ std::unique_ptr<OHOS::NWeb::OhosResourceAdapter> resource_adapter_ = nullptr; 44285 }; 44286 44287 class ClipboardDataBuilder { 44288@@ -533,7 +599,6 @@ class ClipboardDataBuilder { 44289 std::map<std::string, std::vector<int>>& img_src_set, 44290 int offset) { 44291 std::string img_path = GetImgLocalPath(img_src); 44292- // LOG(ERROR) << "AddImgUrlToSet:" << img_path; 44293 if (!img_path.empty()) { 44294 std::map<std::string, std::vector<int>>::iterator iter = 44295 img_src_set.find(img_path); 44296diff --git a/src/ui/base/clipboard/ohos/clipboard_ohos_read_data.cc b/src/ui/base/clipboard/ohos/clipboard_ohos_read_data.cc 44297index 9983b83565535..dfc10c51d7ac3 44298--- a/src/ui/base/clipboard/ohos/clipboard_ohos_read_data.cc 44299+++ b/src/ui/base/clipboard/ohos/clipboard_ohos_read_data.cc 44300@@ -10,12 +10,21 @@ 44301 #include "base/files/file_util.h" 44302 #include "base/logging.h" 44303 #include "third_party/icu/source/i18n/unicode/regex.h" 44304+#include "url/gurl.h" 44305 44306 using namespace OHOS::NWeb; 44307 44308 namespace ui { 44309 const std::string kImgPasteboardDir = "/data/storage/el2/base/cache/pasteboard"; 44310 44311+std::string RemoveFileSchemePerfix(const std::string& img_src) { 44312+ GURL img_url(img_src); 44313+ if (img_url.SchemeIsFile()) { 44314+ return img_url.path(); 44315+ } 44316+ return img_src; 44317+} 44318+ 44319 ClipboardOhosReadData::ClipboardOhosReadData(PasteRecordList& record_list) 44320 : record_list_(record_list) { 44321 is_in_app_ = OhosAdapterHelper::GetInstance().GetPasteBoard().IsLocalPaste(); 44322@@ -28,6 +37,7 @@ ClipboardOhosReadData::ClipboardOhosReadData(PasteRecordList& record_list) 44323 if (!new_uri) { 44324 continue; 44325 } 44326+ LOG(INFO) << "new_uri:" << *new_uri; 44327 int fd = OhosAdapterHelper::GetInstance().GetPasteBoard().OpenRemoteUri( 44328 *new_uri); 44329 if (fd > 0) { 44330@@ -41,11 +51,12 @@ void ClipboardOhosReadData::SaveImgFile(const std::string& old_uri, 44331 std::string& new_uri, 44332 uint32_t token_id) { 44333 base::FilePath pasteboard_root_path(kImgPasteboardDir); 44334+ std::string old_uri_without_prefix = RemoveFileSchemePerfix(old_uri); 44335 base::FilePath dest_file_dir_path( 44336 pasteboard_root_path.Append(std::to_string(token_id)) 44337- .Append(base::FilePath(old_uri).DirName())); 44338- base::FilePath new_file_path( 44339- dest_file_dir_path.Append(base::FilePath(old_uri).BaseName())); 44340+ .Append(base::FilePath(old_uri_without_prefix).DirName())); 44341+ base::FilePath new_file_path(dest_file_dir_path.Append( 44342+ base::FilePath(old_uri_without_prefix).BaseName())); 44343 if (!base::DirectoryExists(dest_file_dir_path) && 44344 !base::CreateDirectory(dest_file_dir_path)) { 44345 return; 44346@@ -60,7 +71,7 @@ void ClipboardOhosReadData::SaveImgFile(const std::string& old_uri, 44347 base::File::Flags::FLAG_WRITE); 44348 if (old_file.IsValid() && new_file.IsValid()) { 44349 if (base::CopyFileContents(old_file, new_file)) { 44350- new_uri = new_file_path.AsUTF8Unsafe(); 44351+ new_uri = "file://" + new_file_path.AsUTF8Unsafe(); 44352 } else { 44353 LOG(ERROR) << "SaveImgFile copy file failed"; 44354 } 44355diff --git a/src/ui/base/resource/data_pack.cc b/src/ui/base/resource/data_pack.cc 44356index fcbe2e4ce0c46..7db34fe6d77d7 44357--- a/src/ui/base/resource/data_pack.cc 44358+++ b/src/ui/base/resource/data_pack.cc 44359@@ -25,6 +25,13 @@ 44360 #include "net/filter/gzip_header.h" 44361 #include "third_party/zlib/google/compression_utils.h" 44362 44363+#if BUILDFLAG(IS_OHOS) 44364+#include <unordered_map> 44365+#include "base/command_line.h" 44366+#include "content/public/common/content_switches.h" 44367+#include "ohos_adapter_helper.h" 44368+#endif 44369+ 44370 // For details of the file layout, see 44371 // http://dev.chromium.org/developers/design-documents/linuxresourcesandlocalizedstrings 44372 44373@@ -173,6 +180,38 @@ bool MmapHasGzipHeader(const base::MemoryMappedFile* mmap) { 44374 return header_status == net::GZipHeader::COMPLETE_HEADER; 44375 } 44376 44377+#if BUILDFLAG(IS_OHOS) 44378+std::unordered_map<ui::ResourceScaleFactor, std::string> kPakFileNameHapMap = { 44379+ {ui::ResourceScaleFactor::kScaleFactorNone, 44380+ "resources/rawfile/resources.pak"}, 44381+ {ui::ResourceScaleFactor::k100Percent, 44382+ "resources/rawfile/chrome_100_percent.pak"}, 44383+ {ui::ResourceScaleFactor::k200Percent, 44384+ "resources/rawfile/chrome_200_percent.pak"}}; 44385+ 44386+bool IsPathFromHap(ui::ResourceScaleFactor factor, 44387+ const base::FilePath& path, 44388+ std::string& pathHap) { 44389+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOhosHapPath)) { 44390+ LOG(INFO) << "not has switch kOhosHapPath, hap is decompress"; 44391+ return false; 44392+ } 44393+ auto iter = kPakFileNameHapMap.find(factor); 44394+ if (iter == kPakFileNameHapMap.end()) { 44395+ LOG(ERROR) << "kPakFileNameHapMap not find path: " << path; 44396+ return false; 44397+ } 44398+ std::string pathStr = path.MaybeAsASCII(); 44399+ if (pathStr.find("zh-CN.pak") != std::string::npos) { 44400+ pathHap = "resources/rawfile/locales/zh-CN.pak"; 44401+ } else if (pathStr.find("en-US.pak") != std::string::npos) { 44402+ pathHap = "resources/rawfile/locales/en-US.pak"; 44403+ } else { 44404+ pathHap = iter->second; 44405+ } 44406+ return true; 44407+} 44408+#endif 44409 } // namespace 44410 44411 namespace ui { 44412@@ -278,10 +317,46 @@ DataPack::DataPack(ResourceScaleFactor resource_scale_factor) 44413 static_assert(sizeof(Alias) == 4, "size of Alias must be 4"); 44414 } 44415 44416-DataPack::~DataPack() { 44417-} 44418+DataPack::~DataPack() {} 44419 44420 bool DataPack::LoadFromPath(const base::FilePath& path) { 44421+#if BUILDFLAG(IS_OHOS) 44422+ std::string pathHap; 44423+ if (IsPathFromHap(resource_scale_factor_, path, pathHap)) { 44424+ size_t length = 0; 44425+ std::unique_ptr<uint8_t[]> data; 44426+ auto resourceInstance = 44427+ OHOS::NWeb::OhosAdapterHelper::GetInstance().GetResourceAdapter(); 44428+ if (!resourceInstance->GetRawFileData(pathHap, length, data, true)) { 44429+ LOG(ERROR) << "DataPack::LoadFromPath couldn't data file: " 44430+ << pathHap.c_str(); 44431+ return false; 44432+ } 44433+ 44434+ LOG(INFO) << "DataPack::LoadFromPath " << pathHap.c_str() 44435+ << ", data file length: " << length; 44436+ std::unique_ptr<base::MemoryMappedFile> mmap = 44437+ std::make_unique<base::MemoryMappedFile>(); 44438+ mmap->SetDataAndLength(data, length); 44439+ if (MmapHasGzipHeader(mmap.get())) { 44440+ base::StringPiece compressed(reinterpret_cast<char*>(mmap->data()), 44441+ mmap->length()); 44442+ std::string data; 44443+ if (!compression::GzipUncompress(compressed, &data)) { 44444+ LOG(ERROR) << "Failed to unzip compressed datapack: " 44445+ << pathHap.c_str(); 44446+ LogDataPackError(UNZIP_FAILED); 44447+ return false; 44448+ } 44449+ return LoadImpl(std::make_unique<StringDataSource>(std::move(data))); 44450+ } 44451+ return LoadImpl(std::make_unique<MemoryMappedDataSource>(std::move(mmap))); 44452+ } 44453+ if (!base::PathExists(path)) { 44454+ LOG(ERROR) << "LoadFromPath file not exist"; 44455+ return false; 44456+ } 44457+#endif 44458 std::unique_ptr<base::MemoryMappedFile> mmap = 44459 std::make_unique<base::MemoryMappedFile>(); 44460 // Open the file for reading; allowing other consumers to also open it for 44461@@ -502,9 +577,9 @@ void DataPack::CheckForDuplicateResources( 44462 if (GetScaleForResourceScaleFactor(handle->GetResourceScaleFactor()) != 44463 resource_scale) 44464 continue; 44465- DCHECK(!handle->HasResource(resource_id)) << "Duplicate resource " 44466- << resource_id << " with scale " 44467- << resource_scale; 44468+ DCHECK(!handle->HasResource(resource_id)) 44469+ << "Duplicate resource " << resource_id << " with scale " 44470+ << resource_scale; 44471 } 44472 } 44473 } 44474diff --git a/src/ui/base/resource/resource_bundle.cc b/src/ui/base/resource/resource_bundle.cc 44475index 9bc3c67f22f7d..bc4f7dc73fae4 44476--- a/src/ui/base/resource/resource_bundle.cc 44477+++ b/src/ui/base/resource/resource_bundle.cc 44478@@ -68,6 +68,12 @@ 44479 #undef LoadBitmap 44480 #endif 44481 44482+#if BUILDFLAG(IS_OHOS) 44483+#include "base/command_line.h" 44484+#include "content/public/common/content_switches.h" 44485+#include "ohos_adapter_helper.h" 44486+#endif 44487+ 44488 namespace ui { 44489 44490 namespace { 44491@@ -366,6 +372,14 @@ void ResourceBundle::LoadSecondaryLocaleDataWithPakFileRegion( 44492 #if !BUILDFLAG(IS_ANDROID) 44493 // static 44494 bool ResourceBundle::LocaleDataPakExists(const std::string& locale) { 44495+#if BUILDFLAG(IS_OHOS) 44496+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kOhosHapPath)) { 44497+ if (locale == "zh-CN" || locale == "en-US" || locale == "resources" || 44498+ locale == "chrome_100_percent" || locale == "chrome_200_percent") { 44499+ return true; 44500+ } 44501+ } 44502+#endif 44503 const auto path = GetLocaleFilePath(locale); 44504 return !path.empty() && base::PathExists(path); 44505 } 44506diff --git a/src/ui/base/ui_features.gni b/src/ui/base/ui_features.gni 44507index 44c1552b35e4c..febd84e679d21 44508--- a/src/ui/base/ui_features.gni 44509+++ b/src/ui/base/ui_features.gni 44510@@ -32,4 +32,4 @@ declare_args() { 44511 has_platform_accessibility_support = 44512 has_native_accessibility || is_android || is_fuchsia 44513 44514-enable_hidpi = !is_android 44515+enable_hidpi = !is_android && !is_ohos 44516diff --git a/src/ui/gl/gl_surface_egl_ohos.cc b/src/ui/gl/gl_surface_egl_ohos.cc 44517index a8c5763683753..bc457f2923daa 44518--- a/src/ui/gl/gl_surface_egl_ohos.cc 44519+++ b/src/ui/gl/gl_surface_egl_ohos.cc 44520@@ -3,6 +3,7 @@ 44521 // found in the LICENSE file. 44522 44523 #include "ui/gl/gl_surface_egl_ohos.h" 44524+#include "content/public/common/content_switches.h" 44525 44526 #include <surface.h> 44527 #include <sys/time.h> 44528@@ -25,11 +26,29 @@ namespace gl { 44529 scoped_refptr<gl::NativeViewGLSurfaceEGLOhos> 44530 NativeViewGLSurfaceEGLOhos::CreateNativeViewGLSurfaceEGLOhos( 44531 gfx::AcceleratedWidget widget) { 44532- NativeWindow* window = 44533- (NativeWindow*)NWebNativeWindowTracker::Instance().GetNativeWindow( 44534+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 44535+ if (command_line->HasSwitch(::switches::kOhosHanceSurface)) { 44536+ LOG(INFO) << "CreateNativeViewGLSurfaceEGLOhos:: enhance surface"; 44537+ WindowsSurfaceInfo* surfaceInfo = 44538+ (WindowsSurfaceInfo*)NWebNativeWindowTracker::Instance().GetNativeWindow( 44539 widget); 44540- return scoped_refptr<NativeViewGLSurfaceEGLOhos>( 44541- new NativeViewGLSurfaceEGLOhos(EGLNativeWindowType(window))); 44542+ if (surfaceInfo != nullptr) { 44543+ LOG(INFO) << "clear surface from NWEB"; 44544+ eglDestroySurface(surfaceInfo->display, surfaceInfo->surface); 44545+ eglDestroyContext(surfaceInfo->display, surfaceInfo->context); 44546+ 44547+ return scoped_refptr<NativeViewGLSurfaceEGLOhos>( 44548+ new NativeViewGLSurfaceEGLOhos(EGLNativeWindowType(surfaceInfo->window))); 44549+ } 44550+ } else { 44551+ LOG(INFO) << "CreateNativeViewGLSurfaceEGLOhos:: normal surface"; 44552+ NativeWindow* window = 44553+ (NativeWindow*)NWebNativeWindowTracker::Instance().GetNativeWindow( 44554+ widget); 44555+ return scoped_refptr<NativeViewGLSurfaceEGLOhos>( 44556+ new NativeViewGLSurfaceEGLOhos(EGLNativeWindowType(window))); 44557+ } 44558+ return nullptr; 44559 } 44560 44561 NativeViewGLSurfaceEGLOhos::NativeViewGLSurfaceEGLOhos( 44562@@ -54,9 +73,8 @@ gfx::SwapResult NativeViewGLSurfaceEGLOhos::SwapBuffers( 44563 void NativeViewGLSurfaceEGLOhos::FrameCounter::Start() { 44564 std::weak_ptr<FrameCounter> frame_counter_weak(shared_from_this()); 44565 std::thread frame_stat_thread([frame_counter_weak]() { 44566- while (!frame_counter_weak.expired()) { 44567+ while (auto frame_counter = frame_counter_weak.lock()) { 44568 { 44569- auto frame_counter = frame_counter_weak.lock(); 44570 std::unique_lock<std::mutex> lk(frame_counter->frame_stat_mtx_); 44571 int64_t curr_time = GetNowTime(); 44572 if (frame_counter->last_time_ == 0) { 44573diff --git a/src/ui/gl/gl_surface_egl_ohos.h b/src/ui/gl/gl_surface_egl_ohos.h 44574index c1c1f00eac9a0..07a6b74e8355b 44575--- a/src/ui/gl/gl_surface_egl_ohos.h 44576+++ b/src/ui/gl/gl_surface_egl_ohos.h 44577@@ -10,8 +10,15 @@ 44578 #include <mutex> 44579 #include "ui/gl/gl_export.h" 44580 #include "ui/gl/gl_surface_egl.h" 44581+#include "ui/gl/gl_bindings.h" 44582 44583 namespace gl { 44584+typedef struct WindowsSurfaceInfoTag { 44585+ void* window; 44586+ EGLDisplay display; 44587+ EGLContext context; 44588+ EGLSurface surface; 44589+} WindowsSurfaceInfo; 44590 44591 class GL_EXPORT NativeViewGLSurfaceEGLOhos : public NativeViewGLSurfaceEGL { 44592 public: 44593diff --git a/src/ui/gl/gl_surface_presentation_helper.cc b/src/ui/gl/gl_surface_presentation_helper.cc 44594index 1f62bff66f200..7db2fb73f3148 44595--- a/src/ui/gl/gl_surface_presentation_helper.cc 44596+++ b/src/ui/gl/gl_surface_presentation_helper.cc 44597@@ -96,7 +96,11 @@ bool GLSurfacePresentationHelper::GetFrameTimestampInfoIfAvailable( 44598 int64_t start = 0; 44599 int64_t end = 0; 44600 frame.timer->GetStartEndTimestamps(&start, &end); 44601+#if BUILDFLAG(IS_OHOS) 44602+ *timestamp = base::TimeTicks::Now(); 44603+#else 44604 *timestamp = base::TimeTicks() + base::Microseconds(start); 44605+#endif 44606 } else { 44607 if (!frame.fence->HasCompleted()) 44608 return false; 44609diff --git a/src/ui/views/BUILD.gn b/src/ui/views/BUILD.gn 44610index 28f6dff93dec7..d884bc549a58f 44611--- a/src/ui/views/BUILD.gn 44612+++ b/src/ui/views/BUILD.gn 44613@@ -15,7 +15,13 @@ import("//ui/views/features.gni") 44614 assert(toolkit_views || is_ohos) 44615 44616 config("flags") { 44617- defines = [ "TOOLKIT_VIEWS=1" ] 44618+ if (is_ohos) { 44619+ if (toolkit_views) { 44620+ defines = [ "TOOLKIT_VIEWS=1" ] 44621+ } 44622+ } else { 44623+ defines = [ "TOOLKIT_VIEWS=1" ] 44624+ } 44625 } 44626 44627 aggregate_vector_icons("views_vector_icons") { 44628diff --git a/src/ui/views/accessibility/ax_aura_obj_cache.cc b/src/ui/views/accessibility/ax_aura_obj_cache.cc 44629index af4c6b5c39686..7313a9caff32a 44630--- a/src/ui/views/accessibility/ax_aura_obj_cache.cc 44631+++ b/src/ui/views/accessibility/ax_aura_obj_cache.cc 44632@@ -74,6 +74,11 @@ AXAuraObjWrapper* AXAuraObjCache::GetOrCreate(View* view) { 44633 // Avoid problems with transient focus events. https://crbug.com/729449 44634 if (!view->GetWidget()) 44635 return nullptr; 44636+ 44637+ DCHECK(view_to_id_map_.find(view) != view_to_id_map_.end() || 44638+ // This is either a new view or we're erroneously here during ~View. 44639+ view->life_cycle_state() == View::LifeCycleState::kAlive); 44640+ 44641 return CreateInternal<AXViewObjWrapper>(view, &view_to_id_map_); 44642 } 44643 44644diff --git a/src/ui/views/accessibility/ax_aura_obj_cache.h b/src/ui/views/accessibility/ax_aura_obj_cache.h 44645index db6c31a89d023..223f13dd2b6e3 44646--- a/src/ui/views/accessibility/ax_aura_obj_cache.h 44647+++ b/src/ui/views/accessibility/ax_aura_obj_cache.h 44648@@ -88,9 +88,6 @@ class VIEWS_EXPORT AXAuraObjCache : public aura::client::FocusChangeObserver { 44649 // Get the object that has focus. 44650 AXAuraObjWrapper* GetFocus(); 44651 44652- // Send a notification that the focused view may have changed. 44653- void OnFocusedViewChanged(); 44654- 44655 // Tell our delegate to fire an event on a given object. 44656 void FireEvent(AXAuraObjWrapper* aura_obj, ax::mojom::Event event_type); 44657 44658@@ -122,6 +119,9 @@ class VIEWS_EXPORT AXAuraObjCache : public aura::client::FocusChangeObserver { 44659 44660 View* GetFocusedView(); 44661 44662+ // Send a notification that the focused view may have changed. 44663+ void OnFocusedViewChanged(); 44664+ 44665 // aura::client::FocusChangeObserver override. 44666 void OnWindowFocused(aura::Window* gained_focus, 44667 aura::Window* lost_focus) override; 44668diff --git a/src/ui/views/accessibility/ax_aura_obj_cache_unittest.cc b/src/ui/views/accessibility/ax_aura_obj_cache_unittest.cc 44669index 037ad6437c2a2..ccdab6ebd0075 44670--- a/src/ui/views/accessibility/ax_aura_obj_cache_unittest.cc 44671+++ b/src/ui/views/accessibility/ax_aura_obj_cache_unittest.cc 44672@@ -106,15 +106,12 @@ class ViewBlurObserver : public ViewObserver { 44673 observation_.Observe(view); 44674 } 44675 44676- // This is fired while the view is being destroyed, after the cache entry is 44677- // removed by the AXWidgetObjWrapper. Re-create the cache entry so we can 44678- // test that it will also be removed. 44679 void OnViewBlurred(View* view) override { 44680 ASSERT_FALSE(was_called()); 44681 observation_.Reset(); 44682 44683- ASSERT_EQ(cache_->GetID(view), 0); 44684- cache_->GetOrCreate(view); 44685+ // The cache entry gets deleted in 44686+ // AXViewObjWrapper::OnViewIsDeleting which occurs later in ~View. 44687 } 44688 44689 bool was_called() { return !observation_.IsObserving(); } 44690diff --git a/src/ui/views/accessibility/ax_widget_obj_wrapper.cc b/src/ui/views/accessibility/ax_widget_obj_wrapper.cc 44691index 7aba1f32a1d9e..7169dafa3fbf6 44692--- a/src/ui/views/accessibility/ax_widget_obj_wrapper.cc 44693+++ b/src/ui/views/accessibility/ax_widget_obj_wrapper.cc 44694@@ -20,7 +20,6 @@ AXWidgetObjWrapper::AXWidgetObjWrapper(AXAuraObjCache* aura_obj_cache, 44695 : AXAuraObjWrapper(aura_obj_cache), widget_(widget) { 44696 DCHECK(widget->GetNativeView()); 44697 widget_observation_.Observe(widget); 44698- widget_removals_observation_.Observe(widget); 44699 } 44700 44701 AXWidgetObjWrapper::~AXWidgetObjWrapper() = default; 44702@@ -78,14 +77,4 @@ void AXWidgetObjWrapper::OnWidgetClosing(Widget* widget) { 44703 aura_obj_cache_->Remove(widget); 44704 } 44705 44706-void AXWidgetObjWrapper::OnWidgetVisibilityChanged(Widget*, bool) { 44707- // If a widget changes visibility it may affect what's focused, in particular 44708- // when a widget that contains the focused view gets hidden. 44709- aura_obj_cache_->OnFocusedViewChanged(); 44710-} 44711- 44712-void AXWidgetObjWrapper::OnWillRemoveView(Widget* widget, View* view) { 44713- aura_obj_cache_->RemoveViewSubtree(view); 44714-} 44715- 44716 } // namespace views 44717diff --git a/src/ui/views/accessibility/ax_widget_obj_wrapper.h b/src/ui/views/accessibility/ax_widget_obj_wrapper.h 44718index 53f3c600a0a26..6ec90e291d8fc 44719--- a/src/ui/views/accessibility/ax_widget_obj_wrapper.h 44720+++ b/src/ui/views/accessibility/ax_widget_obj_wrapper.h 44721@@ -16,15 +16,12 @@ 44722 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" 44723 #include "ui/views/widget/widget.h" 44724 #include "ui/views/widget/widget_observer.h" 44725-#include "ui/views/widget/widget_removals_observer.h" 44726 44727 namespace views { 44728 class AXAuraObjCache; 44729 44730 // Describes a |Widget| for use with other AX classes. 44731-class AXWidgetObjWrapper : public AXAuraObjWrapper, 44732- public WidgetObserver, 44733- public WidgetRemovalsObserver { 44734+class AXWidgetObjWrapper : public AXAuraObjWrapper, public WidgetObserver { 44735 public: 44736 // |aura_obj_cache| must outlive this object. 44737 AXWidgetObjWrapper(AXAuraObjCache* aura_obj_cache, Widget* widget); 44738@@ -43,10 +40,6 @@ class AXWidgetObjWrapper : public AXAuraObjWrapper, 44739 void OnWidgetDestroying(Widget* widget) override; 44740 void OnWidgetDestroyed(Widget* widget) override; 44741 void OnWidgetClosing(Widget* widget) override; 44742- void OnWidgetVisibilityChanged(Widget*, bool) override; 44743- 44744- // WidgetRemovalsObserver overrides. 44745- void OnWillRemoveView(Widget* widget, View* view) override; 44746 44747 private: 44748 raw_ptr<Widget> widget_; 44749@@ -54,11 +47,6 @@ class AXWidgetObjWrapper : public AXAuraObjWrapper, 44750 const ui::AXUniqueId unique_id_; 44751 44752 base::ScopedObservation<Widget, WidgetObserver> widget_observation_{this}; 44753- base::ScopedObservation<Widget, 44754- WidgetRemovalsObserver, 44755- &Widget::AddRemovalsObserver, 44756- &Widget::RemoveRemovalsObserver> 44757- widget_removals_observation_{this}; 44758 }; 44759 44760 } // namespace views 44761diff --git a/src/ui/views/accessibility/ax_window_obj_wrapper.cc b/src/ui/views/accessibility/ax_window_obj_wrapper.cc 44762index 4fa02617f6fdb..7ccad9445a396 44763--- a/src/ui/views/accessibility/ax_window_obj_wrapper.cc 44764+++ b/src/ui/views/accessibility/ax_window_obj_wrapper.cc 44765@@ -281,19 +281,15 @@ void AXWindowObjWrapper::OnCaretBoundsChanged( 44766 } 44767 44768 void AXWindowObjWrapper::OnWindowDestroyed(aura::Window* window) { 44769+ if (is_root_window_) 44770+ aura_obj_cache_->OnRootWindowObjDestroyed(window_); 44771+ 44772 aura_obj_cache_->Remove(window, nullptr); 44773 } 44774 44775 void AXWindowObjWrapper::OnWindowDestroying(aura::Window* window) { 44776- if (window == window_) 44777- window_destroying_ = true; 44778- 44779- Widget* widget = GetWidgetForWindow(window); 44780- if (widget) 44781- aura_obj_cache_->Remove(widget); 44782- 44783- if (is_root_window_) 44784- aura_obj_cache_->OnRootWindowObjDestroyed(window_); 44785+ DCHECK_EQ(window, window_); 44786+ window_destroying_ = true; 44787 } 44788 44789 void AXWindowObjWrapper::OnWindowHierarchyChanged( 44790diff --git a/src/ui/views/bubble/bubble_dialog_delegate_view.cc b/src/ui/views/bubble/bubble_dialog_delegate_view.cc 44791index b0d39d93fbb05..6453c06d13fe9 44792--- a/src/ui/views/bubble/bubble_dialog_delegate_view.cc 44793+++ b/src/ui/views/bubble/bubble_dialog_delegate_view.cc 44794@@ -35,6 +35,7 @@ 44795 #include "ui/views/view_class_properties.h" 44796 #include "ui/views/widget/widget.h" 44797 #include "ui/views/widget/widget_observer.h" 44798+#include "ui/views/window/dialog_client_view.h" 44799 44800 #if BUILDFLAG(IS_WIN) 44801 #include "ui/base/win/shell.h" 44802@@ -709,6 +710,16 @@ void BubbleDialogDelegate::OnAnchorBoundsChanged() { 44803 // TODO(pbos): Reconsider whether to update the anchor when the view isn't 44804 // drawn. 44805 SizeToContents(); 44806+ 44807+ // We will not accept input event a short time after anchored view changed. 44808+ UpdateInputProtectorsTimeStamp(); 44809+} 44810+ 44811+void BubbleDialogDelegate::UpdateInputProtectorsTimeStamp() { 44812+ if (auto* dialog = GetDialogClientView()) 44813+ dialog->UpdateInputProtectorTimeStamp(); 44814+ 44815+ GetBubbleFrameView()->UpdateInputProtectorTimeStamp(); 44816 } 44817 44818 gfx::Rect BubbleDialogDelegate::GetBubbleBounds() { 44819diff --git a/src/ui/views/bubble/bubble_dialog_delegate_view.h b/src/ui/views/bubble/bubble_dialog_delegate_view.h 44820index 77012f1360ad9..fb0c7a27d8576 44821--- a/src/ui/views/bubble/bubble_dialog_delegate_view.h 44822+++ b/src/ui/views/bubble/bubble_dialog_delegate_view.h 44823@@ -140,6 +140,10 @@ class VIEWS_EXPORT BubbleDialogDelegate : public DialogDelegate { 44824 // normally, do not call this. 44825 void OnAnchorBoundsChanged(); 44826 44827+ // Call this method to update view shown time stamp of underneath input 44828+ // protectors. 44829+ void UpdateInputProtectorsTimeStamp(); 44830+ 44831 ////////////////////////////////////////////////////////////////////////////// 44832 // Miscellaneous bubble behaviors: 44833 // 44834diff --git a/src/ui/views/bubble/bubble_frame_view.cc b/src/ui/views/bubble/bubble_frame_view.cc 44835index 01426297ebb61..feca2ab55844d 44836--- a/src/ui/views/bubble/bubble_frame_view.cc 44837+++ b/src/ui/views/bubble/bubble_frame_view.cc 44838@@ -692,6 +692,10 @@ gfx::Rect BubbleFrameView::GetUpdatedWindowBounds( 44839 return bubble_border_->GetBounds(anchor_rect, size); 44840 } 44841 44842+void BubbleFrameView::UpdateInputProtectorTimeStamp() { 44843+ input_protector_.UpdateViewShownTimeStamp(); 44844+} 44845+ 44846 void BubbleFrameView::ResetViewShownTimeStampForTesting() { 44847 input_protector_.ResetForTesting(); 44848 } 44849diff --git a/src/ui/views/bubble/bubble_frame_view.h b/src/ui/views/bubble/bubble_frame_view.h 44850index f1a77ab30951c..a5cbbd9382e30 44851--- a/src/ui/views/bubble/bubble_frame_view.h 44852+++ b/src/ui/views/bubble/bubble_frame_view.h 44853@@ -166,6 +166,10 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView { 44854 44855 View* GetHeaderViewForTesting() const { return header_view_; } 44856 44857+ // Update the |view_shown_time_stamp_| of input protector. A short time 44858+ // from this point onward, input event will be ignored. 44859+ void UpdateInputProtectorTimeStamp(); 44860+ 44861 // Resets the time when view has been shown. Tests may need to call this 44862 // method if they use events that could be otherwise treated as unintended. 44863 // See IsPossiblyUnintendedInteraction(). 44864@@ -202,6 +206,8 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView { 44865 IgnorePossiblyUnintendedClicksClose); 44866 FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, 44867 IgnorePossiblyUnintendedClicksMinimize); 44868+ FRIEND_TEST_ALL_PREFIXES(BubbleFrameViewTest, 44869+ IgnorePossiblyUnintendedClicksAnchorBoundsChanged); 44870 FRIEND_TEST_ALL_PREFIXES(BubbleDelegateTest, CloseReasons); 44871 FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateViewTest, CloseMethods); 44872 FRIEND_TEST_ALL_PREFIXES(BubbleDialogDelegateViewTest, CreateDelegate); 44873diff --git a/src/ui/views/bubble/bubble_frame_view_unittest.cc b/src/ui/views/bubble/bubble_frame_view_unittest.cc 44874index ccb485eb3ffc8..33f6a6829e0fe 44875--- a/src/ui/views/bubble/bubble_frame_view_unittest.cc 44876+++ b/src/ui/views/bubble/bubble_frame_view_unittest.cc 44877@@ -30,11 +30,10 @@ 44878 #include "ui/views/test/views_test_base.h" 44879 #include "ui/views/widget/widget.h" 44880 #include "ui/views/widget/widget_delegate.h" 44881+#include "ui/views/window/dialog_client_view.h" 44882 44883 namespace views { 44884 44885-using BubbleFrameViewTest = ViewsTestBase; 44886- 44887 namespace { 44888 44889 constexpr BubbleBorder::Arrow kArrow = BubbleBorder::TOP_LEFT; 44890@@ -147,6 +146,18 @@ class TestBubbleFrameView : public BubbleFrameView { 44891 44892 } // namespace 44893 44894+class BubbleFrameViewTest : public ViewsTestBase { 44895+ public: 44896+ BubbleFrameViewTest() 44897+ : views::ViewsTestBase( 44898+ base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} 44899+ 44900+ BubbleFrameViewTest(const BubbleFrameViewTest&) = delete; 44901+ BubbleFrameViewTest& operator=(const BubbleFrameViewTest&) = delete; 44902+ 44903+ ~BubbleFrameViewTest() override = default; 44904+}; 44905+ 44906 TEST_F(BubbleFrameViewTest, GetBoundsForClientView) { 44907 TestBubbleFrameView frame(this); 44908 EXPECT_EQ(kArrow, frame.GetBorderArrow()); 44909@@ -1303,6 +1314,46 @@ TEST_F(BubbleFrameViewTest, IgnorePossiblyUnintendedClicksMinimize) { 44910 EXPECT_TRUE(bubble->IsMinimized()); 44911 } 44912 44913+// Ensures that clicks are ignored for short time after anchor view bounds 44914+// changed. 44915+TEST_F(BubbleFrameViewTest, IgnorePossiblyUnintendedClicksAnchorBoundsChanged) { 44916+ auto delegate_unique = std::make_unique<TestBubbleDialogDelegateView>(); 44917+ TestBubbleDialogDelegateView* const delegate = delegate_unique.get(); 44918+ TestAnchor anchor(CreateParams(Widget::InitParams::TYPE_WINDOW)); 44919+ delegate->SetAnchorView(anchor.widget().GetContentsView()); 44920+ delegate->SetCanMinimize(true); 44921+ Widget* bubble = 44922+ BubbleDialogDelegateView::CreateBubble(std::move(delegate_unique)); 44923+ bubble->Show(); 44924+ ui::MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 44925+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 44926+ BubbleFrameView* frame = delegate->GetBubbleFrameView(); 44927+ test::ButtonTestApi(frame->minimize_).NotifyClick(mouse_event); 44928+ auto* widget = delegate->GetWidget(); 44929+ auto* dialog = delegate->GetDialogClientView(); 44930+ auto* ok_button = dialog->ok_button(); 44931+ test::ButtonTestApi(ok_button).NotifyClick(mouse_event); 44932+ EXPECT_FALSE(bubble->IsMinimized()); 44933+ EXPECT_FALSE(widget->IsClosed()); 44934+ 44935+ task_environment()->FastForwardBy( 44936+ base::Milliseconds(GetDoubleClickInterval())); 44937+ anchor.widget().SetBounds(gfx::Rect(10, 10, 100, 100)); 44938+ 44939+ ui::MouseEvent mouse_event_1(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 44940+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 44941+ test::ButtonTestApi(ok_button).NotifyClick(mouse_event_1); 44942+ test::ButtonTestApi(frame->minimize_).NotifyClick(mouse_event_1); 44943+ EXPECT_FALSE(widget->IsClosed()); 44944+ EXPECT_FALSE(bubble->IsMinimized()); 44945+ 44946+ test::ButtonTestApi(ok_button).NotifyClick(ui::MouseEvent( 44947+ ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), 44948+ ui::EventTimeForNow() + base::Milliseconds(GetDoubleClickInterval()), 44949+ ui::EF_NONE, ui::EF_NONE)); 44950+ EXPECT_TRUE(widget->IsClosed()); 44951+} 44952+ 44953 // Ensures that layout is correct when the progress indicator is visible. 44954 TEST_F(BubbleFrameViewTest, LayoutWithProgressIndicator) { 44955 auto delegate_unique = std::make_unique<TestBubbleDialogDelegateView>(); 44956diff --git a/src/ui/views/input_event_activation_protector.cc b/src/ui/views/input_event_activation_protector.cc 44957index fd907009fb29d..94b8e47228d49 44958--- a/src/ui/views/input_event_activation_protector.cc 44959+++ b/src/ui/views/input_event_activation_protector.cc 44960@@ -14,6 +14,14 @@ void InputEventActivationProtector::VisibilityChanged(bool is_visible) { 44961 view_shown_time_stamp_ = base::TimeTicks::Now(); 44962 } 44963 44964+void InputEventActivationProtector::UpdateViewShownTimeStamp() { 44965+ // The UI was never shown, ignore. 44966+ if (view_shown_time_stamp_ == base::TimeTicks()) 44967+ return; 44968+ 44969+ view_shown_time_stamp_ = base::TimeTicks::Now(); 44970+} 44971+ 44972 bool InputEventActivationProtector::IsPossiblyUnintendedInteraction( 44973 const ui::Event& event) { 44974 if (view_shown_time_stamp_ == base::TimeTicks()) { 44975diff --git a/src/ui/views/input_event_activation_protector.h b/src/ui/views/input_event_activation_protector.h 44976index 42ffd02397599..7426d0dc5318a 44977--- a/src/ui/views/input_event_activation_protector.h 44978+++ b/src/ui/views/input_event_activation_protector.h 44979@@ -30,6 +30,11 @@ class VIEWS_EXPORT InputEventActivationProtector { 44980 // method must be called when the visibility of the view is changed. 44981 void VisibilityChanged(bool is_visible); 44982 44983+ // Updates the |view_shown_time_stamp_| if needed. This function will be 44984+ // called when we want to reset back the input protector to "initial shown" 44985+ // state, basically under some certain view's proprieties changed events. 44986+ void UpdateViewShownTimeStamp(); 44987+ 44988 // Returns true if the event is a mouse, touch, or pointer event that took 44989 // place within the double-click time interval after |view_shown_time_stamp_|. 44990 bool IsPossiblyUnintendedInteraction(const ui::Event& event); 44991diff --git a/src/ui/views/view.cc b/src/ui/views/view.cc 44992index 99d9510a9647d..8ac4f139f09c9 44993--- a/src/ui/views/view.cc 44994+++ b/src/ui/views/view.cc 44995@@ -224,6 +224,8 @@ View::View() { 44996 } 44997 44998 View::~View() { 44999+ life_cycle_state_ = LifeCycleState::kDestroying; 45000+ 45001 if (parent_) 45002 parent_->RemoveChildView(this); 45003 45004diff --git a/src/ui/views/view.h b/src/ui/views/view.h 45005index be4a0c8ad6695..59d51e1ce0a36 45006--- a/src/ui/views/view.h 45007+++ b/src/ui/views/view.h 45008@@ -1415,6 +1415,16 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, 45009 void RemoveObserver(ViewObserver* observer); 45010 bool HasObserver(const ViewObserver* observer) const; 45011 45012+ // http://crbug.com/1162949 : Instrumentation that indicates if this is alive. 45013+ // Callers should not depend on this as it is meant to be temporary. 45014+ enum class LifeCycleState : uint32_t { 45015+ kAlive = 0x600D600D, 45016+ kDestroying = 0x90141013, 45017+ kDestroyed = 0xBAADBAAD, 45018+ }; 45019+ 45020+ LifeCycleState life_cycle_state() const { return life_cycle_state_; } 45021+ 45022 protected: 45023 // Used to track a drag. RootView passes this into 45024 // ProcessMousePressed/Dragged. 45025@@ -1666,12 +1676,6 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, 45026 FRIEND_TEST_ALL_PREFIXES(ViewTest, PaintWithMovedViewUsesCacheInRTL); 45027 FRIEND_TEST_ALL_PREFIXES(ViewTest, PaintWithUnknownInvalidation); 45028 45029- // http://crbug.com/1162949 : Instrumentation that indicates if this is alive. 45030- enum class LifeCycleState : uint32_t { 45031- kAlive = 0x600D600D, 45032- kDestroyed = 0xBAADBAAD, 45033- }; 45034- 45035 // This is the default view layout. It is a very simple version of FillLayout, 45036 // which merely sets the bounds of the children to the content bounds. The 45037 // actual FillLayout isn't used here because it supports a couple of features 45038diff --git a/src/ui/views/window/dialog_client_view.cc b/src/ui/views/window/dialog_client_view.cc 45039index 283ee15d15bec..ad9d0862043de 45040--- a/src/ui/views/window/dialog_client_view.cc 45041+++ b/src/ui/views/window/dialog_client_view.cc 45042@@ -225,6 +225,10 @@ void DialogClientView::OnThemeChanged() { 45043 } 45044 } 45045 45046+void DialogClientView::UpdateInputProtectorTimeStamp() { 45047+ input_protector_.UpdateViewShownTimeStamp(); 45048+} 45049+ 45050 void DialogClientView::ResetViewShownTimeStampForTesting() { 45051 input_protector_.ResetForTesting(); 45052 } 45053diff --git a/src/ui/views/window/dialog_client_view.h b/src/ui/views/window/dialog_client_view.h 45054index 016f2531876e8..abff481b0470c 45055--- a/src/ui/views/window/dialog_client_view.h 45056+++ b/src/ui/views/window/dialog_client_view.h 45057@@ -63,6 +63,10 @@ class VIEWS_EXPORT DialogClientView : public ClientView, public DialogObserver { 45058 const ViewHierarchyChangedDetails& details) override; 45059 void OnThemeChanged() override; 45060 45061+ // Update the |view_shown_time_stamp_| of input protector. A short time 45062+ // from this point onward, input event will be ignored. 45063+ void UpdateInputProtectorTimeStamp(); 45064+ 45065 void set_minimum_size(const gfx::Size& size) { minimum_size_ = size; } 45066 45067 // Resets the time when view has been shown. Tests may need to call this 45068diff --git a/src/ui/views/window/dialog_delegate.cc b/src/ui/views/window/dialog_delegate.cc 45069index ba01196119858..b8d7b52bb490d 45070--- a/src/ui/views/window/dialog_delegate.cc 45071+++ b/src/ui/views/window/dialog_delegate.cc 45072@@ -275,12 +275,8 @@ const DialogClientView* DialogDelegate::GetDialogClientView() const { 45073 } 45074 45075 DialogClientView* DialogDelegate::GetDialogClientView() { 45076- if (!GetWidget()) 45077- return nullptr; 45078- views::View* client_view = GetWidget()->client_view(); 45079- return client_view->GetClassName() == DialogClientView::kViewClassName 45080- ? static_cast<DialogClientView*>(client_view) 45081- : nullptr; 45082+ return const_cast<DialogClientView*>( 45083+ const_cast<const DialogDelegate*>(this)->GetDialogClientView()); 45084 } 45085 45086 BubbleFrameView* DialogDelegate::GetBubbleFrameView() const { 45087diff --git a/src/ui/views/window/dialog_delegate.h b/src/ui/views/window/dialog_delegate.h 45088index edfda090a20a3..b5c54aa3753b2 45089--- a/src/ui/views/window/dialog_delegate.h 45090+++ b/src/ui/views/window/dialog_delegate.h 45091@@ -172,6 +172,13 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { 45092 // will only be created when use_custom_frame() is true. 45093 BubbleFrameView* GetBubbleFrameView() const; 45094 45095+ // A helper for accessing the DialogClientView object contained by this 45096+ // delegate's Window. This function can return nullptr if the |client_view| is 45097+ // a DialogClientView subclass which also has metadata or overrides 45098+ // GetClassName(). 45099+ const DialogClientView* GetDialogClientView() const; 45100+ DialogClientView* GetDialogClientView(); 45101+ 45102 // Helpers for accessing parts of the DialogClientView without needing to know 45103 // about DialogClientView. Do not call these before OnWidgetInitialized(). 45104 views::LabelButton* GetOkButton() const; 45105@@ -310,11 +317,6 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { 45106 std::unique_ptr<View> DisownFootnoteView(); 45107 45108 private: 45109- // A helper for accessing the DialogClientView object contained by this 45110- // delegate's Window. 45111- const DialogClientView* GetDialogClientView() const; 45112- DialogClientView* GetDialogClientView(); 45113- 45114 // Runs a close callback, ensuring that at most one close callback is ever 45115 // run. 45116 void RunCloseCallback(base::OnceClosure callback); 45117diff --git a/src/url/gurl.h b/src/url/gurl.h 45118index 86a340a8c5554..54acb99ba6a7e 45119--- a/src/url/gurl.h 45120+++ b/src/url/gurl.h 45121@@ -248,6 +248,13 @@ class COMPONENT_EXPORT(URL) GURL { 45122 return SchemeIs(url::kFileSystemScheme); 45123 } 45124 45125+#if BUILDFLAG(IS_OHOS) 45126+ // Resource URLs for ohos system 45127+ bool SchemeIsOhosResource() const { 45128+ return SchemeIs(url::kResourcesScheme); 45129+ } 45130+#endif 45131+ 45132 // Returns true if the scheme indicates a network connection that uses TLS or 45133 // some other cryptographic protocol (e.g. QUIC) for security. 45134 // 45135diff --git a/src/url/url_constants.cc b/src/url/url_constants.cc 45136index 96850982c936e..7644f04e61c10 45137--- a/src/url/url_constants.cc 45138+++ b/src/url/url_constants.cc 45139@@ -55,6 +55,9 @@ const char16_t kWsScheme16[] = u"ws"; 45140 const char kWssScheme[] = "wss"; 45141 const char16_t kWssScheme16[] = u"wss"; 45142 45143+const char kResourcesScheme[] = "resource"; 45144+const char16_t kResourcesScheme16[] = u"resource"; 45145+ 45146 const char kStandardSchemeSeparator[] = "://"; 45147 const char16_t kStandardSchemeSeparator16[] = u"://"; 45148 45149diff --git a/src/url/url_constants.h b/src/url/url_constants.h 45150index 17226664244e8..6bddf8da75520 45151--- a/src/url/url_constants.h 45152+++ b/src/url/url_constants.h 45153@@ -59,6 +59,9 @@ COMPONENT_EXPORT(URL) extern const char16_t kWsScheme16[]; 45154 COMPONENT_EXPORT(URL) extern const char kWssScheme[]; 45155 COMPONENT_EXPORT(URL) extern const char16_t kWssScheme16[]; 45156 45157+COMPONENT_EXPORT(URL) extern const char kResourcesScheme[]; 45158+COMPONENT_EXPORT(URL) extern const char16_t kResourcesScheme16[]; 45159+ 45160 // Used to separate a standard scheme and the hostname: "://". 45161 COMPONENT_EXPORT(URL) extern const char kStandardSchemeSeparator[]; 45162 COMPONENT_EXPORT(URL) extern const char16_t kStandardSchemeSeparator16[]; 45163diff --git a/src/url/url_util.cc b/src/url/url_util.cc 45164index 0fe4e301c7fda..ddfa2127ece5f 45165--- a/src/url/url_util.cc 45166+++ b/src/url/url_util.cc 45167@@ -47,6 +47,7 @@ struct SchemeRegistry { 45168 {kWsScheme, SCHEME_WITH_HOST_PORT_AND_USER_INFORMATION}, // WebSocket. 45169 {kFileSystemScheme, SCHEME_WITHOUT_AUTHORITY}, 45170 {kQuicTransportScheme, SCHEME_WITH_HOST_AND_PORT}, 45171+ {kResourcesScheme, SCHEME_WITH_HOST}, 45172 }; 45173 45174 // Schemes that are allowed for referrers. 45175@@ -69,7 +70,7 @@ struct SchemeRegistry { 45176 // Schemes that normal pages cannot link to or access (i.e., with the same 45177 // security rules as those applied to "file" URLs). 45178 std::vector<std::string> local_schemes = { 45179- kFileScheme, 45180+ kFileScheme, kResourcesScheme, 45181 }; 45182 45183 // Schemes that cause pages loaded with them to not have access to pages 45184@@ -89,7 +90,7 @@ struct SchemeRegistry { 45185 45186 // Schemes that can be used by web to store data (local storage, etc). 45187 std::vector<std::string> web_storage_schemes = { 45188- kHttpsScheme, kHttpScheme, kFileScheme, kFtpScheme, kWssScheme, kWsScheme, 45189+ kHttpsScheme, kHttpScheme, kFileScheme, kFtpScheme, kWssScheme, kWsScheme, kResourcesScheme 45190 }; 45191 45192 // Schemes that can bypass the Content-Security-Policy (CSP) checks. 45193diff --git a/src/v8/gni/v8.gni b/src/v8/gni/v8.gni 45194index 19f5eeed262c8..974492a827e97 45195--- a/src/v8/gni/v8.gni 45196+++ b/src/v8/gni/v8.gni 45197@@ -87,7 +87,7 @@ declare_args() { 45198 45199 # Enable advanced BigInt algorithms, costing about 10-30 KB binary size 45200 # depending on platform. Disabled on Android to save binary size. 45201- v8_advanced_bigint_algorithms = !is_android 45202+ v8_advanced_bigint_algorithms = !is_android && !is_ohos 45203 } 45204 45205 if (v8_use_external_startup_data == "") { 45206@@ -139,7 +139,8 @@ if (is_debug && !v8_optimized_debug) { 45207 45208 # TODO(crbug.com/621335) Rework this so that we don't have the confusion 45209 # between "optimize_speed" and "optimize_max". 45210- if (((is_posix && !is_android) || is_fuchsia) && !using_sanitizer) { 45211+ if (((is_posix && !is_android && !is_ohos) || is_fuchsia) && 45212+ !using_sanitizer) { 45213 v8_add_configs += [ "//build/config/compiler:optimize_speed" ] 45214 } else { 45215 v8_add_configs += [ "//build/config/compiler:optimize_max" ] 45216diff --git a/src/v8/src/ast/scopes.cc b/src/v8/src/ast/scopes.cc 45217index 3d5d92ae8b306..971ca2e1d31c4 45218--- a/src/v8/src/ast/scopes.cc 45219+++ b/src/v8/src/ast/scopes.cc 45220@@ -840,9 +840,8 @@ void DeclarationScope::AddLocal(Variable* var) { 45221 } 45222 45223 void Scope::Snapshot::Reparent(DeclarationScope* new_parent) { 45224- DCHECK(!IsCleared()); 45225- DCHECK_EQ(new_parent, outer_scope_and_calls_eval_.GetPointer()->inner_scope_); 45226- DCHECK_EQ(new_parent->outer_scope_, outer_scope_and_calls_eval_.GetPointer()); 45227+ DCHECK_EQ(new_parent, outer_scope_->inner_scope_); 45228+ DCHECK_EQ(new_parent->outer_scope_, outer_scope_); 45229 DCHECK_EQ(new_parent, new_parent->GetClosureScope()); 45230 DCHECK_NULL(new_parent->inner_scope_); 45231 DCHECK(new_parent->unresolved_list_.is_empty()); 45232@@ -867,12 +866,11 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) { 45233 new_parent->sibling_ = top_inner_scope_; 45234 } 45235 45236- Scope* outer_scope = outer_scope_and_calls_eval_.GetPointer(); 45237- new_parent->unresolved_list_.MoveTail(&outer_scope->unresolved_list_, 45238+ new_parent->unresolved_list_.MoveTail(&outer_scope_->unresolved_list_, 45239 top_unresolved_); 45240 45241 // Move temporaries allocated for complex parameter initializers. 45242- DeclarationScope* outer_closure = outer_scope->GetClosureScope(); 45243+ DeclarationScope* outer_closure = outer_scope_->GetClosureScope(); 45244 for (auto it = top_local_; it != outer_closure->locals()->end(); ++it) { 45245 Variable* local = *it; 45246 DCHECK_EQ(VariableMode::kTemporary, local->mode()); 45247@@ -884,16 +882,10 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) { 45248 outer_closure->locals_.Rewind(top_local_); 45249 45250 // Move eval calls since Snapshot's creation into new_parent. 45251- if (outer_scope_and_calls_eval_->calls_eval_) { 45252- new_parent->RecordDeclarationScopeEvalCall(); 45253- new_parent->inner_scope_calls_eval_ = true; 45254+ if (outer_scope_->calls_eval_) { 45255+ new_parent->RecordEvalCall(); 45256+ declaration_scope_->sloppy_eval_can_extend_vars_ = false; 45257 } 45258- 45259- // We are in the arrow function case. The calls eval we may have recorded 45260- // is intended for the inner scope and we should simply restore the 45261- // original "calls eval" flag of the outer scope. 45262- RestoreEvalFlag(); 45263- Clear(); 45264 } 45265 45266 void Scope::ReplaceOuterScope(Scope* outer) { 45267@@ -2510,6 +2502,9 @@ void Scope::AllocateVariablesRecursively() { 45268 this->ForEach([](Scope* scope) -> Iteration { 45269 DCHECK(!scope->already_resolved_); 45270 if (WasLazilyParsed(scope)) return Iteration::kContinue; 45271+ if (scope->sloppy_eval_can_extend_vars_) { 45272+ scope->num_heap_slots_ = Context::MIN_CONTEXT_EXTENDED_SLOTS; 45273+ } 45274 DCHECK_EQ(scope->ContextHeaderLength(), scope->num_heap_slots_); 45275 45276 // Allocate variables for this scope. 45277diff --git a/src/v8/src/ast/scopes.h b/src/v8/src/ast/scopes.h 45278index dd1a693255551..de11f6e69e717 45279--- a/src/v8/src/ast/scopes.h 45280+++ b/src/v8/src/ast/scopes.h 45281@@ -107,12 +107,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) { 45282 45283 class Snapshot final { 45284 public: 45285- Snapshot() 45286- : outer_scope_and_calls_eval_(nullptr, false), 45287- top_unresolved_(), 45288- top_local_() { 45289- DCHECK(IsCleared()); 45290- } 45291 inline explicit Snapshot(Scope* scope); 45292 45293 // Disallow copy and move. 45294@@ -120,45 +114,31 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) { 45295 Snapshot(Snapshot&&) = delete; 45296 45297 ~Snapshot() { 45298- // If we're still active, there was no arrow function. In that case outer 45299- // calls eval if it already called eval before this snapshot started, or 45300- // if the code during the snapshot called eval. 45301- if (!IsCleared() && outer_scope_and_calls_eval_.GetPayload()) { 45302- RestoreEvalFlag(); 45303+ // Restore eval flags from before the scope was active. 45304+ if (sloppy_eval_can_extend_vars_) { 45305+ declaration_scope_->sloppy_eval_can_extend_vars_ = true; 45306 } 45307- } 45308- 45309- void RestoreEvalFlag() { 45310- if (outer_scope_and_calls_eval_.GetPayload()) { 45311- // This recreates both calls_eval and sloppy_eval_can_extend_vars. 45312- outer_scope_and_calls_eval_.GetPointer()->RecordEvalCall(); 45313+ if (calls_eval_) { 45314+ outer_scope_->calls_eval_ = true; 45315 } 45316 } 45317 45318 void Reparent(DeclarationScope* new_parent); 45319- bool IsCleared() const { 45320- return outer_scope_and_calls_eval_.GetPointer() == nullptr; 45321- } 45322- 45323- void Clear() { 45324- outer_scope_and_calls_eval_.SetPointer(nullptr); 45325-#ifdef DEBUG 45326- outer_scope_and_calls_eval_.SetPayload(false); 45327- top_inner_scope_ = nullptr; 45328- top_local_ = base::ThreadedList<Variable>::Iterator(); 45329- top_unresolved_ = UnresolvedList::Iterator(); 45330-#endif 45331- } 45332 45333 private: 45334- // During tracking calls_eval caches whether the outer scope called eval. 45335- // Upon move assignment we store whether the new inner scope calls eval into 45336- // the move target calls_eval bit, and restore calls eval on the outer 45337- // scope. 45338- PointerWithPayload<Scope, bool, 1> outer_scope_and_calls_eval_; 45339+ Scope* outer_scope_; 45340+ Scope* declaration_scope_; 45341 Scope* top_inner_scope_; 45342 UnresolvedList::Iterator top_unresolved_; 45343 base::ThreadedList<Variable>::Iterator top_local_; 45344+ // While the scope is active, the scope caches the flag values for 45345+ // outer_scope_ / declaration_scope_ they can be used to know what happened 45346+ // while parsing the arrow head. If this turns out to be an arrow head, new 45347+ // values on the respective scopes will be cleared and moved to the inner 45348+ // scope. Otherwise the cached flags will be merged with the flags from the 45349+ // arrow head. 45350+ bool calls_eval_; 45351+ bool sloppy_eval_can_extend_vars_; 45352 }; 45353 45354 enum class DeserializationMode { kIncludingVariables, kScopesOnly }; 45355@@ -884,8 +864,8 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope { 45356 void RecordDeclarationScopeEvalCall() { 45357 calls_eval_ = true; 45358 45359- // If this isn't a sloppy eval, we don't care about it. 45360- if (language_mode() != LanguageMode::kSloppy) return; 45361+ // The caller already checked whether we're in sloppy mode. 45362+ CHECK(is_sloppy(language_mode())); 45363 45364 // Sloppy eval in script scopes can only introduce global variables anyway, 45365 // so we don't care that it calls sloppy eval. 45366@@ -919,7 +899,6 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope { 45367 } 45368 45369 sloppy_eval_can_extend_vars_ = true; 45370- num_heap_slots_ = Context::MIN_CONTEXT_EXTENDED_SLOTS; 45371 } 45372 45373 bool sloppy_eval_can_extend_vars() const { 45374@@ -1337,7 +1316,9 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope { 45375 45376 void Scope::RecordEvalCall() { 45377 calls_eval_ = true; 45378- GetDeclarationScope()->RecordDeclarationScopeEvalCall(); 45379+ if (is_sloppy(language_mode())) { 45380+ GetDeclarationScope()->RecordDeclarationScopeEvalCall(); 45381+ } 45382 RecordInnerScopeEvalCall(); 45383 // The eval contents might access "super" (if it's inside a function that 45384 // binds super). 45385@@ -1350,14 +1331,18 @@ void Scope::RecordEvalCall() { 45386 } 45387 45388 Scope::Snapshot::Snapshot(Scope* scope) 45389- : outer_scope_and_calls_eval_(scope, scope->calls_eval_), 45390+ : outer_scope_(scope), 45391+ declaration_scope_(scope->GetDeclarationScope()), 45392 top_inner_scope_(scope->inner_scope_), 45393 top_unresolved_(scope->unresolved_list_.end()), 45394- top_local_(scope->GetClosureScope()->locals_.end()) { 45395- // Reset in order to record eval calls during this Snapshot's lifetime. 45396- outer_scope_and_calls_eval_.GetPointer()->calls_eval_ = false; 45397- outer_scope_and_calls_eval_.GetPointer()->sloppy_eval_can_extend_vars_ = 45398- false; 45399+ top_local_(scope->GetClosureScope()->locals_.end()), 45400+ calls_eval_(outer_scope_->calls_eval_), 45401+ sloppy_eval_can_extend_vars_( 45402+ declaration_scope_->sloppy_eval_can_extend_vars_) { 45403+ // Reset in order to record (sloppy) eval calls during this Snapshot's 45404+ // lifetime. 45405+ outer_scope_->calls_eval_ = false; 45406+ declaration_scope_->sloppy_eval_can_extend_vars_ = false; 45407 } 45408 45409 class ModuleScope final : public DeclarationScope { 45410diff --git a/src/v8/src/compiler/access-info.cc b/src/v8/src/compiler/access-info.cc 45411index 2356ba2cb8cf6..9424860b7676b 45412--- a/src/v8/src/compiler/access-info.cc 45413+++ b/src/v8/src/compiler/access-info.cc 45414@@ -477,9 +477,15 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo( 45415 map, descriptor, details_representation)); 45416 } else if (details_representation.IsHeapObject()) { 45417 if (descriptors_field_type->IsNone()) { 45418- // Store is not safe if the field type was cleared. 45419- if (access_mode == AccessMode::kStore) { 45420- return Invalid(); 45421+ switch (access_mode) { 45422+ case AccessMode::kStore: 45423+ case AccessMode::kStoreInLiteral: 45424+ case AccessMode::kDefine: 45425+ // Store is not safe if the field type was cleared. 45426+ return Invalid(); 45427+ case AccessMode::kLoad: 45428+ case AccessMode::kHas: 45429+ break; 45430 } 45431 45432 // The field type was cleared by the GC, so we don't know anything 45433diff --git a/src/v8/src/compiler/compilation-dependencies.cc b/src/v8/src/compiler/compilation-dependencies.cc 45434index 6f5514289b764..62bd0f8c46d1e 45435--- a/src/v8/src/compiler/compilation-dependencies.cc 45436+++ b/src/v8/src/compiler/compilation-dependencies.cc 45437@@ -35,7 +35,8 @@ namespace compiler { 45438 V(Protector) \ 45439 V(PrototypeProperty) \ 45440 V(StableMap) \ 45441- V(Transition) 45442+ V(Transition) \ 45443+ V(ObjectSlotValue) 45444 45445 CompilationDependencies::CompilationDependencies(JSHeapBroker* broker, 45446 Zone* zone) 45447@@ -863,6 +864,42 @@ class ProtectorDependency final : public CompilationDependency { 45448 const PropertyCellRef cell_; 45449 }; 45450 45451+// Check that an object slot will not change during compilation. 45452+class ObjectSlotValueDependency final : public CompilationDependency { 45453+ public: 45454+ explicit ObjectSlotValueDependency(const HeapObjectRef& object, int offset, 45455+ const ObjectRef& value) 45456+ : CompilationDependency(kObjectSlotValue), 45457+ object_(object.object()), 45458+ offset_(offset), 45459+ value_(value.object()) {} 45460+ 45461+ bool IsValid() const override { 45462+ PtrComprCageBase cage_base = GetPtrComprCageBase(*object_); 45463+ Object current_value = 45464+ offset_ == HeapObject::kMapOffset 45465+ ? object_->map() 45466+ : TaggedField<Object>::Relaxed_Load(cage_base, *object_, offset_); 45467+ return *value_ == current_value; 45468+ } 45469+ void Install(PendingDependencies* deps) const override {} 45470+ 45471+ private: 45472+ size_t Hash() const override { 45473+ return base::hash_combine(object_.address(), offset_, value_.address()); 45474+ } 45475+ 45476+ bool Equals(const CompilationDependency* that) const override { 45477+ const ObjectSlotValueDependency* const zat = that->AsObjectSlotValue(); 45478+ return object_->address() == zat->object_->address() && 45479+ offset_ == zat->offset_ && value_.address() == zat->value_.address(); 45480+ } 45481+ 45482+ Handle<HeapObject> object_; 45483+ int offset_; 45484+ Handle<Object> value_; 45485+}; 45486+ 45487 class ElementsKindDependency final : public CompilationDependency { 45488 public: 45489 ElementsKindDependency(const AllocationSiteRef& site, ElementsKind kind) 45490@@ -1110,6 +1147,12 @@ void CompilationDependencies::DependOnElementsKind( 45491 } 45492 } 45493 45494+void CompilationDependencies::DependOnObjectSlotValue( 45495+ const HeapObjectRef& object, int offset, const ObjectRef& value) { 45496+ RecordDependency( 45497+ zone_->New<ObjectSlotValueDependency>(object, offset, value)); 45498+} 45499+ 45500 void CompilationDependencies::DependOnOwnConstantElement( 45501 const JSObjectRef& holder, uint32_t index, const ObjectRef& element) { 45502 RecordDependency( 45503diff --git a/src/v8/src/compiler/compilation-dependencies.h b/src/v8/src/compiler/compilation-dependencies.h 45504index aa8ff7b82abd2..c6a18c400fe75 45505--- a/src/v8/src/compiler/compilation-dependencies.h 45506+++ b/src/v8/src/compiler/compilation-dependencies.h 45507@@ -93,6 +93,10 @@ class V8_EXPORT_PRIVATE CompilationDependencies : public ZoneObject { 45508 // Record the assumption that {site}'s {ElementsKind} doesn't change. 45509 void DependOnElementsKind(const AllocationSiteRef& site); 45510 45511+ // Check that an object slot will not change during compilation. 45512+ void DependOnObjectSlotValue(const HeapObjectRef& object, int offset, 45513+ const ObjectRef& value); 45514+ 45515 void DependOnOwnConstantElement(const JSObjectRef& holder, uint32_t index, 45516 const ObjectRef& element); 45517 45518diff --git a/src/v8/src/compiler/effect-control-linearizer.cc b/src/v8/src/compiler/effect-control-linearizer.cc 45519index bb932732c9692..e1ee380a68785 45520--- a/src/v8/src/compiler/effect-control-linearizer.cc 45521+++ b/src/v8/src/compiler/effect-control-linearizer.cc 45522@@ -5527,6 +5527,8 @@ Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { 45523 45524 auto if_double = __ MakeDeferredLabel(); 45525 auto done = __ MakeLabel(MachineRepresentation::kTagged); 45526+ auto loaded_field = __ MakeLabel(MachineRepresentation::kTagged); 45527+ auto done_double = __ MakeLabel(MachineRepresentation::kFloat64); 45528 45529 // Check if field is a mutable double field. 45530 __ GotoIfNot(__ IntPtrEqual(__ WordAnd(index, one), zero), &if_double); 45531@@ -5543,8 +5545,8 @@ Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { 45532 Node* offset = 45533 __ IntAdd(__ WordShl(index, __ IntPtrConstant(kTaggedSizeLog2 - 1)), 45534 __ IntPtrConstant(JSObject::kHeaderSize - kHeapObjectTag)); 45535- Node* result = __ Load(MachineType::AnyTagged(), object, offset); 45536- __ Goto(&done, result); 45537+ Node* field = __ Load(MachineType::AnyTagged(), object, offset); 45538+ __ Goto(&loaded_field, field); 45539 } 45540 45541 // The field is located in the properties backing store of {object}. 45542@@ -5558,8 +5560,8 @@ Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { 45543 __ IntPtrConstant(kTaggedSizeLog2 - 1)), 45544 __ IntPtrConstant((FixedArray::kHeaderSize - kTaggedSize) - 45545 kHeapObjectTag)); 45546- Node* result = __ Load(MachineType::AnyTagged(), properties, offset); 45547- __ Goto(&done, result); 45548+ Node* field = __ Load(MachineType::AnyTagged(), properties, offset); 45549+ __ Goto(&loaded_field, field); 45550 } 45551 } 45552 45553@@ -5567,9 +5569,6 @@ Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { 45554 // architectures, or a mutable HeapNumber. 45555 __ Bind(&if_double); 45556 { 45557- auto loaded_field = __ MakeLabel(MachineRepresentation::kTagged); 45558- auto done_double = __ MakeLabel(MachineRepresentation::kFloat64); 45559- 45560 index = __ WordSar(index, one); 45561 45562 // Check if field is in-object or out-of-object. 45563@@ -5597,27 +5596,27 @@ Node* EffectControlLinearizer::LowerLoadFieldByIndex(Node* node) { 45564 Node* field = __ Load(MachineType::AnyTagged(), properties, offset); 45565 __ Goto(&loaded_field, field); 45566 } 45567+ } 45568 45569- __ Bind(&loaded_field); 45570- { 45571- Node* field = loaded_field.PhiAt(0); 45572- // We may have transitioned in-place away from double, so check that 45573- // this is a HeapNumber -- otherwise the load is fine and we don't need 45574- // to copy anything anyway. 45575- __ GotoIf(ObjectIsSmi(field), &done, field); 45576- Node* field_map = __ LoadField(AccessBuilder::ForMap(), field); 45577- __ GotoIfNot(__ TaggedEqual(field_map, __ HeapNumberMapConstant()), &done, 45578- field); 45579- 45580- Node* value = __ LoadField(AccessBuilder::ForHeapNumberValue(), field); 45581- __ Goto(&done_double, value); 45582- } 45583+ __ Bind(&loaded_field); 45584+ { 45585+ Node* field = loaded_field.PhiAt(0); 45586+ // We may have transitioned in-place away from double, so check that 45587+ // this is a HeapNumber -- otherwise the load is fine and we don't need 45588+ // to copy anything anyway. 45589+ __ GotoIf(ObjectIsSmi(field), &done, field); 45590+ Node* field_map = __ LoadField(AccessBuilder::ForMap(), field); 45591+ __ GotoIfNot(__ TaggedEqual(field_map, __ HeapNumberMapConstant()), &done, 45592+ field); 45593 45594- __ Bind(&done_double); 45595- { 45596- Node* result = AllocateHeapNumberWithValue(done_double.PhiAt(0)); 45597- __ Goto(&done, result); 45598- } 45599+ Node* value = __ LoadField(AccessBuilder::ForHeapNumberValue(), field); 45600+ __ Goto(&done_double, value); 45601+ } 45602+ 45603+ __ Bind(&done_double); 45604+ { 45605+ Node* result = AllocateHeapNumberWithValue(done_double.PhiAt(0)); 45606+ __ Goto(&done, result); 45607 } 45608 45609 __ Bind(&done); 45610diff --git a/src/v8/src/compiler/js-create-lowering.cc b/src/v8/src/compiler/js-create-lowering.cc 45611index fab65507ea056..25a2ec03d2f4a 45612--- a/src/v8/src/compiler/js-create-lowering.cc 45613+++ b/src/v8/src/compiler/js-create-lowering.cc 45614@@ -1677,6 +1677,10 @@ base::Optional<Node*> JSCreateLowering::TryAllocateFastLiteral( 45615 45616 // Now that we hold the migration lock, get the current map. 45617 MapRef boilerplate_map = boilerplate.map(); 45618+ // Protect against concurrent changes to the boilerplate object by checking 45619+ // for an identical value at the end of the compilation. 45620+ dependencies()->DependOnObjectSlotValue(boilerplate, HeapObject::kMapOffset, 45621+ boilerplate_map); 45622 { 45623 base::Optional<MapRef> current_boilerplate_map = 45624 boilerplate.map_direct_read(); 45625@@ -1841,10 +1845,18 @@ base::Optional<Node*> JSCreateLowering::TryAllocateFastLiteralElements( 45626 boilerplate.elements(kRelaxedLoad); 45627 if (!maybe_boilerplate_elements.has_value()) return {}; 45628 FixedArrayBaseRef boilerplate_elements = maybe_boilerplate_elements.value(); 45629+ // Protect against concurrent changes to the boilerplate object by checking 45630+ // for an identical value at the end of the compilation. 45631+ dependencies()->DependOnObjectSlotValue( 45632+ boilerplate, JSObject::kElementsOffset, boilerplate_elements); 45633 45634 // Empty or copy-on-write elements just store a constant. 45635 int const elements_length = boilerplate_elements.length(); 45636 MapRef elements_map = boilerplate_elements.map(); 45637+ // Protect against concurrent changes to the boilerplate object by checking 45638+ // for an identical value at the end of the compilation. 45639+ dependencies()->DependOnObjectSlotValue(boilerplate_elements, 45640+ HeapObject::kMapOffset, elements_map); 45641 if (boilerplate_elements.length() == 0 || elements_map.IsFixedCowArrayMap()) { 45642 if (allocation == AllocationType::kOld && 45643 !boilerplate.IsElementsTenured(boilerplate_elements)) { 45644diff --git a/src/v8/src/wasm/graph-builder-interface.cc b/src/v8/src/wasm/graph-builder-interface.cc 45645index 61a3bc57c9651..25e7b0252f57a 45646--- a/src/v8/src/wasm/graph-builder-interface.cc 45647+++ b/src/v8/src/wasm/graph-builder-interface.cc 45648@@ -87,6 +87,7 @@ class WasmGraphBuildingInterface { 45649 struct TryInfo : public ZoneObject { 45650 SsaEnv* catch_env; 45651 TFNode* exception = nullptr; 45652+ bool first_catch = true; 45653 45654 bool might_throw() const { return exception != nullptr; } 45655 45656@@ -865,6 +866,10 @@ class WasmGraphBuildingInterface { 45657 45658 TFNode* exception = block->try_info->exception; 45659 SetEnv(block->try_info->catch_env); 45660+ if (block->try_info->first_catch) { 45661+ LoadContextIntoSsa(ssa_env_); 45662+ block->try_info->first_catch = false; 45663+ } 45664 45665 TFNode* if_catch = nullptr; 45666 TFNode* if_no_catch = nullptr; 45667@@ -942,6 +947,9 @@ class WasmGraphBuildingInterface { 45668 } 45669 45670 SetEnv(block->try_info->catch_env); 45671+ if (block->try_info->first_catch) { 45672+ LoadContextIntoSsa(ssa_env_); 45673+ } 45674 } 45675 45676 void AtomicOp(FullDecoder* decoder, WasmOpcode opcode, 45677