diff --git a/BUILD.gn b/BUILD.gn index e1f11bc6e2..cf3f6a2457 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -96,6 +96,10 @@ group("gn_all") { "//url:url_unittests", ] + deps += [ + "//ohos_nweb:libnweb_adapter", + ] + if (!is_component_build) { deps += [ "//third_party/abseil-cpp:absl_tests" ] } diff --git a/base/base_paths_ohos.cc b/base/base_paths_ohos.cc index 2e507f8c9d..ec03cd53d7 100644 --- a/base/base_paths_ohos.cc +++ b/base/base_paths_ohos.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/base/base_paths_ohos.h b/base/base_paths_ohos.h index b85158a319..0b24760f85 100644 --- a/base/base_paths_ohos.h +++ b/base/base_paths_ohos.h @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/base/debug/stack_trace_ohos.cc b/base/debug/stack_trace_ohos.cc index 199b6d679a..5815cc93ca 100644 --- a/base/debug/stack_trace_ohos.cc +++ b/base/debug/stack_trace_ohos.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/base/message_loop/message_pump_ohos.cc b/base/message_loop/message_pump_ohos.cc index b705919891..b49e2a76cb 100644 --- a/base/message_loop/message_pump_ohos.cc +++ b/base/message_loop/message_pump_ohos.cc @@ -1,7 +1,3 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - #include "base/message_loop/message_pump_ohos.h" #include diff --git a/base/message_loop/message_pump_ohos.h b/base/message_loop/message_pump_ohos.h index e1a1c70c73..1997c75f85 100644 --- a/base/message_loop/message_pump_ohos.h +++ b/base/message_loop/message_pump_ohos.h @@ -1,7 +1,3 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_OHOS_H_ #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_OHOS_H_ diff --git a/base/process/internal_linux.h b/base/process/internal_linux.h index 10fa85a8fd..2a05361480 100644 --- a/base/process/internal_linux.h +++ b/base/process/internal_linux.h @@ -11,6 +11,7 @@ #include #include #include +#include #include "base/files/dir_reader_posix.h" #include "base/files/file_path.h" diff --git a/build/config/ohos/BUILD.gn b/build/config/ohos/BUILD.gn index 3e9b09269d..534f0020d7 100644 --- a/build/config/ohos/BUILD.gn +++ b/build/config/ohos/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Huawei Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/build/config/ohos/abi.gni b/build/config/ohos/abi.gni index 71cfb23ccc..146e385624 100644 --- a/build/config/ohos/abi.gni +++ b/build/config/ohos/abi.gni @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Huawei Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/build/config/ohos/config.gni b/build/config/ohos/config.gni index 951d4a7f26..c2d04f6262 100644 --- a/build/config/ohos/config.gni +++ b/build/config/ohos/config.gni @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Huawei Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -69,7 +69,7 @@ if (is_ohos) { "$ohos_build_root/base/location/utils/include", "$ohos_build_root/base/location/interfaces/innerkits/locator_standard/include", "$ohos_build_root/base/location/location_common/common/include", - "$ohos_build_root/utils/system/safwk/native/include", + "$ohos_build_root/foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", ] ohos_libs_dir = [ "$ohos_build_root/out/ohos-arm-release/packages/phone/system/lib", diff --git a/build/toolchain/ohos/BUILD.gn b/build/toolchain/ohos/BUILD.gn index c8540c7b3a..2046bc1321 100644 --- a/build/toolchain/ohos/BUILD.gn +++ b/build/toolchain/ohos/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright 2022 The Chromium Authors. All rights reserved. +# Copyright 2022 The Huawei Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/buildtools/third_party/libc++/trunk/test/support/test_memory_resource.h b/buildtools/third_party/libc++/trunk/test/support/test_memory_resource.h index 1a0d722089..34a9988919 100644 --- a/buildtools/third_party/libc++/trunk/test/support/test_memory_resource.h +++ b/buildtools/third_party/libc++/trunk/test/support/test_memory_resource.h @@ -98,7 +98,7 @@ protected: private: mutable AllocController C; mutable Provider P; - DISALLOW_COPY(TestResourceImp); + DISALLOW_COPY_BASE(TestResourceImp); }; template @@ -117,7 +117,7 @@ struct NullProvider { void deallocate(void*, size_t, size_t) {} void reset() {} private: - DISALLOW_COPY(NullProvider); + DISALLOW_COPY_BASE(NullProvider); }; struct NewDeleteProvider { @@ -126,7 +126,7 @@ struct NewDeleteProvider { void deallocate(void* p, size_t, size_t) { ::operator delete(p); } void reset() {} private: - DISALLOW_COPY(NewDeleteProvider); + DISALLOW_COPY_BASE(NewDeleteProvider); }; template // 10 pages worth of memory. @@ -157,7 +157,7 @@ struct BufferProvider { space = Size; } private: - DISALLOW_COPY(BufferProvider); + DISALLOW_COPY_BASE(BufferProvider); }; using NullResource = TestResourceImp; diff --git a/cc/mojom/BUILD.gn b/cc/mojom/BUILD.gn index e1392a9ec2..3d95042417 100644 --- a/cc/mojom/BUILD.gn +++ b/cc/mojom/BUILD.gn @@ -21,8 +21,8 @@ component("shared_mojom_traits") { mojom("mojom") { generate_java = true - if (is_android) { - enabled_features = [ "is_android" ] + if (is_android || is_ohos) { + enabled_features = [ "is_android_or_ohos" ] } sources = [ "browser_controls_params.mojom", diff --git a/cc/mojom/render_frame_metadata.mojom b/cc/mojom/render_frame_metadata.mojom index 3a087f778c..406647ea11 100644 --- a/cc/mojom/render_frame_metadata.mojom +++ b/cc/mojom/render_frame_metadata.mojom @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -106,7 +107,7 @@ struct RenderFrameMetadata { [EnableIf=is_android] gfx.mojom.SizeF scrollable_viewport_size; - [EnableIf=is_android] + [EnableIf=is_android_or_ohos] gfx.mojom.SizeF root_layer_size; [EnableIf=is_android] diff --git a/cc/mojom/render_frame_metadata_mojom_traits.cc b/cc/mojom/render_frame_metadata_mojom_traits.cc index b9eecfbf56..cef152a29c 100644 --- a/cc/mojom/render_frame_metadata_mojom_traits.cc +++ b/cc/mojom/render_frame_metadata_mojom_traits.cc @@ -52,6 +52,9 @@ bool StructTraits< #if defined(OS_ANDROID) data.ReadScrollableViewportSize(&out->scrollable_viewport_size) && data.ReadRootLayerSize(&out->root_layer_size) && +#endif +#if defined(OS_OHOS) + data.ReadRootLayerSize(&out->root_layer_size) && #endif data.ReadViewportSizeInPixels(&out->viewport_size_in_pixels) && data.ReadLocalSurfaceId(&out->local_surface_id) && diff --git a/cc/mojom/render_frame_metadata_mojom_traits.h b/cc/mojom/render_frame_metadata_mojom_traits.h index 66a3e7e5e1..628292831b 100644 --- a/cc/mojom/render_frame_metadata_mojom_traits.h +++ b/cc/mojom/render_frame_metadata_mojom_traits.h @@ -145,6 +145,13 @@ struct COMPONENT_EXPORT(CC_SHARED_MOJOM_TRAITS) } #endif +#if defined(OS_OHOS) + static const gfx::SizeF& root_layer_size( + const cc::RenderFrameMetadata& metadata) { + return metadata.root_layer_size; + } +#endif + static bool Read(cc::mojom::RenderFrameMetadataDataView data, cc::RenderFrameMetadata* out); }; diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index edf67be0fa..4b51af0bd7 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -2282,6 +2282,10 @@ RenderFrameMetadata LayerTreeHostImpl::MakeRenderFrameMetadata( frame->render_passes.back()->has_transparent_background; #endif +#if defined(OS_OHOS) + metadata.root_layer_size = active_tree_->ScrollableSize(); +#endif + if (last_draw_render_frame_metadata_) { const float last_root_scroll_offset_y = last_draw_render_frame_metadata_->root_scroll_offset diff --git a/cc/trees/render_frame_metadata.cc b/cc/trees/render_frame_metadata.cc index 0efa349668..7e3fe221ab 100644 --- a/cc/trees/render_frame_metadata.cc +++ b/cc/trees/render_frame_metadata.cc @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -36,6 +37,9 @@ bool RenderFrameMetadata::operator==(const RenderFrameMetadata& other) const { external_page_scale_factor == other.external_page_scale_factor && top_controls_height == other.top_controls_height && top_controls_shown_ratio == other.top_controls_shown_ratio && +#if defined(OS_OHOS) + root_layer_size == other.root_layer_size && +#endif #if defined(OS_ANDROID) bottom_controls_height == other.bottom_controls_height && bottom_controls_shown_ratio == other.bottom_controls_shown_ratio && diff --git a/cc/trees/render_frame_metadata.h b/cc/trees/render_frame_metadata.h index 589a022fe4..88091333f3 100644 --- a/cc/trees/render_frame_metadata.h +++ b/cc/trees/render_frame_metadata.h @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -115,6 +116,9 @@ class CC_EXPORT RenderFrameMetadata { viz::VerticalScrollDirection new_vertical_scroll_direction = viz::VerticalScrollDirection::kNull; +#if defined(OS_OHOS) + gfx::SizeF root_layer_size; +#endif #if defined(OS_ANDROID) // Used to position Android bottom bar, whose position is computed by the // renderer compositor. diff --git a/cef/BUILD.gn b/cef/BUILD.gn index 776db090a5..19a8c155ce 100644 --- a/cef/BUILD.gn +++ b/cef/BUILD.gn @@ -526,6 +526,8 @@ static_library("libcef_static") { "libcef/browser/file_dialog_manager.h", "libcef/browser/frame_host_impl.cc", "libcef/browser/frame_host_impl.h", + "libcef/browser/icon_helper.cc", + "libcef/browser/icon_helper.h", "libcef/browser/image_impl.cc", "libcef/browser/image_impl.h", "libcef/browser/iothread_state.cc", @@ -591,6 +593,8 @@ static_library("libcef_static") { "libcef/browser/net_service/stream_reader_url_loader.h", "libcef/browser/net_service/url_loader_factory_getter.cc", "libcef/browser/net_service/url_loader_factory_getter.h", + "libcef/browser/net_service/net_helpers.cc", + "libcef/browser/net_service/net_helpers.h", "libcef/browser/origin_whitelist_impl.cc", "libcef/browser/origin_whitelist_impl.h", "libcef/browser/osr/browser_platform_delegate_osr.cc", @@ -612,6 +616,14 @@ static_library("libcef_static") { "libcef/browser/osr/web_contents_view_osr.cc", "libcef/browser/osr/web_contents_view_osr.h", "libcef/browser/path_util_impl.cc", + "libcef/browser/permission/alloy_access_request.cc", + "libcef/browser/permission/alloy_access_request.h", + "libcef/browser/permission/alloy_geolocation_access.cc", + "libcef/browser/permission/alloy_geolocation_access.h", + "libcef/browser/permission/alloy_permission_manager.cc", + "libcef/browser/permission/alloy_permission_manager.h", + "libcef/browser/permission/alloy_permission_request_handler.cc", + "libcef/browser/permission/alloy_permission_request_handler.h", "libcef/browser/plugins/plugin_service_filter.cc", "libcef/browser/plugins/plugin_service_filter.h", "libcef/browser/prefs/browser_prefs.cc", @@ -765,6 +777,8 @@ static_library("libcef_static") { "libcef/features/runtime_checks.h", "libcef/renderer/alloy/alloy_content_renderer_client.cc", "libcef/renderer/alloy/alloy_content_renderer_client.h", + "libcef/renderer/alloy/alloy_content_settings_client.cc", + "libcef/renderer/alloy/alloy_content_settings_client.h", "libcef/renderer/alloy/alloy_render_frame_observer.cc", "libcef/renderer/alloy/alloy_render_frame_observer.h", "libcef/renderer/alloy/alloy_render_thread_observer.cc", @@ -804,6 +818,31 @@ static_library("libcef_static") { # For Chrome runtime support. "//chrome/app/chrome_main_delegate.cc", "//chrome/app/chrome_main_delegate.h", + + # For Javascript + "libcef/browser/javascript/oh_javascript_injector.h", + "libcef/browser/javascript/oh_javascript_injector.cc", + "libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.h", + "libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.cc", + "libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h", + "libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.cc", + "libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.h", + "libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.cc", + "libcef/common/javascript/oh_gin_javascript_bridge_messages.h", + "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h", + "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.cc", + "libcef/common/javascript/oh_gin_javascript_bridge_errors.h", + "libcef/common/javascript/oh_gin_javascript_bridge_errors.cc", + "libcef/common/javascript/oh_gin_javascript_bridge_value.h", + "libcef/common/javascript/oh_gin_javascript_bridge_value.cc", + "libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h", + "libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.cc", + "libcef/renderer/javascript/oh_gin_javascript_bridge_object.h", + "libcef/renderer/javascript/oh_gin_javascript_bridge_object.cc", + "libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h", + "libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.cc", + "libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h", + "libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.cc", ] configs += [ @@ -1238,6 +1277,9 @@ static_library("libcef_static") { # Part of //ui/aura:test_support which is testingonly. "//ui/aura/test/aura_test_utils.cc", "//ui/aura/test/aura_test_utils.h", + # Part of //ui/events:test_support which is testingonly. + # "//ui/events/test/x11_event_waiter.cc", + # "//ui/events/test/x11_event_waiter.h", ] } } @@ -1642,7 +1684,7 @@ if (is_mac) { info_plist_target = ":cef_framework_plist" } } else { - shared_library("libcef") { + shared_library("libweb_engine") { sources = includes_common + gypi_paths.autogen_cpp_includes + gypi_paths2.includes_capi + @@ -2091,7 +2133,7 @@ if (is_mac) { gypi_paths2.cefclient_sources_renderer deps = [ - ":libcef", + ":libweb_engine", ":libcef_dll_wrapper", ] @@ -2179,7 +2221,7 @@ if (is_mac) { gypi_paths2.cefsimple_sources_common deps = [ - ":libcef", + ":libweb_engine", ":libcef_dll_wrapper", ] @@ -2247,7 +2289,7 @@ if (is_mac) { gypi_paths2.ceftests_sources_common deps = [ - ":libcef", + ":libweb_engine", ":libcef_dll_wrapper", "//testing/gtest", ] @@ -2290,4 +2332,60 @@ if (is_mac) { configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] } } + + # ohosclient + if (is_linux || is_ohos) { + copy("copy_ohosclient_files") { + sources = gypi_paths2.shared_sources_resources + + gypi_paths2.ohosclient_sources_resources + outputs = [ "${root_out_dir}/ohosclient_files/{{source_file_part}}" ] + } + + copy("copy_ohosclient_files_extensions_set_page_color") { + sources = gypi_paths2.ohosclient_sources_resources_extensions_set_page_color + outputs = [ "${root_out_dir}/ohosclient_files/extensions/set_page_color/{{source_file_part}}" ] + } + } + + executable("ohosclient") { + sources = includes_common + + gypi_paths2.includes_wrapper + + gypi_paths2.shared_sources_browser + + gypi_paths2.shared_sources_common + + gypi_paths2.shared_sources_renderer + + gypi_paths2.ohosclient_sources_browser + + gypi_paths2.ohosclient_sources_common + + gypi_paths2.ohosclient_sources_renderer + + deps = [ + ":libweb_engine", + ":libcef_dll_wrapper", + ] + + defines = [ + "CEF_USE_SANDBOX", + ] + + if (is_linux || is_ohos) { + sources += includes_linux + + gypi_paths2.shared_sources_ohos + + gypi_paths2.ohosclient_sources_linux + + deps += [ + ":copy_ohosclient_files", + ":copy_ohosclient_files_extensions_set_page_color", + ] + + if (is_component_build) { + if (use_allocator=="tcmalloc") { + # Link to base to initialize tcmalloc allocator shims, otherwise + # base::allocator::IsAllocatorInitialized check fails + deps += [ "//base" ] + } + } else { + # Set rpath to find our own libfreetype even in a non-component build. + configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] + } + } + } } diff --git a/cef/CHROMIUM_BUILD_COMPATIBILITY.txt b/cef/CHROMIUM_BUILD_COMPATIBILITY.txt index 99fa87f10b..5dbbfb462b 100644 --- a/cef/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/cef/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,6 +7,6 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/91.0.4472.164', + 'chromium_checkout': 'refs/tags/91.0.4472.114', 'depot_tools_checkout': '61bf6e8d69' } diff --git a/cef/cef_paths.gypi b/cef/cef_paths.gypi index b7980f952e..ba3e786a57 100644 --- a/cef/cef_paths.gypi +++ b/cef/cef_paths.gypi @@ -1,4 +1,4 @@ -# Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +# Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. # @@ -8,7 +8,7 @@ # by hand. See the translator.README.txt file in the tools directory for # more information. # -# $hash=f1877c7a493342351e284cb6c14e6f223461facb$ +# $hash=36817748589a28de2402aa1476d2820f0c3f7ead$ # { @@ -52,6 +52,7 @@ 'include/cef_origin_whitelist.h', 'include/cef_parser.h', 'include/cef_path_util.h', + 'include/cef_permission_request.h', 'include/cef_print_handler.h', 'include/cef_print_settings.h', 'include/cef_process_message.h', @@ -149,6 +150,7 @@ 'include/capi/cef_origin_whitelist_capi.h', 'include/capi/cef_parser_capi.h', 'include/capi/cef_path_util_capi.h', + 'include/capi/cef_permission_request_capi.h', 'include/capi/cef_print_handler_capi.h', 'include/capi/cef_print_settings_capi.h', 'include/capi/cef_process_message_capi.h', @@ -208,6 +210,8 @@ 'include/capi/views/cef_window_delegate_capi.h', ], 'autogen_library_side': [ + 'libcef_dll/cpptoc/access_request_cpptoc.cc', + 'libcef_dll/cpptoc/access_request_cpptoc.h', 'libcef_dll/ctocpp/accessibility_handler_ctocpp.cc', 'libcef_dll/ctocpp/accessibility_handler_ctocpp.h', 'libcef_dll/ctocpp/app_ctocpp.cc', @@ -226,6 +230,8 @@ 'libcef_dll/cpptoc/browser_cpptoc.h', 'libcef_dll/cpptoc/browser_host_cpptoc.cc', 'libcef_dll/cpptoc/browser_host_cpptoc.h', + 'libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc', + 'libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h', 'libcef_dll/ctocpp/browser_process_handler_ctocpp.cc', 'libcef_dll/ctocpp/browser_process_handler_ctocpp.h', 'libcef_dll/cpptoc/views/browser_view_cpptoc.cc', @@ -300,6 +306,8 @@ 'libcef_dll/ctocpp/focus_handler_ctocpp.h', 'libcef_dll/cpptoc/frame_cpptoc.cc', 'libcef_dll/cpptoc/frame_cpptoc.h', + 'libcef_dll/cpptoc/geolocation_acess_cpptoc.cc', + 'libcef_dll/cpptoc/geolocation_acess_cpptoc.h', 'libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc', 'libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h', 'libcef_dll/cpptoc/image_cpptoc.cc', @@ -308,6 +316,8 @@ 'libcef_dll/cpptoc/jsdialog_callback_cpptoc.h', 'libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc', 'libcef_dll/ctocpp/jsdialog_handler_ctocpp.h', + 'libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc', + 'libcef_dll/ctocpp/java_script_result_callback_ctocpp.h', 'libcef_dll/ctocpp/keyboard_handler_ctocpp.cc', 'libcef_dll/ctocpp/keyboard_handler_ctocpp.h', 'libcef_dll/cpptoc/views/label_button_cpptoc.cc', @@ -354,6 +364,8 @@ 'libcef_dll/ctocpp/views/panel_delegate_ctocpp.h', 'libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc', 'libcef_dll/ctocpp/pdf_print_callback_ctocpp.h', + 'libcef_dll/ctocpp/permission_request_ctocpp.cc', + 'libcef_dll/ctocpp/permission_request_ctocpp.h', 'libcef_dll/cpptoc/post_data_cpptoc.cc', 'libcef_dll/cpptoc/post_data_cpptoc.h', 'libcef_dll/cpptoc/post_data_element_cpptoc.cc', @@ -518,6 +530,8 @@ 'libcef_dll/cpptoc/zip_reader_cpptoc.h', ], 'autogen_client_side': [ + 'libcef_dll/ctocpp/access_request_ctocpp.cc', + 'libcef_dll/ctocpp/access_request_ctocpp.h', 'libcef_dll/cpptoc/accessibility_handler_cpptoc.cc', 'libcef_dll/cpptoc/accessibility_handler_cpptoc.h', 'libcef_dll/cpptoc/app_cpptoc.cc', @@ -536,6 +550,8 @@ 'libcef_dll/ctocpp/browser_ctocpp.h', 'libcef_dll/ctocpp/browser_host_ctocpp.cc', 'libcef_dll/ctocpp/browser_host_ctocpp.h', + 'libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc', + 'libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h', 'libcef_dll/cpptoc/browser_process_handler_cpptoc.cc', 'libcef_dll/cpptoc/browser_process_handler_cpptoc.h', 'libcef_dll/ctocpp/views/browser_view_ctocpp.cc', @@ -610,6 +626,8 @@ 'libcef_dll/cpptoc/focus_handler_cpptoc.h', 'libcef_dll/ctocpp/frame_ctocpp.cc', 'libcef_dll/ctocpp/frame_ctocpp.h', + 'libcef_dll/ctocpp/geolocation_acess_ctocpp.cc', + 'libcef_dll/ctocpp/geolocation_acess_ctocpp.h', 'libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc', 'libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h', 'libcef_dll/ctocpp/image_ctocpp.cc', @@ -618,6 +636,8 @@ 'libcef_dll/ctocpp/jsdialog_callback_ctocpp.h', 'libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc', 'libcef_dll/cpptoc/jsdialog_handler_cpptoc.h', + 'libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc', + 'libcef_dll/cpptoc/java_script_result_callback_cpptoc.h', 'libcef_dll/cpptoc/keyboard_handler_cpptoc.cc', 'libcef_dll/cpptoc/keyboard_handler_cpptoc.h', 'libcef_dll/ctocpp/views/label_button_ctocpp.cc', @@ -664,6 +684,8 @@ 'libcef_dll/cpptoc/views/panel_delegate_cpptoc.h', 'libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc', 'libcef_dll/cpptoc/pdf_print_callback_cpptoc.h', + 'libcef_dll/cpptoc/permission_request_cpptoc.cc', + 'libcef_dll/cpptoc/permission_request_cpptoc.h', 'libcef_dll/ctocpp/post_data_ctocpp.cc', 'libcef_dll/ctocpp/post_data_ctocpp.h', 'libcef_dll/ctocpp/post_data_element_ctocpp.cc', diff --git a/cef/cef_paths2.gypi b/cef/cef_paths2.gypi index 0ad653c010..a9764b8772 100644 --- a/cef/cef_paths2.gypi +++ b/cef/cef_paths2.gypi @@ -201,6 +201,9 @@ 'tests/shared/browser/main_message_loop_external_pump_linux.cc', 'tests/shared/browser/resource_util_posix.cc', ], + 'shared_sources_ohos': [ + 'tests/shared/browser/resource_util_posix.cc', + ], 'shared_sources_mac': [ 'tests/shared/browser/main_message_loop_external_pump_mac.mm', 'tests/shared/browser/resource_util_mac.mm', @@ -603,5 +606,98 @@ 'ceftests_sources_linux': [ 'tests/ceftests/resource_util_linux.cc', ], + 'ohosclient_sources_browser': [ + 'tests/ohosclient/browser/browser_window.cc', + 'tests/ohosclient/browser/browser_window.h', + 'tests/ohosclient/browser/bytes_write_handler.cc', + 'tests/ohosclient/browser/bytes_write_handler.h', + 'tests/ohosclient/browser/client_app_delegates_browser.cc', + 'tests/ohosclient/browser/client_browser.cc', + 'tests/ohosclient/browser/client_browser.h', + 'tests/ohosclient/browser/client_handler.cc', + 'tests/ohosclient/browser/client_handler.h', + 'tests/ohosclient/browser/client_handler_osr.cc', + 'tests/ohosclient/browser/client_handler_osr.h', + 'tests/ohosclient/browser/client_handler_std.cc', + 'tests/ohosclient/browser/client_handler_std.h', + 'tests/ohosclient/browser/client_types.h', + 'tests/ohosclient/browser/image_cache.cc', + 'tests/ohosclient/browser/image_cache.h', + 'tests/ohosclient/browser/main_context.cc', + 'tests/ohosclient/browser/main_context.h', + 'tests/ohosclient/browser/main_context_impl.cc', + 'tests/ohosclient/browser/main_context_impl.h', + 'tests/ohosclient/browser/osr_dragdrop_events.h', + 'tests/ohosclient/browser/osr_renderer.h', + 'tests/ohosclient/browser/osr_renderer.cc', + 'tests/ohosclient/browser/osr_renderer_settings.h', + 'tests/ohosclient/browser/resource.h', + 'tests/ohosclient/browser/root_window.cc', + 'tests/ohosclient/browser/root_window.h', + 'tests/ohosclient/browser/root_window_create.cc', + 'tests/ohosclient/browser/root_window_manager.cc', + 'tests/ohosclient/browser/root_window_manager.h', + 'tests/ohosclient/browser/root_window_views.cc', + 'tests/ohosclient/browser/root_window_views.h', + 'tests/ohosclient/browser/temp_window.h', + 'tests/ohosclient/browser/views_menu_bar.cc', + 'tests/ohosclient/browser/views_menu_bar.h', + 'tests/ohosclient/browser/views_style.cc', + 'tests/ohosclient/browser/views_style.h', + 'tests/ohosclient/browser/views_window.cc', + 'tests/ohosclient/browser/views_window.h', + ], + 'ohosclient_sources_common': [ + 'tests/ohosclient/common/client_app_delegates_common.cc', + ], + 'ohosclient_sources_renderer': [ + 'tests/ohosclient/renderer/client_app_delegates_renderer.cc', + 'tests/ohosclient/renderer/client_renderer.cc', + 'tests/ohosclient/renderer/client_renderer.h', + ], + 'ohosclient_sources_resources': [ + 'tests/ohosclient/resources/binding.html', + 'tests/ohosclient/resources/dialogs.html', + 'tests/ohosclient/resources/draggable.html', + 'tests/ohosclient/resources/drm.html', + 'tests/ohosclient/resources/localstorage.html', + 'tests/ohosclient/resources/logo.png', + 'tests/ohosclient/resources/media_router.html', + 'tests/ohosclient/resources/menu_icon.1x.png', + 'tests/ohosclient/resources/menu_icon.2x.png', + 'tests/ohosclient/resources/other_tests.html', + 'tests/ohosclient/resources/performance.html', + 'tests/ohosclient/resources/performance2.html', + 'tests/ohosclient/resources/preferences.html', + 'tests/ohosclient/resources/response_filter.html', + 'tests/ohosclient/resources/server.html', + 'tests/ohosclient/resources/transparency.html', + 'tests/ohosclient/resources/urlrequest.html', + 'tests/ohosclient/resources/websocket.html', + 'tests/ohosclient/resources/window.html', + 'tests/ohosclient/resources/xmlhttprequest.html', + ], + 'ohosclient_sources_resources_extensions_set_page_color': [ + 'tests/ohosclient/resources/extensions/set_page_color/icon.png', + 'tests/ohosclient/resources/extensions/set_page_color/manifest.json', + 'tests/ohosclient/resources/extensions/set_page_color/popup.html', + 'tests/ohosclient/resources/extensions/set_page_color/popup.js', + 'tests/ohosclient/resources/extensions/set_page_color/README.md', + ], + 'ohosclient_sources_linux': [ + 'tests/ohosclient/browser/browser_window_osr_ohos.cc', + 'tests/ohosclient/browser/browser_window_osr_ohos.h', + 'tests/ohosclient/browser/dialog_handler_ohos.cc', + 'tests/ohosclient/browser/dialog_handler_ohos.h', + 'tests/ohosclient/browser/main_context_impl_posix.cc', + 'tests/ohosclient/browser/print_handler_ohos.cc', + 'tests/ohosclient/browser/print_handler_ohos.h', + 'tests/ohosclient/browser/resource_util_ohos.cc', + 'tests/ohosclient/browser/root_window_ohos.cc', + 'tests/ohosclient/browser/root_window_ohos.h', + 'tests/ohosclient/browser/util_ohos.cc', + 'tests/ohosclient/browser/util_ohos.h', + 'tests/ohosclient/ohosclient.cc', + ], }, } diff --git a/cef/include/base/internal/cef_net_error_list_ohos.h b/cef/include/base/internal/cef_net_error_list_ohos.h new file mode 100644 index 0000000000..f2fb9124b8 --- /dev/null +++ b/cef/include/base/internal/cef_net_error_list_ohos.h @@ -0,0 +1,998 @@ +// Copyright (c) 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file intentionally does not have header guards, it's included +// inside a macro to generate enum values. The following line silences a +// presubmit and Tricium warning that would otherwise be triggered by this: +// no-include-guard-because-multiply-included +// NOLINT(build/header_guard) + +// This file contains the list of network errors. + +// +// Ranges: +// 0- 99 System related errors +// 100-199 Connection related errors +// 200-299 Certificate errors +// 300-399 HTTP errors +// 400-499 Cache errors +// 500-599 ? +// 600-699 FTP errors +// 700-799 Certificate manager errors +// 800-899 DNS resolver errors + +// An asynchronous IO operation is not yet complete. This usually does not +// indicate a fatal error. Typically this error will be generated as a +// notification to wait for some external notification that the IO operation +// finally completed. +NET_ERROR(IO_PENDING, -1) + +// A generic failure occurred. +NET_ERROR(FAILED, -2) + +// An operation was aborted (due to user action). +NET_ERROR(ABORTED, -3) + +// An argument to the function is incorrect. +NET_ERROR(INVALID_ARGUMENT, -4) + +// The handle or file descriptor is invalid. +NET_ERROR(INVALID_HANDLE, -5) + +// The file or directory cannot be found. +NET_ERROR(FILE_NOT_FOUND, -6) + +// An operation timed out. +NET_ERROR(TIMED_OUT, -7) + +// The file is too large. +NET_ERROR(FILE_TOO_BIG, -8) + +// An unexpected error. This may be caused by a programming mistake or an +// invalid assumption. +NET_ERROR(UNEXPECTED, -9) + +// Permission to access a resource, other than the network, was denied. +NET_ERROR(ACCESS_DENIED, -10) + +// The operation failed because of unimplemented functionality. +NET_ERROR(NOT_IMPLEMENTED, -11) + +// There were not enough resources to complete the operation. +NET_ERROR(INSUFFICIENT_RESOURCES, -12) + +// Memory allocation failed. +NET_ERROR(OUT_OF_MEMORY, -13) + +// The file upload failed because the file's modification time was different +// from the expectation. +NET_ERROR(UPLOAD_FILE_CHANGED, -14) + +// The socket is not connected. +NET_ERROR(SOCKET_NOT_CONNECTED, -15) + +// The file already exists. +NET_ERROR(FILE_EXISTS, -16) + +// The path or file name is too long. +NET_ERROR(FILE_PATH_TOO_LONG, -17) + +// Not enough room left on the disk. +NET_ERROR(FILE_NO_SPACE, -18) + +// The file has a virus. +NET_ERROR(FILE_VIRUS_INFECTED, -19) + +// The client chose to block the request. +NET_ERROR(BLOCKED_BY_CLIENT, -20) + +// The network changed. +NET_ERROR(NETWORK_CHANGED, -21) + +// The request was blocked by the URL block list configured by the domain +// administrator. +NET_ERROR(BLOCKED_BY_ADMINISTRATOR, -22) + +// The socket is already connected. +NET_ERROR(SOCKET_IS_CONNECTED, -23) + +// The request was blocked because the forced reenrollment check is still +// pending. This error can only occur on ChromeOS. +// The error can be emitted by code in chrome/browser/policy/policy_helpers.cc. +NET_ERROR(BLOCKED_ENROLLMENT_CHECK_PENDING, -24) + +// The upload failed because the upload stream needed to be re-read, due to a +// retry or a redirect, but the upload stream doesn't support that operation. +NET_ERROR(UPLOAD_STREAM_REWIND_NOT_SUPPORTED, -25) + +// The request failed because the URLRequestContext is shutting down, or has +// been shut down. +NET_ERROR(CONTEXT_SHUT_DOWN, -26) + +// The request failed because the response was delivered along with requirements +// which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor +// checks and 'Cross-Origin-Resource-Policy', for instance). +NET_ERROR(BLOCKED_BY_RESPONSE, -27) + +// Error -28 was removed (BLOCKED_BY_XSS_AUDITOR). + +// The request was blocked by system policy disallowing some or all cleartext +// requests. Used for NetworkSecurityPolicy on Android. +NET_ERROR(CLEARTEXT_NOT_PERMITTED, -29) + +// The request was blocked by a Content Security Policy +NET_ERROR(BLOCKED_BY_CSP, -30) + +// The request was blocked because of no H/2 or QUIC session. +NET_ERROR(H2_OR_QUIC_REQUIRED, -31) + +// A connection was closed (corresponding to a TCP FIN). +NET_ERROR(CONNECTION_CLOSED, -100) + +// A connection was reset (corresponding to a TCP RST). +NET_ERROR(CONNECTION_RESET, -101) + +// A connection attempt was refused. +NET_ERROR(CONNECTION_REFUSED, -102) + +// A connection timed out as a result of not receiving an ACK for data sent. +// This can include a FIN packet that did not get ACK'd. +NET_ERROR(CONNECTION_ABORTED, -103) + +// A connection attempt failed. +NET_ERROR(CONNECTION_FAILED, -104) + +// The host name could not be resolved. +NET_ERROR(NAME_NOT_RESOLVED, -105) + +// The Internet connection has been lost. +NET_ERROR(INTERNET_DISCONNECTED, -106) + +// An SSL protocol error occurred. +NET_ERROR(SSL_PROTOCOL_ERROR, -107) + +// The IP address or port number is invalid (e.g., cannot connect to the IP +// address 0 or the port 0). +NET_ERROR(ADDRESS_INVALID, -108) + +// The IP address is unreachable. This usually means that there is no route to +// the specified host or network. +NET_ERROR(ADDRESS_UNREACHABLE, -109) + +// The server requested a client certificate for SSL client authentication. +NET_ERROR(SSL_CLIENT_AUTH_CERT_NEEDED, -110) + +// A tunnel connection through the proxy could not be established. +NET_ERROR(TUNNEL_CONNECTION_FAILED, -111) + +// No SSL protocol versions are enabled. +NET_ERROR(NO_SSL_VERSIONS_ENABLED, -112) + +// The client and server don't support a common SSL protocol version or +// cipher suite. +NET_ERROR(SSL_VERSION_OR_CIPHER_MISMATCH, -113) + +// The server requested a renegotiation (rehandshake). +NET_ERROR(SSL_RENEGOTIATION_REQUESTED, -114) + +// The proxy requested authentication (for tunnel establishment) with an +// unsupported method. +NET_ERROR(PROXY_AUTH_UNSUPPORTED, -115) + +// During SSL renegotiation (rehandshake), the server sent a certificate with +// an error. +// +// Note: this error is not in the -2xx range so that it won't be handled as a +// certificate error. +NET_ERROR(CERT_ERROR_IN_SSL_RENEGOTIATION, -116) + +// The SSL handshake failed because of a bad or missing client certificate. +NET_ERROR(BAD_SSL_CLIENT_AUTH_CERT, -117) + +// A connection attempt timed out. +NET_ERROR(CONNECTION_TIMED_OUT, -118) + +// There are too many pending DNS resolves, so a request in the queue was +// aborted. +NET_ERROR(HOST_RESOLVER_QUEUE_TOO_LARGE, -119) + +// Failed establishing a connection to the SOCKS proxy server for a target host. +NET_ERROR(SOCKS_CONNECTION_FAILED, -120) + +// The SOCKS proxy server failed establishing connection to the target host +// because that host is unreachable. +NET_ERROR(SOCKS_CONNECTION_HOST_UNREACHABLE, -121) + +// The request to negotiate an alternate protocol failed. +NET_ERROR(ALPN_NEGOTIATION_FAILED, -122) + +// The peer sent an SSL no_renegotiation alert message. +NET_ERROR(SSL_NO_RENEGOTIATION, -123) + +// Winsock sometimes reports more data written than passed. This is probably +// due to a broken LSP. +NET_ERROR(WINSOCK_UNEXPECTED_WRITTEN_BYTES, -124) + +// An SSL peer sent us a fatal decompression_failure alert. This typically +// occurs when a peer selects DEFLATE compression in the mistaken belief that +// it supports it. +NET_ERROR(SSL_DECOMPRESSION_FAILURE_ALERT, -125) + +// An SSL peer sent us a fatal bad_record_mac alert. This has been observed +// from servers with buggy DEFLATE support. +NET_ERROR(SSL_BAD_RECORD_MAC_ALERT, -126) + +// The proxy requested authentication (for tunnel establishment). +NET_ERROR(PROXY_AUTH_REQUESTED, -127) + +// Error -129 was removed (SSL_WEAK_SERVER_EPHEMERAL_DH_KEY). + +// Could not create a connection to the proxy server. An error occurred +// either in resolving its name, or in connecting a socket to it. +// Note that this does NOT include failures during the actual "CONNECT" method +// of an HTTP proxy. +NET_ERROR(PROXY_CONNECTION_FAILED, -130) + +// A mandatory proxy configuration could not be used. Currently this means +// that a mandatory PAC script could not be fetched, parsed or executed. +NET_ERROR(MANDATORY_PROXY_CONFIGURATION_FAILED, -131) + +// -132 was formerly ERR_ESET_ANTI_VIRUS_SSL_INTERCEPTION + +// We've hit the max socket limit for the socket pool while preconnecting. We +// don't bother trying to preconnect more sockets. +NET_ERROR(PRECONNECT_MAX_SOCKET_LIMIT, -133) + +// The permission to use the SSL client certificate's private key was denied. +NET_ERROR(SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED, -134) + +// The SSL client certificate has no private key. +NET_ERROR(SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY, -135) + +// The certificate presented by the HTTPS Proxy was invalid. +NET_ERROR(PROXY_CERTIFICATE_INVALID, -136) + +// An error occurred when trying to do a name resolution (DNS). +NET_ERROR(NAME_RESOLUTION_FAILED, -137) + +// Permission to access the network was denied. This is used to distinguish +// errors that were most likely caused by a firewall from other access denied +// errors. See also ERR_ACCESS_DENIED. +NET_ERROR(NETWORK_ACCESS_DENIED, -138) + +// The request throttler module cancelled this request to avoid DDOS. +NET_ERROR(TEMPORARILY_THROTTLED, -139) + +// A request to create an SSL tunnel connection through the HTTPS proxy +// received a 302 (temporary redirect) response. The response body might +// include a description of why the request failed. +// +// TODO(https://crbug.com/928551): This is deprecated and should not be used by +// new code. +NET_ERROR(HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT, -140) + +// We were unable to sign the CertificateVerify data of an SSL client auth +// handshake with the client certificate's private key. +// +// Possible causes for this include the user implicitly or explicitly +// denying access to the private key, the private key may not be valid for +// signing, the key may be relying on a cached handle which is no longer +// valid, or the CSP won't allow arbitrary data to be signed. +NET_ERROR(SSL_CLIENT_AUTH_SIGNATURE_FAILED, -141) + +// The message was too large for the transport. (for example a UDP message +// which exceeds size threshold). +NET_ERROR(MSG_TOO_BIG, -142) + +// Error -143 was removed (SPDY_SESSION_ALREADY_EXISTS) + +// Error -144 was removed (LIMIT_VIOLATION). + +// Websocket protocol error. Indicates that we are terminating the connection +// due to a malformed frame or other protocol violation. +NET_ERROR(WS_PROTOCOL_ERROR, -145) + +// Error -146 was removed (PROTOCOL_SWITCHED) + +// Returned when attempting to bind an address that is already in use. +NET_ERROR(ADDRESS_IN_USE, -147) + +// An operation failed because the SSL handshake has not completed. +NET_ERROR(SSL_HANDSHAKE_NOT_COMPLETED, -148) + +// SSL peer's public key is invalid. +NET_ERROR(SSL_BAD_PEER_PUBLIC_KEY, -149) + +// The certificate didn't match the built-in public key pins for the host name. +// The pins are set in net/http/transport_security_state.cc and require that +// one of a set of public keys exist on the path from the leaf to the root. +NET_ERROR(SSL_PINNED_KEY_NOT_IN_CERT_CHAIN, -150) + +// Server request for client certificate did not contain any types we support. +NET_ERROR(CLIENT_AUTH_CERT_TYPE_UNSUPPORTED, -151) + +// Error -152 was removed (ORIGIN_BOUND_CERT_GENERATION_TYPE_MISMATCH) + +// An SSL peer sent us a fatal decrypt_error alert. This typically occurs when +// a peer could not correctly verify a signature (in CertificateVerify or +// ServerKeyExchange) or validate a Finished message. +NET_ERROR(SSL_DECRYPT_ERROR_ALERT, -153) + +// There are too many pending WebSocketJob instances, so the new job was not +// pushed to the queue. +NET_ERROR(WS_THROTTLE_QUEUE_TOO_LARGE, -154) + +// Error -155 was removed (TOO_MANY_SOCKET_STREAMS) + +// The SSL server certificate changed in a renegotiation. +NET_ERROR(SSL_SERVER_CERT_CHANGED, -156) + +// Error -157 was removed (SSL_INAPPROPRIATE_FALLBACK). + +// Error -158 was removed (CT_NO_SCTS_VERIFIED_OK). + +// The SSL server sent us a fatal unrecognized_name alert. +NET_ERROR(SSL_UNRECOGNIZED_NAME_ALERT, -159) + +// Failed to set the socket's receive buffer size as requested. +NET_ERROR(SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR, -160) + +// Failed to set the socket's send buffer size as requested. +NET_ERROR(SOCKET_SET_SEND_BUFFER_SIZE_ERROR, -161) + +// Failed to set the socket's receive buffer size as requested, despite success +// return code from setsockopt. +NET_ERROR(SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE, -162) + +// Failed to set the socket's send buffer size as requested, despite success +// return code from setsockopt. +NET_ERROR(SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE, -163) + +// Failed to import a client certificate from the platform store into the SSL +// library. +NET_ERROR(SSL_CLIENT_AUTH_CERT_BAD_FORMAT, -164) + +// Error -165 was removed (SSL_FALLBACK_BEYOND_MINIMUM_VERSION). + +// Resolving a hostname to an IP address list included the IPv4 address +// "127.0.53.53". This is a special IP address which ICANN has recommended to +// indicate there was a name collision, and alert admins to a potential +// problem. +NET_ERROR(ICANN_NAME_COLLISION, -166) + +// The SSL server presented a certificate which could not be decoded. This is +// not a certificate error code as no X509Certificate object is available. This +// error is fatal. +NET_ERROR(SSL_SERVER_CERT_BAD_FORMAT, -167) + +// Certificate Transparency: Received a signed tree head that failed to parse. +NET_ERROR(CT_STH_PARSING_FAILED, -168) + +// Certificate Transparency: Received a signed tree head whose JSON parsing was +// OK but was missing some of the fields. +NET_ERROR(CT_STH_INCOMPLETE, -169) + +// The attempt to reuse a connection to send proxy auth credentials failed +// before the AuthController was used to generate credentials. The caller should +// reuse the controller with a new connection. This error is only used +// internally by the network stack. +NET_ERROR(UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH, -170) + +// Certificate Transparency: Failed to parse the received consistency proof. +NET_ERROR(CT_CONSISTENCY_PROOF_PARSING_FAILED, -171) + +// The SSL server required an unsupported cipher suite that has since been +// removed. This error will temporarily be signaled on a fallback for one or two +// releases immediately following a cipher suite's removal, after which the +// fallback will be removed. +NET_ERROR(SSL_OBSOLETE_CIPHER, -172) + +// When a WebSocket handshake is done successfully and the connection has been +// upgraded, the URLRequest is cancelled with this error code. +NET_ERROR(WS_UPGRADE, -173) + +// Socket ReadIfReady support is not implemented. This error should not be user +// visible, because the normal Read() method is used as a fallback. +NET_ERROR(READ_IF_READY_NOT_IMPLEMENTED, -174) + +// Error -175 was removed (SSL_VERSION_INTERFERENCE). + +// No socket buffer space is available. +NET_ERROR(NO_BUFFER_SPACE, -176) + +// There were no common signature algorithms between our client certificate +// private key and the server's preferences. +NET_ERROR(SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS, -177) + +// TLS 1.3 early data was rejected by the server. This will be received before +// any data is returned from the socket. The request should be retried with +// early data disabled. +NET_ERROR(EARLY_DATA_REJECTED, -178) + +// TLS 1.3 early data was offered, but the server responded with TLS 1.2 or +// earlier. This is an internal error code to account for a +// backwards-compatibility issue with early data and TLS 1.2. It will be +// received before any data is returned from the socket. The request should be +// retried with early data disabled. +// +// See https://tools.ietf.org/html/rfc8446#appendix-D.3 for details. +NET_ERROR(WRONG_VERSION_ON_EARLY_DATA, -179) + +// TLS 1.3 was enabled, but a lower version was negotiated and the server +// returned a value indicating it supported TLS 1.3. This is part of a security +// check in TLS 1.3, but it may also indicate the user is behind a buggy +// TLS-terminating proxy which implemented TLS 1.2 incorrectly. (See +// https://crbug.com/boringssl/226.) +NET_ERROR(TLS13_DOWNGRADE_DETECTED, -180) + +// The server's certificate has a keyUsage extension incompatible with the +// negotiated TLS key exchange method. +NET_ERROR(SSL_KEY_USAGE_INCOMPATIBLE, -181) + +// Certificate error codes +// +// The values of certificate error codes must be consecutive. + +// The server responded with a certificate whose common name did not match +// the host name. This could mean: +// +// 1. An attacker has redirected our traffic to their server and is +// presenting a certificate for which they know the private key. +// +// 2. The server is misconfigured and responding with the wrong cert. +// +// 3. The user is on a wireless network and is being redirected to the +// network's login page. +// +// 4. The OS has used a DNS search suffix and the server doesn't have +// a certificate for the abbreviated name in the address bar. +// +NET_ERROR(CERT_COMMON_NAME_INVALID, -200) + +// The server responded with a certificate that, by our clock, appears to +// either not yet be valid or to have expired. This could mean: +// +// 1. An attacker is presenting an old certificate for which they have +// managed to obtain the private key. +// +// 2. The server is misconfigured and is not presenting a valid cert. +// +// 3. Our clock is wrong. +// +NET_ERROR(CERT_DATE_INVALID, -201) + +// The server responded with a certificate that is signed by an authority +// we don't trust. The could mean: +// +// 1. An attacker has substituted the real certificate for a cert that +// contains their public key and is signed by their cousin. +// +// 2. The server operator has a legitimate certificate from a CA we don't +// know about, but should trust. +// +// 3. The server is presenting a self-signed certificate, providing no +// defense against active attackers (but foiling passive attackers). +// +NET_ERROR(CERT_AUTHORITY_INVALID, -202) + +// The server responded with a certificate that contains errors. +// This error is not recoverable. +// +// MSDN describes this error as follows: +// "The SSL certificate contains errors." +// NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency, +// use that code instead of this one from now on. +// +NET_ERROR(CERT_CONTAINS_ERRORS, -203) + +// The certificate has no mechanism for determining if it is revoked. In +// effect, this certificate cannot be revoked. +NET_ERROR(CERT_NO_REVOCATION_MECHANISM, -204) + +// Revocation information for the security certificate for this site is not +// available. This could mean: +// +// 1. An attacker has compromised the private key in the certificate and is +// blocking our attempt to find out that the cert was revoked. +// +// 2. The certificate is unrevoked, but the revocation server is busy or +// unavailable. +// +NET_ERROR(CERT_UNABLE_TO_CHECK_REVOCATION, -205) + +// The server responded with a certificate has been revoked. +// We have the capability to ignore this error, but it is probably not the +// thing to do. +NET_ERROR(CERT_REVOKED, -206) + +// The server responded with a certificate that is invalid. +// This error is not recoverable. +// +// MSDN describes this error as follows: +// "The SSL certificate is invalid." +// +NET_ERROR(CERT_INVALID, -207) + +// The server responded with a certificate that is signed using a weak +// signature algorithm. +NET_ERROR(CERT_WEAK_SIGNATURE_ALGORITHM, -208) + +// -209 is availible: was CERT_NOT_IN_DNS. + +// The host name specified in the certificate is not unique. +NET_ERROR(CERT_NON_UNIQUE_NAME, -210) + +// The server responded with a certificate that contains a weak key (e.g. +// a too-small RSA key). +NET_ERROR(CERT_WEAK_KEY, -211) + +// The certificate claimed DNS names that are in violation of name constraints. +NET_ERROR(CERT_NAME_CONSTRAINT_VIOLATION, -212) + +// The certificate's validity period is too long. +NET_ERROR(CERT_VALIDITY_TOO_LONG, -213) + +// Certificate Transparency was required for this connection, but the server +// did not provide CT information that complied with the policy. +NET_ERROR(CERTIFICATE_TRANSPARENCY_REQUIRED, -214) + +// The certificate chained to a legacy Symantec root that is no longer trusted. +// https://g.co/chrome/symantecpkicerts +NET_ERROR(CERT_SYMANTEC_LEGACY, -215) + +// -216 was QUIC_CERT_ROOT_NOT_KNOWN which has been renumbered to not be in the +// certificate error range. + +// The certificate is known to be used for interception by an entity other +// the device owner. +NET_ERROR(CERT_KNOWN_INTERCEPTION_BLOCKED, -217) + +// The connection uses an obsolete version of SSL/TLS. +NET_ERROR(SSL_OBSOLETE_VERSION, -218) + +// Add new certificate error codes here. +// +// Update the value of CERT_END whenever you add a new certificate error +// code. + +// The value immediately past the last certificate error code. +NET_ERROR(CERT_END, -219) + +// The URL is invalid. +NET_ERROR(INVALID_URL, -300) + +// The scheme of the URL is disallowed. +NET_ERROR(DISALLOWED_URL_SCHEME, -301) + +// The scheme of the URL is unknown. +NET_ERROR(UNKNOWN_URL_SCHEME, -302) + +// Attempting to load an URL resulted in a redirect to an invalid URL. +NET_ERROR(INVALID_REDIRECT, -303) + +// Attempting to load an URL resulted in too many redirects. +NET_ERROR(TOO_MANY_REDIRECTS, -310) + +// Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect +// to file:// is considered unsafe). +NET_ERROR(UNSAFE_REDIRECT, -311) + +// Attempting to load an URL with an unsafe port number. These are port +// numbers that correspond to services, which are not robust to spurious input +// that may be constructed as a result of an allowed web construct (e.g., HTTP +// looks a lot like SMTP, so form submission to port 25 is denied). +NET_ERROR(UNSAFE_PORT, -312) + +// The server's response was invalid. +NET_ERROR(INVALID_RESPONSE, -320) + +// Error in chunked transfer encoding. +NET_ERROR(INVALID_CHUNKED_ENCODING, -321) + +// The server did not support the request method. +NET_ERROR(METHOD_NOT_SUPPORTED, -322) + +// The response was 407 (Proxy Authentication Required), yet we did not send +// the request to a proxy. +NET_ERROR(UNEXPECTED_PROXY_AUTH, -323) + +// The server closed the connection without sending any data. +NET_ERROR(EMPTY_RESPONSE, -324) + +// The headers section of the response is too large. +NET_ERROR(RESPONSE_HEADERS_TOO_BIG, -325) + +// Error -326 was removed (PAC_STATUS_NOT_OK) + +// The evaluation of the PAC script failed. +NET_ERROR(PAC_SCRIPT_FAILED, -327) + +// The response was 416 (Requested range not satisfiable) and the server cannot +// satisfy the range requested. +NET_ERROR(REQUEST_RANGE_NOT_SATISFIABLE, -328) + +// The identity used for authentication is invalid. +NET_ERROR(MALFORMED_IDENTITY, -329) + +// Content decoding of the response body failed. +NET_ERROR(CONTENT_DECODING_FAILED, -330) + +// An operation could not be completed because all network IO +// is suspended. +NET_ERROR(NETWORK_IO_SUSPENDED, -331) + +// FLIP data received without receiving a SYN_REPLY on the stream. +NET_ERROR(SYN_REPLY_NOT_RECEIVED, -332) + +// Converting the response to target encoding failed. +NET_ERROR(ENCODING_CONVERSION_FAILED, -333) + +// The server sent an FTP directory listing in a format we do not understand. +NET_ERROR(UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT, -334) + +// Obsolete. Was only logged in NetLog when an HTTP/2 pushed stream expired. +// NET_ERROR(INVALID_SPDY_STREAM, -335) + +// There are no supported proxies in the provided list. +NET_ERROR(NO_SUPPORTED_PROXIES, -336) + +// There is an HTTP/2 protocol error. +NET_ERROR(HTTP2_PROTOCOL_ERROR, -337) + +// Credentials could not be established during HTTP Authentication. +NET_ERROR(INVALID_AUTH_CREDENTIALS, -338) + +// An HTTP Authentication scheme was tried which is not supported on this +// machine. +NET_ERROR(UNSUPPORTED_AUTH_SCHEME, -339) + +// Detecting the encoding of the response failed. +NET_ERROR(ENCODING_DETECTION_FAILED, -340) + +// (GSSAPI) No Kerberos credentials were available during HTTP Authentication. +NET_ERROR(MISSING_AUTH_CREDENTIALS, -341) + +// An unexpected, but documented, SSPI or GSSAPI status code was returned. +NET_ERROR(UNEXPECTED_SECURITY_LIBRARY_STATUS, -342) + +// The environment was not set up correctly for authentication (for +// example, no KDC could be found or the principal is unknown. +NET_ERROR(MISCONFIGURED_AUTH_ENVIRONMENT, -343) + +// An undocumented SSPI or GSSAPI status code was returned. +NET_ERROR(UNDOCUMENTED_SECURITY_LIBRARY_STATUS, -344) + +// The HTTP response was too big to drain. +NET_ERROR(RESPONSE_BODY_TOO_BIG_TO_DRAIN, -345) + +// The HTTP response contained multiple distinct Content-Length headers. +NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH, -346) + +// HTTP/2 headers have been received, but not all of them - status or version +// headers are missing, so we're expecting additional frames to complete them. +NET_ERROR(INCOMPLETE_HTTP2_HEADERS, -347) + +// No PAC URL configuration could be retrieved from DHCP. This can indicate +// either a failure to retrieve the DHCP configuration, or that there was no +// PAC URL configured in DHCP. +NET_ERROR(PAC_NOT_IN_DHCP, -348) + +// The HTTP response contained multiple Content-Disposition headers. +NET_ERROR(RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION, -349) + +// The HTTP response contained multiple Location headers. +NET_ERROR(RESPONSE_HEADERS_MULTIPLE_LOCATION, -350) + +// HTTP/2 server refused the request without processing, and sent either a +// GOAWAY frame with error code NO_ERROR and Last-Stream-ID lower than the +// stream id corresponding to the request indicating that this request has not +// been processed yet, or a RST_STREAM frame with error code REFUSED_STREAM. +// Client MAY retry (on a different connection). See RFC7540 Section 8.1.4. +NET_ERROR(HTTP2_SERVER_REFUSED_STREAM, -351) + +// HTTP/2 server didn't respond to the PING message. +NET_ERROR(HTTP2_PING_FAILED, -352) + +// Obsolete. Kept here to avoid reuse, as the old error can still appear on +// histograms. +// NET_ERROR(PIPELINE_EVICTION, -353) + +// The HTTP response body transferred fewer bytes than were advertised by the +// Content-Length header when the connection is closed. +NET_ERROR(CONTENT_LENGTH_MISMATCH, -354) + +// The HTTP response body is transferred with Chunked-Encoding, but the +// terminating zero-length chunk was never sent when the connection is closed. +NET_ERROR(INCOMPLETE_CHUNKED_ENCODING, -355) + +// There is a QUIC protocol error. +NET_ERROR(QUIC_PROTOCOL_ERROR, -356) + +// The HTTP headers were truncated by an EOF. +NET_ERROR(RESPONSE_HEADERS_TRUNCATED, -357) + +// The QUIC crytpo handshake failed. This means that the server was unable +// to read any requests sent, so they may be resent. +NET_ERROR(QUIC_HANDSHAKE_FAILED, -358) + +// Obsolete. Kept here to avoid reuse, as the old error can still appear on +// histograms. +// NET_ERROR(REQUEST_FOR_SECURE_RESOURCE_OVER_INSECURE_QUIC, -359) + +// Transport security is inadequate for the HTTP/2 version. +NET_ERROR(HTTP2_INADEQUATE_TRANSPORT_SECURITY, -360) + +// The peer violated HTTP/2 flow control. +NET_ERROR(HTTP2_FLOW_CONTROL_ERROR, -361) + +// The peer sent an improperly sized HTTP/2 frame. +NET_ERROR(HTTP2_FRAME_SIZE_ERROR, -362) + +// Decoding or encoding of compressed HTTP/2 headers failed. +NET_ERROR(HTTP2_COMPRESSION_ERROR, -363) + +// Proxy Auth Requested without a valid Client Socket Handle. +NET_ERROR(PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION, -364) + +// HTTP_1_1_REQUIRED error code received on HTTP/2 session. +NET_ERROR(HTTP_1_1_REQUIRED, -365) + +// HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy. +NET_ERROR(PROXY_HTTP_1_1_REQUIRED, -366) + +// The PAC script terminated fatally and must be reloaded. +NET_ERROR(PAC_SCRIPT_TERMINATED, -367) + +// Obsolete. Kept here to avoid reuse. +// Request is throttled because of a Backoff header. +// See: crbug.com/486891. +// NET_ERROR(TEMPORARY_BACKOFF, -369) + +// The server was expected to return an HTTP/1.x response, but did not. Rather +// than treat it as HTTP/0.9, this error is returned. +NET_ERROR(INVALID_HTTP_RESPONSE, -370) + +// Initializing content decoding failed. +NET_ERROR(CONTENT_DECODING_INIT_FAILED, -371) + +// Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should +// be handled internally by HTTP/2 code, and should not make it above the +// SpdyStream layer. +NET_ERROR(HTTP2_RST_STREAM_NO_ERROR_RECEIVED, -372) + +// The pushed stream claimed by the request is no longer available. +NET_ERROR(HTTP2_PUSHED_STREAM_NOT_AVAILABLE, -373) + +// A pushed stream was claimed and later reset by the server. When this happens, +// the request should be retried. +NET_ERROR(HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER, -374) + +// An HTTP transaction was retried too many times due for authentication or +// invalid certificates. This may be due to a bug in the net stack that would +// otherwise infinite loop, or if the server or proxy continually requests fresh +// credentials or presents a fresh invalid certificate. +NET_ERROR(TOO_MANY_RETRIES, -375) + +// Received an HTTP/2 frame on a closed stream. +NET_ERROR(HTTP2_STREAM_CLOSED, -376) + +// Client is refusing an HTTP/2 stream. +NET_ERROR(HTTP2_CLIENT_REFUSED_STREAM, -377) + +// A pushed HTTP/2 stream was claimed by a request based on matching URL and +// request headers, but the pushed response headers do not match the request. +NET_ERROR(HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH, -378) + +// The server returned a non-2xx HTTP response code. +// +// Not that this error is only used by certain APIs that interpret the HTTP +// response itself. URLRequest for instance just passes most non-2xx +// response back as success. +NET_ERROR(HTTP_RESPONSE_CODE_FAILURE, -379) + +// The certificate presented on a QUIC connection does not chain to a known root +// and the origin connected to is not on a list of domains where unknown roots +// are allowed. +NET_ERROR(QUIC_CERT_ROOT_NOT_KNOWN, -380) + +// A GOAWAY frame has been received indicating that the request has not been +// processed and is therefore safe to retry on a different connection. +NET_ERROR(QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED, -381) + +// The cache does not have the requested entry. +NET_ERROR(CACHE_MISS, -400) + +// Unable to read from the disk cache. +NET_ERROR(CACHE_READ_FAILURE, -401) + +// Unable to write to the disk cache. +NET_ERROR(CACHE_WRITE_FAILURE, -402) + +// The operation is not supported for this entry. +NET_ERROR(CACHE_OPERATION_NOT_SUPPORTED, -403) + +// The disk cache is unable to open this entry. +NET_ERROR(CACHE_OPEN_FAILURE, -404) + +// The disk cache is unable to create this entry. +NET_ERROR(CACHE_CREATE_FAILURE, -405) + +// Multiple transactions are racing to create disk cache entries. This is an +// internal error returned from the HttpCache to the HttpCacheTransaction that +// tells the transaction to restart the entry-creation logic because the state +// of the cache has changed. +NET_ERROR(CACHE_RACE, -406) + +// The cache was unable to read a checksum record on an entry. This can be +// returned from attempts to read from the cache. It is an internal error, +// returned by the SimpleCache backend, but not by any URLRequest methods +// or members. +NET_ERROR(CACHE_CHECKSUM_READ_FAILURE, -407) + +// The cache found an entry with an invalid checksum. This can be returned from +// attempts to read from the cache. It is an internal error, returned by the +// SimpleCache backend, but not by any URLRequest methods or members. +NET_ERROR(CACHE_CHECKSUM_MISMATCH, -408) + +// Internal error code for the HTTP cache. The cache lock timeout has fired. +NET_ERROR(CACHE_LOCK_TIMEOUT, -409) + +// Received a challenge after the transaction has read some data, and the +// credentials aren't available. There isn't a way to get them at that point. +NET_ERROR(CACHE_AUTH_FAILURE_AFTER_READ, -410) + +// Internal not-quite error code for the HTTP cache. In-memory hints suggest +// that the cache entry would not have been useable with the transaction's +// current configuration (e.g. load flags, mode, etc.) +NET_ERROR(CACHE_ENTRY_NOT_SUITABLE, -411) + +// The disk cache is unable to doom this entry. +NET_ERROR(CACHE_DOOM_FAILURE, -412) + +// The disk cache is unable to open or create this entry. +NET_ERROR(CACHE_OPEN_OR_CREATE_FAILURE, -413) + +// The server's response was insecure (e.g. there was a cert error). +NET_ERROR(INSECURE_RESPONSE, -501) + +// An attempt to import a client certificate failed, as the user's key +// database lacked a corresponding private key. +NET_ERROR(NO_PRIVATE_KEY_FOR_CERT, -502) + +// An error adding a certificate to the OS certificate database. +NET_ERROR(ADD_USER_CERT_FAILED, -503) + +// An error occurred while handling a signed exchange. +NET_ERROR(INVALID_SIGNED_EXCHANGE, -504) + +// An error occurred while handling a Web Bundle source. +NET_ERROR(INVALID_WEB_BUNDLE, -505) + +// A Trust Tokens protocol operation-executing request failed for one of a +// number of reasons (precondition failure, internal error, bad response). +NET_ERROR(TRUST_TOKEN_OPERATION_FAILED, -506) + +// When handling a Trust Tokens protocol operation-executing request, the system +// was able to execute the request's Trust Tokens operation without sending the +// request to its destination: for instance, the results could have been present +// in a local cache (for redemption) or the operation could have been diverted +// to a local provider (for "platform-provided" issuance). +NET_ERROR(TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST, -507) + +// *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). *** + +// A generic error for failed FTP control connection command. +// If possible, please use or add a more specific error code. +NET_ERROR(FTP_FAILED, -601) + +// The server cannot fulfill the request at this point. This is a temporary +// error. +// FTP response code 421. +NET_ERROR(FTP_SERVICE_UNAVAILABLE, -602) + +// The server has aborted the transfer. +// FTP response code 426. +NET_ERROR(FTP_TRANSFER_ABORTED, -603) + +// The file is busy, or some other temporary error condition on opening +// the file. +// FTP response code 450. +NET_ERROR(FTP_FILE_BUSY, -604) + +// Server rejected our command because of syntax errors. +// FTP response codes 500, 501. +NET_ERROR(FTP_SYNTAX_ERROR, -605) + +// Server does not support the command we issued. +// FTP response codes 502, 504. +NET_ERROR(FTP_COMMAND_NOT_SUPPORTED, -606) + +// Server rejected our command because we didn't issue the commands in right +// order. +// FTP response code 503. +NET_ERROR(FTP_BAD_COMMAND_SEQUENCE, -607) + +// PKCS #12 import failed due to incorrect password. +NET_ERROR(PKCS12_IMPORT_BAD_PASSWORD, -701) + +// PKCS #12 import failed due to other error. +NET_ERROR(PKCS12_IMPORT_FAILED, -702) + +// CA import failed - not a CA cert. +NET_ERROR(IMPORT_CA_CERT_NOT_CA, -703) + +// Import failed - certificate already exists in database. +// Note it's a little weird this is an error but reimporting a PKCS12 is ok +// (no-op). That's how Mozilla does it, though. +NET_ERROR(IMPORT_CERT_ALREADY_EXISTS, -704) + +// CA import failed due to some other error. +NET_ERROR(IMPORT_CA_CERT_FAILED, -705) + +// Server certificate import failed due to some internal error. +NET_ERROR(IMPORT_SERVER_CERT_FAILED, -706) + +// PKCS #12 import failed due to invalid MAC. +NET_ERROR(PKCS12_IMPORT_INVALID_MAC, -707) + +// PKCS #12 import failed due to invalid/corrupt file. +NET_ERROR(PKCS12_IMPORT_INVALID_FILE, -708) + +// PKCS #12 import failed due to unsupported features. +NET_ERROR(PKCS12_IMPORT_UNSUPPORTED, -709) + +// Key generation failed. +NET_ERROR(KEY_GENERATION_FAILED, -710) + +// Error -711 was removed (ORIGIN_BOUND_CERT_GENERATION_FAILED) + +// Failure to export private key. +NET_ERROR(PRIVATE_KEY_EXPORT_FAILED, -712) + +// Self-signed certificate generation failed. +NET_ERROR(SELF_SIGNED_CERT_GENERATION_FAILED, -713) + +// The certificate database changed in some way. +NET_ERROR(CERT_DATABASE_CHANGED, -714) + +// Error -715 was removed (CHANNEL_ID_IMPORT_FAILED) + +// DNS error codes. + +// DNS resolver received a malformed response. +NET_ERROR(DNS_MALFORMED_RESPONSE, -800) + +// DNS server requires TCP +NET_ERROR(DNS_SERVER_REQUIRES_TCP, -801) + +// DNS server failed. This error is returned for all of the following +// error conditions: +// 1 - Format error - The name server was unable to interpret the query. +// 2 - Server failure - The name server was unable to process this query +// due to a problem with the name server. +// 4 - Not Implemented - The name server does not support the requested +// kind of query. +// 5 - Refused - The name server refuses to perform the specified +// operation for policy reasons. +NET_ERROR(DNS_SERVER_FAILED, -802) + +// DNS transaction timed out. +NET_ERROR(DNS_TIMED_OUT, -803) + +// The entry was not found in cache or other local sources, for lookups where +// only local sources were queried. +// TODO(ericorth): Consider renaming to DNS_LOCAL_MISS or something like that as +// the cache is not necessarily queried either. +NET_ERROR(DNS_CACHE_MISS, -804) + +// Suffix search list rules prevent resolution of the given host name. +NET_ERROR(DNS_SEARCH_EMPTY, -805) + +// Failed to sort addresses according to RFC3484. +NET_ERROR(DNS_SORT_ERROR, -806) + +// Error -807 was removed (DNS_HTTP_FAILED) + +// Failed to resolve the hostname of a DNS-over-HTTPS server. +NET_ERROR(DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED, -808) diff --git a/cef/include/capi/cef_accessibility_handler_capi.h b/cef/include/capi/cef_accessibility_handler_capi.h index 5235aa68b7..cafa9a27d3 100644 --- a/cef/include/capi/cef_accessibility_handler_capi.h +++ b/cef/include/capi/cef_accessibility_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=c487e5fd787b1be8224a8981839e0cfdd0ed74f3$ +// $hash=306e44d49ab6198a0fa1bcea50e8a25ee18672be$ // #ifndef CEF_INCLUDE_CAPI_CEF_ACCESSIBILITY_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_app_capi.h b/cef/include/capi/cef_app_capi.h index 8dc4595cb9..4554a25dc0 100644 --- a/cef/include/capi/cef_app_capi.h +++ b/cef/include/capi/cef_app_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a4b63e6e7942e3a3961b4f7141a963980178ae6f$ +// $hash=adfba3dd6479b96a95639c13ee1e07bed7b335d0$ // #ifndef CEF_INCLUDE_CAPI_CEF_APP_CAPI_H_ diff --git a/cef/include/capi/cef_audio_handler_capi.h b/cef/include/capi/cef_audio_handler_capi.h index 00a25458d3..ffb9ff0b18 100644 --- a/cef/include/capi/cef_audio_handler_capi.h +++ b/cef/include/capi/cef_audio_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=7a483ed552ecca4f1aaa03800d366beca1ea2dee$ +// $hash=fd8d34089842ee8f8490ef1828c3091d12052e28$ // #ifndef CEF_INCLUDE_CAPI_CEF_AUDIO_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_auth_callback_capi.h b/cef/include/capi/cef_auth_callback_capi.h index 0e0cffd3f4..6042416513 100644 --- a/cef/include/capi/cef_auth_callback_capi.h +++ b/cef/include/capi/cef_auth_callback_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=2b9508a328ed0218e2c576af455f8d76e5978545$ +// $hash=01a33de48ac9780f78d606d8aee2429ddb0c81a2$ // #ifndef CEF_INCLUDE_CAPI_CEF_AUTH_CALLBACK_CAPI_H_ diff --git a/cef/include/capi/cef_browser_capi.h b/cef/include/capi/cef_browser_capi.h index f7a5b17bdb..7517bf0895 100644 --- a/cef/include/capi/cef_browser_capi.h +++ b/cef/include/capi/cef_browser_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=92c4d38f6895018f72fbafeecb13c47320ef0b1d$ +// $hash=45bcd802ddf8bc4919ae9b79f70f96b6956cf026$ // #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_CAPI_H_ @@ -46,8 +46,10 @@ #include "include/capi/cef_frame_capi.h" #include "include/capi/cef_image_capi.h" #include "include/capi/cef_navigation_entry_capi.h" +#include "include/capi/cef_permission_request_capi.h" #include "include/capi/cef_registration_capi.h" #include "include/capi/cef_request_context_capi.h" +#include "include/capi/cef_task_capi.h" #ifdef __cplusplus extern "C" { @@ -55,6 +57,7 @@ extern "C" { struct _cef_browser_host_t; struct _cef_client_t; +struct _cef_java_script_result_callback_t; /// // Structure used to represent a browser window. When used in the browser @@ -95,6 +98,12 @@ typedef struct _cef_browser_t { /// void(CEF_CALLBACK* go_forward)(struct _cef_browser_t* self); + /// + // Returns true (1) if the browser can navigate forwards. + /// + int(CEF_CALLBACK* can_go_back_or_forward)(struct _cef_browser_t* self, + int num_steps); + /// // Returns true (1) if the browser is currently loading. /// @@ -184,6 +193,19 @@ typedef struct _cef_browser_t { /// void(CEF_CALLBACK* get_frame_names)(struct _cef_browser_t* self, cef_string_list_t names); + + /// + // Returns the Permission Request Delegate object. + /// + struct _cef_browser_permission_request_delegate_t*( + CEF_CALLBACK* get_permission_request_delegate)( + struct _cef_browser_t* self); + + /// + // Returns the Geolocation Permission handler object. + /// + struct _cef_geolocation_acess_t*(CEF_CALLBACK* get_geolocation_permissions)( + struct _cef_browser_t* self); } cef_browser_t; /// @@ -295,6 +317,12 @@ typedef struct _cef_browser_host_t { struct _cef_browser_t*(CEF_CALLBACK* get_browser)( struct _cef_browser_host_t* self); + /// + // Post task to ui thread. + /// + void(CEF_CALLBACK* post_task_to_uithread)(struct _cef_browser_host_t* self, + struct _cef_task_t* task); + /// // Request that the browser close. The JavaScript 'onbeforeunload' event will // be fired. If |force_close| is false (0) the event handler, if any, will be @@ -710,6 +738,102 @@ typedef struct _cef_browser_host_t { struct _cef_browser_host_t* self, int frame_rate); + /// + // Recompute the WebPreferences based on the current state of the CefSettings, + // we will also call SetWebPreferences and send the updated WebPreferences to + // all RenderViews by WebContents. + /// + void(CEF_CALLBACK* set_web_preferences)( + struct _cef_browser_host_t* self, + const struct _cef_browser_settings_t* browser_settings); + + /// + // PutUserAgent + /// + void(CEF_CALLBACK* put_user_agent)(struct _cef_browser_host_t* self, + const cef_string_t* ua); + + /// + // DefaultUserAgent + /// + // The resulting string must be freed by calling cef_string_userfree_free(). + cef_string_userfree_t(CEF_CALLBACK* default_user_agent)( + struct _cef_browser_host_t* self); + + /// + // SetBackgroundColor + /// + void(CEF_CALLBACK* set_background_color)(struct _cef_browser_host_t* self, + int color); + + /// + // RegisterArkJSfunction + /// + void(CEF_CALLBACK* register_ark_jsfunction)(struct _cef_browser_host_t* self, + const cef_string_t* object_name, + cef_string_list_t method_list); + + /// + // UnregisterArkJSfunction + /// + void(CEF_CALLBACK* unregister_ark_jsfunction)( + struct _cef_browser_host_t* self, + const cef_string_t* object_name, + cef_string_list_t method_list); + + /// + // Gets the title for the current page. + /// + // The resulting string must be freed by calling cef_string_userfree_free(). + cef_string_userfree_t(CEF_CALLBACK* title)(struct _cef_browser_host_t* self); + + /// + // Gets the latest hitdata + /// + void(CEF_CALLBACK* get_hit_data)(struct _cef_browser_host_t* self, + int* type, + cef_string_t* extra_data); + + /// + // Gets the progress for the current page. + /// + int(CEF_CALLBACK* page_load_progress)(struct _cef_browser_host_t* self); + + /// + // Gets the progress for the current page. + /// + float(CEF_CALLBACK* scale)(struct _cef_browser_host_t* self); + + /// + // Loads the given data into this WebView, using baseUrl as the base URL for + // the content. The base URL is used both to resolve relative URLs and when + // applying JavaScript's same origin policy. The historyUrl is used for the + // history entry. optional_param=baseUrl, optional_param=data, + // optional_param=mimeType, optional_param=encoding, optional_param=historyUrl + /// + void(CEF_CALLBACK* load_with_data_and_base_url)( + struct _cef_browser_host_t* self, + const cef_string_t* baseUrl, + const cef_string_t* data, + const cef_string_t* mimeType, + const cef_string_t* encoding, + const cef_string_t* historyUrl); + + /// + // Loads the given data into this WebView optional_param=data, + // optional_param=mimeType, optional_param=encoding, + /// + void(CEF_CALLBACK* load_with_data)(struct _cef_browser_host_t* self, + const cef_string_t* data, + const cef_string_t* mimeType, + const cef_string_t* encoding); + + /// + // add visited url. + /// + void(CEF_CALLBACK* add_visited_links)(struct _cef_browser_host_t* self, + cef_string_list_t urls); + /// // Begins a new composition or updates the existing composition. Blink has a // special node (a composition node) that allows the input function to change @@ -726,10 +850,11 @@ typedef struct _cef_browser_host_t { // or completed. To cancel the composition call ImeCancelComposition. To // complete the composition call either ImeCommitText or // ImeFinishComposingText. Completion is usually signaled when: - // A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR + // A. The client receives a WM_IME_COMPOSITION message with a + // GCS_RESULTSTR // flag (on Windows), or; - // B. The client receives a "commit" signal of GtkIMContext (on Linux), or; - // C. insertText of NSTextInput is called (on Mac). + // B. The client receives a "commit" signal of GtkIMContext (on Linux), + // or; C. insertText of NSTextInput is called (on Mac). // // This function is only used when window rendering is disabled. /// @@ -910,6 +1035,14 @@ typedef struct _cef_browser_host_t { // be called on the UI thread. /// int(CEF_CALLBACK* is_audio_muted)(struct _cef_browser_host_t* self); + + /// + // Execute a string of JavaScript code, return result by callback + /// + void(CEF_CALLBACK* execute_java_script)( + struct _cef_browser_host_t* self, + const cef_string_t* code, + struct _cef_java_script_result_callback_t* callback); } cef_browser_host_t; /// @@ -946,6 +1079,25 @@ CEF_EXPORT cef_browser_t* cef_browser_host_create_browser_sync( struct _cef_dictionary_value_t* extra_info, struct _cef_request_context_t* request_context); +/// +// Structure to implement to be notified of asynchronous completion via +// cef_browser_host_tBase::execute_java_script(). +/// +typedef struct _cef_java_script_result_callback_t { + /// + // Base structure. + /// + cef_base_ref_counted_t base; + + /// + // Method that will be called upon completion. |num_deleted| will be the + // number of cookies that were deleted. + /// + void(CEF_CALLBACK* on_java_script_exe_result)( + struct _cef_java_script_result_callback_t* self, + const cef_string_t* result); +} cef_java_script_result_callback_t; + #ifdef __cplusplus } #endif diff --git a/cef/include/capi/cef_browser_process_handler_capi.h b/cef/include/capi/cef_browser_process_handler_capi.h index 43f8047723..2a3dc178e7 100644 --- a/cef/include/capi/cef_browser_process_handler_capi.h +++ b/cef/include/capi/cef_browser_process_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=ade537f836add7fe0b5fd94ceba26d678abb3e43$ +// $hash=8c97f9b58c642c144cc37824ad820192640307cb$ // #ifndef CEF_INCLUDE_CAPI_CEF_BROWSER_PROCESS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_callback_capi.h b/cef/include/capi/cef_callback_capi.h index 4ed4b825ae..1ece08781f 100644 --- a/cef/include/capi/cef_callback_capi.h +++ b/cef/include/capi/cef_callback_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=cd8c183355a6808abd763ecc0396b5da6c15b3f9$ +// $hash=10ef5088ce2a5c6ffb38f8864d3aad6e5ac88b40$ // #ifndef CEF_INCLUDE_CAPI_CEF_CALLBACK_CAPI_H_ diff --git a/cef/include/capi/cef_client_capi.h b/cef/include/capi/cef_client_capi.h index 8351d9ae76..f7eace3f95 100644 --- a/cef/include/capi/cef_client_capi.h +++ b/cef/include/capi/cef_client_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=14eca959988209ba8f95037a47192fd50d64f2f1$ +// $hash=16bf02f2a17c61e7f0724b364fb3669b1d66210a$ // #ifndef CEF_INCLUDE_CAPI_CEF_CLIENT_CAPI_H_ @@ -53,6 +53,7 @@ #include "include/capi/cef_keyboard_handler_capi.h" #include "include/capi/cef_life_span_handler_capi.h" #include "include/capi/cef_load_handler_capi.h" +#include "include/capi/cef_permission_request_capi.h" #include "include/capi/cef_print_handler_capi.h" #include "include/capi/cef_process_message_capi.h" #include "include/capi/cef_render_handler_capi.h" @@ -166,6 +167,12 @@ typedef struct _cef_client_t { struct _cef_request_handler_t*(CEF_CALLBACK* get_request_handler)( struct _cef_client_t* self); + /// + // Return the handler for browser geolocation permission request events. + /// + struct _cef_permission_request_t*(CEF_CALLBACK* get_permission_request)( + struct _cef_client_t* self); + /// // Called when a new message is received from a different process. Return true // (1) if the message was handled or false (0) otherwise. Do not keep a @@ -177,6 +184,16 @@ typedef struct _cef_client_t { struct _cef_frame_t* frame, cef_process_id_t source_process, struct _cef_process_message_t* message); + + /// + // Returns the list of arguments NotifyJavaScriptResult. + /// + int(CEF_CALLBACK* notify_java_script_result)( + struct _cef_client_t* self, + struct _cef_list_value_t* args, + const cef_string_t* method, + const cef_string_t* object_name, + struct _cef_list_value_t* result); } cef_client_t; #ifdef __cplusplus diff --git a/cef/include/capi/cef_command_line_capi.h b/cef/include/capi/cef_command_line_capi.h index df70b2a029..3f2127f0b0 100644 --- a/cef/include/capi/cef_command_line_capi.h +++ b/cef/include/capi/cef_command_line_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=5af5bf1e877dd53f21f751d332a9e2166817324c$ +// $hash=1c67e681e14c38b992b8356f0dfea27e970f2a44$ // #ifndef CEF_INCLUDE_CAPI_CEF_COMMAND_LINE_CAPI_H_ diff --git a/cef/include/capi/cef_context_menu_handler_capi.h b/cef/include/capi/cef_context_menu_handler_capi.h index 59b1f28785..f83dfa3646 100644 --- a/cef/include/capi/cef_context_menu_handler_capi.h +++ b/cef/include/capi/cef_context_menu_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=175779df75a1405fcc5c337a09e6322c556698ba$ +// $hash=fd33ce439e4379d231b6be16bdc1786f314d98e4$ // #ifndef CEF_INCLUDE_CAPI_CEF_CONTEXT_MENU_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_cookie_capi.h b/cef/include/capi/cef_cookie_capi.h index d6f7cb68be..86a809cd43 100644 --- a/cef/include/capi/cef_cookie_capi.h +++ b/cef/include/capi/cef_cookie_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=b19ef1c8a781f8d59276357609fe64370bb8a107$ +// $hash=f56fb7f36efbc915453237ce10712eb49e436b00$ // #ifndef CEF_INCLUDE_CAPI_CEF_COOKIE_CAPI_H_ @@ -61,6 +61,35 @@ typedef struct _cef_cookie_manager_t { /// cef_base_ref_counted_t base; + /// + // Get whether this cookie manager can accpet and send cookies. Returns false + // (0) if can't. + /// + int(CEF_CALLBACK* is_accept_cookie_allowed)( + struct _cef_cookie_manager_t* self); + + /// + // Set whether this cookie manager can accpet and send cookies. + /// + void(CEF_CALLBACK* put_accept_cookie_enabled)( + struct _cef_cookie_manager_t* self, + int accept); + + /// + // Get whether this cookie manager can accpet and send cookies for file scheme + // URL. Returns false (0) if can't. + /// + int(CEF_CALLBACK* is_file_urlscheme_cookies_allowed)( + struct _cef_cookie_manager_t* self); + + /// + // Set whether this cookie manager can accpet and send cookies for file scheme + // URL. + /// + void(CEF_CALLBACK* put_accept_file_urlscheme_cookies_enabled)( + struct _cef_cookie_manager_t* self, + int allow); + /// // Visit all cookies on the UI thread. The returned cookies are ordered by // longest path, then by earliest creation date. Returns false (0) if cookies @@ -110,6 +139,7 @@ typedef struct _cef_cookie_manager_t { struct _cef_cookie_manager_t* self, const cef_string_t* url, const cef_string_t* cookie_name, + int is_session, struct _cef_delete_cookies_callback_t* callback); /// @@ -132,6 +162,15 @@ typedef struct _cef_cookie_manager_t { CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager( struct _cef_completion_callback_t* callback); +/// +// Convert string cookie to CefCookie. The function will return true (1) when +// excuted success, otherwise return false (0). +/// +CEF_EXPORT int cef_cookie_manager_create_cef_cookie( + const cef_string_t* url, + const cef_string_t* value, + struct _cef_cookie_t* cef_cookie); + /// // Structure to implement for visiting cookie values. The functions of this // structure will always be called on the UI thread. @@ -154,6 +193,14 @@ typedef struct _cef_cookie_visitor_t { int count, int total, int* deleteCookie); + + /// + // Method that will be called when all cookies have been visited, contenate + // them into one string line. The string cookie line will be passed into this + // function. + /// + void(CEF_CALLBACK* set_cookie_line)(struct _cef_cookie_visitor_t* self, + const cef_string_t* cookieLine); } cef_cookie_visitor_t; /// diff --git a/cef/include/capi/cef_crash_util_capi.h b/cef/include/capi/cef_crash_util_capi.h index 48ce101bbc..2a569bdb80 100644 --- a/cef/include/capi/cef_crash_util_capi.h +++ b/cef/include/capi/cef_crash_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=5e19231e3476eef376c2742e8d375bee7bd4ea2d$ +// $hash=0460e68eb7d1b1188706c42d14beafbf9a6f7126$ // #ifndef CEF_INCLUDE_CAPI_CEF_CRASH_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_devtools_message_observer_capi.h b/cef/include/capi/cef_devtools_message_observer_capi.h index 93fe069b2c..137f82136d 100644 --- a/cef/include/capi/cef_devtools_message_observer_capi.h +++ b/cef/include/capi/cef_devtools_message_observer_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=1a256c04042ebd4867f39e1c31def558871b2bab$ +// $hash=ec62239c2b24ff512b64ca758be825ff57fb3b6b$ // #ifndef CEF_INCLUDE_CAPI_CEF_DEVTOOLS_MESSAGE_OBSERVER_CAPI_H_ diff --git a/cef/include/capi/cef_dialog_handler_capi.h b/cef/include/capi/cef_dialog_handler_capi.h index c0dd985060..51563dbdc0 100644 --- a/cef/include/capi/cef_dialog_handler_capi.h +++ b/cef/include/capi/cef_dialog_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=5ae5556e4085faf8cf17ee757f5eeac9197f75c0$ +// $hash=0f56154217707d141912dc8a298279df8df04311$ // #ifndef CEF_INCLUDE_CAPI_CEF_DIALOG_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_display_handler_capi.h b/cef/include/capi/cef_display_handler_capi.h index 09d41dd7a7..5f5a0f34fc 100644 --- a/cef/include/capi/cef_display_handler_capi.h +++ b/cef/include/capi/cef_display_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=067fd169a30bec1ad8eeacc5ab1ac750cf59640e$ +// $hash=0c615f158ce150e61102f4b3493b50951a302231$ // #ifndef CEF_INCLUDE_CAPI_CEF_DISPLAY_HANDLER_CAPI_H_ @@ -80,6 +80,25 @@ typedef struct _cef_display_handler_t { struct _cef_browser_t* browser, cef_string_list_t icon_urls); + /// + // onReceivedTouchIconUrl. + /// + void(CEF_CALLBACK* on_received_touch_icon_url)( + struct _cef_display_handler_t* self, + struct _cef_browser_t* browser, + const cef_string_t* icon_url, + int precomposed); + + /// + // onReceivedIcon. + /// + void(CEF_CALLBACK* on_received_icon)(struct _cef_display_handler_t* self, + const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type); + /// // Called when web content in the page has toggled fullscreen mode. If // |fullscreen| is true (1) the content will automatically be sized to fill diff --git a/cef/include/capi/cef_dom_capi.h b/cef/include/capi/cef_dom_capi.h index b165078a3e..97300ec387 100644 --- a/cef/include/capi/cef_dom_capi.h +++ b/cef/include/capi/cef_dom_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=0517dc6c42fdde9fecfc4549fab1ea12b614e143$ +// $hash=c6de3fb4d64a2b2ad06a4b9c5e9d7625d40b5bb6$ // #ifndef CEF_INCLUDE_CAPI_CEF_DOM_CAPI_H_ diff --git a/cef/include/capi/cef_download_handler_capi.h b/cef/include/capi/cef_download_handler_capi.h index cfccc28376..29b0587103 100644 --- a/cef/include/capi/cef_download_handler_capi.h +++ b/cef/include/capi/cef_download_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f0ceb73b289072a01c45c6e7abf339a4ec924d29$ +// $hash=ec13ec3e2819e4ac49792c3a1c57bc60b45fb95b$ // #ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_download_item_capi.h b/cef/include/capi/cef_download_item_capi.h index 7b628a3504..2d52f11b42 100644 --- a/cef/include/capi/cef_download_item_capi.h +++ b/cef/include/capi/cef_download_item_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d84044bb582b029af5fa46c75f35b3da948dffd2$ +// $hash=b9f0d91dd2fdb3625365ff8b332b08e1f0ea1187$ // #ifndef CEF_INCLUDE_CAPI_CEF_DOWNLOAD_ITEM_CAPI_H_ diff --git a/cef/include/capi/cef_drag_data_capi.h b/cef/include/capi/cef_drag_data_capi.h index 97efa21a3e..7e133155d6 100644 --- a/cef/include/capi/cef_drag_data_capi.h +++ b/cef/include/capi/cef_drag_data_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=9663321e2be1d000ac54e195c81f210ae40773d1$ +// $hash=b6e3236a062cd25ec26c3daeb1940d1e1bf0d96a$ // #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_DATA_CAPI_H_ diff --git a/cef/include/capi/cef_drag_handler_capi.h b/cef/include/capi/cef_drag_handler_capi.h index 260fa4810b..68b26d7165 100644 --- a/cef/include/capi/cef_drag_handler_capi.h +++ b/cef/include/capi/cef_drag_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=1cc1f134e68406ae3b05f7e181e12f27262772f0$ +// $hash=5b2051c42c1d4c41b85ca823d34b26bfa5de6777$ // #ifndef CEF_INCLUDE_CAPI_CEF_DRAG_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_extension_capi.h b/cef/include/capi/cef_extension_capi.h index f51d570d66..24ba87d641 100644 --- a/cef/include/capi/cef_extension_capi.h +++ b/cef/include/capi/cef_extension_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=5d5251098be1477705de2a21502dec2d8338ce00$ +// $hash=fcfe34c1517ebdb3f00c1f737b91361e771b820d$ // #ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_CAPI_H_ diff --git a/cef/include/capi/cef_extension_handler_capi.h b/cef/include/capi/cef_extension_handler_capi.h index 023417c09c..73c4f3bca1 100644 --- a/cef/include/capi/cef_extension_handler_capi.h +++ b/cef/include/capi/cef_extension_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=c952241dabb9d99109ebb64acba0124e43150628$ +// $hash=768e2436e54cceb2675ddd03ebdc61b5c0785bdc$ // #ifndef CEF_INCLUDE_CAPI_CEF_EXTENSION_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_file_util_capi.h b/cef/include/capi/cef_file_util_capi.h index d706775605..234f4240f8 100644 --- a/cef/include/capi/cef_file_util_capi.h +++ b/cef/include/capi/cef_file_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=00d75d4f1968686cec7db84a59df89d98d8fe146$ +// $hash=e76fa23e9682bf0865319d93e4009752ac8f854f$ // #ifndef CEF_INCLUDE_CAPI_CEF_FILE_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_find_handler_capi.h b/cef/include/capi/cef_find_handler_capi.h index 3d42a13fdc..c2f3e08aaa 100644 --- a/cef/include/capi/cef_find_handler_capi.h +++ b/cef/include/capi/cef_find_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=03bb69a14868a95abf3bf7b1608dc351480e307f$ +// $hash=b1fe7f7db5ab92c6ae64dc1288b6fd47c80f9423$ // #ifndef CEF_INCLUDE_CAPI_CEF_FIND_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_focus_handler_capi.h b/cef/include/capi/cef_focus_handler_capi.h index 69fb5a45c6..1615986150 100644 --- a/cef/include/capi/cef_focus_handler_capi.h +++ b/cef/include/capi/cef_focus_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=0fccb41381e922e9d9545ae45ba3e6cf1916c4b0$ +// $hash=a136a2679c8af339b21a89e8ae3090a9dbb8daa7$ // #ifndef CEF_INCLUDE_CAPI_CEF_FOCUS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_frame_capi.h b/cef/include/capi/cef_frame_capi.h index 7a6f6046cd..4e619607f1 100644 --- a/cef/include/capi/cef_frame_capi.h +++ b/cef/include/capi/cef_frame_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=bce865a34f45e6dee8f413f0d6bd7f4c37ab55c0$ +// $hash=ae1cd10d052cdc0f603c9dbf9b99f46746a795ef$ // #ifndef CEF_INCLUDE_CAPI_CEF_FRAME_CAPI_H_ @@ -214,6 +214,18 @@ typedef struct _cef_frame_t { void(CEF_CALLBACK* visit_dom)(struct _cef_frame_t* self, struct _cef_domvisitor_t* visitor); + /// + // Loads the given URL with additional HTTP headers, specified as a map from + // name to value. Note that if this map contains any of the headers that are + // set by default by this WebView, such as those controlling caching, accept + // types or the User-Agent, their values may be overridden by this WebView's + // defaults. + /// + void(CEF_CALLBACK* load_header_url)( + struct _cef_frame_t* self, + const cef_string_t* url, + const cef_string_t* additionalHttpHeaders); + /// // Create a new URL request that will be treated as originating from this // frame and the associated browser. This request may be intercepted by the diff --git a/cef/include/capi/cef_image_capi.h b/cef/include/capi/cef_image_capi.h index 338e3151c7..99af056297 100644 --- a/cef/include/capi/cef_image_capi.h +++ b/cef/include/capi/cef_image_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d9da8862142742e780086714bbd4fb44ac95cf2c$ +// $hash=b5a36ef39ff250c9d3cb1e9a8c7ee38d7e0f8b3f$ // #ifndef CEF_INCLUDE_CAPI_CEF_IMAGE_CAPI_H_ diff --git a/cef/include/capi/cef_jsdialog_handler_capi.h b/cef/include/capi/cef_jsdialog_handler_capi.h index 9ebc436ea1..c0ab4497ed 100644 --- a/cef/include/capi/cef_jsdialog_handler_capi.h +++ b/cef/include/capi/cef_jsdialog_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d991e2a7d1a58a013e4d3a963361fed6918f4ec3$ +// $hash=c68332a779bab425aa2e6a858d20a43448631890$ // #ifndef CEF_INCLUDE_CAPI_CEF_JSDIALOG_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_keyboard_handler_capi.h b/cef/include/capi/cef_keyboard_handler_capi.h index e88ab7272b..3d6c50fc38 100644 --- a/cef/include/capi/cef_keyboard_handler_capi.h +++ b/cef/include/capi/cef_keyboard_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d804a2db0f9ac13afd249407c85cb8d5852508ac$ +// $hash=140d3a3ce78f5e8ab50a24a2fd6377e7a8ea3256$ // #ifndef CEF_INCLUDE_CAPI_CEF_KEYBOARD_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_life_span_handler_capi.h b/cef/include/capi/cef_life_span_handler_capi.h index b06a3445b2..a5be3bbe54 100644 --- a/cef/include/capi/cef_life_span_handler_capi.h +++ b/cef/include/capi/cef_life_span_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d7521ac4f73dabd876344400a165d15954c770b0$ +// $hash=a27d95f5d86c5d4ab8a0ced5f05f43923df8b84d$ // #ifndef CEF_INCLUDE_CAPI_CEF_LIFE_SPAN_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_load_handler_capi.h b/cef/include/capi/cef_load_handler_capi.h index 4352a822a8..13871a2b69 100644 --- a/cef/include/capi/cef_load_handler_capi.h +++ b/cef/include/capi/cef_load_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=6c6a719d7cbbc01adfdc9bbe0dff6da10e06e3f3$ +// $hash=4e59a8c7cda2f13ee54599773755637ec846fe84$ // #ifndef CEF_INCLUDE_CAPI_CEF_LOAD_HANDLER_CAPI_H_ @@ -43,6 +43,7 @@ #include "include/capi/cef_base_capi.h" #include "include/capi/cef_browser_capi.h" #include "include/capi/cef_frame_capi.h" +#include "include/capi/cef_response_capi.h" #ifdef __cplusplus extern "C" { @@ -117,6 +118,26 @@ typedef struct _cef_load_handler_t { cef_errorcode_t errorCode, const cef_string_t* errorText, const cef_string_t* failedUrl); + + /// + // OnLoadErrorWithRequest + /// + void(CEF_CALLBACK* on_load_error_with_request)( + struct _cef_load_handler_t* self, + struct _cef_request_t* request, + int is_main_frame, + int has_user_gesture, + int error_code, + const cef_string_t* error_text); + + /// + // OnHttpError + /// + void(CEF_CALLBACK* on_http_error)(struct _cef_load_handler_t* self, + struct _cef_request_t* request, + int is_main_frame, + int has_user_gesture, + struct _cef_response_t* response); } cef_load_handler_t; #ifdef __cplusplus diff --git a/cef/include/capi/cef_media_router_capi.h b/cef/include/capi/cef_media_router_capi.h index 6d7b4f20a1..e370e52040 100644 --- a/cef/include/capi/cef_media_router_capi.h +++ b/cef/include/capi/cef_media_router_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=79e4e38c732c0cfeef495c8a9726e105054012bb$ +// $hash=3db7459a1940c37898699cc97f69ba9249a6f1fd$ // #ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ diff --git a/cef/include/capi/cef_menu_model_capi.h b/cef/include/capi/cef_menu_model_capi.h index be2a547119..a1f7920ce9 100644 --- a/cef/include/capi/cef_menu_model_capi.h +++ b/cef/include/capi/cef_menu_model_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=28fa978051bd3ddff69d58e0dc8f445f64a61480$ +// $hash=9f30f2caa9eedc0d4fe963dbf0127602ffcbec61$ // #ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_CAPI_H_ diff --git a/cef/include/capi/cef_menu_model_delegate_capi.h b/cef/include/capi/cef_menu_model_delegate_capi.h index 95a437aeba..bd4628568f 100644 --- a/cef/include/capi/cef_menu_model_delegate_capi.h +++ b/cef/include/capi/cef_menu_model_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=edc411cb0447a6c2965cdeb5f709fe56c43ec2bb$ +// $hash=bdb670bcaa9eb9f5748900ad25bcc061155d6076$ // #ifndef CEF_INCLUDE_CAPI_CEF_MENU_MODEL_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/cef_navigation_entry_capi.h b/cef/include/capi/cef_navigation_entry_capi.h index 1e257e58bb..4d4e07f10d 100644 --- a/cef/include/capi/cef_navigation_entry_capi.h +++ b/cef/include/capi/cef_navigation_entry_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f14afbd6941bcb37b14cce81569882512c3d7194$ +// $hash=3a7dd4a6a1b5e0d9191be6c4dd2f0135f43de643$ // #ifndef CEF_INCLUDE_CAPI_CEF_NAVIGATION_ENTRY_CAPI_H_ diff --git a/cef/include/capi/cef_origin_whitelist_capi.h b/cef/include/capi/cef_origin_whitelist_capi.h index fb7f45fb61..563bbdd2cd 100644 --- a/cef/include/capi/cef_origin_whitelist_capi.h +++ b/cef/include/capi/cef_origin_whitelist_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=6798e6147540596c1abac8c7457d9d1d4d99bd54$ +// $hash=0939a44345bea8df7ca5f1dbd6afbe41972121f2$ // #ifndef CEF_INCLUDE_CAPI_CEF_ORIGIN_WHITELIST_CAPI_H_ diff --git a/cef/include/capi/cef_parser_capi.h b/cef/include/capi/cef_parser_capi.h index eef3a0583c..d3ec0ee5d4 100644 --- a/cef/include/capi/cef_parser_capi.h +++ b/cef/include/capi/cef_parser_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=84149324b177c47287b935dcb3d5900a33acfdf5$ +// $hash=f5e1c0fc43c6e85dbafa66975d9dc5e2bc7be69f$ // #ifndef CEF_INCLUDE_CAPI_CEF_PARSER_CAPI_H_ diff --git a/cef/include/capi/cef_path_util_capi.h b/cef/include/capi/cef_path_util_capi.h index e70ff9f228..3cbb3ba4b0 100644 --- a/cef/include/capi/cef_path_util_capi.h +++ b/cef/include/capi/cef_path_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=0ae1fe7f7141eb05eb7fd44c2d41e4c576afae1e$ +// $hash=41ddd04d4efb147b05eb93816af1591ec3b61b76$ // #ifndef CEF_INCLUDE_CAPI_CEF_PATH_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_permission_request_capi.h b/cef/include/capi/cef_permission_request_capi.h new file mode 100644 index 0000000000..2be5e9ec8c --- /dev/null +++ b/cef/include/capi/cef_permission_request_capi.h @@ -0,0 +1,227 @@ +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool and should not edited +// by hand. See the translator.README.txt file in the tools directory for +// more information. +// +// $hash=e930f6445aaeb80ff2f6b1a3077d7d0d4bbd7109$ +// + +#ifndef CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ +#define CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ +#pragma once + +#include "include/capi/cef_base_capi.h" +#include "include/internal/cef_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/// +// Structure used to report permission request for the specified origin. +/// +typedef struct _cef_access_request_t { + /// + // Base structure. + /// + cef_base_ref_counted_t base; + + /// + // Get the origin that is trying to acess the resource. + /// + // The resulting string must be freed by calling cef_string_userfree_free(). + cef_string_userfree_t(CEF_CALLBACK* origin)( + struct _cef_access_request_t* self); + + /// + // Get the resource that the origin is trying to acess. + /// + int(CEF_CALLBACK* resource_acess_id)(struct _cef_access_request_t* self); + + /// + // Report whether the origin is allowed to acess the resource. + /// + void(CEF_CALLBACK* report_request_result)(struct _cef_access_request_t* self, + int allowed); +} cef_access_request_t; + +/// +// Implement this structure to handle permission requests. +/// +typedef struct _cef_permission_request_t { + /// + // Base structure. + /// + cef_base_ref_counted_t base; + + /// + // Notify the host application that web content from the specified origin is + // attempting to use the Geolocation API, but no permission state is currently + // set for that origin. The host application should invoke the specified + // callback with the desired permission state. + /// + void(CEF_CALLBACK* on_geolocation_show)( + struct _cef_permission_request_t* self, + const cef_string_t* origin); + + /// + // Revert the operation in the OnGeolocationShow. + /// + void(CEF_CALLBACK* on_geolocation_hide)( + struct _cef_permission_request_t* self); + + /// + // Notify the host application that web content from the specified origin is + // attempting to access the resources, but no permission state is currently + // set for that origin. The host application should invoke the specified + // callback with the desired permission state. + /// + void(CEF_CALLBACK* on_permission_request)( + struct _cef_permission_request_t* self, + struct _cef_access_request_t* request); + + /// + // Revert the operation in the OnPermissionRequest. + /// + void(CEF_CALLBACK* on_permission_request_canceled)( + struct _cef_permission_request_t* self, + struct _cef_access_request_t* request); +} cef_permission_request_t; + +/// +// Structure used to handle the permission requests from |BrowserContext|. +/// +typedef struct _cef_browser_permission_request_delegate_t { + /// + // Base structure. + /// + cef_base_ref_counted_t base; + + /// + // Handle the Geolocation permission requests. + /// + void(CEF_CALLBACK* ask_geolocation_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback); + + /// + // Cancel the Geolocation permission requests. + /// + void(CEF_CALLBACK* abort_ask_geolocation_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin); + + /// + // Handle the Protected Media Identifier permission requests. + /// + void(CEF_CALLBACK* ask_protected_media_identifier_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback); + + /// + // Cancel the Protected Media Identifier permission requests. + /// + void(CEF_CALLBACK* abort_ask_protected_media_identifier_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin); + + /// + // Handle the MIDI Sysex permission requests. + /// + void(CEF_CALLBACK* ask_midisysex_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback); + + /// + // Cancel the MIDI Sysex permission requests. + /// + void(CEF_CALLBACK* abort_ask_midisysex_permission)( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin); + + /// + // The callback for the Geolocation permission requests. + /// + void(CEF_CALLBACK* notify_geolocation_permission)( + struct _cef_browser_permission_request_delegate_t* self, + int value, + const cef_string_t* origin); +} cef_browser_permission_request_delegate_t; + +/// +// Structure used to set the geolocation permission state for the specified +// origin. +/// +typedef struct _cef_geolocation_acess_t { + /// + // Base structure. + /// + cef_base_ref_counted_t base; + + /// + // Return true (1) if the geolocation permission state is set for the + // specified origin. + /// + int(CEF_CALLBACK* contain_origin)(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin); + + /// + // Return true (1) if the geolocation permission state set for the specified + // origin is true (1). + /// + int(CEF_CALLBACK* is_origin_access_enabled)( + struct _cef_geolocation_acess_t* self, + const cef_string_t* origin); + + /// + // Set the geolocation permission state to true (1) for the specified origin. + /// + void(CEF_CALLBACK* enabled)(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin); + + /// + // Set the geolocation permission state to false (0) for the specified + // origin. + /// + void(CEF_CALLBACK* disabled)(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin); +} cef_geolocation_acess_t; + +#ifdef __cplusplus +} +#endif + +#endif // CEF_INCLUDE_CAPI_CEF_PERMISSION_REQUEST_CAPI_H_ diff --git a/cef/include/capi/cef_print_handler_capi.h b/cef/include/capi/cef_print_handler_capi.h index a3d7d3cf91..df321dea17 100644 --- a/cef/include/capi/cef_print_handler_capi.h +++ b/cef/include/capi/cef_print_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=84fc58b3898f25476d9cdd260553390ba5e0b30b$ +// $hash=e26be3efc18d8c79d019c02b1d73a7ec2866b142$ // #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_print_settings_capi.h b/cef/include/capi/cef_print_settings_capi.h index 4019599462..e611abfd47 100644 --- a/cef/include/capi/cef_print_settings_capi.h +++ b/cef/include/capi/cef_print_settings_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=4b52323c4ce2d0ebcc3438e16fc9a9b181a58adc$ +// $hash=fdbd26f9dd20dbd7813fc17a8c34650b2da19581$ // #ifndef CEF_INCLUDE_CAPI_CEF_PRINT_SETTINGS_CAPI_H_ diff --git a/cef/include/capi/cef_process_message_capi.h b/cef/include/capi/cef_process_message_capi.h index 5cee0e8108..b87770ba48 100644 --- a/cef/include/capi/cef_process_message_capi.h +++ b/cef/include/capi/cef_process_message_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=53ff22b73527aa331d2bd96e008f4cb4f0413042$ +// $hash=2549ea10cd3a41bc04ab81bad24eb12787de68b9$ // #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_MESSAGE_CAPI_H_ diff --git a/cef/include/capi/cef_process_util_capi.h b/cef/include/capi/cef_process_util_capi.h index e968af1ad2..f22dd7e8ab 100644 --- a/cef/include/capi/cef_process_util_capi.h +++ b/cef/include/capi/cef_process_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=c476a8d22852994d9d9695db901efaef13bbfc9d$ +// $hash=1f2b752c4e314b240ce95cb3b87863c2f99534a8$ // #ifndef CEF_INCLUDE_CAPI_CEF_PROCESS_UTIL_CAPI_H_ diff --git a/cef/include/capi/cef_registration_capi.h b/cef/include/capi/cef_registration_capi.h index 2ad93caf5c..3285569eb8 100644 --- a/cef/include/capi/cef_registration_capi.h +++ b/cef/include/capi/cef_registration_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=8cde223bdb8d25ff163edd95da0d9e238b298016$ +// $hash=d5efa37953d0f0097fef20bc18f4938621c6b168$ // #ifndef CEF_INCLUDE_CAPI_CEF_REGISTRATION_CAPI_H_ diff --git a/cef/include/capi/cef_render_handler_capi.h b/cef/include/capi/cef_render_handler_capi.h index 0dd8716557..a57a968602 100644 --- a/cef/include/capi/cef_render_handler_capi.h +++ b/cef/include/capi/cef_render_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=e4bdab963041a270edabc0954b415eb4cae8e5cb$ +// $hash=da1762d0fa16d2e4c2b7281bcaeb6181e00eb1af$ // #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ @@ -198,6 +198,14 @@ typedef struct _cef_render_handler_t { double x, double y); + /// + // Called when the RootLayer has changed. + /// + void(CEF_CALLBACK* on_root_layer_changed)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, + int height, + int width); + /// // Called when the IME composition range has changed. |selected_range| is the // range of characters that have been selected. |character_bounds| is the diff --git a/cef/include/capi/cef_render_process_handler_capi.h b/cef/include/capi/cef_render_process_handler_capi.h index 5359e9df79..c949cf11b4 100644 --- a/cef/include/capi/cef_render_process_handler_capi.h +++ b/cef/include/capi/cef_render_process_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=41339414bca54054046a8f7fbce402a0e0dd8020$ +// $hash=c1b07725cbf7cd1fb4ef207a17fda98b8e9e750f$ // #ifndef CEF_INCLUDE_CAPI_CEF_RENDER_PROCESS_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_request_callback_capi.h b/cef/include/capi/cef_request_callback_capi.h index 112d3a4f56..3799fb2d0d 100644 --- a/cef/include/capi/cef_request_callback_capi.h +++ b/cef/include/capi/cef_request_callback_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=273af5bd01c6ab5d4df8efb2af2b4e2da9c21760$ +// $hash=830a1e8ef0e0910fde07c4f4c4fb7df7f8d74a66$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CALLBACK_CAPI_H_ diff --git a/cef/include/capi/cef_request_capi.h b/cef/include/capi/cef_request_capi.h index a0f835baec..3ddd18fef5 100644 --- a/cef/include/capi/cef_request_capi.h +++ b/cef/include/capi/cef_request_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a5e9055958c3588d583d4d128a5d7c8639f39946$ +// $hash=47b361878452f2a94e559782913d80beb0dba25a$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CAPI_H_ diff --git a/cef/include/capi/cef_request_context_capi.h b/cef/include/capi/cef_request_context_capi.h index 9871a214d8..3dc3ab3a3f 100644 --- a/cef/include/capi/cef_request_context_capi.h +++ b/cef/include/capi/cef_request_context_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=2e42334fc22050e207e5a0af6fe290a592e4105f$ +// $hash=9faa2d004412793c0b4d9f9a487197bb02dc6da8$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ diff --git a/cef/include/capi/cef_request_context_handler_capi.h b/cef/include/capi/cef_request_context_handler_capi.h index c14f672869..5428253026 100644 --- a/cef/include/capi/cef_request_context_handler_capi.h +++ b/cef/include/capi/cef_request_context_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=fa148db8a0ecd79966814086fb92e439687be701$ +// $hash=f5082ce09256e084167c6fe3e6cf2a46fe7262ff$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_request_handler_capi.h b/cef/include/capi/cef_request_handler_capi.h index 596c4b7c1e..bf623801b2 100644 --- a/cef/include/capi/cef_request_handler_capi.h +++ b/cef/include/capi/cef_request_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=1d8b3f540a8305ce1738c5fe7c716434062c67b0$ +// $hash=f71942c55763a057642cb4b23a212d9c858db6a0$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_resource_bundle_capi.h b/cef/include/capi/cef_resource_bundle_capi.h index 8f6351b126..9e83df4059 100644 --- a/cef/include/capi/cef_resource_bundle_capi.h +++ b/cef/include/capi/cef_resource_bundle_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=ffe0de3b50e0a612bd1b055b873c265b030e721d$ +// $hash=a9e35ca17785f77666db7650208cacfd9a85c3e0$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_CAPI_H_ diff --git a/cef/include/capi/cef_resource_bundle_handler_capi.h b/cef/include/capi/cef_resource_bundle_handler_capi.h index 4f87d716ef..a72d6dffd3 100644 --- a/cef/include/capi/cef_resource_bundle_handler_capi.h +++ b/cef/include/capi/cef_resource_bundle_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=b9723e0dfe6d03c24665eac2264396743a5254df$ +// $hash=3d7b3d4702c8d35dc8780f9e87eb7560d6ce1dee$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_BUNDLE_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_resource_handler_capi.h b/cef/include/capi/cef_resource_handler_capi.h index 9dc7b0bde2..4c581cb71f 100644 --- a/cef/include/capi/cef_resource_handler_capi.h +++ b/cef/include/capi/cef_resource_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a9598f4e94a864e749b425aa62bc519589f5753e$ +// $hash=67df3d56f0cc0f58d2b0a2fe884bbb2c1c39813f$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_resource_request_handler_capi.h b/cef/include/capi/cef_resource_request_handler_capi.h index 3f436a2b7e..66e605cd14 100644 --- a/cef/include/capi/cef_resource_request_handler_capi.h +++ b/cef/include/capi/cef_resource_request_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=aec52d0efc8407495fe1fc4821616673da7ed17a$ +// $hash=17f1853125ab8cc00765275d8bf1d3bc63433e05$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESOURCE_REQUEST_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_response_capi.h b/cef/include/capi/cef_response_capi.h index 640ed91c7a..d4973e6cda 100644 --- a/cef/include/capi/cef_response_capi.h +++ b/cef/include/capi/cef_response_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=8202bbf8e7f7ae474182c483f0f599b13f6914eb$ +// $hash=6ebf7adcdaee57772810c1528b27140ae95966d0$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_CAPI_H_ diff --git a/cef/include/capi/cef_response_filter_capi.h b/cef/include/capi/cef_response_filter_capi.h index c5943fb8be..2267054ca8 100644 --- a/cef/include/capi/cef_response_filter_capi.h +++ b/cef/include/capi/cef_response_filter_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=cdadf516dc77455c5a3d6633bfb12e1cb276b9bb$ +// $hash=fb06b9630b95fedb5d202aab7814d914ab7c943b$ // #ifndef CEF_INCLUDE_CAPI_CEF_RESPONSE_FILTER_CAPI_H_ diff --git a/cef/include/capi/cef_scheme_capi.h b/cef/include/capi/cef_scheme_capi.h index 84fb28dc94..444506c93f 100644 --- a/cef/include/capi/cef_scheme_capi.h +++ b/cef/include/capi/cef_scheme_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=9384e0b2bc27ccbdd7ebb1a86f213c28fd2784a1$ +// $hash=df8c46dd19ef6a3964c49d79e770de6e4245e208$ // #ifndef CEF_INCLUDE_CAPI_CEF_SCHEME_CAPI_H_ diff --git a/cef/include/capi/cef_server_capi.h b/cef/include/capi/cef_server_capi.h index d18d846068..a3aa6a64d9 100644 --- a/cef/include/capi/cef_server_capi.h +++ b/cef/include/capi/cef_server_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=37b3332057dbcf705b61a51cf14640d171d18a74$ +// $hash=72c2b4f976016cea50e54a386c09a786973c01a3$ // #ifndef CEF_INCLUDE_CAPI_CEF_SERVER_CAPI_H_ diff --git a/cef/include/capi/cef_ssl_info_capi.h b/cef/include/capi/cef_ssl_info_capi.h index 1c03e1f516..b122a75862 100644 --- a/cef/include/capi/cef_ssl_info_capi.h +++ b/cef/include/capi/cef_ssl_info_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=aefb3b63aba8f5df6ab6dc11e2029820c75c36cf$ +// $hash=d72f3b34b4150f29f1491b2c729f4a8afc4a33f4$ // #ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_ diff --git a/cef/include/capi/cef_ssl_status_capi.h b/cef/include/capi/cef_ssl_status_capi.h index c2a0ecdebe..49268b3f24 100644 --- a/cef/include/capi/cef_ssl_status_capi.h +++ b/cef/include/capi/cef_ssl_status_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=93eb2bc0f51da08a41fb906436654b3452b74fb3$ +// $hash=1bc8a73a196fbbb6cec3dd1738b817575b17706d$ // #ifndef CEF_INCLUDE_CAPI_CEF_SSL_STATUS_CAPI_H_ diff --git a/cef/include/capi/cef_stream_capi.h b/cef/include/capi/cef_stream_capi.h index e0db46afeb..3197a5b1f5 100644 --- a/cef/include/capi/cef_stream_capi.h +++ b/cef/include/capi/cef_stream_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=61ff7a4ebc917482bad5daba7089b92cc62bada8$ +// $hash=87f6cad177614ece33d9574f0f2964e5bb97d613$ // #ifndef CEF_INCLUDE_CAPI_CEF_STREAM_CAPI_H_ diff --git a/cef/include/capi/cef_string_visitor_capi.h b/cef/include/capi/cef_string_visitor_capi.h index 8798cf4f75..4acd1b472a 100644 --- a/cef/include/capi/cef_string_visitor_capi.h +++ b/cef/include/capi/cef_string_visitor_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=30d4a63d53bce310ad641cbe5096ae126a664076$ +// $hash=398537ec88bfe902c49908db4a549da297594b70$ // #ifndef CEF_INCLUDE_CAPI_CEF_STRING_VISITOR_CAPI_H_ diff --git a/cef/include/capi/cef_task_capi.h b/cef/include/capi/cef_task_capi.h index 9087af3ceb..5f6281e1b9 100644 --- a/cef/include/capi/cef_task_capi.h +++ b/cef/include/capi/cef_task_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a8b2162b7c3b7cede392e8531c46a1277e990689$ +// $hash=e943dd2af818e5a5f19f6cbd1648896684c666c6$ // #ifndef CEF_INCLUDE_CAPI_CEF_TASK_CAPI_H_ diff --git a/cef/include/capi/cef_thread_capi.h b/cef/include/capi/cef_thread_capi.h index 09dc421a05..4b99983d5b 100644 --- a/cef/include/capi/cef_thread_capi.h +++ b/cef/include/capi/cef_thread_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=9a471c97e43ad3d1d042ba3dc6d887f2f4b0d851$ +// $hash=d99ffc2270c1cf8b0f06dd08c1b6e9b27cee4bc8$ // #ifndef CEF_INCLUDE_CAPI_CEF_THREAD_CAPI_H_ diff --git a/cef/include/capi/cef_trace_capi.h b/cef/include/capi/cef_trace_capi.h index 28304312a9..df39462f05 100644 --- a/cef/include/capi/cef_trace_capi.h +++ b/cef/include/capi/cef_trace_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=99779f8a728d2e1a0b87d6d6b89bd28e5da16d4c$ +// $hash=a7b4410e0a35eb0aba747014665419fb6b6fcb67$ // #ifndef CEF_INCLUDE_CAPI_CEF_TRACE_CAPI_H_ diff --git a/cef/include/capi/cef_urlrequest_capi.h b/cef/include/capi/cef_urlrequest_capi.h index 3b3e8281cf..75a834c811 100644 --- a/cef/include/capi/cef_urlrequest_capi.h +++ b/cef/include/capi/cef_urlrequest_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=11c227079ec0687adeaa8a085aeec37c89346ee7$ +// $hash=a14d77cd7756797afb4db3d28a2359da53011bfa$ // #ifndef CEF_INCLUDE_CAPI_CEF_URLREQUEST_CAPI_H_ diff --git a/cef/include/capi/cef_v8_capi.h b/cef/include/capi/cef_v8_capi.h index c11f9d36ad..824c3dbb48 100644 --- a/cef/include/capi/cef_v8_capi.h +++ b/cef/include/capi/cef_v8_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=23dc3ab761547687a491e5d7303b73b2d0d54e7a$ +// $hash=2bdcad7f8e3c03285a5e5ddb9a02a5a2182f254c$ // #ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ diff --git a/cef/include/capi/cef_values_capi.h b/cef/include/capi/cef_values_capi.h index d6001b4c5e..90df63d6ce 100644 --- a/cef/include/capi/cef_values_capi.h +++ b/cef/include/capi/cef_values_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d9074be0e6960c69cfe2c39b92b4dd6f529210d1$ +// $hash=c557496bdc1403b25b22ca9354a942478131c7ce$ // #ifndef CEF_INCLUDE_CAPI_CEF_VALUES_CAPI_H_ diff --git a/cef/include/capi/cef_waitable_event_capi.h b/cef/include/capi/cef_waitable_event_capi.h index 83ce7c7d90..aa507e1083 100644 --- a/cef/include/capi/cef_waitable_event_capi.h +++ b/cef/include/capi/cef_waitable_event_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=ed698ff6cb09ee2ed87614e2733c742db827ed4f$ +// $hash=aff380a4fa3f1a26063170381d47c67971511f1d$ // #ifndef CEF_INCLUDE_CAPI_CEF_WAITABLE_EVENT_CAPI_H_ diff --git a/cef/include/capi/cef_web_plugin_capi.h b/cef/include/capi/cef_web_plugin_capi.h index 77597e9546..33a788b865 100644 --- a/cef/include/capi/cef_web_plugin_capi.h +++ b/cef/include/capi/cef_web_plugin_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f74bf4d33914d56d760f1bf5aadcf2651740c711$ +// $hash=34fce84ddc16f815ddf44745f93dfd86cfd51e96$ // #ifndef CEF_INCLUDE_CAPI_CEF_WEB_PLUGIN_CAPI_H_ diff --git a/cef/include/capi/cef_x509_certificate_capi.h b/cef/include/capi/cef_x509_certificate_capi.h index c474718b86..8650b4055d 100644 --- a/cef/include/capi/cef_x509_certificate_capi.h +++ b/cef/include/capi/cef_x509_certificate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=e06ad8a1e173edd1e888ce6a8f8a9d95394e6a44$ +// $hash=32b942f6b50b842ddec08addc2b5794f2a272dbe$ // #ifndef CEF_INCLUDE_CAPI_CEF_X509_CERTIFICATE_CAPI_H_ diff --git a/cef/include/capi/cef_xml_reader_capi.h b/cef/include/capi/cef_xml_reader_capi.h index 74be5dbaf2..75f32a4d1d 100644 --- a/cef/include/capi/cef_xml_reader_capi.h +++ b/cef/include/capi/cef_xml_reader_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=76de25a0d0f0a2cc4657f46c26ec44b6d7d937e8$ +// $hash=c3bdf957dfd307568842b95599e3259d4c8d8f44$ // #ifndef CEF_INCLUDE_CAPI_CEF_XML_READER_CAPI_H_ diff --git a/cef/include/capi/cef_zip_reader_capi.h b/cef/include/capi/cef_zip_reader_capi.h index aa9a79a6a6..5d89935336 100644 --- a/cef/include/capi/cef_zip_reader_capi.h +++ b/cef/include/capi/cef_zip_reader_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d3d4ee91a69edd5f12785871b5c5a55e86c5c675$ +// $hash=ac91bcd40e1439ee1e742cc47989530b112c99bd$ // #ifndef CEF_INCLUDE_CAPI_CEF_ZIP_READER_CAPI_H_ diff --git a/cef/include/capi/test/cef_test_helpers_capi.h b/cef/include/capi/test/cef_test_helpers_capi.h index 8d89c05348..128ab4c649 100644 --- a/cef/include/capi/test/cef_test_helpers_capi.h +++ b/cef/include/capi/test/cef_test_helpers_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f9db602ed3bcb4b8ceb583034db9d0297b2961fd$ +// $hash=584acfdb7be699b0192c46ac9fa88084f141e845$ // #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TEST_HELPERS_CAPI_H_ diff --git a/cef/include/capi/test/cef_translator_test_capi.h b/cef/include/capi/test/cef_translator_test_capi.h index 8f68eb461f..48811c5e88 100644 --- a/cef/include/capi/test/cef_translator_test_capi.h +++ b/cef/include/capi/test/cef_translator_test_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a20dfae14509f99270e5ce1422790681aee2d5f2$ +// $hash=d70d5b74890e3ca91f01333ebdb4f3298caeb619$ // #ifndef CEF_INCLUDE_CAPI_TEST_CEF_TRANSLATOR_TEST_CAPI_H_ diff --git a/cef/include/capi/views/cef_box_layout_capi.h b/cef/include/capi/views/cef_box_layout_capi.h index 06d83bade9..6499ec22fd 100644 --- a/cef/include/capi/views/cef_box_layout_capi.h +++ b/cef/include/capi/views/cef_box_layout_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=069553694811acdd7a7871c895d73fc4f3e2798a$ +// $hash=bf1d1dc95fa2053645a348d6f554688b9d06c83a$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BOX_LAYOUT_CAPI_H_ diff --git a/cef/include/capi/views/cef_browser_view_capi.h b/cef/include/capi/views/cef_browser_view_capi.h index 30fd5db049..ab629c8a61 100644 --- a/cef/include/capi/views/cef_browser_view_capi.h +++ b/cef/include/capi/views/cef_browser_view_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=3e4eb9ed3a0cb28ae0459a50f20c8405c7722437$ +// $hash=9ae10b92eed7495112c94825521ac46fb9327ef7$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_CAPI_H_ diff --git a/cef/include/capi/views/cef_browser_view_delegate_capi.h b/cef/include/capi/views/cef_browser_view_delegate_capi.h index 9852c37bd9..27ae4c1c4e 100644 --- a/cef/include/capi/views/cef_browser_view_delegate_capi.h +++ b/cef/include/capi/views/cef_browser_view_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=220a126af3682f716f10b9019e8d1461702aa7c9$ +// $hash=520df1f3e00efbffc9d499149f2f797bf0f85c99$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BROWSER_VIEW_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_button_capi.h b/cef/include/capi/views/cef_button_capi.h index 92069a75fd..40e71ec963 100644 --- a/cef/include/capi/views/cef_button_capi.h +++ b/cef/include/capi/views/cef_button_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=eb8e4197f2dba4829b1ed54957e1d5043fb8adaa$ +// $hash=5ebbf84a506d3d4d0bfb3d8db48f060a682f1ac9$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_CAPI_H_ diff --git a/cef/include/capi/views/cef_button_delegate_capi.h b/cef/include/capi/views/cef_button_delegate_capi.h index af84d045e2..d853dbf97e 100644 --- a/cef/include/capi/views/cef_button_delegate_capi.h +++ b/cef/include/capi/views/cef_button_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=f4c4a72bf4db6abaf709f5ce4fb648c2532c85bc$ +// $hash=9f1752ee949e98662a718de764e83f26ce06ec26$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_BUTTON_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_display_capi.h b/cef/include/capi/views/cef_display_capi.h index 6140b8816e..40c304b44f 100644 --- a/cef/include/capi/views/cef_display_capi.h +++ b/cef/include/capi/views/cef_display_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=1f9c61687a16a5c095c73afd47c1c0a27096ab3c$ +// $hash=2fd0db428ce5902d59a7802c901e1c13b2367b5a$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_DISPLAY_CAPI_H_ diff --git a/cef/include/capi/views/cef_fill_layout_capi.h b/cef/include/capi/views/cef_fill_layout_capi.h index b76bd9d7ad..a8778a96d6 100644 --- a/cef/include/capi/views/cef_fill_layout_capi.h +++ b/cef/include/capi/views/cef_fill_layout_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=967f99321db8d0a900e33f3032b3ba1a6bd6bc9c$ +// $hash=13972453cdca328c6ee81249aeb202d80da6d290$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_FILL_LAYOUT_CAPI_H_ diff --git a/cef/include/capi/views/cef_label_button_capi.h b/cef/include/capi/views/cef_label_button_capi.h index a9f6dc7684..47ff1de60f 100644 --- a/cef/include/capi/views/cef_label_button_capi.h +++ b/cef/include/capi/views/cef_label_button_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=ae11ffbfed64dc255909f01a7abccbf6acfb5922$ +// $hash=de3e738efca85a84422c92fa8504b24ed4efab8a$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_ diff --git a/cef/include/capi/views/cef_layout_capi.h b/cef/include/capi/views/cef_layout_capi.h index 4cc2f7a4cc..8047df752a 100644 --- a/cef/include/capi/views/cef_layout_capi.h +++ b/cef/include/capi/views/cef_layout_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=6a10260132a69996885e20fe54f552fca6f0862b$ +// $hash=6ef0d3d4390654fc1460a2ff586f2bbfd62e96b8$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LAYOUT_CAPI_H_ diff --git a/cef/include/capi/views/cef_menu_button_capi.h b/cef/include/capi/views/cef_menu_button_capi.h index c9265787bd..50aaca9d60 100644 --- a/cef/include/capi/views/cef_menu_button_capi.h +++ b/cef/include/capi/views/cef_menu_button_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=56ea894f85a5ec444d7899d8ccb548e34b4ba891$ +// $hash=925b09f77cd71327a447bf5c9601cc21a7eb7c3a$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_ diff --git a/cef/include/capi/views/cef_menu_button_delegate_capi.h b/cef/include/capi/views/cef_menu_button_delegate_capi.h index e0c1ae39a9..c5f22aabac 100644 --- a/cef/include/capi/views/cef_menu_button_delegate_capi.h +++ b/cef/include/capi/views/cef_menu_button_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=d04871b1f67c5074874d68a50e14e9746d1f175d$ +// $hash=ca7948602a0d20a5bd0271065d79e8679898eff6$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_panel_capi.h b/cef/include/capi/views/cef_panel_capi.h index 64566d6ff9..276c6206d4 100644 --- a/cef/include/capi/views/cef_panel_capi.h +++ b/cef/include/capi/views/cef_panel_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=9a56cb55b4454c640ec9edf0af58fbdf7142c129$ +// $hash=d5311ffa72e57d240f6963b1f45a278041bd33f4$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_CAPI_H_ diff --git a/cef/include/capi/views/cef_panel_delegate_capi.h b/cef/include/capi/views/cef_panel_delegate_capi.h index 9ad7a49df5..bef0a26510 100644 --- a/cef/include/capi/views/cef_panel_delegate_capi.h +++ b/cef/include/capi/views/cef_panel_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=954694f6f807cdbff3d5b0533cedae118019b469$ +// $hash=3b6b3ef725189debb1dd43db395a111f50dee60c$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_PANEL_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_scroll_view_capi.h b/cef/include/capi/views/cef_scroll_view_capi.h index 9a697c322e..2c93f45c3a 100644 --- a/cef/include/capi/views/cef_scroll_view_capi.h +++ b/cef/include/capi/views/cef_scroll_view_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=74c1ec16b0fd36657bc6227e19ff529a9e9e7afa$ +// $hash=374b16fddbbb8bedc2dbb2e03dcfaa8cddba6aeb$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_SCROLL_VIEW_CAPI_H_ diff --git a/cef/include/capi/views/cef_textfield_capi.h b/cef/include/capi/views/cef_textfield_capi.h index deb179e3ed..fbb97eea93 100644 --- a/cef/include/capi/views/cef_textfield_capi.h +++ b/cef/include/capi/views/cef_textfield_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=ffe125c11cab3b704f22e232837f36414b1a36a6$ +// $hash=798f84672412f544765b800d03cf284b066f818c$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_CAPI_H_ diff --git a/cef/include/capi/views/cef_textfield_delegate_capi.h b/cef/include/capi/views/cef_textfield_delegate_capi.h index ea22493e71..167249eef6 100644 --- a/cef/include/capi/views/cef_textfield_delegate_capi.h +++ b/cef/include/capi/views/cef_textfield_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=4d1e834a5a548f1da317aceb92c590590651ed99$ +// $hash=44337fe515a5acf51829e1dd00a54f2c1230aba5$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_TEXTFIELD_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_view_capi.h b/cef/include/capi/views/cef_view_capi.h index dcf0e9e4e3..f4367a2187 100644 --- a/cef/include/capi/views/cef_view_capi.h +++ b/cef/include/capi/views/cef_view_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=9881a00ef237b6972f14c071544387fc90fe18f1$ +// $hash=a2f35807b488fcb00674418d25f4f3d8e544bf9f$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_CAPI_H_ diff --git a/cef/include/capi/views/cef_view_delegate_capi.h b/cef/include/capi/views/cef_view_delegate_capi.h index 9c2a0844e0..7756a33072 100644 --- a/cef/include/capi/views/cef_view_delegate_capi.h +++ b/cef/include/capi/views/cef_view_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=a060cb3c53317d758e7f6b4a275288cd08f086e7$ +// $hash=06b8e3c806864f42170d7d050d21a10a094df2df$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_VIEW_DELEGATE_CAPI_H_ diff --git a/cef/include/capi/views/cef_window_capi.h b/cef/include/capi/views/cef_window_capi.h index d9e584bfda..a8d267f05a 100644 --- a/cef/include/capi/views/cef_window_capi.h +++ b/cef/include/capi/views/cef_window_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=15f88e3521ca96947fe8b1f91f251eb3405fb293$ +// $hash=d391352a3ffd7bd9485c3d0c33674ff523a9a61d$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_CAPI_H_ diff --git a/cef/include/capi/views/cef_window_delegate_capi.h b/cef/include/capi/views/cef_window_delegate_capi.h index 4cf6188c40..bcf48dc0cb 100644 --- a/cef/include/capi/views/cef_window_delegate_capi.h +++ b/cef/include/capi/views/cef_window_delegate_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=b43e6106fde84f3bab4dd566efab23a50adaf94d$ +// $hash=da087348fa213f9ce4ceb37d248d9aaecc04e5d3$ // #ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_WINDOW_DELEGATE_CAPI_H_ diff --git a/cef/include/cef_api_hash.h b/cef/include/cef_api_hash.h index c09e0c63ce..6449fab747 100644 --- a/cef/include/cef_api_hash.h +++ b/cef/include/cef_api_hash.h @@ -42,15 +42,15 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "d026196d35d8894a836ab3a3d033b84195cdb835" +#define CEF_API_HASH_UNIVERSAL "d7e9904bce60295dd04e64d40efe4da6a362210c" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "4150bd26e7bf639a9b1f3e5860af8c76eeae8570" +#define CEF_API_HASH_PLATFORM "2b7373e08ea7313f324f799cf199f4499a0f3efc" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "5cc32f88bd134410eff86b21095138b339d572f2" +#define CEF_API_HASH_PLATFORM "42bfe0cdf84e5eeedf2f6736bea7a3db1fa3295d" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "b227b3fdd6142a9d8ff0f2252a71425f15960800" +#define CEF_API_HASH_PLATFORM "d5c72291f0a9668264d2d8ac246d6c8c84fea0cc" #elif defined(OS_OHOS) -#define CEF_API_HASH_PLATFORM "b227b3fdd6142a9d8ff0f2252a71425f15960800" +#define CEF_API_HASH_PLATFORM "d5c72291f0a9668264d2d8ac246d6c8c84fea0cc" #endif #ifdef __cplusplus diff --git a/cef/include/cef_browser.h b/cef/include/cef_browser.h index cab6ce50eb..a0496a272a 100644 --- a/cef/include/cef_browser.h +++ b/cef/include/cef_browser.h @@ -45,11 +45,14 @@ #include "include/cef_frame.h" #include "include/cef_image.h" #include "include/cef_navigation_entry.h" +#include "include/cef_permission_request.h" #include "include/cef_registration.h" #include "include/cef_request_context.h" +#include "include/cef_task.h" class CefBrowserHost; class CefClient; +class CefJavaScriptResultCallback; /// // Class used to represent a browser window. When used in the browser process @@ -91,6 +94,12 @@ class CefBrowser : public virtual CefBaseRefCounted { /*--cef()--*/ virtual void GoForward() = 0; + /// + // Returns true if the browser can navigate forwards. + /// + /*--cef()--*/ + virtual bool CanGoBackOrForward(int num_steps) = 0; + /// // Returns true if the browser is currently loading. /// @@ -186,6 +195,18 @@ class CefBrowser : public virtual CefBaseRefCounted { /// /*--cef()--*/ virtual void GetFrameNames(std::vector& names) = 0; + + /// + // Returns the Permission Request Delegate object. + /// + /*--cef()--*/ + virtual CefRefPtr GetPermissionRequestDelegate() = 0; + + /// + // Returns the Geolocation Permission handler object. + /// + /*--cef()--*/ + virtual CefRefPtr GetGeolocationPermissions() = 0; }; /// @@ -322,6 +343,12 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /*--cef()--*/ virtual CefRefPtr GetBrowser() = 0; + /// + // Post task to ui thread. + /// + /*--cef()--*/ + virtual void PostTaskToUIThread(CefRefPtr task) = 0; + /// // Request that the browser close. The JavaScript 'onbeforeunload' event will // be fired. If |force_close| is false the event handler, if any, will be @@ -739,26 +766,124 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /*--cef()--*/ virtual void SetWindowlessFrameRate(int frame_rate) = 0; + /* ---------- ohos webview add begin --------- */ + /// + // Recompute the WebPreferences based on the current state of the CefSettings, + // we will also call SetWebPreferences and send the updated WebPreferences to + // all RenderViews by WebContents. + /// + /*--cef()--*/ + virtual void SetWebPreferences( + const CefBrowserSettings& browser_settings) = 0; + + /// + // PutUserAgent + /// + /*--cef()--*/ + virtual void PutUserAgent(const CefString& ua) = 0; + + /// + // DefaultUserAgent + /// + /*--cef()--*/ + virtual CefString DefaultUserAgent() = 0; + + /// + // SetBackgroundColor + /// + /*--cef()--*/ + virtual void SetBackgroundColor(int color) = 0; + + /// + // RegisterArkJSfunction + /// + /*--cef()--*/ + virtual void RegisterArkJSfunction(const CefString& object_name, const std::vector& method_list) = 0; + + /// + // UnregisterArkJSfunction + /// + /*--cef(optional_param=method_list)--*/ + virtual void UnregisterArkJSfunction(const CefString& object_name, const std::vector& method_list) = 0; + /* ---------- ohos webview add end --------- */ + + /// + // Gets the title for the current page. + /// + /*--cef()--*/ + virtual CefString Title() = 0; + + /// + // Gets the latest hitdata + /// + /*--cef()--*/ + virtual void GetHitData(int& type, CefString& extra_data) = 0; + + /// + // Gets the progress for the current page. + /// + /*--cef()--*/ + virtual int PageLoadProgress() = 0; + + /// + // Gets the progress for the current page. + /// + /*--cef()--*/ + virtual float Scale() = 0; + + /// + // Loads the given data into this WebView, using baseUrl as the base URL for + // the content. The base URL is used both to resolve relative URLs and when + // applying JavaScript's same origin policy. The historyUrl is used for the + // history entry. + // optional_param=baseUrl, optional_param=data, optional_param=mimeType, + // optional_param=encoding, optional_param=historyUrl + /// + /*--cef(optional_param=baseUrl, optional_param=data, optional_param=mimeType, + optional_param=encoding, optional_param=historyUrl)--*/ + virtual void LoadWithDataAndBaseUrl(const CefString& baseUrl, + const CefString& data, + const CefString& mimeType, + const CefString& encoding, + const CefString& historyUrl) = 0; + /// - // Begins a new composition or updates the existing composition. Blink has a - // special node (a composition node) that allows the input method to change - // text without affecting other DOM nodes. |text| is the optional text that - // will be inserted into the composition node. |underlines| is an optional set - // of ranges that will be underlined in the resulting text. - // |replacement_range| is an optional range of the existing text that will be - // replaced. |selection_range| is an optional range of the resulting text that - // will be selected after insertion or replacement. The |replacement_range| - // value is only used on OS X. + // Loads the given data into this WebView + // optional_param=data, optional_param=mimeType, optional_param=encoding, + /// + /*--cef(optional_param=data, optional_param=mimeType, optional_param=encoding,)--*/ + virtual void LoadWithData(const CefString& data, + const CefString& mimeType, + const CefString& encoding) = 0; + + /// + // add visited url. + /// + /*--cef(optional_param=urls)--*/ + virtual void AddVisitedLinks(const std::vector& urls) {} + + /// + // Begins a new composition or updates the existing composition. Blink has + // a special node (a composition node) that allows the input method to + // change text without affecting other DOM nodes. |text| is the optional + // text that will be inserted into the composition node. |underlines| is + // an optional set of ranges that will be underlined in the resulting + // text. |replacement_range| is an optional range of the existing text + // that will be replaced. |selection_range| is an optional range of the + // resulting text that will be selected after insertion or replacement. + // The |replacement_range| value is only used on OS X. // - // This method may be called multiple times as the composition changes. When - // the client is done making changes the composition should either be canceled - // or completed. To cancel the composition call ImeCancelComposition. To - // complete the composition call either ImeCommitText or - // ImeFinishComposingText. Completion is usually signaled when: - // A. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR + // This method may be called multiple times as the composition changes. + // When the client is done making changes the composition should either be + // canceled or completed. To cancel the composition call + // ImeCancelComposition. To complete the composition call either + // ImeCommitText or ImeFinishComposingText. Completion is usually signaled + // when: + // A. The client receives a WM_IME_COMPOSITION message with a + // GCS_RESULTSTR // flag (on Windows), or; - // B. The client receives a "commit" signal of GtkIMContext (on Linux), or; - // C. insertText of NSTextInput is called (on Mac). + // B. The client receives a "commit" signal of GtkIMContext (on Linux), + // or; C. insertText of NSTextInput is called (on Mac). // // This method is only used when window rendering is disabled. /// @@ -940,6 +1065,28 @@ class CefBrowserHost : public virtual CefBaseRefCounted { /// /*--cef()--*/ virtual bool IsAudioMuted() = 0; + + /// + // Execute a string of JavaScript code, return result by callback + /// + /*--cef()--*/ + virtual void ExecuteJavaScript(const CefString& code, + CefRefPtr callback) = 0; +}; + +/// +// Interface to implement to be notified of asynchronous completion via +// CefBrowserHostBase::ExecuteJavaScript(). +/// +/*--cef(source=client)--*/ +class CefJavaScriptResultCallback : public virtual CefBaseRefCounted { + public: + /// + // Method that will be called upon completion. |num_deleted| will be the + // number of cookies that were deleted. + /// + /*--cef()--*/ + virtual void OnJavaScriptExeResult(const CefString& result) = 0; }; #endif // CEF_INCLUDE_CEF_BROWSER_H_ diff --git a/cef/include/cef_client.h b/cef/include/cef_client.h index 20e5ede627..759c20f52c 100644 --- a/cef/include/cef_client.h +++ b/cef/include/cef_client.h @@ -51,6 +51,7 @@ #include "include/cef_keyboard_handler.h" #include "include/cef_life_span_handler.h" #include "include/cef_load_handler.h" +#include "include/cef_permission_request.h" #include "include/cef_print_handler.h" #include "include/cef_process_message.h" #include "include/cef_render_handler.h" @@ -159,6 +160,12 @@ class CefClient : public virtual CefBaseRefCounted { /*--cef()--*/ virtual CefRefPtr GetRequestHandler() { return nullptr; } + /// + // Return the handler for browser geolocation permission request events. + /// + /*--cef()--*/ + virtual CefRefPtr GetPermissionRequest() { return nullptr; } + /// // Called when a new message is received from a different process. Return true // if the message was handled or false otherwise. Do not keep a reference to @@ -171,6 +178,15 @@ class CefClient : public virtual CefBaseRefCounted { CefRefPtr message) { return false; } + + /// + // Returns the list of arguments NotifyJavaScriptResult. + /// + /*--cef()--*/ + virtual int NotifyJavaScriptResult(CefRefPtr args, + const CefString& method, + const CefString& object_name, + CefRefPtr result) { return 0; }; }; #endif // CEF_INCLUDE_CEF_CLIENT_H_ diff --git a/cef/include/cef_cookie.h b/cef/include/cef_cookie.h index bea152ce94..8eb3beea39 100644 --- a/cef/include/cef_cookie.h +++ b/cef/include/cef_cookie.h @@ -64,6 +64,40 @@ class CefCookieManager : public virtual CefBaseRefCounted { static CefRefPtr GetGlobalManager( CefRefPtr callback); + /// + // Convert string cookie to CefCookie. The method will return true when excuted + // success, otherwise return false. + /// + /*--cef()--*/ + static bool CreateCefCookie(const CefString& url, const CefString& value, + CefCookie& cef_cookie); + + /// + // Get whether this cookie manager can accpet and send cookies. Returns false if + // can't. + /// + /*--cef()--*/ + virtual bool IsAcceptCookieAllowed() = 0; + + /// + // Set whether this cookie manager can accpet and send cookies. + /// + /*--cef()--*/ + virtual void PutAcceptCookieEnabled(bool accept) = 0; + + /// + // Get whether this cookie manager can accpet and send cookies for file scheme URL. + // Returns false if can't. + /// + /*--cef()--*/ + virtual bool IsFileURLSchemeCookiesAllowed() = 0; + + /// + // Set whether this cookie manager can accpet and send cookies for file scheme URL. + /// + /*--cef()--*/ + virtual void PutAcceptFileURLSchemeCookiesEnabled(bool allow) = 0; + /// // Visit all cookies on the UI thread. The returned cookies are ordered by // longest path, then by earliest creation date. Returns false if cookies @@ -113,6 +147,7 @@ class CefCookieManager : public virtual CefBaseRefCounted { optional_param=callback)--*/ virtual bool DeleteCookies(const CefString& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) = 0; /// @@ -143,6 +178,14 @@ class CefCookieVisitor : public virtual CefBaseRefCounted { int count, int total, bool& deleteCookie) = 0; + + /// + // Method that will be called when all cookies have been visited, contenate + // them into one string line. The string cookie line will be passed into this + // method. + /// + /*--cef()--*/ + virtual void SetCookieLine(const CefString& cookieLine) {} }; /// diff --git a/cef/include/cef_display_handler.h b/cef/include/cef_display_handler.h index 61636f1047..cffbbe6fba 100644 --- a/cef/include/cef_display_handler.h +++ b/cef/include/cef_display_handler.h @@ -71,6 +71,24 @@ class CefDisplayHandler : public virtual CefBaseRefCounted { virtual void OnFaviconURLChange(CefRefPtr browser, const std::vector& icon_urls) {} + /// + // onReceivedTouchIconUrl. + /// + /*--cef()--*/ + virtual void OnReceivedTouchIconUrl(CefRefPtr browser, + const CefString& icon_url, + bool precomposed) {} + + /// + // onReceivedIcon. + /// + /*--cef()--*/ + virtual void OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) {} + /// // Called when web content in the page has toggled fullscreen mode. If // |fullscreen| is true the content will automatically be sized to fill the diff --git a/cef/include/cef_frame.h b/cef/include/cef_frame.h index a1d0bbadcf..2f99585f9a 100644 --- a/cef/include/cef_frame.h +++ b/cef/include/cef_frame.h @@ -219,6 +219,14 @@ class CefFrame : public virtual CefBaseRefCounted { /*--cef()--*/ virtual void VisitDOM(CefRefPtr visitor) = 0; + /// + // Loads the given URL with additional HTTP headers, specified as a map + // from name to value. Note that if this map contains any of the headers that are set by default by this WebView, + // such as those controlling caching, accept types or the User-Agent, their values may be overridden by this WebView's defaults. + /// + /*--cef(optional_param=url, optional_param=additionalHttpHeaders)--*/ + virtual void LoadHeaderUrl(const CefString& url, const CefString& additionalHttpHeaders) = 0; + /// // Create a new URL request that will be treated as originating from this // frame and the associated browser. This request may be intercepted by the diff --git a/cef/include/cef_load_handler.h b/cef/include/cef_load_handler.h index 66b556732d..3389aa306b 100644 --- a/cef/include/cef_load_handler.h +++ b/cef/include/cef_load_handler.h @@ -41,6 +41,7 @@ #include "include/cef_base.h" #include "include/cef_browser.h" #include "include/cef_frame.h" +#include "include/cef_response.h" /// // Implement this interface to handle events related to browser load status. The @@ -111,6 +112,25 @@ class CefLoadHandler : public virtual CefBaseRefCounted { ErrorCode errorCode, const CefString& errorText, const CefString& failedUrl) {} + + /// + // OnLoadErrorWithRequest + /// + /*--cef()--*/ + virtual void OnLoadErrorWithRequest(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + int error_code, + const CefString& error_text) {} + + /// + // OnHttpError + /// + /*--cef()--*/ + virtual void OnHttpError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr response) {} }; #endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_ diff --git a/cef/include/cef_permission_request.h b/cef/include/cef_permission_request.h new file mode 100644 index 0000000000..89931b9a32 --- /dev/null +++ b/cef/include/cef_permission_request.h @@ -0,0 +1,149 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_INCLUDE_CEF_PERMISSION_REQUEST_H_ +#define CEF_INCLUDE_CEF_PERMISSION_REQUEST_H_ +#pragma once + +#include "include/cef_base.h" +#include "include/internal/cef_types.h" + +/// +// Class used to report permission request for the specified origin. +/// +/*--cef(source=library)--*/ +class CefAccessRequest : public virtual CefBaseRefCounted { + public: + /// + // Get the origin that is trying to acess the resource. + /// + /*--cef()--*/ + virtual CefString Origin() = 0; + /// + // Get the resource that the origin is trying to acess. + /// + /*--cef()--*/ + virtual int ResourceAcessId() = 0; + /// + // Report whether the origin is allowed to acess the resource. + /// + /*--cef()--*/ + virtual void ReportRequestResult(bool allowed) = 0; +}; + +/// +// Implement this interface to handle permission requests. +/// +/*--cef(source=client,no_debugct_check)--*/ +class CefPermissionRequest : public virtual CefBaseRefCounted { + public: + /// + // Notify the host application that web content from the specified origin is + // attempting to use the Geolocation API, but no permission state is currently + // set for that origin. The host application should invoke the specified + // callback with the desired permission state. + /// + /*--cef()--*/ + virtual void OnGeolocationShow(const CefString& origin) = 0; + /// + // Revert the operation in the OnGeolocationShow. + /// + /*--cef()--*/ + virtual void OnGeolocationHide() = 0; + /// + // Notify the host application that web content from the specified origin is + // attempting to access the resources, but no permission state is currently + // set for that origin. The host application should invoke the specified + // callback with the desired permission state. + /// + /*--cef()--*/ + virtual void OnPermissionRequest(CefRefPtr request) = 0; + /// + // Revert the operation in the OnPermissionRequest. + /// + /*--cef()--*/ + virtual void OnPermissionRequestCanceled( + CefRefPtr request) = 0; +}; + +/// +// Class used to handle the permission requests from |BrowserContext|. +/// +/*--cef(source=library)--*/ +class CefBrowserPermissionRequestDelegate : public virtual CefBaseRefCounted { + public: + /// + // Handle the Geolocation permission requests. + /// + /*--cef()--*/ + virtual void AskGeolocationPermission(const CefString& origin, + cef_permission_callback_t callback) = 0; + /// + // Cancel the Geolocation permission requests. + /// + /*--cef()--*/ + virtual void AbortAskGeolocationPermission(const CefString& origin) = 0; + /// + // Handle the Protected Media Identifier permission requests. + /// + /*--cef()--*/ + virtual void AskProtectedMediaIdentifierPermission( + const CefString& origin, + cef_permission_callback_t callback) = 0; + /// + // Cancel the Protected Media Identifier permission requests. + /// + /*--cef()--*/ + virtual void AbortAskProtectedMediaIdentifierPermission( + const CefString& origin) = 0; + /// + // Handle the MIDI Sysex permission requests. + /// + /*--cef()--*/ + virtual void AskMIDISysexPermission(const CefString& origin, + cef_permission_callback_t callback) = 0; + /// + // Cancel the MIDI Sysex permission requests. + /// + /*--cef()--*/ + virtual void AbortAskMIDISysexPermission(const CefString& origin) = 0; + /// + // The callback for the Geolocation permission requests. + /// + /*--cef()--*/ + virtual void NotifyGeolocationPermission(bool value, + const CefString& origin) = 0; +}; + +/// +// Class used to set the geolocation permission state for the specified origin. +/// +/*--cef(source=library)--*/ +class CefGeolocationAcess : public virtual CefBaseRefCounted { + public: + /// + // Return true if the geolocation permission state is set for the specified + // origin. + /// + /*--cef()--*/ + virtual bool ContainOrigin(const CefString& origin) = 0; + /// + // Return true if the geolocation permission state set for the specified + // origin is true. + /// + /*--cef()--*/ + virtual bool IsOriginAccessEnabled(const CefString& origin) = 0; + /// + // Set the geolocation permission state to true for the specified origin. + /// + /*--cef()--*/ + virtual void Enabled(const CefString& origin) = 0; + /// + // Set the geolocation permission state to false for the specified origin. + /// + /*--cef()--*/ + virtual void Disabled(const CefString& origin) = 0; +}; + +#endif // CEF_INCLUDE_CEF_PERMISSION_REQUEST_H_ diff --git a/cef/include/cef_render_handler.h b/cef/include/cef_render_handler.h index f101083a79..286418081d 100644 --- a/cef/include/cef_render_handler.h +++ b/cef/include/cef_render_handler.h @@ -202,6 +202,14 @@ class CefRenderHandler : public virtual CefBaseRefCounted { double x, double y) {} + /// + // Called when the RootLayer has changed. + /// + /*--cef()--*/ + virtual void OnRootLayerChanged(CefRefPtr browser, + int height, + int width) {} + /// // Called when the IME composition range has changed. |selected_range| is the // range of characters that have been selected. |character_bounds| is the diff --git a/cef/include/internal/cef_types.h b/cef/include/internal/cef_types.h index db67632877..980265365a 100644 --- a/cef/include/internal/cef_types.h +++ b/cef/include/internal/cef_types.h @@ -32,6 +32,7 @@ #pragma once #include "include/base/cef_basictypes.h" +#include "include/base/cef_callback.h" #include "include/internal/cef_string.h" #include "include/internal/cef_string_list.h" #include "include/internal/cef_time.h" @@ -45,6 +46,9 @@ #include "include/internal/cef_types_linux.h" #endif +// Permission request callback. +typedef base::Callback cef_permission_callback_t; + // 32-bit ARGB color value, not premultiplied. The color components are always // in a known order. Equivalent to the SkColor type. typedef uint32 cef_color_t; @@ -684,6 +688,23 @@ typedef struct _cef_browser_settings_t { // empty then "en-US,en" will be used. /// cef_string_t accept_language_list; + + /* ohos webview begin */ + /// + // Force the background color to be dark + /// + cef_state_t force_dark_mode_enabled; + cef_state_t loads_images_automatically; + bool javascript_can_open_windows_automatically; + int text_size_percent; + int mixed_content_mode; + cef_state_t allow_running_insecure_content; + cef_state_t strict_mixed_content_checking; + cef_state_t allow_mixed_content_upgrades; + bool geolocation_enabled; + bool supports_double_tap_zoom; + bool supports_multi_touch_zoom; + /* ohos webview end */ } cef_browser_settings_t; /// @@ -945,7 +966,11 @@ typedef enum { ERR_NONE = 0, #define NET_ERROR(label, value) ERR_##label = value, +#if defined(COMPILE_WITH_OHOS) +#include "include/base/internal/cef_net_error_list_ohos.h" +#else #include "include/base/internal/cef_net_error_list.h" +#endif #undef NET_ERROR } cef_errorcode_t; @@ -2653,6 +2678,11 @@ typedef enum { // BGRA with 8 bits per pixel (32bits total). /// CEF_COLOR_TYPE_BGRA_8888, + + /// + // Unknown color type. + /// + CEF_COLOR_TYPE_UNKNOWN, } cef_color_type_t; /// @@ -2673,6 +2703,11 @@ typedef enum { // Transparency with post-multiplied alpha component. /// CEF_ALPHA_TYPE_POSTMULTIPLIED, + + /// + // Unknown alpha type. + /// + CEF_ALPHA_TYPE_UNKNOWN, } cef_alpha_type_t; /// diff --git a/cef/include/internal/cef_types_wrappers.h b/cef/include/internal/cef_types_wrappers.h index 78ecdb5c41..49429490a9 100644 --- a/cef/include/internal/cef_types_wrappers.h +++ b/cef/include/internal/cef_types_wrappers.h @@ -725,6 +725,21 @@ struct CefBrowserSettingsTraits { cef_string_set(src->accept_language_list.str, src->accept_language_list.length, &target->accept_language_list, copy); + + /* ohos webview begin */ + target->force_dark_mode_enabled = src->force_dark_mode_enabled; + target->javascript_can_open_windows_automatically = + src->javascript_can_open_windows_automatically; + target->loads_images_automatically = src->loads_images_automatically; + target->text_size_percent = src->text_size_percent; + target->mixed_content_mode = src->mixed_content_mode; + target->allow_running_insecure_content = src->allow_running_insecure_content; + target->strict_mixed_content_checking = src->strict_mixed_content_checking; + target->allow_mixed_content_upgrades = src->allow_mixed_content_upgrades; + target->geolocation_enabled = src->geolocation_enabled; + target->supports_double_tap_zoom = src->supports_double_tap_zoom; + target->supports_multi_touch_zoom = src->supports_multi_touch_zoom; + /* ohos webview end */ } }; diff --git a/cef/libcef/browser/alloy/alloy_browser_context.cc b/cef/libcef/browser/alloy/alloy_browser_context.cc index 96516f4d5f..65d870cda1 100644 --- a/cef/libcef/browser/alloy/alloy_browser_context.cc +++ b/cef/libcef/browser/alloy/alloy_browser_context.cc @@ -1,6 +1,7 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/alloy/alloy_browser_context.h" @@ -9,6 +10,7 @@ #include "libcef/browser/download_manager_delegate.h" #include "libcef/browser/extensions/extension_system.h" +#include "libcef/browser/permission/alloy_permission_manager.h" #include "libcef/browser/prefs/browser_prefs.h" #include "libcef/browser/ssl_host_state_delegate.h" #include "libcef/browser/thread_util.h" @@ -381,7 +383,9 @@ content::SSLHostStateDelegate* AlloyBrowserContext::GetSSLHostStateDelegate() { content::PermissionControllerDelegate* AlloyBrowserContext::GetPermissionControllerDelegate() { - return nullptr; + if (!permission_manager_.get()) + permission_manager_.reset(new AlloyPermissionManager()); + return permission_manager_.get(); } content::BackgroundFetchDelegate* diff --git a/cef/libcef/browser/alloy/alloy_browser_context.h b/cef/libcef/browser/alloy/alloy_browser_context.h index 72c458196d..d9ebf677ef 100644 --- a/cef/libcef/browser/alloy/alloy_browser_context.h +++ b/cef/libcef/browser/alloy/alloy_browser_context.h @@ -1,6 +1,7 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_CONTEXT_H_ #define CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_CONTEXT_H_ @@ -141,6 +142,7 @@ class AlloyBrowserContext : public ChromeProfileAlloy, std::unique_ptr resource_context_; scoped_refptr media_device_id_salt_; + std::unique_ptr permission_manager_; DISALLOW_COPY_AND_ASSIGN(AlloyBrowserContext); }; diff --git a/cef/libcef/browser/alloy/alloy_browser_host_impl.cc b/cef/libcef/browser/alloy/alloy_browser_host_impl.cc index ec9b8e6bcf..73e7113807 100644 --- a/cef/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/cef/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -1,7 +1,7 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/alloy/alloy_browser_host_impl.h" @@ -19,6 +19,8 @@ #include "libcef/browser/media_capture_devices_dispatcher.h" #include "libcef/browser/native/cursor_util.h" #include "libcef/browser/osr/osr_util.h" +#include "libcef/browser/osr/render_widget_host_view_osr.h" +#include "libcef/browser/prefs/renderer_prefs.h" #include "libcef/browser/request_context_impl.h" #include "libcef/browser/thread_util.h" #include "libcef/common/cef_messages.h" @@ -567,6 +569,10 @@ bool AlloyBrowserHostImpl::IsBackgroundHost() { return is_background_host_; } +SkColor AlloyBrowserHostImpl::GetBackgroundColor() const { + return base_background_color_; +} + bool AlloyBrowserHostImpl::IsWindowRenderingDisabled() { return IsWindowless(); } @@ -1226,6 +1232,33 @@ bool AlloyBrowserHostImpl::HandleContextMenu( return HandleContextMenu(web_contents(), params); } +void AlloyBrowserHostImpl::SetBackgroundColor(int color) { + if (color == base_background_color_) { + return; + } + + base_background_color_ = color; + OnWebPreferencesChanged(); +} + +void AlloyBrowserHostImpl::UpdateBackgroundColor(int color) { + auto rvh = web_contents()->GetRenderViewHost(); + + if (rvh->GetWidget()->GetView()) { + rvh->GetWidget()->GetView()->SetBackgroundColor(color); + } +} + +void AlloyBrowserHostImpl::UpdateZoomSupportEnabled() { + auto rvh = web_contents()->GetRenderViewHost(); + CefRenderWidgetHostViewOSR* view = static_cast(rvh->GetWidget()->GetView()); + + if (view) { + view->SetDoubleTapSupportEnabled(settings_.supports_double_tap_zoom); + view->SetMultiTouchZoomSupportEnabled(settings_.supports_multi_touch_zoom); + } +} + KeyboardEventProcessingResult AlloyBrowserHostImpl::PreHandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) { @@ -1483,6 +1516,8 @@ void AlloyBrowserHostImpl::RenderFrameCreated( void AlloyBrowserHostImpl::RenderViewReady() { platform_delegate_->RenderViewReady(); + UpdateBackgroundColor(base_background_color_); + UpdateZoomSupportEnabled(); } void AlloyBrowserHostImpl::DidFinishNavigation( @@ -1645,3 +1680,17 @@ void AlloyBrowserHostImpl::EnsureFileDialogManager() { this, platform_delegate_->CreateFileDialogRunner())); } } + +void AlloyBrowserHostImpl::AddVisitedLinks(const std::vector& urls) { + std::vector urlList = std::vector(); + for (auto url : urls) { + urlList.push_back(url_util::MakeGURL(url, /*fixup=*/false)); + } + if (web_contents()) { + auto cef_browser_context = + static_cast(web_contents()->GetBrowserContext()); + if (cef_browser_context) { + cef_browser_context->AddVisitedURLs(urlList); + } + } +} diff --git a/cef/libcef/browser/alloy/alloy_browser_host_impl.h b/cef/libcef/browser/alloy/alloy_browser_host_impl.h index faee30792c..799295d3eb 100644 --- a/cef/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/cef/libcef/browser/alloy/alloy_browser_host_impl.h @@ -1,7 +1,7 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_HOST_IMPL_H_ #define CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_HOST_IMPL_H_ @@ -148,6 +148,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, const CefSize& max_size) override; CefRefPtr GetExtension() override; bool IsBackgroundHost() override; + SkColor GetBackgroundColor() const; // Returns true if windowless rendering is enabled. bool IsWindowless() const override; @@ -203,6 +204,10 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, }; DestructionState destruction_state() const { return destruction_state_; } + /* ohos webview begin */ + void SetBackgroundColor(int color) override; + /* ohos webview end */ + // content::WebContentsDelegate methods. content::WebContents* OpenURLFromTab( content::WebContents* source, @@ -306,6 +311,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, const std::vector& locData) override; void WebContentsDestroyed() override; + void AddVisitedLinks(const std::vector& urls) override; private: friend class CefBrowserPlatformDelegateAlloy; @@ -343,6 +349,10 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, void SetFocusInternal(bool focus); + void UpdateBackgroundColor(int color); + + void UpdateZoomSupportEnabled(); + CefWindowHandle opener_; const bool is_windowless_; CefWindowHandle host_window_handle_ = kNullWindowHandle; @@ -373,6 +383,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, // starts running when a tab stops being audible, and is canceled if it starts // being audible again before it fires. base::OneShotTimer recently_audible_timer_; + + int base_background_color_ = 0xffffffff; }; #endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_HOST_IMPL_H_ diff --git a/cef/libcef/browser/alloy/alloy_content_browser_client.cc b/cef/libcef/browser/alloy/alloy_content_browser_client.cc index 33be06def0..2a2e3cf6ea 100644 --- a/cef/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/cef/libcef/browser/alloy/alloy_content_browser_client.cc @@ -955,6 +955,16 @@ bool AlloyContentBrowserClient::CanCreateWindow( CEF_REQUIRE_UIT(); *no_javascript_access = false; + content::WebContents* web_contents = + content::WebContents::FromRenderFrameHost(opener); + CefRefPtr browser_host = + CefBrowserHostBase::GetBrowserForContents(web_contents); + + if (!browser_host->settings().javascript_can_open_windows_automatically) { + LOG(INFO) << "javascript_can_open_windows_automatically false"; + return false; + } + return CefBrowserInfoManager::GetInstance()->CanCreateWindow( opener, target_url, referrer, frame_name, disposition, features, user_gesture, opener_suppressed, no_javascript_access); @@ -998,9 +1008,8 @@ void AlloyContentBrowserClient::DidCreatePpapiPlugin( new ChromeBrowserPepperHostFactory(browser_host))); } -std::unique_ptr -AlloyContentBrowserClient::CreateDevToolsManagerDelegate() { - return std::make_unique(); +content::DevToolsManagerDelegate* AlloyContentBrowserClient::GetDevToolsManagerDelegate() { + return new CefDevToolsManagerDelegate(); } std::vector> @@ -1211,6 +1220,16 @@ void AlloyContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { // This method may be called during shutdown when using multi-threaded // message loop mode. In that case exit early to avoid crashes. + AlloyBrowserContext* cef_context = static_cast(CefBrowserContext::FromBrowserContext(context)); + + base::FilePath cache_path; + if (base::PathService::Get(base::DIR_CACHE, &cache_path)) { + if (cef_context->ShouldPersistSessionCookies()) { + network_context_params->cookie_path = cache_path.Append(base::FilePath("cookie.db")); + } + network_context_params->persist_session_cookies = cef_context->ShouldPersistSessionCookies(); + network_context_params->restore_old_session_cookies = cef_context->ShouldRestoreOldSessionCookies(); + } if (!SystemNetworkContextManager::GetInstance()) { // This must match the value expected in // StoragePartitionImpl::InitNetworkContext. @@ -1218,8 +1237,6 @@ void AlloyContentBrowserClient::ConfigureNetworkContextParams( return; } - auto cef_context = CefBrowserContext::FromBrowserContext(context); - Profile* profile = cef_context->AsProfile(); ProfileNetworkContextService* service = ProfileNetworkContextServiceFactory::GetForContext(profile); diff --git a/cef/libcef/browser/alloy/alloy_content_browser_client.h b/cef/libcef/browser/alloy/alloy_content_browser_client.h index 35b45c4f89..19b3cebebb 100644 --- a/cef/libcef/browser/alloy/alloy_content_browser_client.h +++ b/cef/libcef/browser/alloy/alloy_content_browser_client.h @@ -109,8 +109,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) override; std::string GetDefaultDownloadName() override; void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override; - std::unique_ptr - CreateDevToolsManagerDelegate(); + content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; std::vector> CreateThrottlesForNavigation( content::NavigationHandle* navigation_handle) override; diff --git a/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc index 18aad738c2..099cfbec28 100644 --- a/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc +++ b/cef/libcef/browser/alloy/browser_platform_delegate_alloy.cc @@ -254,6 +254,15 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() { widget->LostCapture(); } +void CefBrowserPlatformDelegateAlloy::SendTouchEventToRender(const CefTouchEvent& event) { + if (!browser_) + return; + auto frame = browser_->GetMainFrame(); + if (frame && frame->IsValid()) { + static_cast(frame.get())->SendTouchEvent(event); + } +} + #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC)) void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() { if (!browser_) diff --git a/cef/libcef/browser/alloy/browser_platform_delegate_alloy.h b/cef/libcef/browser/alloy/browser_platform_delegate_alloy.h index dcd8879cc0..8622f73c51 100644 --- a/cef/libcef/browser/alloy/browser_platform_delegate_alloy.h +++ b/cef/libcef/browser/alloy/browser_platform_delegate_alloy.h @@ -37,6 +37,7 @@ class CefBrowserPlatformDelegateAlloy : public CefBrowserPlatformDelegate { extensions::ExtensionHost* GetExtensionHost() const override; void BrowserDestroyed(CefBrowserHostBase* browser) override; void SendCaptureLostEvent() override; + void SendTouchEventToRender(const CefTouchEvent& event); #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MAC)) void NotifyMoveOrResizeStarted() override; #endif diff --git a/cef/libcef/browser/browser_contents_delegate.cc b/cef/libcef/browser/browser_contents_delegate.cc index f6f26956c1..fca6d1e95f 100644 --- a/cef/libcef/browser/browser_contents_delegate.cc +++ b/cef/libcef/browser/browser_contents_delegate.cc @@ -1,12 +1,14 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/browser_contents_delegate.h" #include "libcef/browser/browser_host_base.h" #include "libcef/browser/browser_platform_delegate.h" #include "libcef/browser/browser_util.h" +#include "libcef/common/request_impl.h" #include "content/public/browser/keyboard_event_processing_result.h" #include "content/public/browser/native_web_keyboard_event.h" @@ -29,7 +31,7 @@ CefBrowserContentsDelegate::CefBrowserContentsDelegate( void CefBrowserContentsDelegate::ObserveWebContents( content::WebContents* new_contents) { WebContentsObserver::Observe(new_contents); - + icon_helper_->SetWebContents(new_contents); if (new_contents) { registrar_.reset(new content::NotificationRegistrar); @@ -410,7 +412,17 @@ void CefBrowserContentsDelegate::DidFinishNavigation( // If the error happened before commit then this call will originate from // RenderFrameHostImpl::OnDidFailProvisionalLoadWithError. // OnLoadStart/OnLoadEnd will not be called. - OnLoadError(frame.get(), navigation_handle->GetURL(), error_code); + + CefRefPtr request = new CefRequestImpl(); + CefString cef_url(navigation_handle->GetURL().spec()); + CefString cef_method(navigation_handle->IsPost() ? "POST" : "GET"); + request->SetURL(cef_url); + request->SetMethod(cef_method); + request->Set(net::HttpRequestHeaders()); + OnLoadError(request, + navigation_handle->IsInMainFrame(), + navigation_handle->HasUserGesture(), + error_code); } } @@ -473,6 +485,7 @@ void CefBrowserContentsDelegate::DidUpdateFaviconURL( } } } + icon_helper_->OnUpdateFaviconURL(render_frame_host, candidates); } void CefBrowserContentsDelegate::OnWebContentsFocused( @@ -594,6 +607,23 @@ void CefBrowserContentsDelegate::OnLoadError(CefRefPtr frame, } } +void CefBrowserContentsDelegate::OnLoadError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + int error_code) { + if (auto c = client()) { + if (auto handler = c->GetLoadHandler()) { + auto navigation_lock = browser_info_->CreateNavigationLock(); + // On the handler that loading has failed. + handler->OnLoadErrorWithRequest(request, + is_main_frame, + has_user_gesture, + error_code, + net::ErrorToShortString(error_code)); + } + } +} + void CefBrowserContentsDelegate::OnTitleChange(const std::u16string& title) { if (auto c = client()) { if (auto handler = c->GetDisplayHandler()) { @@ -621,3 +651,15 @@ void CefBrowserContentsDelegate::OnStateChanged(State state_changed) { observer.OnStateChanged(state_changed); } } + +void CefBrowserContentsDelegate::InitIconHelper() { + icon_helper_ = new IconHelper(); + icon_helper_->SetBrowser(CefBrowserContentsDelegate::browser()); + CefRefPtr client = CefBrowserContentsDelegate::client(); + if (client) { + CefRefPtr handler = client->GetDisplayHandler(); + if (handler) { + icon_helper_->SetDisplayHandler(handler); + } + } +} diff --git a/cef/libcef/browser/browser_contents_delegate.h b/cef/libcef/browser/browser_contents_delegate.h index 9977552a8f..991010f4f7 100644 --- a/cef/libcef/browser/browser_contents_delegate.h +++ b/cef/libcef/browser/browser_contents_delegate.h @@ -1,6 +1,7 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_BROWSER_CONTENTS_DELEGATE_H_ #define CEF_LIBCEF_BROWSER_BROWSER_CONTENTS_DELEGATE_H_ @@ -9,6 +10,7 @@ #include #include "libcef/browser/frame_host_impl.h" +#include "libcef/browser/icon_helper.h" #include "base/observer_list.h" #include "content/public/browser/notification_observer.h" @@ -153,6 +155,7 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate, const GURL& url, int http_status_code); bool OnSetFocus(cef_focus_source_t source); + void InitIconHelper(); private: CefRefPtr client() const; @@ -164,6 +167,10 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate, void OnLoadStart(CefRefPtr frame, ui::PageTransition transition_type); void OnLoadError(CefRefPtr frame, const GURL& url, int error_code); + void OnLoadError(CefRefPtr request, + bool is_in_main_frame, + bool has_user_gesture, + int error_code); void OnTitleChange(const std::u16string& title); void OnFullscreenModeChange(bool fullscreen); @@ -192,6 +199,9 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate, // True if the focus is currently on an editable field on the page. bool focus_on_editable_field_ = false; + // Store web site icon. + CefRefPtr icon_helper_; + DISALLOW_COPY_AND_ASSIGN(CefBrowserContentsDelegate); }; diff --git a/cef/libcef/browser/browser_host_base.cc b/cef/libcef/browser/browser_host_base.cc index 20760ddff7..9f046ffc57 100644 --- a/cef/libcef/browser/browser_host_base.cc +++ b/cef/libcef/browser/browser_host_base.cc @@ -1,20 +1,27 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. + #include "libcef/browser/browser_host_base.h" +#include "cef/include/cef_parser.h" #include "libcef/browser/browser_info_manager.h" #include "libcef/browser/browser_platform_delegate.h" #include "libcef/browser/context.h" #include "libcef/browser/image_impl.h" #include "libcef/browser/navigation_entry_impl.h" +#include "libcef/browser/permission/alloy_access_request.h" +#include "libcef/browser/permission/alloy_geolocation_access.h" #include "libcef/browser/thread_util.h" #include "libcef/common/net/url_util.h" +#include "base/json/json_writer.h" #include "base/logging.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_service.h" +#include "components/embedder_support/user_agent_utils.h" #include "components/favicon/core/favicon_url.h" #include "components/spellcheck/common/spellcheck_features.h" #include "content/public/browser/browser_context.h" @@ -27,6 +34,12 @@ #include "components/spellcheck/browser/spellcheck_platform.h" #endif +#include "content/browser/web_contents/web_contents_impl.h" + +#if defined(OS_OHOS) +#include "libcef/browser/javascript/oh_javascript_injector.h" +#endif + namespace { // Associates a CefBrowserHostBase instance with a WebContents. This object will @@ -67,6 +80,7 @@ class WebContentsUserDataAdapter : public base::SupportsUserData::Data { } // namespace +using namespace NWEB; // static CefRefPtr CefBrowserHostBase::GetBrowserForHost( const content::RenderViewHost* host) { @@ -169,10 +183,12 @@ CefBrowserHostBase::CefBrowserHostBase( CEF_REQUIRE_UIT(); DCHECK(!browser_info_->browser().get()); browser_info_->SetBrowser(this); - contents_delegate_ = std::make_unique(browser_info_); contents_delegate_->AddObserver(this); + contents_delegate_->InitIconHelper(); + permission_request_handler_.reset(new AlloyPermissionRequestHandler( + client_->GetPermissionRequest(), GetWebContents())); } void CefBrowserHostBase::InitializeBrowser() { @@ -181,6 +197,10 @@ void CefBrowserHostBase::InitializeBrowser() { // Associate the WebContents with this browser object. DCHECK(GetWebContents()); WebContentsUserDataAdapter::Register(this); + +#if defined(OS_OHOS) + new OhJavascriptInjector(GetWebContents(), client_); +#endif } void CefBrowserHostBase::DestroyBrowser() { @@ -197,6 +217,16 @@ void CefBrowserHostBase::DestroyBrowser() { browser_info_->SetBrowser(nullptr); } +void CefBrowserHostBase::PostTaskToUIThread(CefRefPtr task) { + if (!CEF_CURRENTLY_ON_UIT()) { + CEF_POST_TASK( + CEF_UIT, + base::BindOnce(&CefBrowserHostBase::PostTaskToUIThread, this, task)); + return; + } + std::move(task)->Execute(); +} + CefRefPtr CefBrowserHostBase::GetBrowser() { return this; } @@ -397,6 +427,110 @@ CefRefPtr CefBrowserHostBase::GetVisibleNavigationEntry() { return new CefNavigationEntryImpl(entry); } +#if defined(OS_OHOS) +// copy settings string params +#define SETTINGS_STRING_SET(src, target) \ + cef_string_set(src.str, src.length, &target, true) + +void CefBrowserHostBase::UpdateBrowserSettings( + const CefBrowserSettings& browser_settings) { + /* font family */ + SETTINGS_STRING_SET(browser_settings.standard_font_family, settings_.standard_font_family); + SETTINGS_STRING_SET(browser_settings.fixed_font_family, settings_.fixed_font_family); + SETTINGS_STRING_SET(browser_settings.serif_font_family, settings_.serif_font_family); + SETTINGS_STRING_SET(browser_settings.sans_serif_font_family, settings_.sans_serif_font_family); + SETTINGS_STRING_SET(browser_settings.cursive_font_family, settings_.cursive_font_family); + SETTINGS_STRING_SET(browser_settings.fantasy_font_family, settings_.fantasy_font_family); + + /* font size*/ + settings_.default_font_size = browser_settings.default_font_size; + settings_.default_fixed_font_size = browser_settings.default_fixed_font_size; + settings_.minimum_font_size = browser_settings.minimum_font_size; + settings_.minimum_logical_font_size = + browser_settings.minimum_logical_font_size; + SETTINGS_STRING_SET(browser_settings.default_encoding, settings_.default_encoding); + settings_.javascript = browser_settings.javascript; + settings_.image_loading = browser_settings.image_loading; + settings_.local_storage = browser_settings.local_storage; + settings_.databases = browser_settings.databases; + settings_.universal_access_from_file_urls = + browser_settings.universal_access_from_file_urls; + settings_.file_access_from_file_urls = + browser_settings.file_access_from_file_urls; + /* ohos webview add*/ + settings_.force_dark_mode_enabled = browser_settings.force_dark_mode_enabled; + settings_.javascript_can_open_windows_automatically = + browser_settings.javascript_can_open_windows_automatically; + settings_.loads_images_automatically = + browser_settings.loads_images_automatically; + settings_.text_size_percent = browser_settings.text_size_percent; + settings_.mixed_content_mode = browser_settings.mixed_content_mode; + settings_.allow_running_insecure_content = + browser_settings.allow_running_insecure_content; + settings_.strict_mixed_content_checking = + browser_settings.strict_mixed_content_checking; + settings_.allow_mixed_content_upgrades = + browser_settings.allow_mixed_content_upgrades; + settings_.geolocation_enabled = browser_settings.geolocation_enabled; + settings_.supports_double_tap_zoom = + browser_settings.supports_double_tap_zoom; + settings_.supports_multi_touch_zoom = + browser_settings.supports_multi_touch_zoom; +} + +void CefBrowserHostBase::SetWebPreferences( + const CefBrowserSettings& browser_settings) { + UpdateBrowserSettings(browser_settings); + GetWebContents()->OnWebPreferencesChanged(); +} + +void CefBrowserHostBase::OnWebPreferencesChanged() { + GetWebContents()->OnWebPreferencesChanged(); +} + +void CefBrowserHostBase::PutUserAgent(const CefString& ua) { + if (!GetWebContents()) { + return; + } + + GetWebContents()->SetUserAgentOverride( + blink::UserAgentOverride::UserAgentOnly(ua), true); + + content::NavigationController& controller = GetWebContents()->GetController(); + for (int i = 0; i < controller.GetEntryCount(); ++i) { + controller.GetEntryAtIndex(i)->SetIsOverridingUserAgent(true); + } +} + +CefString CefBrowserHostBase::DefaultUserAgent() { + return embedder_support::GetUserAgent(); +} + +void CefBrowserHostBase::RegisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) { + OhJavascriptInjector* javascriptInjector = + OhJavascriptInjector::FromWebContents(GetWebContents()); + std::vector method_vector; + for (CefString method : method_list) { + method_vector.push_back(method.ToString()); + } + javascriptInjector->AddInterface(object_name.ToString(), method_vector); +} + +void CefBrowserHostBase::UnregisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) { + OhJavascriptInjector* javascriptInjector = + OhJavascriptInjector::FromWebContents(GetWebContents()); + std::vector method_vector; + for (CefString method : method_list) { + method_vector.push_back(method.ToString()); + } + javascriptInjector->RemoveInterface(object_name.ToString(), method_vector); +} +#endif + void CefBrowserHostBase::ReplaceMisspelling(const CefString& word) { if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK( @@ -545,6 +679,17 @@ void CefBrowserHostBase::GoForward() { } } +bool CefBrowserHostBase::CanGoBackOrForward(int num_steps) { + auto wc = GetWebContents(); + LOG(INFO) << "CanGoBackOrForward"; + if (wc != nullptr) { + LOG(INFO) << "CanGoBackOrForward:" + << wc->GetController().CanGoToOffset(num_steps); + return wc->GetController().CanGoToOffset(num_steps); + } + return false; +} + bool CefBrowserHostBase::IsLoading() { base::AutoLock lock_scope(state_lock_); return is_loading_; @@ -711,6 +856,131 @@ void CefBrowserHostBase::OnStateChanged(CefBrowserContentsState state_changed) { void CefBrowserHostBase::OnWebContentsDestroyed( content::WebContents* web_contents) {} +CefRefPtr +CefBrowserHostBase::GetPermissionRequestDelegate() { + return this; +} + +CefRefPtr CefBrowserHostBase::GetGeolocationPermissions() { + if (geolocation_permissions_ == nullptr) { + geolocation_permissions_ = new AlloyGeolocationAccess(); + } + return geolocation_permissions_; +} + +bool CefBrowserHostBase::UseLegacyGeolocationPermissionAPI() { + return true; +} + +void CefBrowserHostBase::AskGeolocationPermission( + const CefString& origin, + cef_permission_callback_t callback) { + if (UseLegacyGeolocationPermissionAPI()) { + PopupGeolocationPrompt(origin, std::move(callback)); + return; + } + permission_request_handler_->SendRequest(new AlloyAccessRequest( + origin, AlloyAccessRequest::Resources::GEOLOCATION, std::move(callback))); +} + +void CefBrowserHostBase::AbortAskGeolocationPermission( + const CefString& origin) { + RemoveGeolocationPrompt(origin); + return; +} + +void CefBrowserHostBase::PopupGeolocationPrompt( + std::string origin, + cef_permission_callback_t callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + bool show_prompt = unhandled_geolocation_prompts_.empty(); + unhandled_geolocation_prompts_.emplace_back(origin, std::move(callback)); + if (show_prompt) { + OnGeolocationShow(origin); + } +} + +void CefBrowserHostBase::OnGeolocationShow(std::string origin) { + // Reject if geoloaction is disabled, or the origin has a retained deny + if (!settings_.geolocation_enabled) { + NotifyGeolocationPermission(false, origin); + return; + } + + auto permissions = GetGeolocationPermissions(); + if (permissions->ContainOrigin(origin)) { + NotifyGeolocationPermission(permissions->IsOriginAccessEnabled(origin), + origin); + return; + } + + GetClient()->GetPermissionRequest()->OnGeolocationShow(origin); +} + +void CefBrowserHostBase::NotifyGeolocationPermission(bool value, + const CefString& origin) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + if (unhandled_geolocation_prompts_.empty()) + return; + if (origin == unhandled_geolocation_prompts_.front().first) { + std::move(unhandled_geolocation_prompts_.front().second).Run(value); + unhandled_geolocation_prompts_.pop_front(); + if (!unhandled_geolocation_prompts_.empty()) { + OnGeolocationShow(unhandled_geolocation_prompts_.front().first); + } + } +} + +void CefBrowserHostBase::RemoveGeolocationPrompt(std::string origin) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + bool removed_current_outstanding_callback = false; + std::list::iterator it = + unhandled_geolocation_prompts_.begin(); + while (it != unhandled_geolocation_prompts_.end()) { + if ((*it).first == origin) { + if (it == unhandled_geolocation_prompts_.begin()) { + removed_current_outstanding_callback = true; + } + it = unhandled_geolocation_prompts_.erase(it); + } else { + ++it; + } + } + + if (removed_current_outstanding_callback) { + GetClient()->GetPermissionRequest()->OnGeolocationHide(); + if (!unhandled_geolocation_prompts_.empty()) { + OnGeolocationShow(unhandled_geolocation_prompts_.front().first); + } + } +} + +void CefBrowserHostBase::AskProtectedMediaIdentifierPermission( + const CefString& origin, + cef_permission_callback_t callback) { + permission_request_handler_->SendRequest(new AlloyAccessRequest( + origin, AlloyAccessRequest::Resources::PROTECTED_MEDIA_ID, + std::move(callback))); +} + +void CefBrowserHostBase::AbortAskProtectedMediaIdentifierPermission( + const CefString& origin) { + permission_request_handler_->CancelRequest( + origin, AlloyAccessRequest::Resources::PROTECTED_MEDIA_ID); +} + +void CefBrowserHostBase::AskMIDISysexPermission( + const CefString& origin, + cef_permission_callback_t callback) { + permission_request_handler_->SendRequest(new AlloyAccessRequest( + origin, AlloyAccessRequest::Resources::MIDI_SYSEX, std::move(callback))); +} + +void CefBrowserHostBase::AbortAskMIDISysexPermission(const CefString& origin) { + permission_request_handler_->CancelRequest( + origin, AlloyAccessRequest::Resources::MIDI_SYSEX); +} + CefRefPtr CefBrowserHostBase::GetFrameForHost( const content::RenderFrameHost* host) { CEF_REQUIRE_UIT(); @@ -781,6 +1051,11 @@ void CefBrowserHostBase::OnDidFinishLoad(CefRefPtr frame, contents_delegate_->OnLoadEnd(frame, validated_url, http_status_code); } +void CefBrowserHostBase::OnUpdateHitData(const int type, const CefString extra_data) { + cef_hit_data_.type = type; + cef_hit_data_.extra_data = extra_data; +} + void CefBrowserHostBase::ViewText(const std::string& text) { if (!CEF_CURRENTLY_ON_UIT()) { CEF_POST_TASK(CEF_UIT, @@ -850,7 +1125,7 @@ content::BrowserContext* CefBrowserHostBase::GetBrowserContext() const { return nullptr; } -#if defined(TOOLKIT_VIEWS) +#if defined(TOOLKIT_VIEWS) || defined(OS_OHOS) views::Widget* CefBrowserHostBase::GetWindowWidget() const { CEF_REQUIRE_UIT(); if (!platform_delegate_) @@ -892,3 +1167,126 @@ void CefBrowserHostBase::InitializeDevToolsRegistrationOnUIThread( return; devtools_manager_->InitializeRegistrationOnUIThread(registration); } + +CefString CefBrowserHostBase::Title() { + auto web_contents = GetWebContents(); + if (web_contents) { + return web_contents->GetTitle(); + } + return ""; +} + +void CefBrowserHostBase::GetHitData(int& type, CefString& extra_data) { + type = cef_hit_data_.type; + extra_data = cef_hit_data_.extra_data; +} + +float CefBrowserHostBase::Scale() { + auto web_contents = GetWebContents(); + if (web_contents) { + return static_cast(web_contents) + ->page_scale_factor(); + } + return 1.0; +} + +bool CefBrowserHostBase::IsBase64Encoded(std::string encoding) { + return "base64" == encoding; +} + +std::string CefBrowserHostBase::GetDataURI(const std::string& data) { + return CefURIEncode(CefBase64Encode(data.data(), data.size()), false) + .ToString(); +} + +int CefBrowserHostBase::PageLoadProgress() { + auto web_contents = GetWebContents(); + if (web_contents) { + if (!web_contents->IsLoading()) { + return 100; + } + return round(100 * web_contents->GetLoadProgress()); + } + return 0; +} + +void CefBrowserHostBase::LoadWithDataAndBaseUrl(const CefString& baseUrl, + const CefString& data, + const CefString& mimeType, + const CefString& encoding, + const CefString& historyUrl) { + std::string dataBase = data.empty() ? "" : data; + std::string mimeTypeBase = mimeType.empty() ? "text/html" : mimeType; + std::string url = baseUrl.empty() ? "about:blank" : baseUrl; + std::string historyUrlBase = historyUrl.empty() ? "about:blank" : historyUrl; + + std::string buildData = "data:"; + buildData.append(mimeTypeBase); + if (!encoding.empty()) { + buildData.append(";charset="); + buildData.append(encoding); + } + buildData.append(";base64"); + buildData.append(","); + dataBase = GetDataURI(dataBase); + buildData.append(dataBase); + GURL data_url = GURL(buildData); + content::NavigationController::LoadURLParams loadUrlParams(data_url); + + if (!(url.find("data:") == 0)) { + loadUrlParams.virtual_url_for_data_url = GURL(historyUrlBase); + loadUrlParams.base_url_for_data_url = GURL(url); + } + + auto web_contents = GetWebContents(); + if (web_contents) { + web_contents->GetController().LoadURLWithParams(loadUrlParams); + } +} + +void CefBrowserHostBase::LoadWithData(const CefString& data, + const CefString& mimeType, + const CefString& encoding) { + std::string dataBase = data.empty() ? "" : data; + std::string mimeTypeBase = mimeType.empty() ? "text/html" : mimeType; + + std::string buildData = "data:"; + buildData.append(mimeTypeBase); + if (encoding.ToString() == "base64") { + buildData.append(";base64"); + } + buildData.append(","); + buildData.append(dataBase); + GURL data_url = GURL(buildData); + content::NavigationController::LoadURLParams loadUrlParams(data_url); + + auto web_contents = GetWebContents(); + if (web_contents) { + LOG(INFO) << "load data"; + web_contents->GetController().LoadURLWithParams(loadUrlParams); + } +} + +void CefBrowserHostBase::ExecuteJavaScript( + const CefString& code, + CefRefPtr callback) { + auto web_contents = GetWebContents(); + // enable inject javaScript + web_contents->GetMainFrame()->AllowInjectingJavaScript(); + if (web_contents) { + LOG(INFO) << "ExecuteJavaScript with callback"; + web_contents->GetMainFrame()->ExecuteJavaScript( + code.ToString16(), + base::BindOnce( + [](CefRefPtr callback, + base::Value result) { + LOG(INFO) << "javascript result callback enter"; + std::string json; + base::JSONWriter::Write(result, &json); + if (callback != nullptr) { + callback->OnJavaScriptExeResult(json); + } + }, + callback)); + } +} \ No newline at end of file diff --git a/cef/libcef/browser/browser_host_base.h b/cef/libcef/browser/browser_host_base.h index d30f0b43d0..dc9f9be31f 100644 --- a/cef/libcef/browser/browser_host_base.h +++ b/cef/libcef/browser/browser_host_base.h @@ -1,6 +1,7 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_BROWSER_HOST_BASE_H_ #define CEF_LIBCEF_BROWSER_BROWSER_HOST_BASE_H_ @@ -8,12 +9,15 @@ #include "include/cef_browser.h" #include "include/cef_client.h" +#include "include/cef_permission_request.h" +#include "include/cef_task.h" #include "include/views/cef_browser_view.h" #include "libcef/browser/browser_contents_delegate.h" #include "libcef/browser/browser_info.h" #include "libcef/browser/browser_platform_delegate.h" #include "libcef/browser/devtools/devtools_manager.h" #include "libcef/browser/frame_host_impl.h" +#include "libcef/browser/permission/alloy_permission_request_handler.h" #include "libcef/browser/request_context_impl.h" #include "base/observer_list.h" @@ -24,6 +28,8 @@ namespace extensions { class Extension; } +class AlloyPermissionRequestHandler; + // Parameters that are passed to the runtime-specific Create methods. struct CefBrowserCreateParams { CefBrowserCreateParams() {} @@ -90,12 +96,18 @@ struct CefBrowserCreateParams { extensions::mojom::ViewType::kInvalid; }; +struct CefHitData { + int type; + CefString extra_data; +}; + // Base class for CefBrowserHost implementations. Includes functionality that is // shared by the alloy and chrome runtimes. All methods are thread-safe unless // otherwise indicated. class CefBrowserHostBase : public CefBrowserHost, public CefBrowser, - public CefBrowserContentsDelegate::Observer { + public CefBrowserContentsDelegate::Observer, + public CefBrowserPermissionRequestDelegate { public: // Interface to implement for observers that wish to be informed of changes // to the CefBrowserHostBase. All methods will be called on the UI thread. @@ -150,6 +162,8 @@ class CefBrowserHostBase : public CefBrowserHost, // was not properly shut down. virtual void DestroyBrowser(); + void PostTaskToUIThread(CefRefPtr task) override; + // CefBrowserHost methods: CefRefPtr GetBrowser() override; CefRefPtr GetClient() override; @@ -182,12 +196,29 @@ class CefBrowserHostBase : public CefBrowserHost, bool current_only) override; CefRefPtr GetVisibleNavigationEntry() override; +#if defined(OS_OHOS) + /* ohos webview begin */ + void SetWebPreferences(const CefBrowserSettings& browser_settings) override; + void PutUserAgent(const CefString& ua) override; + CefString DefaultUserAgent() override; + void UpdateBrowserSettings(const CefBrowserSettings& browser_settings); + void RegisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) override; + void UnregisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) override; + void OnWebPreferencesChanged(); + /* ohos webview end */ +#endif + // CefBrowser methods: CefRefPtr GetHost() override; bool CanGoBack() override; void GoBack() override; bool CanGoForward() override; void GoForward() override; + bool CanGoBackOrForward(int num_steps) override; bool IsLoading() override; void Reload() override; void ReloadIgnoreCache() override; @@ -203,11 +234,54 @@ class CefBrowserHostBase : public CefBrowserHost, size_t GetFrameCount() override; void GetFrameIdentifiers(std::vector& identifiers) override; void GetFrameNames(std::vector& names) override; - + CefRefPtr GetPermissionRequestDelegate() + override; + CefRefPtr GetGeolocationPermissions() override; + CefString Title() override; + void GetHitData(int& type, CefString& extra_data) override; + int PageLoadProgress() override; + float Scale() override; + void LoadWithDataAndBaseUrl(const CefString& baseUrl, + const CefString& data, + const CefString& mimeType, + const CefString& encoding, + const CefString& historyUrl) override; + + void LoadWithData(const CefString& data, + const CefString& mimeType, + const CefString& encoding) override; + + void ExecuteJavaScript( + const CefString& code, + CefRefPtr callback) override; // CefBrowserContentsDelegate::Observer methods: void OnStateChanged(CefBrowserContentsState state_changed) override; void OnWebContentsDestroyed(content::WebContents* web_contents) override; + AlloyPermissionRequestHandler* GetPermissionRequestHandler() { + return permission_request_handler_.get(); + } + + // CefBrowserPermissionRequestDelegate methods: + void AskGeolocationPermission(const CefString& origin, + cef_permission_callback_t callback) override; + void AbortAskGeolocationPermission(const CefString& origin) override; + void NotifyGeolocationPermission(bool value, + const CefString& origin) override; + void AskProtectedMediaIdentifierPermission( + const CefString& origin, + cef_permission_callback_t callback) override; + void AbortAskProtectedMediaIdentifierPermission(const CefString& origin) override; + void AskMIDISysexPermission(const CefString& origin, + cef_permission_callback_t callback) override; + void AbortAskMIDISysexPermission(const CefString& origin) override; + + // Geolocation API support + void PopupGeolocationPrompt(std::string origin, + cef_permission_callback_t callback); + void RemoveGeolocationPrompt(std::string origin); + void OnGeolocationShow(std::string origin); + // Returns the frame associated with the specified RenderFrameHost. CefRefPtr GetFrameForHost(const content::RenderFrameHost* host); @@ -225,6 +299,7 @@ class CefBrowserHostBase : public CefBrowserHost, void OnDidFinishLoad(CefRefPtr frame, const GURL& validated_url, int http_status_code); + void OnUpdateHitData(const int type, const CefString extra_data); virtual void OnSetFocus(cef_focus_source_t source) = 0; void ViewText(const std::string& text); @@ -238,6 +313,9 @@ class CefBrowserHostBase : public CefBrowserHost, void OnBeforeClose(); void OnBrowserDestroyed(); + bool IsBase64Encoded(std::string encoding); + std::string GetDataURI(const std::string& data); + // Thread-safe accessors. const CefBrowserSettings& settings() const { return settings_; } CefRefPtr client() const { return client_; } @@ -309,6 +387,18 @@ class CefBrowserHostBase : public CefBrowserHost, std::unique_ptr devtools_manager_; private: + bool UseLegacyGeolocationPermissionAPI(); + // GURL is supplied by the content layer as requesting frame. + // Callback is supplied by the content layer, and is invoked with the result + // from the permission prompt. + typedef std::pair OriginCallback; + // The first element in the list is always the currently pending request. + std::list unhandled_geolocation_prompts_; + + CefHitData cef_hit_data_; + CefRefPtr geolocation_permissions_; + std::unique_ptr permission_request_handler_; + IMPLEMENT_REFCOUNTING(CefBrowserHostBase); DISALLOW_COPY_AND_ASSIGN(CefBrowserHostBase); }; diff --git a/cef/libcef/browser/browser_host_create.cc b/cef/libcef/browser/browser_host_create.cc index 10a3a4e256..21742d9599 100644 --- a/cef/libcef/browser/browser_host_create.cc +++ b/cef/libcef/browser/browser_host_create.cc @@ -82,20 +82,7 @@ bool CefBrowserHost::CreateBrowser( auto helper = std::make_unique( windowInfo, client, url, settings, extra_info, request_context); - - auto request_context_impl = - static_cast(request_context.get()); - - // Wait for the browser context to be initialized before creating the browser. - request_context_impl->ExecuteWhenBrowserContextInitialized(base::BindOnce( - [](std::unique_ptr helper) { - // Always execute asynchronously to avoid potential issues if we're - // being called synchronously during app initialization. - CEF_POST_TASK(CEF_UIT, base::BindOnce(&CreateBrowserHelper::Run, - std::move(helper))); - }, - std::move(helper))); - + helper->Run(); return true; } diff --git a/cef/libcef/browser/chrome/chrome_browser_host_impl.cc b/cef/libcef/browser/chrome/chrome_browser_host_impl.cc index 76b5da71d9..5c8bd8fc17 100644 --- a/cef/libcef/browser/chrome/chrome_browser_host_impl.cc +++ b/cef/libcef/browser/chrome/chrome_browser_host_impl.cc @@ -593,3 +593,5 @@ int ChromeBrowserHostImpl::GetCurrentTabIndex() const { } return TabStripModel::kNoTab; } + +void ChromeBrowserHostImpl::SetBackgroundColor(int color) {} \ No newline at end of file diff --git a/cef/libcef/browser/chrome/chrome_browser_host_impl.h b/cef/libcef/browser/chrome/chrome_browser_host_impl.h index c15352b307..c73499622c 100644 --- a/cef/libcef/browser/chrome/chrome_browser_host_impl.h +++ b/cef/libcef/browser/chrome/chrome_browser_host_impl.h @@ -129,6 +129,9 @@ class ChromeBrowserHostImpl : public CefBrowserHostBase { CefRefPtr GetExtension() override; bool IsBackgroundHost() override; + /* ohos webview begin */ + void SetBackgroundColor(int color) override; + /* ohos webview end */ protected: bool Navigate(const content::OpenURLParams& params) override; diff --git a/cef/libcef/browser/context.cc b/cef/libcef/browser/context.cc index 687e4b8df2..39b20a59ae 100644 --- a/cef/libcef/browser/context.cc +++ b/cef/libcef/browser/context.cc @@ -406,6 +406,7 @@ SkColor CefContext::GetBackgroundColor( !GetColor(browser_settings->background_color, is_windowless, &sk_color)) { GetColor(settings_.background_color, is_windowless, &sk_color); } + return sk_color; } diff --git a/cef/libcef/browser/frame_host_impl.cc b/cef/libcef/browser/frame_host_impl.cc index 1daae18d75..4234984399 100644 --- a/cef/libcef/browser/frame_host_impl.cc +++ b/cef/libcef/browser/frame_host_impl.cc @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. @@ -169,6 +170,10 @@ void CefFrameHostImpl::LoadURL(const CefString& url) { std::string()); } +void CefFrameHostImpl::LoadHeaderUrl(const CefString& url, const CefString& additionalHttpHeaders) { + LoadURLWithExtras(url, content::Referrer(), kPageTransitionExplicit, additionalHttpHeaders); +} + void CefFrameHostImpl::ExecuteJavaScript(const CefString& jsCode, const CefString& scriptUrl, int startLine) { @@ -303,6 +308,15 @@ void CefFrameHostImpl::RefreshAttributes() { parent_frame_id_ = MakeFrameId(render_frame_host_->GetParent()); } +void CefFrameHostImpl::SendTouchEvent(const CefTouchEvent& event) { + Cef_TouchEvent_Params touchEvent; + touchEvent.x = event.x; + touchEvent.y = event.y; + touchEvent.width = event.radius_x; + touchEvent.height = event.radius_y; + Send(new CefMsg_TouchEvent(MSG_ROUTING_NONE, touchEvent)); +} + void CefFrameHostImpl::NotifyMoveOrResizeStarted() { Send(new CefMsg_MoveOrResizeStarted(MSG_ROUTING_NONE)); } @@ -486,6 +500,7 @@ bool CefFrameHostImpl::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(CefFrameHostImpl, message) IPC_MESSAGE_HANDLER(CefHostMsg_FrameAttached, OnAttached) IPC_MESSAGE_HANDLER(CefHostMsg_DidFinishLoad, OnDidFinishLoad) + IPC_MESSAGE_HANDLER(CefHostMsg_HitData, OnUpdateHitData) IPC_MESSAGE_HANDLER(CefHostMsg_UpdateDraggableRegions, OnUpdateDraggableRegions) IPC_MESSAGE_HANDLER(CefHostMsg_Request, OnRequest) @@ -588,6 +603,12 @@ void CefFrameHostImpl::OnDidFinishLoad(const GURL& validated_url, browser->OnDidFinishLoad(this, validated_url, http_status_code); } +void CefFrameHostImpl::OnUpdateHitData(const Cef_HitData_Params param) { + auto browser = GetBrowserHostBase(); + if (browser) + browser->OnUpdateHitData(param.type, param.extra_data_for_type); +} + void CefFrameHostImpl::OnUpdateDraggableRegions( const std::vector& regions) { auto browser = GetBrowserHostBase(); @@ -657,6 +678,11 @@ void CefFrameHostImpl::OnResponse(const Cef_Response_Params& params) { Send(new CefMsg_ResponseAck(MSG_ROUTING_NONE, params.request_id)); } +void CefFrameHostImpl::PutZoomingForTextFactor(float factor) { + CEF_REQUIRE_UIT(); + Send(new CefMsg_PutZoomingForTextFactor(MSG_ROUTING_NONE, factor)); +} + void CefFrameHostImpl::OnResponseAck(int request_id) { response_manager_->RunAckHandler(request_id); } @@ -692,4 +718,4 @@ void CefExecuteJavaScriptWithUserGestureForTests(CefRefPtr frame, CefFrameHostImpl* impl = static_cast(frame.get()); if (impl) impl->ExecuteJavaScriptWithUserGestureForTests(javascript); -} +} \ No newline at end of file diff --git a/cef/libcef/browser/frame_host_impl.h b/cef/libcef/browser/frame_host_impl.h index 4d5167b403..df9fdbe0c4 100644 --- a/cef/libcef/browser/frame_host_impl.h +++ b/cef/libcef/browser/frame_host_impl.h @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. @@ -28,6 +29,8 @@ class Message; class GURL; struct Cef_DraggableRegion_Params; +struct Cef_TouchEvent_Params; +struct Cef_HitData_Params; struct Cef_Request_Params; struct Cef_Response_Params; class CefBrowserInfo; @@ -83,10 +86,14 @@ class CefFrameHostImpl : public CefFrame { CefRefPtr client) override; void SendProcessMessage(CefProcessId target_process, CefRefPtr message) override; + void LoadHeaderUrl(const CefString& url, const CefString& additionalHttpHeaders) override; void SetFocused(bool focused); void RefreshAttributes(); + // Send the touch point to the rederer to get hitdata. + void SendTouchEvent(const CefTouchEvent& event); + // Notification that a move or resize of the renderer's containing window has // started. Used on Windows and Linux with the Alloy runtime. void NotifyMoveOrResizeStarted(); @@ -115,6 +122,10 @@ class CefFrameHostImpl : public CefFrame { void SendJavaScript(const std::string& jsCode, const std::string& scriptUrl, int startLine); + + // Sets the zoom factor for text only. Used in layout modes other than + // Text Autosizing. + void PutZoomingForTextFactor(float factor); // Called from CefBrowserHostBase::DidStopLoading. void MaybeSendDidStopLoading(); @@ -154,6 +165,7 @@ class CefFrameHostImpl : public CefFrame { // OnMessageReceived message handlers. void OnAttached(); void OnDidFinishLoad(const GURL& validated_url, int http_status_code); + void OnUpdateHitData(const Cef_HitData_Params param); void OnUpdateDraggableRegions( const std::vector& regions); void OnRequest(const Cef_Request_Params& params); diff --git a/cef/libcef/browser/icon_helper.cc b/cef/libcef/browser/icon_helper.cc new file mode 100644 index 0000000000..beb0a12469 --- /dev/null +++ b/cef/libcef/browser/icon_helper.cc @@ -0,0 +1,150 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/icon_helper.h" + +#include "include/cef_display_handler.h" + +#include "base/logging.h" +#include "components/favicon_base/select_favicon_frames.h" +#include "content/public/browser/web_contents.h" + +namespace { + +constexpr int LARGEST_ICON_SIZE = 192; + +cef_color_type_t TransformSkColorType(SkColorType color_type) { + switch (color_type) { + case kRGBA_8888_SkColorType: + return CEF_COLOR_TYPE_RGBA_8888; + case kBGRA_8888_SkColorType: + return CEF_COLOR_TYPE_BGRA_8888; + default: + return CEF_COLOR_TYPE_UNKNOWN; + } +} + +cef_alpha_type_t TransformSkAlphaType(SkAlphaType alpha_type) { + switch (alpha_type) { + case kOpaque_SkAlphaType: + return CEF_ALPHA_TYPE_OPAQUE; + case kPremul_SkAlphaType: + return CEF_ALPHA_TYPE_PREMULTIPLIED; + case kUnpremul_SkAlphaType: + return CEF_ALPHA_TYPE_POSTMULTIPLIED; + default: + return CEF_ALPHA_TYPE_UNKNOWN; + } +} + +} // namespace + +void IconHelper::SetDisplayHandler(const CefRefPtr& handler) { + handler_ = handler; +} + +void IconHelper::SetBrowser(const CefRefPtr& browser) { + browser_ = browser; +} + +void IconHelper::SetWebContents(content::WebContents* new_contents) { + web_contents_ = new_contents; +} + +void IconHelper::OnUpdateFaviconURL( + content::RenderFrameHost* render_frame_host, + const std::vector& candidates) { + if (!handler_ || !browser_) { + LOG(ERROR) << "Initialized value is invalid"; + return; + } + for (const auto& candidate : candidates) { + if (!candidate->icon_url.is_valid()) + continue; + switch (candidate->icon_type) { + case blink::mojom::FaviconIconType::kFavicon: + DownloadFavicon(candidate); + break; + case blink::mojom::FaviconIconType::kTouchIcon: + handler_->OnReceivedTouchIconUrl(browser_, CefString(candidate->icon_url.spec()), false); + break; + case blink::mojom::FaviconIconType::kTouchPrecomposedIcon: + handler_->OnReceivedTouchIconUrl(browser_, CefString(candidate->icon_url.spec()), true); + break; + case blink::mojom::FaviconIconType::kInvalid: + LOG(INFO) << "An invalid icon type."; + break; + default: + NOTREACHED(); + break; + } + } +} + +void IconHelper::DownloadFavicon(const blink::mojom::FaviconURLPtr& candidate) { + if (!web_contents_) { + LOG(ERROR) << "WebContents is invalid"; + return; + } + web_contents_->DownloadImage( + candidate->icon_url, + true, // Is a favicon + 0, // No preferred size + LARGEST_ICON_SIZE, // Max bitmap size 192 + false, // Normal cache policy + base::BindOnce(&IconHelper::DownloadFaviconCallback, this)); +} + +void IconHelper::DownloadFaviconCallback( + int id, + int http_status_code, + const GURL& image_url, + const std::vector& bitmaps, + const std::vector& original_bitmap_sizes) { + if (http_status_code == 404) { + return; + } + + if (bitmaps.size() == 0) { + return; + } + std::vector best_indices; + SelectFaviconFrameIndices(original_bitmap_sizes, + std::vector(1U, LARGEST_ICON_SIZE), + &best_indices, nullptr); + const auto& bitmap = bitmaps[best_indices.size() == 0 ? 0 : best_indices.front()]; + if (bitmap.drawsNothing()) { + return; + } + bitmap_ = bitmap; + auto ret = bitmap_.writePixels(bitmap.pixmap()); + if (!ret) { + LOG(ERROR) << "Copy pixels failed."; + return; + } + void* pixels = bitmap_.getPixels(); + size_t byte_size = bitmap_.computeByteSize(); + if (!pixels || byte_size == 0) { + LOG(ERROR) << "Pixels value is invalid."; + return; + } + auto color_type = TransformSkColorType(bitmap_.colorType()); + auto alpha_type = TransformSkAlphaType(bitmap_.alphaType()); + size_t pixel_width = bitmap_.width(); + size_t pixel_height = bitmap_.height(); + OnReceivedIcon(pixels, pixel_width, pixel_height, color_type, alpha_type); +} + +void IconHelper::OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) { + if (!handler_ || !browser_) { + LOG(ERROR) << "Initialized value is invalid"; + return; + } + handler_->OnReceivedIcon(data, width, height, color_type, alpha_type); +} \ No newline at end of file diff --git a/cef/libcef/browser/icon_helper.h b/cef/libcef/browser/icon_helper.h new file mode 100644 index 0000000000..7a397e057d --- /dev/null +++ b/cef/libcef/browser/icon_helper.h @@ -0,0 +1,66 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_ICON_HELPER_H_ +#define CEF_LIBCEF_BROWSER_ICON_HELPER_H_ +#pragma once + +#include + +#include "include/cef_base.h" +#include "libcef/browser/thread_util.h" + +#include "third_party/blink/public/mojom/favicon/favicon_url.mojom-forward.h" +#include "third_party/skia/include/core/SkBitmap.h" + +namespace gfx { +class Size; +} // namespace gfx + +namespace content { +class RenderFrameHost; +class WebContents; +} // namespace content + +class CefBrowser; +class CefDisplayHandler; +class GURL; + +class IconHelper : public virtual CefBaseRefCounted { + public: + IconHelper() = default; + ~IconHelper() { + web_contents_ = nullptr; + } + + void SetDisplayHandler(const CefRefPtr& handler); + void SetBrowser(const CefRefPtr& browser); + void SetWebContents(content::WebContents* new_contents); + void OnUpdateFaviconURL(content::RenderFrameHost* render_frame_host, + const std::vector& candidates); + void DownloadFavicon(const blink::mojom::FaviconURLPtr& candidate); + void DownloadFaviconCallback(int id, + int http_status_code, + const GURL& image_url, + const std::vector& bitmaps, + const std::vector& original_bitmap_sizes); + void OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type); + + private: + content::WebContents* web_contents_ = nullptr; + CefRefPtr handler_ = nullptr; + CefRefPtr browser_ = nullptr; + SkBitmap bitmap_; + + IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(IconHelper); + DISALLOW_COPY_AND_ASSIGN(IconHelper); + +}; + +#endif // CEF_LIBCEF_BROWSER_ICON_HELPER_H_ \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.cc b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.cc new file mode 100644 index 0000000000..821c07a73b --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.cc @@ -0,0 +1,292 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "oh_gin_javascript_bridge_dispatcher_host.h" + +#include "content/browser/renderer_host/agent_scheduling_group_host.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/web_contents.h" +#include "libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_messages.h" +#include "libcef/common/values_impl.h" +#include "oh_gin_javascript_bridge_object_deletion_message_filter.h" + +namespace NWEB { +OhGinJavascriptBridgeDispatcherHost::OhGinJavascriptBridgeDispatcherHost( + content::WebContents* web_contents, + CefRefPtr client) + : content::WebContentsObserver(web_contents), client_(client) {} + +OhGinJavascriptBridgeDispatcherHost::~OhGinJavascriptBridgeDispatcherHost() { + client_.reset(); + method_map_.clear(); +} + +// Run on the UI thread. +void OhGinJavascriptBridgeDispatcherHost:: + InstallFilterAndRegisterAllRoutingIds() { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + if (method_map_.empty() || + !web_contents()->GetMainFrame()->GetProcess()->GetChannel()) { + return; + } + + // Unretained() is safe because ForEachFrame() is synchronous. + web_contents()->ForEachFrame(base::BindRepeating( + [](OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* frame) { + content::AgentSchedulingGroupHost& agent_scheduling_group = + static_cast(frame) + ->GetAgentSchedulingGroup(); + + scoped_refptr per_asg_filter = + OhGinJavascriptBridgeMessageFilter::FromHost( + agent_scheduling_group, + /*create_if_not_exists=*/true); + if (base::FeatureList::IsEnabled(features::kMBIMode)) { + scoped_refptr + process_global_filter = + OhGinJavascriptBridgeObjectDeletionMessageFilter::FromHost( + agent_scheduling_group.GetProcess(), + /*create_if_not_exists=*/true); + process_global_filter->AddRoutingIdForHost(host, frame); + } + + per_asg_filter->AddRoutingIdForHost(host, frame); + }, + base::Unretained(this))); +} + +void OhGinJavascriptBridgeDispatcherHost::RenderFrameCreated( + content::RenderFrameHost* render_frame_host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + content::AgentSchedulingGroupHost& agent_scheduling_group = + static_cast(render_frame_host) + ->GetAgentSchedulingGroup(); + if (scoped_refptr filter = + OhGinJavascriptBridgeMessageFilter::FromHost( + agent_scheduling_group, /*create_if_not_exists=*/false)) { + filter->AddRoutingIdForHost(this, render_frame_host); + } else { + InstallFilterAndRegisterAllRoutingIds(); + } + for (ObjectMethodMap::const_iterator iter = method_map_.begin(); + iter != method_map_.end(); ++iter) { + render_frame_host->Send(new OhGinJavascriptBridgeMsg_AddNamedObject( + render_frame_host->GetRoutingID(), iter->second.first, iter->first)); + } +} + +void OhGinJavascriptBridgeDispatcherHost::WebContentsDestroyed() { + // Unretained() is safe because ForEachFrame() is synchronous. + web_contents()->ForEachFrame(base::BindRepeating( + [](OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* frame) { + content::AgentSchedulingGroupHost& agent_scheduling_group = + static_cast(frame) + ->GetAgentSchedulingGroup(); + scoped_refptr filter = + OhGinJavascriptBridgeMessageFilter::FromHost( + agent_scheduling_group, /*create_if_not_exists=*/false); + + if (filter) + filter->RemoveHost(host); + }, + base::Unretained(this))); +} + +void OhGinJavascriptBridgeDispatcherHost::RenderViewHostChanged( + content::RenderViewHost* old_host, + content::RenderViewHost* new_host) { + content::AgentSchedulingGroupHost& agent_scheduling_group = + static_cast(new_host) + ->GetAgentSchedulingGroup(); + scoped_refptr filter = + OhGinJavascriptBridgeMessageFilter::FromHost( + agent_scheduling_group, + /*create_if_not_exists=*/false); + if (!filter) + InstallFilterAndRegisterAllRoutingIds(); +} + +void OhGinJavascriptBridgeDispatcherHost::AddNamedObject( + const std::string& object_name, + const std::vector& method_list) { + LOG(INFO) << "AddNamedObject::" << object_name; + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + { + std::unique_lock lk(object_mtx_); + ObjectMethodMap::iterator it; + for (it = method_map_.begin(); it != method_map_.end(); ++it) { + if (it->second.first == object_name) { + std::unordered_set method_set = it->second.second; + for (std::string method : method_list) { + method_set.emplace(method); + } + it->second.second = method_set; + return; + } + } + ++object_id_; + + MethodPair object_pair; + std::unordered_set method_set; + for (std::string s : method_list) { + method_set.emplace(s); + } + object_pair.first = object_name; + object_pair.second = method_set; + method_map_[object_id_] = object_pair; + } + + InstallFilterAndRegisterAllRoutingIds(); + + content::WebContentsImpl* web_contents_impl = + static_cast(web_contents()); + + web_contents_impl->SendToAllFramesIncludingPending( + new OhGinJavascriptBridgeMsg_AddNamedObject(MSG_ROUTING_NONE, object_name, + object_id_)); +} + +void OhGinJavascriptBridgeDispatcherHost::RemoveNamedObject( + const std::string& object_name, + const std::vector& method_list) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + { + std::unique_lock lk(object_mtx_); + ObjectMethodMap::iterator it; + for (it = method_map_.begin(); it != method_map_.end(); ++it) { + if (!(object_name == it->second.first)) { + continue; + } + method_map_.erase(it); + break; + } + } + + // |name| may come from |named_objects_|. Make a copy of name so that if + // |name| is from |named_objects_| it'll be valid after the remove below. + const std::string copied_name(object_name); + + content::WebContentsImpl* web_contents_impl = + static_cast(web_contents()); + web_contents_impl->SendToAllFramesIncludingPending( + new OhGinJavascriptBridgeMsg_RemoveNamedObject(MSG_ROUTING_NONE, + copied_name)); +} + +void OhGinJavascriptBridgeDispatcherHost::DocumentAvailableInMainFrame( + content::RenderFrameHost* render_frame_host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + (void)render_frame_host; +} + +// OhGinJavascriptBridgeDispatcherHost::FindObject( + +void OhGinJavascriptBridgeDispatcherHost::OnGetMethods( + int32_t object_id, + std::set* returned_method_names) { + LOG(INFO) << "OhGinJavascriptBridgeDispatcherHost::OnGetMethods::" + << object_id; + if (method_map_.find(object_id) == method_map_.end()) { + return; + } + MethodPair p = method_map_[object_id]; + for (auto iter = p.second.begin(); iter != p.second.end(); ++iter) { + returned_method_names->emplace(*iter); + } +} + +void OhGinJavascriptBridgeDispatcherHost::OnHasMethod( + int32_t object_id, + const std::string& method_name, + bool* result) { + LOG(INFO) << "OhGinJavascriptBridgeDispatcherHost::OnHasMethod::" + << method_name.c_str(); + if (method_map_.find(object_id) == method_map_.end()) { + *result = false; + return; + } + + MethodPair p = method_map_[object_id]; + if (p.second.find(method_name) == p.second.end()) { + *result = false; + return; + } + + *result = true; +} + +std::unique_ptr ParseValueTONWebValue( + CefRefPtr result) { + std::unique_ptr value = std::make_unique(); + if (!result.get() || result->GetSize() == 0) { + return value; + } + + CefRefPtr argument = result->GetValue(0); + + switch (argument->GetType()) { + case CefValueType::VTYPE_INT: + value = std::make_unique(result->GetInt(0)); + break; + case CefValueType::VTYPE_DOUBLE: { + value = std::make_unique(result->GetDouble(0)); + break; + } + case CefValueType::VTYPE_BOOL: + value = std::make_unique(result->GetBool(0)); + break; + case CefValueType::VTYPE_STRING: + value = std::make_unique(result->GetString(0).ToString()); + break; + case CefValueType::VTYPE_INVALID: + value = std::make_unique(); + break; + default: + value = std::make_unique(); + break; + } + + return value; +} + +void OhGinJavascriptBridgeDispatcherHost::OnInvokeMethod( + int routing_id, + int32_t object_id, + const std::string& method_name, + const base::ListValue& arguments, + base::ListValue* wrapped_result, + OhGinJavascriptBridgeError* error_code) { + (void)routing_id; + LOG(INFO) << "OnInvokeMethod method_name : " << method_name.c_str(); + if (method_map_.find(object_id) == method_map_.end()) { + *error_code = kOhGinJavascriptBridgeUnknownObjectId; + return; + } + base::ListValue* argument = const_cast(&arguments); + + CefRefPtr ceflistvalue = + new CefListValueImpl(argument, false, false); + + MethodPair object_pair = method_map_[object_id]; + + std::string method = method_name; + std::string classname = object_pair.first; + + CefRefPtr result = CefListValue::Create(); + + int error = + client_->NotifyJavaScriptResult(ceflistvalue, method, classname, result); + *error_code = OhGinJavascriptBridgeError(error); + if (error != 0) { + return; + } + + wrapped_result->Append(ParseValueTONWebValue(result)); +} +} // namespace NWEB \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.h b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.h new file mode 100644 index 0000000000..79ce84aa74 --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_dispatcher_host.h @@ -0,0 +1,77 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_DISPATCHEER_HOST_H +#define OH_GIN_JAVASCRIPT_BRIDGE_DISPATCHEER_HOST_H + +#include +#include +#include "base/memory/ref_counted.h" +#include "content/public/browser/web_contents_observer.h" +#include "include/cef_client.h" +#include "libcef/browser/browser_info.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_errors.h" + +namespace NWEB { +class OhGinJavascriptBridgeDispatcherHost + : public base::RefCountedThreadSafe, + public content::WebContentsObserver { + public: + OhGinJavascriptBridgeDispatcherHost(content::WebContents* web_contents, + CefRefPtr client); + OhGinJavascriptBridgeDispatcherHost( + const OhGinJavascriptBridgeDispatcherHost&) = delete; + OhGinJavascriptBridgeDispatcherHost& operator=( + const OhGinJavascriptBridgeDispatcherHost&) = delete; + + void AddNamedObject(const std::string& classname, + const std::vector& method_list); + void RemoveNamedObject(const std::string& classname, + const std::vector& method_list); + + // WebContentsObserver + void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override; + void DocumentAvailableInMainFrame( + content::RenderFrameHost* render_frame_host) override; + void WebContentsDestroyed() override; + void RenderViewHostChanged(content::RenderViewHost* old_host, + content::RenderViewHost* new_host) override; + + // Run on the background thread. + void OnGetMethods(int32_t object_id, + std::set* returned_method_names); + void OnHasMethod(int32_t object_id, + const std::string& method_name, + bool* result); + void OnInvokeMethod(int routing_id, + int32_t object_id, + const std::string& method_name, + const base::ListValue& arguments, + base::ListValue* result, + OhGinJavascriptBridgeError* error_code); + + private: + typedef int32_t ObjectID; + friend class base::RefCountedThreadSafe; + + // object id and ace js function name + typedef std::map ObjectMap; + + ~OhGinJavascriptBridgeDispatcherHost(); + + // Run on the UI thread. + void InstallFilterAndRegisterAllRoutingIds(); + + // js property name and object id + using MethodPair = std::pair>; + using ObjectMethodMap = std::map; + ObjectMethodMap method_map_; + int32_t object_id_ = 0; + + std::mutex object_mtx_; + CefRefPtr client_; +}; +} // namespace NWEB +#endif \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.cc b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.cc new file mode 100644 index 0000000000..b2d7083ba3 --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.cc @@ -0,0 +1,184 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "oh_gin_javascript_bridge_message_filter.h" + +#include +#include "base/types/pass_key.h" +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_messages.h" +#include "content/browser/renderer_host/agent_scheduling_group_host.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/web_contents.h" +#include "oh_gin_javascript_bridge_dispatcher_host.h" + +namespace { + +const char kOhGinJavascriptBridgeMessageFilterKey[] = + "OhGinJavascriptBridgeMessageFilter"; + +} // namespace + +namespace NWEB { +OhGinJavascriptBridgeMessageFilter::OhGinJavascriptBridgeMessageFilter( + base::PassKey pass_key, + content::AgentSchedulingGroupHost& agent_scheduling_group) + : BrowserMessageFilter(OhGinJavascriptBridgeMsgStart), + agent_scheduling_group_(agent_scheduling_group), + current_routing_id_(MSG_ROUTING_NONE) {} + +OhGinJavascriptBridgeMessageFilter::~OhGinJavascriptBridgeMessageFilter() {} + +void OhGinJavascriptBridgeMessageFilter::OnDestruct() const { + if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { + delete this; + } else { + content::GetUIThreadTaskRunner({})->DeleteSoon(FROM_HERE, this); + } +} + +bool OhGinJavascriptBridgeMessageFilter::OnMessageReceived( + const IPC::Message& message) { + std::thread dump_thread( + [message, this] { this->OnMessageReceivedThread(message); }); + dump_thread.detach(); + return true; +} + +bool OhGinJavascriptBridgeMessageFilter::OnMessageReceivedThread( + const IPC::Message& message) { + base::AutoReset routing_id(¤t_routing_id_, + message.routing_id()); + bool handled = true; + IPC_BEGIN_MESSAGE_MAP(OhGinJavascriptBridgeMessageFilter, message) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeHostMsg_GetMethods, OnGetMethods) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeHostMsg_HasMethod, OnHasMethod) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeHostMsg_InvokeMethod, + OnInvokeMethod) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeHostMsg_ObjectWrapperDeleted, + OnObjectWrapperDeleted) + IPC_MESSAGE_UNHANDLED(handled = false) + IPC_END_MESSAGE_MAP() + return handled; +} + +void OhGinJavascriptBridgeMessageFilter::AddRoutingIdForHost( + OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* render_frame_host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + base::AutoLock locker(hosts_lock_); + hosts_[render_frame_host->GetRoutingID()] = host; +} + +void OhGinJavascriptBridgeMessageFilter::RemoveHost( + const OhGinJavascriptBridgeDispatcherHost* host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + base::AutoLock locker(hosts_lock_); + auto iter = hosts_.begin(); + while (iter != hosts_.end()) { + if (iter->second == host) + hosts_.erase(iter++); + else + ++iter; + } +} + +void OhGinJavascriptBridgeMessageFilter::RenderProcessExited( + content::RenderProcessHost* rph, + const content::ChildProcessTerminationInfo& info) { +#if DCHECK_IS_ON() + { + scoped_refptr filter = + base::UserDataAdapter::Get( + &agent_scheduling_group_, kOhGinJavascriptBridgeMessageFilterKey); + DCHECK_EQ(this, filter.get()); + } +#endif + + rph->RemoveObserver(this); + + agent_scheduling_group_.RemoveUserData( + kOhGinJavascriptBridgeMessageFilterKey); +} + +scoped_refptr +OhGinJavascriptBridgeMessageFilter::FromHost( + content::AgentSchedulingGroupHost& agent_scheduling_group, + bool create_if_not_exists) { + scoped_refptr filter = + base::UserDataAdapter::Get( + &agent_scheduling_group, kOhGinJavascriptBridgeMessageFilterKey); + + if (!filter && create_if_not_exists) { + filter = base::MakeRefCounted( + base::PassKey(), + agent_scheduling_group); + agent_scheduling_group.AddFilter(filter.get()); + agent_scheduling_group.GetProcess()->AddObserver(filter.get()); + + agent_scheduling_group.SetUserData( + kOhGinJavascriptBridgeMessageFilterKey, + std::make_unique< + base::UserDataAdapter>( + filter.get())); + } + return filter; +} + +scoped_refptr +OhGinJavascriptBridgeMessageFilter::FindHost() { + base::AutoLock locker(hosts_lock_); + auto iter = hosts_.find(current_routing_id_); + if (iter != hosts_.end()) + return iter->second; + + return nullptr; +} + +void OhGinJavascriptBridgeMessageFilter::OnGetMethods( + int32_t object_id, + std::set* returned_method_names) { + scoped_refptr host = FindHost(); + if (host) { + host->OnGetMethods(object_id, returned_method_names); + } else { + *returned_method_names = std::set(); + } +} + +void OhGinJavascriptBridgeMessageFilter::OnHasMethod( + int32_t object_id, + const std::string& method_name, + bool* result) { + scoped_refptr host = FindHost(); + if (host) { + host->OnHasMethod(object_id, method_name, result); + } else { + *result = false; + } +} + +void OhGinJavascriptBridgeMessageFilter::OnInvokeMethod( + int32_t object_id, + const std::string& method_name, + const base::ListValue& arguments, + base::ListValue* wrapped_result, + OhGinJavascriptBridgeError* error_code) { + scoped_refptr host = FindHost(); + if (host) { + host->OnInvokeMethod(current_routing_id_, object_id, method_name, arguments, + wrapped_result, error_code); + } else { + wrapped_result->Append(std::make_unique()); + *error_code = kOhGinJavascriptBridgeRenderFrameDeleted; + } +} + +void OhGinJavascriptBridgeMessageFilter::OnObjectWrapperDeleted(int object_id) { + (void)object_id; +} +} // namespace NWEB \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h new file mode 100644 index 0000000000..de1af8204b --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_message_filter.h @@ -0,0 +1,92 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_MESSAGE_FILTER_H +#define OH_GIN_JAVASCRIPT_BRIDGE_MESSAGE_FILTER_H + +#include "base/types/pass_key.h" +#include "content/public/browser/browser_message_filter.h" +#include "content/public/browser/render_process_host_observer.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_errors.h" + +namespace IPC { +class Message; +} + +namespace content { +class AgentSchedulingGroupHost; +class RenderFrameHost; +class BrowserThread; +} // namespace content + +namespace NWEB { +class OhGinJavascriptBridgeDispatcherHost; +class OhGinJavascriptBridgeMessageFilter + : public content::BrowserMessageFilter, + public content::RenderProcessHostObserver { + public: + OhGinJavascriptBridgeMessageFilter( + base::PassKey pass_key, + content::AgentSchedulingGroupHost& agent_scheduling_group); + + // BrowserMessageFilter + void OnDestruct() const override; + bool OnMessageReceived(const IPC::Message& message) override; + // scoped_refptr OverrideTaskRunnerForMessage( + // const IPC::Message& message) override; + + // RenderProcessHostObserver + void RenderProcessExited( + content::RenderProcessHost* rph, + const content::ChildProcessTerminationInfo& info) override; + + // Called on the UI thread. + void AddRoutingIdForHost(OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* render_frame_host); + void RemoveHost(const OhGinJavascriptBridgeDispatcherHost* host); + + static scoped_refptr FromHost( + content::AgentSchedulingGroupHost& agent_scheduling_group, + bool create_if_not_exists); + + private: + friend class BrowserThread; + friend class base::DeleteHelper; + + typedef std::map> + HostMap; + ~OhGinJavascriptBridgeMessageFilter() override; + + bool OnMessageReceivedThread(const IPC::Message& message); + + // Called on the background thread. + scoped_refptr FindHost(); + + void OnGetMethods(int32_t object_id, + std::set* returned_method_names); + void OnHasMethod(int32_t object_id, + const std::string& method_name, + bool* result); + void OnInvokeMethod(int32_t object_id, + const std::string& method_name, + const base::ListValue& arguments, + base::ListValue* result, + OhGinJavascriptBridgeError* error_code); + void OnObjectWrapperDeleted(int object_id); + + // Accessed both from UI and background threads. + HostMap hosts_ GUARDED_BY(hosts_lock_); + base::Lock hosts_lock_; + + // The `AgentSchedulingGroupHost` that this object is associated with. This + // filter is installed on the host's channel. + content::AgentSchedulingGroupHost& agent_scheduling_group_; + + // The routing id of the RenderFrameHost whose request we are processing. + // Used on the background thread. + int32_t current_routing_id_; +}; +} // namespace NWEB +#endif \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.cc b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.cc new file mode 100644 index 0000000000..6aa2ba2ec7 --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.cc @@ -0,0 +1,136 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "oh_gin_javascript_bridge_object_deletion_message_filter.h" + +#include "base/auto_reset.h" +#include "base/feature_list.h" +#include "base/types/pass_key.h" +#include "build/build_config.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/content_features.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_messages.h" +#include "oh_gin_javascript_bridge_dispatcher_host.h" + +namespace { + +const char kOhGinJavascriptBridgeObjectDeletionMessageFilterKey[] = + "OhGinJavascriptBridgeObjectDeletionMessageFilter"; + +} // namespace +namespace NWEB { +OhGinJavascriptBridgeObjectDeletionMessageFilter:: + OhGinJavascriptBridgeObjectDeletionMessageFilter( + base::PassKey + pass_key) + : BrowserMessageFilter(OhGinJavascriptBridgeMsgStart), + current_routing_id_(MSG_ROUTING_NONE) { + DCHECK(base::FeatureList::IsEnabled(features::kMBIMode)); +} + +OhGinJavascriptBridgeObjectDeletionMessageFilter:: + ~OhGinJavascriptBridgeObjectDeletionMessageFilter() {} + +void OhGinJavascriptBridgeObjectDeletionMessageFilter::OnDestruct() const { + if (content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { + delete this; + } else { + content::GetUIThreadTaskRunner({})->DeleteSoon(FROM_HERE, this); + } +} + +bool OhGinJavascriptBridgeObjectDeletionMessageFilter::OnMessageReceived( + const IPC::Message& message) { + (void)message; + return false; +} + +scoped_refptr +OhGinJavascriptBridgeObjectDeletionMessageFilter::OverrideTaskRunnerForMessage( + const IPC::Message& message) { + (void)message; + return nullptr; +} + +void OhGinJavascriptBridgeObjectDeletionMessageFilter::AddRoutingIdForHost( + OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* render_frame_host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + base::AutoLock locker(hosts_lock_); + hosts_[render_frame_host->GetRoutingID()] = host; +} + +void OhGinJavascriptBridgeObjectDeletionMessageFilter::RemoveHost( + const OhGinJavascriptBridgeDispatcherHost* host) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + base::AutoLock locker(hosts_lock_); + auto iter = hosts_.begin(); + while (iter != hosts_.end()) { + if (iter->second == host) + hosts_.erase(iter++); + else + ++iter; + } +} + +void OhGinJavascriptBridgeObjectDeletionMessageFilter::RenderProcessExited( + content::RenderProcessHost* rph, + const content::ChildProcessTerminationInfo& info) { +#if DCHECK_IS_ON() + { + scoped_refptr filter = + base::UserDataAdapter< + OhGinJavascriptBridgeObjectDeletionMessageFilter>:: + Get(rph, kOhGinJavascriptBridgeObjectDeletionMessageFilterKey); + DCHECK_EQ(this, filter.get()); + } +#endif + rph->RemoveObserver(this); + rph->RemoveUserData(kOhGinJavascriptBridgeObjectDeletionMessageFilterKey); +} + +// static +scoped_refptr +OhGinJavascriptBridgeObjectDeletionMessageFilter::FromHost( + content::RenderProcessHost* rph, + bool create_if_not_exists) { + DCHECK(base::FeatureList::IsEnabled(features::kMBIMode)); + scoped_refptr filter = + base::UserDataAdapter:: + Get(rph, kOhGinJavascriptBridgeObjectDeletionMessageFilterKey); + if (!filter && create_if_not_exists) { + filter = + base::MakeRefCounted( + base::PassKey()); + rph->AddFilter(filter.get()); + rph->AddObserver(filter.get()); + + rph->SetUserData( + kOhGinJavascriptBridgeObjectDeletionMessageFilterKey, + std::make_unique>(filter.get())); + } + return filter; +} + +scoped_refptr +OhGinJavascriptBridgeObjectDeletionMessageFilter::FindHost() { + base::AutoLock locker(hosts_lock_); + auto iter = hosts_.find(current_routing_id_); + if (iter != hosts_.end()) + return iter->second; + + return nullptr; +} + +void OhGinJavascriptBridgeObjectDeletionMessageFilter::OnObjectWrapperDeleted( + ObjectID object_id) { + (void)object_id; +} +} // namespace NWEB \ No newline at end of file diff --git a/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.h b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.h new file mode 100644 index 0000000000..68e9350f26 --- /dev/null +++ b/cef/libcef/browser/javascript/oh_gin_javascript_bridge_object_deletion_message_filter.h @@ -0,0 +1,85 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_OBJECT_DELETION_MESSAGE_FILTER_H +#define OH_GIN_JAVASCRIPT_BRIDGE_OBJECT_DELETION_MESSAGE_FILTER_H + +#include + +#include +#include + +#include "base/memory/ref_counted.h" +#include "base/synchronization/lock.h" +#include "base/thread_annotations.h" +#include "base/types/pass_key.h" +#include "content/public/browser/browser_message_filter.h" +#include "content/public/browser/render_process_host_observer.h" + +#include "content/public/browser/child_process_termination_info.h" + +namespace IPC { +class Message; +} + +namespace content { +class RenderFrameHost; +class BrowserThread; +} // namespace content + +namespace NWEB { +class OhGinJavascriptBridgeDispatcherHost; +class OhGinJavascriptBridgeObjectDeletionMessageFilter + : public content::BrowserMessageFilter, + public content::RenderProcessHostObserver { + public: + // BrowserMessageFilter + void OnDestruct() const override; + bool OnMessageReceived(const IPC::Message& message) override; + scoped_refptr OverrideTaskRunnerForMessage( + const IPC::Message& message) override; + + // RenderProcessHostObserver + void RenderProcessExited( + content::RenderProcessHost* rph, + const content ::ChildProcessTerminationInfo& info) override; + + // Called on the UI thread. + void AddRoutingIdForHost(OhGinJavascriptBridgeDispatcherHost* host, + content::RenderFrameHost* render_frame_host); + void RemoveHost(const OhGinJavascriptBridgeDispatcherHost* host); + + static scoped_refptr + FromHost(content::RenderProcessHost* rph, bool create_if_not_exists); + + OhGinJavascriptBridgeObjectDeletionMessageFilter( + base::PassKey pass_key); + + private: + typedef int32_t ObjectID; + + friend class BrowserThread; + friend class base::DeleteHelper< + OhGinJavascriptBridgeObjectDeletionMessageFilter>; + + typedef std::map> + HostMap; + + ~OhGinJavascriptBridgeObjectDeletionMessageFilter() override; + + // Called on the background thread. + scoped_refptr FindHost(); + void OnObjectWrapperDeleted(ObjectID object_id); + + // Accessed both from UI and background threads. + HostMap hosts_ GUARDED_BY(hosts_lock_); + base::Lock hosts_lock_; + + // The routing id of the RenderFrameHost whose request we are processing. + // Used on the background thread. + int32_t current_routing_id_; +}; +} // namespace NWEB +#endif diff --git a/cef/libcef/browser/javascript/oh_javascript_injector.cc b/cef/libcef/browser/javascript/oh_javascript_injector.cc new file mode 100644 index 0000000000..0a37d983e0 --- /dev/null +++ b/cef/libcef/browser/javascript/oh_javascript_injector.cc @@ -0,0 +1,33 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "oh_javascript_injector.h" +#include "oh_gin_javascript_bridge_dispatcher_host.h" +namespace NWEB { +OhJavascriptInjector::OhJavascriptInjector(content::WebContents* web_contents, + CefRefPtr client) { + javascript_bridge_dispatcher_host_ = + new OhGinJavascriptBridgeDispatcherHost(web_contents, client); + web_contents->SetUserData(UserDataKey(), base::WrapUnique(this)); +} + +OhJavascriptInjector::~OhJavascriptInjector() {} + +void OhJavascriptInjector::AddInterface( + const std::string& object_name, + const std::vector method_list) { + LOG(INFO) << "AddInterface name : " << object_name.c_str(); + javascript_bridge_dispatcher_host_->AddNamedObject(object_name, method_list); +} + +void OhJavascriptInjector::RemoveInterface( + const std::string& object_name, + const std::vector method_list) { + LOG(INFO) << "RemoveInterface name : " << object_name.c_str(); + javascript_bridge_dispatcher_host_->RemoveNamedObject(object_name, + method_list); +} +WEB_CONTENTS_USER_DATA_KEY_IMPL(OhJavascriptInjector); +} // namespace NWEB diff --git a/cef/libcef/browser/javascript/oh_javascript_injector.h b/cef/libcef/browser/javascript/oh_javascript_injector.h new file mode 100644 index 0000000000..bc60a903da --- /dev/null +++ b/cef/libcef/browser/javascript/oh_javascript_injector.h @@ -0,0 +1,39 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_JAVASCRIPT_INJECTOR_H +#define OH_JAVASCRIPT_INJECTOR_H + +#include "content/public/browser/web_contents_user_data.h" +#include "include/cef_client.h" +#include "libcef/browser/browser_info.h" + +namespace NWEB { +class OhGinJavascriptBridgeDispatcherHost; + +class OhJavascriptInjector + : public content::WebContentsUserData { + public: + OhJavascriptInjector(content::WebContents* web_contents, + CefRefPtr client); + + OhJavascriptInjector(const OhJavascriptInjector&) = delete; + OhJavascriptInjector& operator=(const OhJavascriptInjector&) = delete; + ~OhJavascriptInjector(); + + void AddInterface(const std::string& object_name, + const std::vector method_list); + void RemoveInterface(const std::string& object_name, + const std::vector method_list); + + private: + friend class content::WebContentsUserData; + + scoped_refptr + javascript_bridge_dispatcher_host_; + WEB_CONTENTS_USER_DATA_KEY_DECL(); +}; +} // namespace NWEB +#endif \ No newline at end of file diff --git a/cef/libcef/browser/net_service/cookie_manager_impl.cc b/cef/libcef/browser/net_service/cookie_manager_impl.cc index 935cad6c33..67c7419dd7 100644 --- a/cef/libcef/browser/net_service/cookie_manager_impl.cc +++ b/cef/libcef/browser/net_service/cookie_manager_impl.cc @@ -46,8 +46,9 @@ void RunAsyncCompletionOnUIThread(CefRefPtr callback) { // Always execute the callback asynchronously. void SetCookieCallbackImpl(CefRefPtr callback, net::CookieAccessResult access_result) { - if (!callback.get()) + if (!callback.get()) { return; + } const bool is_include = access_result.status.IsInclude(); if (!is_include) { LOG(WARNING) << "SetCookie failed with reason: " @@ -78,6 +79,13 @@ void ExecuteVisitor(CefRefPtr visitor, auto cookie_manager = GetCookieManager(browser_context); int total = cookies.size(), count = 0; + if (total == 0) { + CefCookie cookie; + bool deleteCookie = false; + visitor->Visit(cookie, 0, 0, deleteCookie); + return; + } + for (const auto& cc : cookies) { CefCookie cookie; net_service::MakeCefCookie(cc, cookie); @@ -92,6 +100,8 @@ void ExecuteVisitor(CefRefPtr visitor, break; count++; } + std::string cookie_line = net::CanonicalCookie::BuildCookieLine(cookies); + visitor->SetCookieLine(CefString(cookie_line)); } // Always execute the callback asynchronously. @@ -114,7 +124,6 @@ void GetCookiesCallbackImpl( } GetAllCookiesCallbackImpl(visitor, browser_context_getter, cookies); } - } // namespace CefCookieManagerImpl::CefCookieManagerImpl() {} @@ -139,6 +148,30 @@ void CefCookieManagerImpl::Initialize( RunAsyncCompletionOnUIThread(callback); } +bool CefCookieManagerImpl::IsAcceptCookieAllowed() { + return accept_cookies_; +} + +void CefCookieManagerImpl::PutAcceptCookieEnabled(bool accept) { + accept_cookies_ = accept; +} + +bool CefCookieManagerImpl::IsFileURLSchemeCookiesAllowed() { + return allow_file_scheme_cookies_; +} + +void CefCookieManagerImpl::PutAcceptFileURLSchemeCookiesEnabled(bool allow) { + if (!ValidContext()) { + StoreOrTriggerInitCallback(base::BindOnce( + base::IgnoreResult(&CefCookieManagerImpl:: + PutAcceptFileURLSchemeCookiesEnabledInternal), + this, allow)); + return; + } + + PutAcceptFileURLSchemeCookiesEnabledInternal(allow); +} + bool CefCookieManagerImpl::VisitAllCookies( CefRefPtr visitor) { if (!visitor.get()) @@ -179,8 +212,9 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url, const CefCookie& cookie, CefRefPtr callback) { GURL gurl = GURL(url.ToString()); - if (!gurl.is_valid()) + if (!gurl.is_valid()) { return false; + } if (!ValidContext()) { StoreOrTriggerInitCallback(base::BindOnce( @@ -195,6 +229,7 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url, bool CefCookieManagerImpl::DeleteCookies( const CefString& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) { // Empty URLs are allowed but not invalid URLs. GURL gurl = GURL(url.ToString()); @@ -204,11 +239,11 @@ bool CefCookieManagerImpl::DeleteCookies( if (!ValidContext()) { StoreOrTriggerInitCallback(base::BindOnce( base::IgnoreResult(&CefCookieManagerImpl::DeleteCookiesInternal), this, - gurl, cookie_name, callback)); + gurl, cookie_name, is_session, callback)); return true; } - return DeleteCookiesInternal(gurl, cookie_name, callback); + return DeleteCookiesInternal(gurl, cookie_name, is_session, callback); } bool CefCookieManagerImpl::FlushStore( @@ -223,6 +258,30 @@ bool CefCookieManagerImpl::FlushStore( return FlushStoreInternal(callback); } +void CefCookieManagerImpl::PutAcceptFileURLSchemeCookiesEnabledCompleted( + bool allow, + bool can_change_schemes) { + if (can_change_schemes) { + allow_file_scheme_cookies_ = allow; + } +} + +bool CefCookieManagerImpl::PutAcceptFileURLSchemeCookiesEnabledInternal( + bool allow) { + DCHECK(ValidContext()); + auto browser_context = GetBrowserContext(browser_context_getter_); + if (!browser_context) + return false; + + GetCookieManager(browser_context) + ->AllowFileSchemeCookies( + allow, + base::BindOnce(&CefCookieManagerImpl:: + PutAcceptFileURLSchemeCookiesEnabledCompleted, + base::Unretained(this), allow)); + return true; +} + bool CefCookieManagerImpl::VisitAllCookiesInternal( CefRefPtr visitor) { DCHECK(ValidContext()); @@ -308,7 +367,6 @@ bool CefCookieManagerImpl::SetCookieInternal( auto browser_context = GetBrowserContext(browser_context_getter_); if (!browser_context) return false; - GetCookieManager(browser_context) ->SetCanonicalCookie(*canonical_cookie, url, options, base::Bind(SetCookieCallbackImpl, callback)); @@ -318,6 +376,7 @@ bool CefCookieManagerImpl::SetCookieInternal( bool CefCookieManagerImpl::DeleteCookiesInternal( const GURL& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) { DCHECK(ValidContext()); DCHECK(url.is_empty() || url.is_valid()); @@ -336,6 +395,11 @@ bool CefCookieManagerImpl::DeleteCookiesInternal( deletion_filter->cookie_name = cookie_name; } + if (is_session) { + deletion_filter->session_control = + network::mojom::CookieDeletionSessionControl::SESSION_COOKIES; + } + auto browser_context = GetBrowserContext(browser_context_getter_); if (!browser_context) return false; @@ -388,3 +452,10 @@ CefRefPtr CefCookieManager::GetGlobalManager( CefRefPtr context = CefRequestContext::GetGlobalContext(); return context ? context->GetCookieManager(callback) : nullptr; } + +bool CefCookieManager::CreateCefCookie(const CefString& url, + const CefString& value, + CefCookie& cef_cookie) { + return net_service::MakeCefCookie(GURL(url.ToString()), value.ToString(), + cef_cookie); +} diff --git a/cef/libcef/browser/net_service/cookie_manager_impl.h b/cef/libcef/browser/net_service/cookie_manager_impl.h index 036cc3edfb..860ec7b90c 100644 --- a/cef/libcef/browser/net_service/cookie_manager_impl.h +++ b/cef/libcef/browser/net_service/cookie_manager_impl.h @@ -5,6 +5,8 @@ #ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_COOKIE_MANAGER_IMPL_H_ #define CEF_LIBCEF_BROWSER_NET_SERVICE_COOKIE_MANAGER_IMPL_H_ +#include + #include "include/cef_cookie.h" #include "libcef/browser/browser_context.h" #include "libcef/browser/thread_util.h" @@ -23,6 +25,10 @@ class CefCookieManagerImpl : public CefCookieManager { CefRefPtr callback); // CefCookieManager methods. + bool IsAcceptCookieAllowed() override; + void PutAcceptCookieEnabled(bool accept) override; + bool IsFileURLSchemeCookiesAllowed() override; + void PutAcceptFileURLSchemeCookiesEnabled(bool allow) override; bool VisitAllCookies(CefRefPtr visitor) override; bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, @@ -32,10 +38,13 @@ class CefCookieManagerImpl : public CefCookieManager { CefRefPtr callback) override; bool DeleteCookies(const CefString& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) override; bool FlushStore(CefRefPtr callback) override; private: + void PutAcceptFileURLSchemeCookiesEnabledCompleted(bool allow, bool can_change_schemes); + bool PutAcceptFileURLSchemeCookiesEnabledInternal(bool allow); bool VisitAllCookiesInternal(CefRefPtr visitor); bool VisitUrlCookiesInternal(const GURL& url, bool includeHttpOnly, @@ -45,6 +54,7 @@ class CefCookieManagerImpl : public CefCookieManager { CefRefPtr callback); bool DeleteCookiesInternal(const GURL& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback); bool FlushStoreInternal(CefRefPtr callback); @@ -58,6 +68,8 @@ class CefCookieManagerImpl : public CefCookieManager { CefBrowserContext::Getter browser_context_getter_; bool initialized_ = false; + std::atomic accept_cookies_ = true; + std::atomic allow_file_scheme_cookies_ = false; std::vector init_callbacks_; IMPLEMENT_REFCOUNTING(CefCookieManagerImpl); diff --git a/cef/libcef/browser/net_service/net_helpers.cc b/cef/libcef/browser/net_service/net_helpers.cc new file mode 100644 index 0000000000..e1a9b4cf59 --- /dev/null +++ b/cef/libcef/browser/net_service/net_helpers.cc @@ -0,0 +1,53 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/net_service/net_helpers.h" + +#include "url/gurl.h" +#include "include/base/cef_logging.h" +#include "base/strings/string_util.h" +#include "base/path_service.h" +#include "base/base_paths_ohos.h" +#include "base/files/file_path.h" + +namespace net_service { + +bool NetHelpers::allow_content_access = false; +bool NetHelpers::allow_file_access = false; + +bool NetHelpers::ShouldBlockContentUrls() { + return !allow_content_access; +} + +bool NetHelpers::ShouldBlockFileUrls() { + return !allow_file_access; +} + +bool IsSpecialFileUrl(const GURL& url) { + if (!url.is_valid() || !url.SchemeIsFile() || !url.has_path()) + return false; + base::FilePath OhosAppDataPath; + if (!base::PathService::Get(base::DIR_OHOS_APP_DATA, &OhosAppDataPath)) { + return false; + } + LOG(INFO) << "AppDataPath:" << OhosAppDataPath.value(); + + return base::StartsWith(url.path(), OhosAppDataPath.value(), + base::CompareCase::SENSITIVE); +} + +bool IsURLBlocked(const GURL& url) { + // Part of implementation of NWebPreference.allowContentAccess. + if (url.SchemeIs(url::kContentScheme) && NetHelpers::ShouldBlockContentUrls()) + return true; + + // Part of implementation of NWebPreference.allowFileAccess. + if (url.SchemeIsFile() && NetHelpers::ShouldBlockFileUrls()) { + // Appdatas are always available. + return !IsSpecialFileUrl(url); + } + return false; +} + +} // namespace net_service diff --git a/cef/libcef/browser/net_service/net_helpers.h b/cef/libcef/browser/net_service/net_helpers.h new file mode 100644 index 0000000000..2bd485ad36 --- /dev/null +++ b/cef/libcef/browser/net_service/net_helpers.h @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_NET_HELPERS_H_ +#define CEF_LIBCEF_BROWSER_NET_SERVICE_NET_HELPERS_H_ + +class GURL; + +namespace net_service { + +#define NETHELPERS_EXPORT __attribute__((visibility("default"))) + +class NETHELPERS_EXPORT NetHelpers { +public: + static bool ShouldBlockContentUrls(); + static bool ShouldBlockFileUrls(); + + static bool allow_content_access; + static bool allow_file_access; +}; + +bool IsSpecialFileUrl(const GURL& url); + +// Returns true if the given URL should be aborted with +// net::ERR_ACCESS_DENIED. +bool IsURLBlocked(const GURL& url); + +} // namespace net_service + +#endif // CEF_LIBCEF_BROWSER_NET_SERVICE_NET_HELPERS_H_ diff --git a/cef/libcef/browser/net_service/proxy_url_loader_factory.cc b/cef/libcef/browser/net_service/proxy_url_loader_factory.cc index c5546c29f0..6949ca15fb 100644 --- a/cef/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/cef/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -1,16 +1,18 @@ -// Copyright (c) 2019 The Chromium Embedded Framework Authors. Portions -// Copyright (c) 2018 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/net_service/proxy_url_loader_factory.h" #include "libcef/browser/context.h" #include "libcef/browser/origin_whitelist_impl.h" #include "libcef/browser/thread_util.h" +#include "libcef/browser/net_service/net_helpers.h" #include "libcef/common/cef_switches.h" #include "libcef/common/net/scheme_registration.h" #include "libcef/common/net_service/net_service_util.h" +#include "libcef/common/request_impl.h" #include "base/barrier_closure.h" #include "base/command_line.h" @@ -62,6 +64,28 @@ bool DisableRequestHandlingForTesting() { return disabled; } +CefRefPtr ExtractHttpErrorResponse(const net::HttpResponseHeaders* headers) { + CefRefPtr response = CefResponse::Create(); + response->SetStatus(headers->response_code()); + response->SetStatusText(headers->GetStatusText()); + + size_t headers_line = 0; + std::string header_name, header_value; + CefResponse::HeaderMap map; + while (headers->EnumerateHeaderLines( + &headers_line, &header_name, &header_value)) { + map.insert({CefString(header_name), CefString(header_value)}); + } + response->SetHeaderMap(map); + std::string mime_type; + std::string encoding; + headers->GetMimeType(&mime_type); + headers->GetCharset(&encoding); + response->SetMimeType(CefString(mime_type)); + response->SetCharset(CefString(encoding)); + return response; +} + } // namespace // Owns all of the ProxyURLLoaderFactorys for a given BrowserContext. Since @@ -209,6 +233,12 @@ class InterceptedRequest : public network::mojom::URLLoader, // Called from InterceptDelegate::OnInputStreamOpenFailed. void InputStreamFailed(bool restart_needed); + void OnHttpErrorForUIThread(int32_t, + CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr error_response); + // mojom::TrustedHeaderClient methods: void OnBeforeSendHeaders(const net::HttpRequestHeaders& headers, OnBeforeSendHeadersCallback callback) override; @@ -460,6 +490,12 @@ void InterceptedRequest::Restart() { } } + if (IsURLBlocked(request_.url)) { + SendErrorAndCompleteImmediately(net::ERR_ACCESS_DENIED); + LOG(INFO) << "File url access denied! url=" << request_.url.spec(); + return; + } + const GURL original_url = request_.url; factory_->request_handler_->OnBeforeRequest( @@ -551,7 +587,23 @@ void InterceptedRequest::OnReceiveEarlyHints( void InterceptedRequest::OnReceiveResponse( network::mojom::URLResponseHeadPtr head) { current_response_ = std::move(head); - + if (current_response_->headers && current_response_->headers->response_code() >= 400) { + // The WebViewClient onReceivedHttpError callback will be invoked for any resource + // (such as main page, iframe, image, etc.) with status code >= 400 + auto error_reponse = ExtractHttpErrorResponse(current_response_->headers.get()); + CefRefPtr request = new CefRequestImpl(); + request->SetURL(CefString(request_.url.spec())); + request->SetMethod(CefString(request_.method)); + request->Set(request_.headers); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&InterceptedRequest::OnHttpErrorForUIThread, + base::Unretained(this), + id_, + request, + request_.is_main_frame, + request_.has_user_gesture, + error_reponse)); + } if (current_request_uses_header_client_) { // Use the headers we got from OnHeadersReceived as that'll contain // Set-Cookie if it existed. @@ -1147,6 +1199,22 @@ void InterceptedRequest::OnUploadProgressACK() { waiting_for_upload_progress_ack_ = false; } +void InterceptedRequest::OnHttpErrorForUIThread(int32_t id, + CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr error_response) { + if (!factory_) { + LOG(INFO) << "factory is invalid"; + return; + } + if (!factory_->request_handler_) { + LOG(INFO) << "request handler is invalid"; + return; + } + factory_->request_handler_->OnHttpError(id, request, is_main_frame, has_user_gesture, error_response); +} + //============================== // InterceptedRequestHandler //============================== diff --git a/cef/libcef/browser/net_service/proxy_url_loader_factory.h b/cef/libcef/browser/net_service/proxy_url_loader_factory.h index 16bde50185..5f26acd9ff 100644 --- a/cef/libcef/browser/net_service/proxy_url_loader_factory.h +++ b/cef/libcef/browser/net_service/proxy_url_loader_factory.h @@ -1,11 +1,12 @@ -// Copyright (c) 2019 The Chromium Embedded Framework Authors. Portions -// Copyright (c) 2018 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_PROXY_URL_LOADER_FACTORY_H_ #define CEF_LIBCEF_BROWSER_NET_SERVICE_PROXY_URL_LOADER_FACTORY_H_ +#include "include/internal/cef_ptr.h" #include "libcef/browser/net_service/stream_reader_url_loader.h" #include "base/callback.h" @@ -21,6 +22,9 @@ #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" +class CefRequest; +class CefResponse; + namespace content { class ResourceContext; } @@ -125,6 +129,13 @@ class InterceptedRequestHandler { int error_code, bool safebrowsing_hit) {} + // Called on received http request error. + virtual void OnHttpError(int32_t request_id, + CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr error_response) {} + private: DISALLOW_COPY_AND_ASSIGN(InterceptedRequestHandler); }; diff --git a/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc b/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc index 1e57bef431..43d6fd9933 100644 --- a/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/cef/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -1,6 +1,7 @@ -// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/net_service/resource_request_handler_wrapper.h" @@ -669,7 +670,6 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { // The request will be handled by the NetworkService. Remove the // "Accept-Language" header here so that it can be re-added in // URLRequestHttpJob::AddExtraHeaders with correct ordering applied. - request->headers.RemoveHeader(net::HttpRequestHeaders::kAcceptLanguage); } // Continue the request. @@ -993,6 +993,27 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler { RemoveState(request_id); } + void OnHttpError(int32_t request_id, + CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr error_response) override { + CEF_REQUIRE_UIT(); + if (!init_state_->browser_) { + return; + } + CefRefPtr client = init_state_->browser_->GetHost()->GetClient(); + if (!client) { + return; + } + CefRefPtr load_handler = client->GetLoadHandler(); + if (!load_handler) { + return; + } + load_handler->OnHttpError(request, is_main_frame, has_user_gesture, + error_response); + } + private: void CallHandlerOnComplete(RequestState* state, const network::URLLoaderCompletionStatus& status) { diff --git a/cef/libcef/browser/net_service/resource_request_handler_wrapper.h b/cef/libcef/browser/net_service/resource_request_handler_wrapper.h index 52d2b27921..60ffeb66bf 100644 --- a/cef/libcef/browser/net_service/resource_request_handler_wrapper.h +++ b/cef/libcef/browser/net_service/resource_request_handler_wrapper.h @@ -1,6 +1,7 @@ -// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_ #define CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_ diff --git a/cef/libcef/browser/osr/browser_platform_delegate_osr.cc b/cef/libcef/browser/osr/browser_platform_delegate_osr.cc index a086176e84..c298893749 100644 --- a/cef/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/cef/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -157,8 +157,10 @@ void CefBrowserPlatformDelegateOsr::SendMouseWheelEvent( void CefBrowserPlatformDelegateOsr::SendTouchEvent(const CefTouchEvent& event) { CefRenderWidgetHostViewOSR* view = GetOSRHostView(); - if (view) - view->SendTouchEvent(event); + if (!view) + return; + view->SendTouchEvent(event); + SendTouchEventToRender(event); } void CefBrowserPlatformDelegateOsr::SendFocusEvent(bool setFocus) { diff --git a/cef/libcef/browser/osr/render_widget_host_view_osr.cc b/cef/libcef/browser/osr/render_widget_host_view_osr.cc index 49c1568285..b8ccb16d4f 100644 --- a/cef/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/cef/libcef/browser/osr/render_widget_host_view_osr.cc @@ -1,7 +1,7 @@ -// Copyright (c) 2014 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/browser/osr/render_widget_host_view_osr.h" @@ -931,6 +931,16 @@ void CefRenderWidgetHostViewOSR::OnRenderFrameMetadataChangedAfterActivation( weak_ptr_factory_.GetWeakPtr())); } } +#if defined(OS_OHOS) + gfx::SizeF root_layer_size = metadata.root_layer_size; + if (root_layer_size != root_layer_size_) { + root_layer_size_ = root_layer_size; + + // Send the notification asynchronously. + CEF_POST_TASK(CEF_UIT, base::Bind(&CefRenderWidgetHostViewOSR::OnRootLayerChanged, + weak_ptr_factory_.GetWeakPtr())); + } +#endif } std::unique_ptr @@ -1622,6 +1632,18 @@ void CefRenderWidgetHostViewOSR::OnScrollOffsetChanged() { is_scroll_offset_changed_pending_ = false; } +#if defined(OS_OHOS) +void CefRenderWidgetHostViewOSR::OnRootLayerChanged() { + if (browser_impl_.get()) { + CefRefPtr handler = + browser_impl_->client()->GetRenderHandler(); + CHECK(handler); + handler->OnRootLayerChanged(browser_impl_.get(), root_layer_size_.height(), + root_layer_size_.width()); + } +} +#endif + void CefRenderWidgetHostViewOSR::AddGuestHostView( CefRenderWidgetHostViewOSR* guest_host) { guest_host_views_.insert(guest_host); @@ -1684,3 +1706,11 @@ void CefRenderWidgetHostViewOSR::UpdateBackgroundColorFromRenderer( GetRootLayer()->SetFillsBoundsOpaquely(opaque); GetRootLayer()->SetColor(color); } + +void CefRenderWidgetHostViewOSR::SetDoubleTapSupportEnabled(bool enabled) { + gesture_provider_.SetDoubleTapSupportForPlatformEnabled(enabled); +} + +void CefRenderWidgetHostViewOSR::SetMultiTouchZoomSupportEnabled(bool enabled) { + gesture_provider_.SetMultiTouchZoomSupportEnabled(enabled); +} diff --git a/cef/libcef/browser/osr/render_widget_host_view_osr.h b/cef/libcef/browser/osr/render_widget_host_view_osr.h index 2f63d0d7de..ce0fae2b71 100644 --- a/cef/libcef/browser/osr/render_widget_host_view_osr.h +++ b/cef/libcef/browser/osr/render_widget_host_view_osr.h @@ -1,7 +1,7 @@ -// Copyright (c) 2014 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_OSR_H_ #define CEF_LIBCEF_BROWSER_OSR_RENDER_WIDGET_HOST_VIEW_OSR_H_ @@ -274,6 +274,9 @@ class CefRenderWidgetHostViewOSR void ReleaseCompositor(); + void SetDoubleTapSupportEnabled(bool enabled); + void SetMultiTouchZoomSupportEnabled(bool enabled); + private: void SetFrameRate(); bool SetDeviceScaleFactor(); @@ -288,6 +291,10 @@ class CefRenderWidgetHostViewOSR void OnScrollOffsetChanged(); +#if defined(OS_OHOS) + void OnRootLayerChanged(); +#endif + void AddGuestHostView(CefRenderWidgetHostViewOSR* guest_host); void RemoveGuestHostView(CefRenderWidgetHostViewOSR* guest_host); @@ -372,6 +379,9 @@ class CefRenderWidgetHostViewOSR CefRenderWidgetHostViewOSR* popup_host_view_ = nullptr; CefRenderWidgetHostViewOSR* child_host_view_ = nullptr; std::set guest_host_views_; +#if defined(OS_OHOS) + gfx::SizeF root_layer_size_; +#endif CefRefPtr browser_impl_; diff --git a/cef/libcef/browser/permission/alloy_access_request.cc b/cef/libcef/browser/permission/alloy_access_request.cc new file mode 100644 index 0000000000..c15d3bd73d --- /dev/null +++ b/cef/libcef/browser/permission/alloy_access_request.cc @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/permission/alloy_access_request.h" + +AlloyAccessRequest::AlloyAccessRequest(const CefString& origin, + int resources, + cef_permission_callback_t callback) + : origin_(origin), resources_(resources), callback_(std::move(callback)) {} + +AlloyAccessRequest::~AlloyAccessRequest() { + std::move(callback_).Run(false); +} + +CefString AlloyAccessRequest::Origin() { + return origin_; +} + +int AlloyAccessRequest::ResourceAcessId() { + return resources_; +} + +void AlloyAccessRequest::ReportRequestResult(bool allowed) { + std::move(callback_).Run(allowed); +} \ No newline at end of file diff --git a/cef/libcef/browser/permission/alloy_access_request.h b/cef/libcef/browser/permission/alloy_access_request.h new file mode 100644 index 0000000000..5342f0a3a4 --- /dev/null +++ b/cef/libcef/browser/permission/alloy_access_request.h @@ -0,0 +1,48 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_PERMISSION_ALLOY_ACCESS_REQUEST_H_ +#define CEF_LIBCEF_BROWSER_PERMISSION_ALLOY_ACCESS_REQUEST_H_ + +#include + +#include "base/macros.h" + +#include "include/cef_permission_request.h" + +// This class is used to handle the permission request which just needs +// a callback with bool parameter to indicate the permission granted or not. It +// works with PermissionRequestHandler. The specific permission request should +// implement the CefAccessRequest. +class AlloyAccessRequest : public CefAccessRequest { + public: + enum Resources { + GEOLOCATION = 1 << 0, + VIDEO_CAPTURE = 1 << 1, + AUDIO_CAPTURE = 1 << 2, + PROTECTED_MEDIA_ID = 1 << 3, + MIDI_SYSEX = 1 << 4, + }; + + AlloyAccessRequest(const CefString& origin, + int resources, + cef_permission_callback_t callback); + ~AlloyAccessRequest() override; + + CefString Origin() override; + + int ResourceAcessId() override; + + void ReportRequestResult(bool allowed) override; + + private: + const CefString& origin_; + int resources_; + cef_permission_callback_t callback_; + + IMPLEMENT_REFCOUNTING(AlloyAccessRequest); + DISALLOW_COPY_AND_ASSIGN(AlloyAccessRequest); +}; + +#endif // CEF_LIBCEF_BROWSER_PERMISSION_ALLOY_ACCESS_REQUEST_H_ diff --git a/cef/libcef/browser/permission/alloy_geolocation_access.cc b/cef/libcef/browser/permission/alloy_geolocation_access.cc new file mode 100644 index 0000000000..e45567a8c9 --- /dev/null +++ b/cef/libcef/browser/permission/alloy_geolocation_access.cc @@ -0,0 +1,23 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/permission/alloy_geolocation_access.h" + +#include "base/logging.h" + +bool AlloyGeolocationAccess::ContainOrigin(const CefString& origin) { + return false; +} + +bool AlloyGeolocationAccess::IsOriginAccessEnabled(const CefString& origin) { + return true; +} + +void AlloyGeolocationAccess::Enabled(const CefString& origin) {} + +void AlloyGeolocationAccess::Disabled(const CefString& origin) {} + +std::string AlloyGeolocationAccess::GetOriginKey(std::string& origin) { + return pref_prefix_ + origin; +} diff --git a/cef/libcef/browser/permission/alloy_geolocation_access.h b/cef/libcef/browser/permission/alloy_geolocation_access.h new file mode 100644 index 0000000000..e36e23e976 --- /dev/null +++ b/cef/libcef/browser/permission/alloy_geolocation_access.h @@ -0,0 +1,33 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_ALLOY_GEOLOCATION_PERMISSIONS_H_ +#define CEF_LIBCEF_BROWSER_ALLOY_GEOLOCATION_PERMISSIONS_H_ + +#include + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" + +#include "include/cef_permission_request.h" + +class AlloyGeolocationAccess : public CefGeolocationAcess { + public: + AlloyGeolocationAccess() {}; + ~AlloyGeolocationAccess() {}; + + bool ContainOrigin(const CefString& origin) override; + bool IsOriginAccessEnabled(const CefString& origin) override; + void Enabled(const CefString& origin) override; + void Disabled(const CefString& origin) override; + + private: + std::string GetOriginKey(std::string& origin); + const std::string pref_prefix_ = "AlloyGeolocationAccess%"; + + IMPLEMENT_REFCOUNTING(AlloyGeolocationAccess); + DISALLOW_COPY_AND_ASSIGN(AlloyGeolocationAccess); +}; + +#endif // CEF_LIBCEF_BROWSER_ALLOY_GEOLOCATION_PERMISSIONS_H_ diff --git a/cef/libcef/browser/permission/alloy_permission_manager.cc b/cef/libcef/browser/permission/alloy_permission_manager.cc new file mode 100644 index 0000000000..4b24d0612b --- /dev/null +++ b/cef/libcef/browser/permission/alloy_permission_manager.cc @@ -0,0 +1,422 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/permission/alloy_permission_manager.h" + +#include +#include + +#include "base/callback.h" +#include "base/logging.h" +#include "content/public/browser/permission_controller.h" +#include "content/public/browser/permission_type.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/web_contents.h" + +using blink::mojom::PermissionStatus; +using content::PermissionType; + +using RequestPermissionsCallback = + base::OnceCallback&)>; + +namespace { + +void PermissionRequestResponseCallbackWrapper( + base::OnceCallback callback, + const std::vector& vector) { + DCHECK_EQ(vector.size(), 1ul); + std::move(callback).Run(vector.at(0)); +} + +} // namespace + +class AlloyPermissionManager::UnhandledRequest { + public: + UnhandledRequest(const std::vector permissions, + content::RenderFrameHost* render_frame_host, + GURL requesting_origin, + RequestPermissionsCallback callback) + : permissions_(permissions), + render_frame_host_(render_frame_host), + requesting_origin_(requesting_origin), + callback_(std::move(callback)), + results_(permissions.size(), PermissionStatus::DENIED), + cancelled_(false) { + for (size_t i = 0; i < permissions.size(); ++i) + permission_index_map_.insert(std::make_pair(permissions[i], i)); + } + + ~UnhandledRequest() = default; + + bool HasPermissionType(PermissionType type) { + return permission_index_map_.find(type) != permission_index_map_.end(); + } + + bool IsCompleted(PermissionType type) const { + return resolved_permissions_.count(type) != 0; + } + + bool IsCompleted() const { + return results_.size() == resolved_permissions_.size(); + } + + void SetPermissionStatus(PermissionType type, PermissionStatus status) { + auto result = permission_index_map_.find(type); + if (result == permission_index_map_.end()) { + NOTREACHED(); + return; + } + DCHECK(!IsCompleted()); + results_[result->second] = status; + resolved_permissions_.insert(type); + } + + PermissionStatus GetPermissionStatus(PermissionType type) { + auto result = permission_index_map_.find(type); + if (result == permission_index_map_.end()) { + NOTREACHED(); + return PermissionStatus::DENIED; + } + return results_[result->second]; + } + + void Cancel() { cancelled_ = true; } + + bool IsCancelled() const { return cancelled_; } + + std::vector permissions_; + content::RenderFrameHost* render_frame_host_; + GURL requesting_origin_; + RequestPermissionsCallback callback_; + std::vector results_; + + private: + std::map permission_index_map_; + std::set resolved_permissions_; + bool cancelled_; +}; + +AlloyPermissionManager::AlloyPermissionManager() {} + +AlloyPermissionManager::~AlloyPermissionManager() { + AbortPermissionRequests(); +} + +int AlloyPermissionManager::RequestPermission( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::OnceCallback callback) { + return RequestPermissions( + std::vector(1, permission), render_frame_host, + requesting_origin, user_gesture, + base::BindOnce(&PermissionRequestResponseCallbackWrapper, + std::move(callback))); +} + +int AlloyPermissionManager::RequestPermissions( + const std::vector& permissions, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::OnceCallback&)> + callback) { + if (permissions.empty()) { + std::move(callback).Run(std::vector()); + return content::PermissionController::kNoPendingOperation; + } + + auto pending_request = std::make_unique( + permissions, render_frame_host, requesting_origin, std::move(callback)); + std::vector should_delegate_requests = + std::vector(permissions.size(), true); + for (size_t i = 0; i < permissions.size(); ++i) { + for (UnhandledRequestsMap::Iterator it( + &unhandled_requests_); + !it.IsAtEnd(); it.Advance()) { + if (!it.GetCurrentValue()->HasPermissionType(permissions[i]) || + it.GetCurrentValue()->requesting_origin_ != requesting_origin) { + continue; + } + if (it.GetCurrentValue()->IsCompleted(permissions[i])) { + pending_request->SetPermissionStatus( + permissions[i], + it.GetCurrentValue()->GetPermissionStatus(permissions[i])); + } + should_delegate_requests[i] = false; + break; + } + } + + // Keep copy of pointer for performing further operations after ownership is + // transferred to unhandled_requests_ + UnhandledRequest* pending_request_raw = pending_request.get(); + const int request_id = unhandled_requests_.Add(std::move(pending_request)); + + CefRefPtr browser = + CefBrowserHostBase::GetBrowserForHost(render_frame_host); + + for (size_t i = 0; i < permissions.size(); ++i) { + if (should_delegate_requests[i]) + RequestPermissionByType(permissions[i], browser, pending_request_raw, + request_id); + } + + // If delegate resolve the permission synchronously, all requests could be + // already resolved here. + if (!unhandled_requests_.Lookup(request_id)) + return content::PermissionController::kNoPendingOperation; + + // If requests are resolved without calling delegate functions, e.g. + // PermissionType::MIDI is permitted within the previous for-loop, all + // requests could be already resolved, but still in the |unhandled_requests_| + // without invoking the callback. + if (pending_request_raw->IsCompleted()) { + std::vector results = pending_request_raw->results_; + RequestPermissionsCallback completed_callback = + std::move(pending_request_raw->callback_); + unhandled_requests_.Remove(request_id); + std::move(completed_callback).Run(results); + return content::PermissionController::kNoPendingOperation; + } + + return request_id; +} + +void AlloyPermissionManager::RequestPermissionByType( + const content::PermissionType permission_type, + CefRefPtr browser, + UnhandledRequest* pending_request_raw, + const int request_id) { + switch (permission_type) { + case PermissionType::GEOLOCATION: + if (browser) + browser->AskGeolocationPermission( + pending_request_raw->requesting_origin_.spec(), + base::Bind(&OnRequestResponseCallBack, + weak_ptr_factory_.GetWeakPtr(), request_id, + permission_type)); + break; + case PermissionType::PROTECTED_MEDIA_IDENTIFIER: + browser->AskProtectedMediaIdentifierPermission( + pending_request_raw->requesting_origin_.spec(), + base::Bind(&OnRequestResponseCallBack, + weak_ptr_factory_.GetWeakPtr(), request_id, + permission_type)); + break; + case PermissionType::MIDI_SYSEX: + browser->AskMIDISysexPermission( + pending_request_raw->requesting_origin_.spec(), + base::Bind(&OnRequestResponseCallBack, + weak_ptr_factory_.GetWeakPtr(), request_id, + permission_type)); + break; + case PermissionType::AUDIO_CAPTURE: + case PermissionType::VIDEO_CAPTURE: + case PermissionType::NOTIFICATIONS: + case PermissionType::DURABLE_STORAGE: + case PermissionType::BACKGROUND_SYNC: + case PermissionType::ACCESSIBILITY_EVENTS: + case PermissionType::CLIPBOARD_READ_WRITE: + case PermissionType::CLIPBOARD_SANITIZED_WRITE: + case PermissionType::PAYMENT_HANDLER: + case PermissionType::BACKGROUND_FETCH: + case PermissionType::IDLE_DETECTION: + case PermissionType::PERIODIC_BACKGROUND_SYNC: + case PermissionType::NFC: + case PermissionType::VR: + case PermissionType::AR: + case PermissionType::STORAGE_ACCESS_GRANT: + case PermissionType::CAMERA_PAN_TILT_ZOOM: + case PermissionType::WINDOW_PLACEMENT: + case PermissionType::FONT_ACCESS: + case PermissionType::DISPLAY_CAPTURE: + case PermissionType::MIDI: + case PermissionType::SENSORS: + case PermissionType::WAKE_LOCK_SCREEN: + case PermissionType::WAKE_LOCK_SYSTEM: + default: + NOTREACHED() << "Invalid PermissionType."; + pending_request_raw->SetPermissionStatus(permission_type, + PermissionStatus::DENIED); + break; + } +} + +void AlloyPermissionManager::OnRequestResponseCallBack( + const base::WeakPtr& manager, + int request_id, + PermissionType permission, + bool allowed) { + // All delegate functions should be cancelled when the manager runs + // destructor. Therefore |manager| should be always valid here. + DCHECK(manager); + PermissionStatus status = + allowed ? PermissionStatus::GRANTED : PermissionStatus::DENIED; + UnhandledRequest* pending_request = + manager->unhandled_requests_.Lookup(request_id); + std::vector complete_request_ids; + std::vector< + std::pair>> + complete_request_pairs; + for (UnhandledRequestsMap::Iterator it( + &manager->unhandled_requests_); + !it.IsAtEnd(); it.Advance()) { + if (!it.GetCurrentValue()->HasPermissionType(permission) || + it.GetCurrentValue()->requesting_origin_ != + pending_request->requesting_origin_) { + continue; + } + it.GetCurrentValue()->SetPermissionStatus(permission, status); + if (it.GetCurrentValue()->IsCompleted()) { + complete_request_ids.push_back(it.GetCurrentKey()); + if (!it.GetCurrentValue()->IsCancelled()) { + complete_request_pairs.emplace_back( + std::move(it.GetCurrentValue()->callback_), + std::move(it.GetCurrentValue()->results_)); + } + } + } + for (auto id : complete_request_ids) + manager->unhandled_requests_.Remove(id); + for (auto& pair : complete_request_pairs) + std::move(pair.first).Run(pair.second); +} + +PermissionStatus AlloyPermissionManager::GetPermissionStatus( + PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + return PermissionStatus::DENIED; +} + +PermissionStatus AlloyPermissionManager::GetPermissionStatusForFrame( + PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin) { + return GetPermissionStatus( + permission, requesting_origin, + content::WebContents::FromRenderFrameHost(render_frame_host) + ->GetLastCommittedURL() + .GetOrigin()); +} + +void AlloyPermissionManager::ResetPermission(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) {} + +int AlloyPermissionManager::SubscribePermissionStatusChange( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + base::RepeatingCallback callback) { + return content::PermissionController::kNoPendingOperation; +} + +void AlloyPermissionManager::UnsubscribePermissionStatusChange( + int subscription_id) {} + +void AlloyPermissionManager::AbortPermissionRequests() { + std::vector request_ids; + for (UnhandledRequestsMap::Iterator it( + &unhandled_requests_); + !it.IsAtEnd(); it.Advance()) { + request_ids.push_back(it.GetCurrentKey()); + } + for (auto request_id : request_ids) + AbortPermissionRequest(request_id); + DCHECK(unhandled_requests_.IsEmpty()); +} + +void AlloyPermissionManager::AbortPermissionRequest(int request_id) { + UnhandledRequest* pending_request = unhandled_requests_.Lookup(request_id); + if (pending_request == nullptr || pending_request->IsCancelled()) + return; + pending_request->Cancel(); + + const GURL& requesting_origin = pending_request->requesting_origin_; + + CefRefPtr browser = CefBrowserHostBase::GetBrowserForHost( + pending_request->render_frame_host_); + + for (auto permission : pending_request->permissions_) { + // If the permission was already resolved, we do not need to cancel it. + if (pending_request->IsCompleted(permission)) + continue; + + // If another pending_request waits for the same permission being resolved, + // we should not cancel the delegate's request. + bool should_not_cancel_ = false; + for (UnhandledRequestsMap::Iterator it( + &unhandled_requests_); + !it.IsAtEnd(); it.Advance()) { + if (it.GetCurrentValue() != pending_request && + it.GetCurrentValue()->HasPermissionType(permission) && + it.GetCurrentValue()->requesting_origin_ == requesting_origin && + !it.GetCurrentValue()->IsCompleted(permission)) { + should_not_cancel_ = true; + break; + } + } + if (should_not_cancel_) + continue; + AbortPermissionRequestByType(permission, browser, requesting_origin); + pending_request->SetPermissionStatus(permission, PermissionStatus::DENIED); + } + + // If there are still active requests, we should not remove request_id here, + // but just do not invoke a relevant callback when the request is resolved in + // OnRequestResponseCallBack(). + if (pending_request->IsCompleted()) + unhandled_requests_.Remove(request_id); +} + +void AlloyPermissionManager::AbortPermissionRequestByType( + const content::PermissionType permission_type, + CefRefPtr browser, + const GURL& requesting_origin) { + switch (permission_type) { + case PermissionType::GEOLOCATION: + if (browser) + browser->AbortAskGeolocationPermission(requesting_origin.spec()); + break; + case PermissionType::PROTECTED_MEDIA_IDENTIFIER: + if (browser) + browser->AbortAskProtectedMediaIdentifierPermission(requesting_origin.spec()); + break; + case PermissionType::MIDI_SYSEX: + if (browser) + browser->AbortAskMIDISysexPermission(requesting_origin.spec()); + break; + case PermissionType::NOTIFICATIONS: + case PermissionType::DURABLE_STORAGE: + case PermissionType::AUDIO_CAPTURE: + case PermissionType::VIDEO_CAPTURE: + case PermissionType::BACKGROUND_SYNC: + case PermissionType::ACCESSIBILITY_EVENTS: + case PermissionType::CLIPBOARD_READ_WRITE: + case PermissionType::CLIPBOARD_SANITIZED_WRITE: + case PermissionType::PAYMENT_HANDLER: + case PermissionType::BACKGROUND_FETCH: + case PermissionType::IDLE_DETECTION: + case PermissionType::PERIODIC_BACKGROUND_SYNC: + case PermissionType::NFC: + case PermissionType::VR: + case PermissionType::AR: + case PermissionType::STORAGE_ACCESS_GRANT: + case PermissionType::CAMERA_PAN_TILT_ZOOM: + case PermissionType::WINDOW_PLACEMENT: + case PermissionType::FONT_ACCESS: + case PermissionType::DISPLAY_CAPTURE: + case PermissionType::MIDI: + case PermissionType::SENSORS: + case PermissionType::WAKE_LOCK_SCREEN: + case PermissionType::WAKE_LOCK_SYSTEM: + default: + NOTREACHED() << "Invalid PermissionType."; + break; + } +} diff --git a/cef/libcef/browser/permission/alloy_permission_manager.h b/cef/libcef/browser/permission/alloy_permission_manager.h new file mode 100644 index 0000000000..e883cb7b9d --- /dev/null +++ b/cef/libcef/browser/permission/alloy_permission_manager.h @@ -0,0 +1,92 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_MANAGER_H_ +#define CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_MANAGER_H_ + +#include + +#include "base/containers/id_map.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "content/public/browser/permission_controller_delegate.h" +#include "libcef/browser/browser_host_base.h" + +namespace content { +class WebContents; +} + +class AlloyPermissionManager : public content::PermissionControllerDelegate { + public: + AlloyPermissionManager(); + ~AlloyPermissionManager() override; + + // PermissionControllerDelegate implementation. + int RequestPermission(content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::OnceCallback + callback) override; + int RequestPermissions( + const std::vector& permissions, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::OnceCallback< + void(const std::vector&)> callback) + override; + blink::mojom::PermissionStatus GetPermissionStatus( + content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForFrame( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin) override; + void ResetPermission(content::PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) override; + int SubscribePermissionStatusChange( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + base::RepeatingCallback callback) + override; + void UnsubscribePermissionStatusChange(int subscription_id) override; + + protected: + void AbortPermissionRequest(int request_id); + void AbortPermissionRequests(); + + private: + class UnhandledRequest; + using UnhandledRequestsMap = base::IDMap>; + + void RequestPermissionByType(const content::PermissionType permission_type, + CefRefPtr browser, + UnhandledRequest* pending_request_raw, + const int request_id); + + void AbortPermissionRequestByType( + const content::PermissionType permission_type, + CefRefPtr browser, + const GURL& requesting_origin); + // The weak pointer to this is used to clean up any information which is + // stored in the pending request or result cache maps. However, the callback + // should be run regardless of whether the class is still alive so the method + // is static. + static void OnRequestResponseCallBack( + const base::WeakPtr& manager, + int request_id, + content::PermissionType permission, + bool allowed); + + base::WeakPtrFactory weak_ptr_factory_{this}; + UnhandledRequestsMap unhandled_requests_; + + DISALLOW_COPY_AND_ASSIGN(AlloyPermissionManager); +}; + +#endif // CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_MANAGER_H_ diff --git a/cef/libcef/browser/permission/alloy_permission_request_handler.cc b/cef/libcef/browser/permission/alloy_permission_request_handler.cc new file mode 100644 index 0000000000..3208fb2bf9 --- /dev/null +++ b/cef/libcef/browser/permission/alloy_permission_request_handler.cc @@ -0,0 +1,122 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/permission/alloy_permission_request_handler.h" + +#include "content/public/browser/navigation_details.h" +#include "content/public/browser/navigation_entry.h" +#include "content/public/browser/web_contents.h" +#include "include/cef_permission_request.h" + +namespace { +int GetLastCommittedEntryID(content::WebContents* web_contents) { + if (!web_contents) + return 0; + + content::NavigationEntry* entry = + web_contents->GetController().GetLastCommittedEntry(); + return entry ? entry->GetUniqueID() : 0; +} +} // namespace + +AlloyPermissionRequestHandler::AlloyPermissionRequestHandler( + CefRefPtr client, + content::WebContents* web_contents) + : content::WebContentsObserver(web_contents), + client_(client), + contents_unique_id_(GetLastCommittedEntryID(web_contents)) {} + +AlloyPermissionRequestHandler::~AlloyPermissionRequestHandler() { + CancelAllRequests(); +} + +void AlloyPermissionRequestHandler::SendRequest( + CefRefPtr request) { + if (Preauthorized(request->Origin(), request->ResourceAcessId())) { + request->ReportRequestResult(true); + return; + } + + requests_.push_back(request); + client_->OnPermissionRequest(request); + PruneRequests(); +} + +void AlloyPermissionRequestHandler::CancelRequest(const CefString& origin, + int resources) { + // The request list might have multiple requests with same origin and + // resources. + RequestIterator i = FindRequest(origin, resources); + while (i != requests_.end()) { + CancelRequestInternal(i); + requests_.erase(i); + i = FindRequest(origin, resources); + } +} + +void AlloyPermissionRequestHandler::CancelRequestInternal(RequestIterator i) { + CefRefPtr request = i->get(); + if (request) { + client_->OnPermissionRequestCanceled(request); + } +} + +void AlloyPermissionRequestHandler::CancelAllRequests() { + for (RequestIterator i = requests_.begin(); i != requests_.end(); ++i) + CancelRequestInternal(i); +} + +AlloyPermissionRequestHandler::RequestIterator +AlloyPermissionRequestHandler::FindRequest(const CefString& origin, + int resources) { + RequestIterator i; + for (i = requests_.begin(); i != requests_.end(); ++i) { + if (i->get() && i->get()->Origin() == origin && + i->get()->ResourceAcessId() == resources) { + break; + } + } + return i; +} + +void AlloyPermissionRequestHandler::PreauthorizePermission( + const CefString& origin, + int resources) { + if (!resources) + return; + + if (origin.empty()) { + LOG(ERROR) << "The origin of preauthorization is empty, ignore it."; + return; + } + + preauthorized_permission_[origin] |= resources; +} + +void AlloyPermissionRequestHandler::NavigationEntryCommitted( + const content::LoadCommittedDetails& details) { + const ui::PageTransition transition = details.entry->GetTransitionType(); + if (details.is_navigation_to_different_page() || + ui::PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_RELOAD) || + contents_unique_id_ != details.entry->GetUniqueID()) { + CancelAllRequests(); + contents_unique_id_ = details.entry->GetUniqueID(); + } +} + +void AlloyPermissionRequestHandler::PruneRequests() { + for (RequestIterator i = requests_.begin(); i != requests_.end();) { + if (!i->get()) + i = requests_.erase(i); + else + ++i; + } +} + +bool AlloyPermissionRequestHandler::Preauthorized(const CefString& origin, + int resources) { + std::map::iterator i = preauthorized_permission_.find(origin); + + return i != preauthorized_permission_.end() && i->second == resources; +} \ No newline at end of file diff --git a/cef/libcef/browser/permission/alloy_permission_request_handler.h b/cef/libcef/browser/permission/alloy_permission_request_handler.h new file mode 100644 index 0000000000..1e093121eb --- /dev/null +++ b/cef/libcef/browser/permission/alloy_permission_request_handler.h @@ -0,0 +1,72 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_REQUEST_HANDLER_H_ +#define CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_REQUEST_HANDLER_H_ + +#include + +#include +#include +#include + +#include "base/macros.h" +#include "content/public/browser/web_contents_observer.h" +#include "include/cef_permission_request.h" + +// This class is used to send the permission requests, or cancel ongoing +// requests. +// It is owned by WebContents and has 1x1 mapping to WebContents. All methods +// are running on UI thread. +class AlloyPermissionRequestHandler : public content::WebContentsObserver { + public: + AlloyPermissionRequestHandler(CefRefPtr client, + content::WebContents* web_contents); + ~AlloyPermissionRequestHandler() override; + + // Send the given |request| to CefPermissionRequest. + void SendRequest(CefRefPtr request); + + // Cancel the ongoing request initiated by |origin| for accessing |resources|. + void CancelRequest(const CefString& origin, int resources); + + // Allow |origin| to access the |resources|. + void PreauthorizePermission(const CefString& origin, int resources); + + // WebContentsObserver + void NavigationEntryCommitted( + const content::LoadCommittedDetails& load_details) override; + + private: + typedef std::vector>::iterator RequestIterator; + + // Return the request initiated by |origin| for accessing |resources|. + RequestIterator FindRequest(const CefString& origin, int resources); + + // Cancel the given request. + void CancelRequestInternal(RequestIterator i); + + void CancelAllRequests(); + + // Remove the invalid requests from requests_. + void PruneRequests(); + + // Return true if |origin| were preauthorized to access |resources|. + bool Preauthorized(const CefString& origin, int resources); + + CefRefPtr client_; + + // A list of ongoing requests. + std::vector> requests_; + + std::map preauthorized_permission_; + + // The unique id of the active NavigationEntry of the WebContents that we were + // opened for. Used to help expire on requests. + int contents_unique_id_; + + DISALLOW_COPY_AND_ASSIGN(AlloyPermissionRequestHandler); +}; + +#endif // CEF_LIBCEF_BROWSER_ALLOY_PERMISSION_REQUEST_HANDLER_H_ diff --git a/cef/libcef/browser/prefs/renderer_prefs.cc b/cef/libcef/browser/prefs/renderer_prefs.cc index d6521e2c15..7ed5929a4e 100644 --- a/cef/libcef/browser/prefs/renderer_prefs.cc +++ b/cef/libcef/browser/prefs/renderer_prefs.cc @@ -1,4 +1,5 @@ -// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. @@ -9,6 +10,7 @@ #include "libcef/browser/alloy/alloy_browser_host_impl.h" #include "libcef/browser/context.h" #include "libcef/browser/extensions/browser_extensions_util.h" +#include "libcef/browser/osr/render_widget_host_view_osr.h" #include "libcef/common/cef_switches.h" #include "libcef/common/extensions/extensions_util.h" #include "libcef/features/runtime_checks.h" @@ -32,6 +34,7 @@ #include "components/prefs/pref_store.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" +#include "content/public/browser/render_widget_host.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/url_constants.h" @@ -226,6 +229,27 @@ bool UpdatePreferredColorScheme(blink::web_pref::WebPreferences* web_prefs, return old_preferred_color_scheme != web_prefs->preferred_color_scheme; } +void SetCefSpecialPrefs(content::RenderViewHost* rvh, + CefRefPtr browser, + blink::web_pref::WebPreferences& web) { + auto frame = browser->GetMainFrame(); + if (frame && frame->IsValid() && + (browser->settings().text_size_percent > 0)) { + web.force_enable_zoom = false; + static_cast(frame.get()) + ->PutZoomingForTextFactor(browser->settings().text_size_percent / + 100.0f); + } + CefRenderWidgetHostViewOSR* view = + static_cast(rvh->GetWidget()->GetView()); + if (view) { + view->SetDoubleTapSupportEnabled( + browser->settings().supports_double_tap_zoom); + view->SetMultiTouchZoomSupportEnabled( + browser->settings().supports_multi_touch_zoom); + } +} + } // namespace void SetCommandLinePrefDefaults(CommandLinePrefStore* prefs) { @@ -323,7 +347,7 @@ void SetCefPrefs(const CefBrowserSettings& cef, web.allow_universal_access_from_file_urls); SET_STATE(cef.file_access_from_file_urls, web.allow_file_access_from_file_urls); - SET_STATE(cef.image_loading, web.loads_images_automatically); + SET_STATE(cef.image_loading, web.images_enabled); SET_STATE(cef.image_shrink_standalone_to_fit, web.shrinks_standalone_images_to_fit); SET_STATE(cef.text_area_resize, web.text_areas_are_resizable); @@ -338,6 +362,16 @@ void SetCefPrefs(const CefBrowserSettings& cef, web.webgl1_enabled = false; web.webgl2_enabled = false; } + + /* ohos webview begin*/ + SET_STATE(cef.force_dark_mode_enabled, web.force_dark_mode_enabled); + SET_STATE(cef.loads_images_automatically, web.loads_images_automatically); + SET_STATE(cef.allow_running_insecure_content, + web.allow_running_insecure_content); + SET_STATE(cef.strict_mixed_content_checking, + web.strict_mixed_content_checking); + SET_STATE(cef.allow_mixed_content_upgrades, web.allow_mixed_content_upgrades); + /* ohos webview end */ } void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, @@ -418,6 +452,8 @@ void PopulateWebPreferences(content::RenderViewHost* rvh, // Set preferences based on CefBrowserSettings. SetCefPrefs(browser->settings(), web); + SetCefSpecialPrefs(rvh, browser, web); + web.picture_in_picture_enabled = browser->IsPictureInPictureSupported(); // Set the background color for the WebView. diff --git a/cef/libcef/browser/prefs/renderer_prefs.h b/cef/libcef/browser/prefs/renderer_prefs.h index 00ab48d225..a374247416 100644 --- a/cef/libcef/browser/prefs/renderer_prefs.h +++ b/cef/libcef/browser/prefs/renderer_prefs.h @@ -1,4 +1,5 @@ -// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. diff --git a/cef/libcef/common/cef_messages.h b/cef/libcef/common/cef_messages.h index 82f161dd6f..9065e80cfb 100644 --- a/cef/libcef/common/cef_messages.h +++ b/cef/libcef/common/cef_messages.h @@ -46,6 +46,23 @@ struct ParamTraits> { // Common types. +// Parameters structure for a hittestdata. +IPC_STRUCT_BEGIN(Cef_HitData_Params) + IPC_STRUCT_MEMBER(int, type) + IPC_STRUCT_MEMBER(std::string, extra_data_for_type) + IPC_STRUCT_MEMBER(std::u16string, href) + IPC_STRUCT_MEMBER(std::u16string, anchor_text) + IPC_STRUCT_MEMBER(GURL, img_src) +IPC_STRUCT_END() + +// Parameters structure for a point event. +IPC_STRUCT_BEGIN(Cef_TouchEvent_Params) + IPC_STRUCT_MEMBER(float, x) + IPC_STRUCT_MEMBER(float, y) + IPC_STRUCT_MEMBER(int, width) + IPC_STRUCT_MEMBER(int, height) +IPC_STRUCT_END() + // Parameters structure for a request. IPC_STRUCT_BEGIN(Cef_Request_Params) // Unique request id to match requests and responses. @@ -140,9 +157,15 @@ IPC_MESSAGE_ROUTED1(CefMsg_Response, Cef_Response_Params) // has been processed. IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck, int /* request_id */) +// Sets the zoom factor for text only. Used in layout modes other than +// Text Autosizing. +IPC_MESSAGE_ROUTED1(CefMsg_PutZoomingForTextFactor, float /* zoom_factor */) + // Tells the renderer that loading has stopped. IPC_MESSAGE_ROUTED0(CefMsg_DidStopLoading) +// Tell the renderer that touch event has happened. +IPC_MESSAGE_ROUTED1(CefMsg_TouchEvent, Cef_TouchEvent_Params) // Notification that a move or resize of the renderer's containing window has // started. Used on Windows and Linux with the Alloy runtime, and was // previously handled by RenderViewHost::NotifyMoveOrResizeStarted() prior to @@ -207,3 +230,6 @@ IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck, int /* request_id */) // Sent by the renderer when the draggable regions are updated. IPC_MESSAGE_ROUTED1(CefHostMsg_UpdateDraggableRegions, std::vector /* regions */) + +// Sent by the renderer when the hit data updated. +IPC_MESSAGE_ROUTED1(CefHostMsg_HitData, Cef_HitData_Params) diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.cc b/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.cc new file mode 100644 index 0000000000..c583f8f893 --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h" + +#include "base/notreached.h" +namespace NWEB { +const char* OhGinJavascriptBridgeErrorToString( + OhGinJavascriptBridgeError error) { + switch (error) { + case kOhGinJavascriptBridgeNoError: + return "No error"; + case kOhGinJavascriptBridgeUnknownObjectId: + return "Unknown Ace object ID"; + case kOhGinJavascriptBridgeObjectIsGone: + return "Ace object is gone"; + case kOhGinJavascriptBridgeMethodNotFound: + return "Method not found"; + case kOhGinJavascriptBridgeAccessToObjectGetClassIsBlocked: + return "Access to Ace is blocked"; + case kOhGinJavascriptBridgeJavaExceptionRaised: + return "Ace exception was raised during method invocation"; + case kOhGinJavascriptBridgeNonAssignableTypes: + return "The type of the object passed to the method is incompatible " + "with the type of method's argument"; + case kOhGinJavascriptBridgeRenderFrameDeleted: + return "RenderFrame has been deleted"; + } + NOTREACHED(); + return "Unknown error"; +} +} // namespace NWEB \ No newline at end of file diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h b/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h new file mode 100644 index 0000000000..5ccc0196b9 --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h @@ -0,0 +1,25 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_ERRORS_H +#define OH_GIN_JAVASCRIPT_BRIDGE_ERRORS_H + +namespace NWEB { +enum OhGinJavascriptBridgeError { + kOhGinJavascriptBridgeNoError = 0, + kOhGinJavascriptBridgeUnknownObjectId, + kOhGinJavascriptBridgeObjectIsGone, + kOhGinJavascriptBridgeMethodNotFound, + kOhGinJavascriptBridgeAccessToObjectGetClassIsBlocked, + kOhGinJavascriptBridgeJavaExceptionRaised, + kOhGinJavascriptBridgeNonAssignableTypes, + kOhGinJavascriptBridgeRenderFrameDeleted, + kOhGinJavascriptBridgeErrorLast = kOhGinJavascriptBridgeRenderFrameDeleted +}; + +__attribute__((visibility("default"))) const char* +OhGinJavascriptBridgeErrorToString(OhGinJavascriptBridgeError error); +} // namespace NWEB +#endif diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.cc b/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.cc new file mode 100644 index 0000000000..a87ad45510 --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.cc @@ -0,0 +1,29 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#define IPC_MESSAGE_IMPL +#include "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h" + +// Generate constructors. +#include "ipc/struct_constructor_macros.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h" + +// Generate param traits write methods. +#include "ipc/param_traits_write_macros.h" +namespace IPC { +#include "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h" +} // namespace IPC + +// Generate param traits read methods. +#include "ipc/param_traits_read_macros.h" +namespace IPC { +#include "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h" +} // namespace IPC + +// Generate param traits log methods. +#include "ipc/param_traits_log_macros.h" +namespace IPC { +#include "libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h" +} // namespace IPC \ No newline at end of file diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h b/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h new file mode 100644 index 0000000000..aa7b64bd1d --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_message_generator.h @@ -0,0 +1,6 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/common/javascript/oh_gin_javascript_bridge_messages.h" \ No newline at end of file diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_messages.h b/cef/libcef/common/javascript/oh_gin_javascript_bridge_messages.h new file mode 100644 index 0000000000..d663f8d0fe --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_messages.h @@ -0,0 +1,49 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// IPC messages for injected Javascript objects (Gin-based implementation). +#include +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h" +#include "content/common/content_export.h" +#include "ipc/ipc_message_macros.h" +#include "ipc/ipc_message_start.h" + +#undef IPC_MESSAGE_EXPORT +#define IPC_MESSAGE_EXPORT CONTENT_EXPORT +#define IPC_MESSAGE_START OhGinJavascriptBridgeMsgStart + +IPC_ENUM_TRAITS_MAX_VALUE(NWEB::OhGinJavascriptBridgeError, + NWEB::kOhGinJavascriptBridgeErrorLast) + +// Sent from browser to renderer to add a Javascript object with the given +// name. + +IPC_MESSAGE_ROUTED2(OhGinJavascriptBridgeMsg_AddNamedObject, + std::string /* name */, + int32_t /* object_id */) + +IPC_MESSAGE_ROUTED1(OhGinJavascriptBridgeMsg_RemoveNamedObject, + std::string /* name */) + +IPC_SYNC_MESSAGE_ROUTED1_1(OhGinJavascriptBridgeHostMsg_GetMethods, + int32_t /* object_id */, + std::set /* returned_method_names */) + +// Sent from renderer to browser to find out, if an object has a method with +// the given name. +IPC_SYNC_MESSAGE_ROUTED2_1(OhGinJavascriptBridgeHostMsg_HasMethod, + int32_t /* object_id */, + std::string /* method_name */, + bool /* result */) + +IPC_SYNC_MESSAGE_ROUTED3_2(OhGinJavascriptBridgeHostMsg_InvokeMethod, + int32_t /* object_id */, + std::string /* method_name */, + base::ListValue /* arguments */, + base::ListValue /* result */, + NWEB::OhGinJavascriptBridgeError /* error_code */) + +IPC_MESSAGE_ROUTED1(OhGinJavascriptBridgeHostMsg_ObjectWrapperDeleted, + int32_t /* object_id */) \ No newline at end of file diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.cc b/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.cc new file mode 100644 index 0000000000..13250be521 --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.cc @@ -0,0 +1,147 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_value.h" + +#include "base/containers/span.h" + +namespace { + +// The magic value is only used to prevent accidental attempts of reading +// OhGinJavascriptBridgeValue from a random BinaryValue. +// OhGinJavascriptBridgeValue is not intended for scenarios where with +// BinaryValues are being used for anything else than holding +// OhGinJavascriptBridgeValue s. If a need for such scenario ever emerges, the +// best solution would be to extend OhGinJavascriptBridgeValue to be able to +// wrap raw BinaryValues. +const uint32_t kHeaderMagic = 0xBEEFCAFE; + +#pragma pack(push, 4) +struct Header : public base::Pickle::Header { + uint32_t magic; + int32_t type; +}; +#pragma pack(pop) + +} // namespace + +// static +std::unique_ptr +OhGinJavascriptBridgeValue ::CreateUndefinedValue() { + OhGinJavascriptBridgeValue gin_value(TYPE_UNDEFINED); + return gin_value.SerializeToBinaryValue(); +} + +// static +std::unique_ptr OhGinJavascriptBridgeValue ::CreateNonFiniteValue( + float in_value) { + OhGinJavascriptBridgeValue gin_value(TYPE_NONFINITE); + gin_value.pickle_.WriteFloat(in_value); + return gin_value.SerializeToBinaryValue(); +} + +// static +std::unique_ptr OhGinJavascriptBridgeValue ::CreateNonFiniteValue( + double in_value) { + return CreateNonFiniteValue(static_cast(in_value)); +} + +// static +std::unique_ptr OhGinJavascriptBridgeValue ::CreateObjectIDValue( + int32_t in_value) { + OhGinJavascriptBridgeValue gin_value(TYPE_OBJECT_ID); + gin_value.pickle_.WriteInt(in_value); + return gin_value.SerializeToBinaryValue(); +} + +// static +std::unique_ptr OhGinJavascriptBridgeValue ::CreateUInt32Value( + uint32_t in_value) { + OhGinJavascriptBridgeValue gin_value(TYPE_UINT32); + gin_value.pickle_.WriteUInt32(in_value); + return gin_value.SerializeToBinaryValue(); +} + +// static +bool OhGinJavascriptBridgeValue ::ContainsOhGinJavascriptBridgeValue( + const base::Value* value) { + if (!value->is_blob()) + return false; + if (value->GetBlob().size() < sizeof(Header)) + return false; + base::Pickle pickle(reinterpret_cast(value->GetBlob().data()), + value->GetBlob().size()); + // Broken binary value: payload or header size is wrong + if (!pickle.data() || pickle.size() - pickle.payload_size() != sizeof(Header)) + return false; + Header* header = pickle.headerT
(); + return (header->magic == kHeaderMagic && header->type >= TYPE_FIRST_VALUE && + header->type < TYPE_LAST_VALUE); +} + +// static +std::unique_ptr +OhGinJavascriptBridgeValue ::FromValue(const base::Value* value) { + return std::unique_ptr( + value->is_blob() ? new OhGinJavascriptBridgeValue(value) : NULL); +} + +OhGinJavascriptBridgeValue ::Type OhGinJavascriptBridgeValue ::GetType() const { + const Header* header = pickle_.headerT
(); + DCHECK(header->type >= TYPE_FIRST_VALUE && header->type < TYPE_LAST_VALUE); + return static_cast(header->type); +} + +bool OhGinJavascriptBridgeValue ::IsType(Type type) const { + return GetType() == type; +} + +bool OhGinJavascriptBridgeValue ::GetAsNonFinite(float* out_value) const { + if (GetType() == TYPE_NONFINITE) { + base::PickleIterator iter(pickle_); + return iter.ReadFloat(out_value); + } else { + return false; + } +} + +bool OhGinJavascriptBridgeValue ::GetAsObjectID(int32_t* out_object_id) const { + if (GetType() == TYPE_OBJECT_ID) { + base::PickleIterator iter(pickle_); + return iter.ReadInt(out_object_id); + } else { + return false; + } +} + +bool OhGinJavascriptBridgeValue ::GetAsUInt32(uint32_t* out_value) const { + if (GetType() == TYPE_UINT32) { + base::PickleIterator iter(pickle_); + return iter.ReadUInt32(out_value); + } else { + return false; + } +} + +OhGinJavascriptBridgeValue ::OhGinJavascriptBridgeValue(Type type) + : pickle_(sizeof(Header)) { + Header* header = pickle_.headerT
(); + header->magic = kHeaderMagic; + header->type = type; +} + +OhGinJavascriptBridgeValue ::OhGinJavascriptBridgeValue( + const base::Value* value) + : pickle_(reinterpret_cast(value->GetBlob().data()), + value->GetBlob().size()) { + DCHECK(ContainsOhGinJavascriptBridgeValue(value)); +} + +std::unique_ptr +OhGinJavascriptBridgeValue ::SerializeToBinaryValue() { + const auto* data = static_cast(pickle_.data()); + return base::Value::ToUniquePtrValue( + base::Value(base::make_span(data, pickle_.size()))); +} diff --git a/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.h b/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.h new file mode 100644 index 0000000000..bf862f1c42 --- /dev/null +++ b/cef/libcef/common/javascript/oh_gin_javascript_bridge_value.h @@ -0,0 +1,66 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_VALUE_H +#define OH_GIN_JAVASCRIPT_BRIDGE_VALUE_H + +#include + +#include + +#include "base/pickle.h" +#include "base/values.h" + +// In Javascript Bridge, we need to pass some kinds of values that can't +// be put into base::Value. And since base::Value is not extensible, +// we transfer these special values via base::Value. + +class OhGinJavascriptBridgeValue { + public: + enum Type { + TYPE_FIRST_VALUE = 0, + // JavaScript 'undefined' + TYPE_UNDEFINED = 0, + // JavaScript NaN and Infinity + TYPE_NONFINITE, + // Bridge Object ID + TYPE_OBJECT_ID, + // Uint32 type + TYPE_UINT32, + TYPE_LAST_VALUE + }; + + OhGinJavascriptBridgeValue(const OhGinJavascriptBridgeValue&) = delete; + OhGinJavascriptBridgeValue& operator=(const OhGinJavascriptBridgeValue&) = + delete; + + // Serialization + static std::unique_ptr CreateUndefinedValue(); + static std::unique_ptr CreateNonFiniteValue(float in_value); + static std::unique_ptr CreateNonFiniteValue(double in_value); + static std::unique_ptr CreateObjectIDValue(int32_t in_value); + static std::unique_ptr CreateUInt32Value(uint32_t in_value); + + // De-serialization + static bool ContainsOhGinJavascriptBridgeValue(const base::Value* value); + static std::unique_ptr FromValue( + const base::Value* value); + + Type GetType() const; + bool IsType(Type type) const; + + bool GetAsNonFinite(float* out_value) const; + bool GetAsObjectID(int32_t* out_object_id) const; + bool GetAsUInt32(uint32_t* out_value) const; + + private: + explicit OhGinJavascriptBridgeValue(Type type); + explicit OhGinJavascriptBridgeValue(const base::Value* value); + std::unique_ptr SerializeToBinaryValue(); + + base::Pickle pickle_; +}; + +#endif // OH_GIN_JAVASCRIPT_BRIDGE_VALUE_H \ No newline at end of file diff --git a/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc b/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc index 096412f29f..073ba4c7fb 100644 --- a/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/cef/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -30,6 +30,7 @@ #include "libcef/common/extensions/extensions_util.h" #include "libcef/common/request_impl.h" #include "libcef/features/runtime_checks.h" +#include "libcef/renderer/alloy/alloy_content_settings_client.h" #include "libcef/renderer/alloy/alloy_render_frame_observer.h" #include "libcef/renderer/alloy/alloy_render_thread_observer.h" #include "libcef/renderer/alloy/url_loader_throttle_provider_impl.h" @@ -272,6 +273,7 @@ void AlloyContentRendererClient::RenderThreadConnected() { void AlloyContentRendererClient::RenderFrameCreated( content::RenderFrame* render_frame) { + new AlloyContentSettingsClient(render_frame); AlloyRenderFrameObserver* render_frame_observer = new AlloyRenderFrameObserver(render_frame); service_manager::BinderRegistry* registry = render_frame_observer->registry(); diff --git a/cef/libcef/renderer/alloy/alloy_content_settings_client.cc b/cef/libcef/renderer/alloy/alloy_content_settings_client.cc new file mode 100644 index 0000000000..031ea46a42 --- /dev/null +++ b/cef/libcef/renderer/alloy/alloy_content_settings_client.cc @@ -0,0 +1,25 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/renderer/alloy/alloy_content_settings_client.h" + +#include "content/public/renderer/render_frame.h" +#include "third_party/blink/public/common/web_preferences/web_preferences.h" +#include "third_party/blink/public/web/web_local_frame.h" + +AlloyContentSettingsClient::AlloyContentSettingsClient( + content::RenderFrame* render_frame) + : content::RenderFrameObserver(render_frame) { + render_frame->GetWebFrame()->SetContentSettingsClient(this); +} + +AlloyContentSettingsClient::~AlloyContentSettingsClient() {} + +bool AlloyContentSettingsClient::ShouldAutoupgradeMixedContent() { + return render_frame()->GetBlinkPreferences().allow_mixed_content_upgrades; +} + +void AlloyContentSettingsClient::OnDestruct() { + delete this; +} diff --git a/cef/libcef/renderer/alloy/alloy_content_settings_client.h b/cef/libcef/renderer/alloy/alloy_content_settings_client.h new file mode 100644 index 0000000000..29e885110a --- /dev/null +++ b/cef/libcef/renderer/alloy/alloy_content_settings_client.h @@ -0,0 +1,29 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_RENDERER_ALLOY_ALLOY_CONTENT_SETTINGS_CLIENT_H_ +#define CEF_LIBCEF_RENDERER_ALLOY_ALLOY_CONTENT_SETTINGS_CLIENT_H_ + +#include "base/macros.h" +#include "content/public/renderer/render_frame_observer.h" +#include "third_party/blink/public/platform/web_content_settings_client.h" + +// NWeb implementation of blink::WebContentSettingsClient. +class AlloyContentSettingsClient : public content::RenderFrameObserver, + public blink::WebContentSettingsClient { + public: + explicit AlloyContentSettingsClient(content::RenderFrame* render_view); + + private: + ~AlloyContentSettingsClient() override; + + // content::RenderFrameObserver implementation. + void OnDestruct() override; + + bool ShouldAutoupgradeMixedContent() override; + + DISALLOW_COPY_AND_ASSIGN(AlloyContentSettingsClient); +}; + +#endif // CEF_LIBCEF_RENDERER_ALLOY_ALLOY_CONTENT_SETTINGS_CLIENT_H_ diff --git a/cef/libcef/renderer/blink_glue.cc b/cef/libcef/renderer/blink_glue.cc index a730e12921..67907ccf03 100644 --- a/cef/libcef/renderer/blink_glue.cc +++ b/cef/libcef/renderer/blink_glue.cc @@ -57,6 +57,21 @@ bool CanGoForward(blink::WebView* view) { return view->HistoryForwardListCount() > 0; } +bool CanGoBackOrForward(blink::WebView* view, int num_steps) { + if (!view) + return false; + if (num_steps == 0) { + return true; + } + if (num_steps > 0 && view->HistoryForwardListCount() >= num_steps) { + return true; + } + if (num_steps < 0 && view->HistoryBackListCount() >= -num_steps) { + return true; + } + return false; +} + void GoBack(blink::WebView* view) { if (!view) return; diff --git a/cef/libcef/renderer/blink_glue.h b/cef/libcef/renderer/blink_glue.h index a7db3ef456..46fc4f596e 100644 --- a/cef/libcef/renderer/blink_glue.h +++ b/cef/libcef/renderer/blink_glue.h @@ -39,6 +39,7 @@ BLINK_EXPORT bool CanGoBack(blink::WebView* view); BLINK_EXPORT bool CanGoForward(blink::WebView* view); BLINK_EXPORT void GoBack(blink::WebView* view); BLINK_EXPORT void GoForward(blink::WebView* view); +BLINK_EXPORT bool CanGoBackOrForward(blink::WebView* view, int num_steps); // Returns the text of the document element. BLINK_EXPORT std::string DumpDocumentText(blink::WebLocalFrame* frame); diff --git a/cef/libcef/renderer/browser_impl.cc b/cef/libcef/renderer/browser_impl.cc index 007692926a..80a4444232 100644 --- a/cef/libcef/renderer/browser_impl.cc +++ b/cef/libcef/renderer/browser_impl.cc @@ -1,7 +1,7 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #include "libcef/renderer/browser_impl.h" @@ -68,7 +68,6 @@ void CefBrowserImpl::GoBack() { bool CefBrowserImpl::CanGoForward() { CEF_REQUIRE_RT_RETURN(false); - return blink_glue::CanGoForward(GetWebView()); } @@ -78,6 +77,12 @@ void CefBrowserImpl::GoForward() { blink_glue::GoForward(GetWebView()); } +bool CefBrowserImpl::CanGoBackOrForward(int num_steps) { + CEF_REQUIRE_RT_RETURN(false); + + return blink_glue::CanGoBackOrForward(GetWebView(), num_steps); +} + bool CefBrowserImpl::IsLoading() { CEF_REQUIRE_RT_RETURN(false); @@ -259,6 +264,16 @@ void CefBrowserImpl::GetFrameNames(std::vector& names) { } } +CefRefPtr +CefBrowserImpl::GetPermissionRequestDelegate() { + return nullptr; +} + +CefRefPtr +CefBrowserImpl::GetGeolocationPermissions() { + return nullptr; +} + // CefBrowserImpl public methods. // ----------------------------------------------------------------------------- diff --git a/cef/libcef/renderer/browser_impl.h b/cef/libcef/renderer/browser_impl.h index cb422a4460..0f6711a91d 100644 --- a/cef/libcef/renderer/browser_impl.h +++ b/cef/libcef/renderer/browser_impl.h @@ -1,7 +1,7 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. -// Portions copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that can +// be found in the LICENSE file. #ifndef CEF_LIBCEF_RENDERER_BROWSER_IMPL_H_ #define CEF_LIBCEF_RENDERER_BROWSER_IMPL_H_ @@ -49,6 +49,7 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver { void GoBack() override; bool CanGoForward() override; void GoForward() override; + bool CanGoBackOrForward(int num_steps) override; bool IsLoading() override; void Reload() override; void ReloadIgnoreCache() override; @@ -64,6 +65,9 @@ class CefBrowserImpl : public CefBrowser, public blink::WebViewObserver { size_t GetFrameCount() override; void GetFrameIdentifiers(std::vector& identifiers) override; void GetFrameNames(std::vector& names) override; + CefRefPtr GetPermissionRequestDelegate() + override; + CefRefPtr GetGeolocationPermissions() override; CefBrowserImpl(content::RenderView* render_view, int browser_id, diff --git a/cef/libcef/renderer/frame_impl.cc b/cef/libcef/renderer/frame_impl.cc index d02fbb5eaf..393ae6f30b 100644 --- a/cef/libcef/renderer/frame_impl.cc +++ b/cef/libcef/renderer/frame_impl.cc @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. @@ -42,12 +43,29 @@ #include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_document_loader.h" +#include "third_party/blink/public/web/web_element_collection.h" #include "third_party/blink/public/web/web_frame_content_dumper.h" +#include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_navigation_control.h" #include "third_party/blink/public/web/web_script_source.h" #include "third_party/blink/public/web/web_view.h" +const std::string kAddressPrefix = "geo:0,0?q="; +const std::string kEmailPrefix = "mailto:"; +const std::string kPhoneNumberPrefix = "tel:"; + +enum HitTestDataType { + kUnknown = 0, + kPhone = 2, + kGeo = 3, + kEmail = 4, + kImage = 5, + kSrcLink = 7, + kSrcImageLink = 8, + kEditText = 9, +}; + CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, blink::WebLocalFrame* frame, int64_t frame_id) @@ -154,6 +172,21 @@ void CefFrameImpl::LoadURL(const CefString& url) { OnLoadRequest(params); } +void CefFrameImpl::LoadHeaderUrl(const CefString& url, + const CefString& additionalHttpHeaders) { + CEF_REQUIRE_RT_RETURN_VOID(); + + if (!frame_) + return; + + CefMsg_LoadRequest_Params params; + params.url = GURL(url.ToString()); + params.method = "GET"; + params.headers = additionalHttpHeaders; + + OnLoadRequest(params); +} + void CefFrameImpl::ExecuteJavaScript(const CefString& jsCode, const CefString& scriptUrl, int startLine) { @@ -334,8 +367,10 @@ bool CefFrameImpl::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(CefMsg_Response, OnResponse) IPC_MESSAGE_HANDLER(CefMsg_ResponseAck, OnResponseAck) IPC_MESSAGE_HANDLER(CefMsg_LoadRequest, OnLoadRequest) + IPC_MESSAGE_HANDLER(CefMsg_TouchEvent, SendTouchEvent) IPC_MESSAGE_HANDLER(CefMsg_DidStopLoading, OnDidStopLoading) IPC_MESSAGE_HANDLER(CefMsg_MoveOrResizeStarted, OnMoveOrResizeStarted) + IPC_MESSAGE_HANDLER(CefMsg_PutZoomingForTextFactor, PutZoomingForTextFactor) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -364,6 +399,113 @@ void CefFrameImpl::OnDidFinishLoad() { } } +GURL CefFrameImpl::GetAbsoluteUrl(const blink::WebNode& node, + const std::u16string& url_fragment) { + return GURL(node.GetDocument().CompleteURL( + blink::WebString::FromUTF16(url_fragment))); +} + +GURL CefFrameImpl::GetAbsoluteSrcUrl(const blink::WebElement& element) { + if (element.IsNull()) + return GURL(); + return GetAbsoluteUrl(element, element.GetAttribute("src").Utf16()); +} + +blink::WebElement CefFrameImpl::GetImgChild(const blink::WebNode& node) { + blink::WebElementCollection collection = node.GetElementsByHTMLTagName("img"); + DCHECK(!collection.IsNull()); + return collection.FirstItem(); +} + +GURL CefFrameImpl::GetChildImageUrlFromElement( + const blink::WebElement& element) { + const blink::WebElement child_img = GetImgChild(element); + if (child_img.IsNull()) + return GURL(); + return GetAbsoluteSrcUrl(child_img); +} + +bool CefFrameImpl::RemovePrefixAndAssignIfMatches(const std::string prefix, + const GURL& url, + std::string* dest) { + const base::StringPiece spec(url.possibly_invalid_spec()); + + if (base::StartsWith(spec, prefix)) { + url::RawCanonOutputW<1024> output; + url::DecodeURLEscapeSequences( + spec.data() + prefix.length(), spec.length() - prefix.length(), + url::DecodeURLMode::kUTF8OrIsomorphic, &output); + *dest = + base::UTF16ToUTF8(base::StringPiece16(output.data(), output.length())); + return true; + } + return false; +} + +void CefFrameImpl::DistinguishAndAssignSrcLinkType(const GURL& url, + Cef_HitData_Params* data) { + if (RemovePrefixAndAssignIfMatches(kAddressPrefix, url, + &data->extra_data_for_type)) { + data->type = HitTestDataType::kGeo; + } else if (RemovePrefixAndAssignIfMatches(kPhoneNumberPrefix, url, + &data->extra_data_for_type)) { + data->type = HitTestDataType::kPhone; + } else if (RemovePrefixAndAssignIfMatches(kEmailPrefix, url, + &data->extra_data_for_type)) { + data->type = HitTestDataType::kEmail; + } else { + data->type = HitTestDataType::kSrcLink; + data->extra_data_for_type = url.possibly_invalid_spec(); + if (!data->extra_data_for_type.empty()) + data->href = base::UTF8ToUTF16(data->extra_data_for_type); + } +} + +void CefFrameImpl::PopulateHitTestData(const GURL& absolute_link_url, + const GURL& absolute_image_url, + bool is_editable, + Cef_HitData_Params* data) { + if (!absolute_image_url.is_empty()) + data->img_src = absolute_image_url; + + const bool is_javascript_scheme = + absolute_link_url.SchemeIs(url::kJavaScriptScheme); + const bool has_link_url = !absolute_link_url.is_empty(); + const bool has_image_url = !absolute_image_url.is_empty(); + if (has_link_url && !has_image_url && !is_javascript_scheme) { + DistinguishAndAssignSrcLinkType(absolute_link_url, data); + } else if (has_link_url && has_image_url && !is_javascript_scheme) { + data->type = HitTestDataType::kSrcImageLink; + data->extra_data_for_type = data->img_src.possibly_invalid_spec(); + if (absolute_link_url.is_valid()) + data->href = base::UTF8ToUTF16(absolute_link_url.possibly_invalid_spec()); + } else if (!has_link_url && has_image_url) { + data->type = HitTestDataType::kImage; + data->extra_data_for_type = data->img_src.possibly_invalid_spec(); + } else if (is_editable) { + data->type = HitTestDataType::kEditText; + DCHECK_EQ(0u, data->extra_data_for_type.length()); + } +} + +void CefFrameImpl::OnFocusedNodeChanged(const blink::WebElement& element) { + Cef_HitData_Params data; + if (element.IsNull()) { + LOG(INFO) << "FocusedHitDataChange element is NULL"; + return; + } + LOG(INFO) << "FocusedHitDataChangeBegin"; + data.href = element.GetAttribute("href").Utf16(); + data.anchor_text = element.TextContent().Utf16(); + GURL absolute_link_url; + if (element.IsLink()) + absolute_link_url = GetAbsoluteUrl(element, data.href); + GURL absolute_image_url = GetChildImageUrlFromElement(element); + PopulateHitTestData(absolute_link_url, absolute_image_url, + element.IsEditable(), &data); + LOG(INFO) << "FocusedHitDataChangeEnd"; + Send(new CefHostMsg_HitData(MSG_ROUTING_NONE, data)); +} void CefFrameImpl::OnDraggableRegionsChanged() { blink::WebVector webregions = frame_->GetDocument().DraggableRegions(); @@ -534,6 +676,30 @@ void CefFrameImpl::OnDidStopLoading() { browser_->OnLoadingStateChange(false); } +void CefFrameImpl::SendTouchEvent(const Cef_TouchEvent_Params& params) { + auto render_frame = content::RenderFrame::FromWebFrame(frame_); + DCHECK(render_frame->IsMainFrame()); + blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); + if (!webview) { + LOG(INFO) << "SendTouchEvent webview is NULL"; + return; + } + const blink::WebHitTestResult result = webview->HitTestResultForTap( + gfx::Point(params.x, params.y), gfx::Size(params.width, params.height)); + Cef_HitData_Params data; + GURL absolute_image_url = result.AbsoluteImageURL(); + if (!result.UrlElement().IsNull()) { + data.anchor_text = result.UrlElement().TextContent().Utf16(); + data.href = result.UrlElement().GetAttribute("href").Utf16(); + if (absolute_image_url.is_empty()) + absolute_image_url = GetChildImageUrlFromElement(result.UrlElement()); + } + + PopulateHitTestData(result.AbsoluteLinkURL(), absolute_image_url, + result.IsContentEditable(), &data); + Send(new CefHostMsg_HitData(MSG_ROUTING_NONE, data)); +} + void CefFrameImpl::OnMoveOrResizeStarted() { if (frame_) { auto web_view = frame_->View(); @@ -551,6 +717,19 @@ void CefFrameImpl::OnLoadRequest(const CefMsg_LoadRequest_Params& params) { blink_glue::StartNavigation(frame_, request); } +void CefFrameImpl::PutZoomingForTextFactor(float factor) { + auto render_frame = content::RenderFrame::FromWebFrame(frame_); + DCHECK(render_frame->IsMainFrame()); + blink::WebView* webview = render_frame->GetRenderView()->GetWebView(); + + if (!webview) + return; + // Hide selection and autofill popups. + webview->CancelPagePopup(); + + render_frame->GetWebFrame()->FrameWidget()->SetTextZoomFactor(factor); +} + // Enable deprecation warnings on Windows. See http://crbug.com/585142. #if defined(OS_WIN) #if defined(__clang__) diff --git a/cef/libcef/renderer/frame_impl.h b/cef/libcef/renderer/frame_impl.h index f587e0340e..2912625df3 100644 --- a/cef/libcef/renderer/frame_impl.h +++ b/cef/libcef/renderer/frame_impl.h @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that can // be found in the LICENSE file. @@ -9,6 +10,7 @@ #include #include "include/cef_frame.h" #include "include/cef_v8.h" +#include "third_party/blink/public/web/web_element.h" namespace base { class ListValue; @@ -29,6 +31,8 @@ class GURL; class CefBrowserImpl; class CefResponseManager; +struct Cef_HitData_Params; +struct Cef_TouchEvent_Params; struct CefMsg_LoadRequest_Params; struct Cef_Request_Params; struct Cef_Response_Params; @@ -74,6 +78,7 @@ class CefFrameImpl : public CefFrame { CefRefPtr client) override; void SendProcessMessage(CefProcessId target_process, CefRefPtr message) override; + void LoadHeaderUrl(const CefString& url, const CefString& additionalHttpHeaders) override; // Used by CefRenderURLRequest. std::unique_ptr CreateURLLoader(); @@ -82,6 +87,7 @@ class CefFrameImpl : public CefFrame { // Forwarded from CefRenderFrameObserver. void OnAttached(); + void OnFocusedNodeChanged(const blink::WebElement& element); bool OnMessageReceived(const IPC::Message& message); void OnDidFinishLoad(); void OnDraggableRegionsChanged(); @@ -106,8 +112,24 @@ class CefFrameImpl : public CefFrame { void OnResponse(const Cef_Response_Params& params); void OnResponseAck(int request_id); void OnDidStopLoading(); + void SendTouchEvent(const Cef_TouchEvent_Params& params); void OnMoveOrResizeStarted(); void OnLoadRequest(const CefMsg_LoadRequest_Params& params); + void PutZoomingForTextFactor(float factor); + GURL GetAbsoluteUrl(const blink::WebNode& node, + const std::u16string& url_fragment); + GURL GetAbsoluteSrcUrl(const blink::WebElement& element); + blink::WebElement GetImgChild(const blink::WebNode& node); + GURL GetChildImageUrlFromElement(const blink::WebElement& element); + bool RemovePrefixAndAssignIfMatches(const std::string prefix, + const GURL& url, + std::string* dest); + void DistinguishAndAssignSrcLinkType(const GURL& url, + Cef_HitData_Params* data); + void PopulateHitTestData(const GURL& absolute_link_url, + const GURL& absolute_image_url, + bool is_editable, + Cef_HitData_Params* data); CefBrowserImpl* browser_; blink::WebLocalFrame* frame_; diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.cc b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.cc new file mode 100644 index 0000000000..30c0568a71 --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.cc @@ -0,0 +1,136 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "oh_gin_javascript_bridge_dispatcher.h" +#include "base/auto_reset.h" +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_messages.h" +#include "cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.h" +#include "content/public/renderer/render_frame.h" + +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_view.h" +namespace NWEB { +OhGinJavascriptBridgeDispatcher::OhGinJavascriptBridgeDispatcher( + content::RenderFrame* render_frame) + : content::RenderFrameObserver(render_frame), + inside_did_clear_window_object_(false) {} + +OhGinJavascriptBridgeDispatcher::~OhGinJavascriptBridgeDispatcher() {} + +bool OhGinJavascriptBridgeDispatcher::OnMessageReceived( + const IPC::Message& msg) { + bool handled = true; + IPC_BEGIN_MESSAGE_MAP(OhGinJavascriptBridgeDispatcher, msg) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeMsg_AddNamedObject, + OnAddNamedObject) + IPC_MESSAGE_HANDLER(OhGinJavascriptBridgeMsg_RemoveNamedObject, + OnRemoveNamedObject) + IPC_MESSAGE_UNHANDLED(handled = false) + IPC_END_MESSAGE_MAP() + return handled; +} + +void OhGinJavascriptBridgeDispatcher::DidClearWindowObject() { + if (inside_did_clear_window_object_) + return; + base::AutoReset flag_entry(&inside_did_clear_window_object_, true); + for (NamedObjectMap::const_iterator iter = named_objects_.begin(); + iter != named_objects_.end(); ++iter) { + if (objects_.Lookup(iter->second)) + objects_.Remove(iter->second); + + OhGinJavascriptBridgeObject* object = + OhGinJavascriptBridgeObject::InjectNamed(render_frame()->GetWebFrame(), + AsWeakPtr(), iter->first, + iter->second); + if (object) { + objects_.AddWithID(object, iter->second); + } else { + // Inform the host about wrapper creation failure. + render_frame()->Send( + new OhGinJavascriptBridgeHostMsg_ObjectWrapperDeleted(routing_id(), + iter->second)); + } + } +} + +void OhGinJavascriptBridgeDispatcher::OnAddNamedObject(const std::string& name, + ObjectID object_id) { + LOG(INFO) << "OnAddNamedObject name : " << name + << " object_id : " << object_id; + named_objects_.insert(std::make_pair(name, object_id)); +} + +void OhGinJavascriptBridgeDispatcher::OnRemoveNamedObject( + const std::string& name) { + // Removal becomes in effect on next reload. We simply removing the entry + // from the map here. + NamedObjectMap::iterator iter = named_objects_.find(name); + DCHECK(iter != named_objects_.end()); + named_objects_.erase(iter); +} + +void OhGinJavascriptBridgeDispatcher::GetJavascriptMethods( + ObjectID object_id, + std::set* methods) { + render_frame()->Send(new OhGinJavascriptBridgeHostMsg_GetMethods( + routing_id(), object_id, methods)); +} + +bool OhGinJavascriptBridgeDispatcher::HasJavascriptMethod( + ObjectID object_id, + const std::string& method_name) { + LOG(INFO) << "HasJavascriptMethod"; + bool result; + render_frame()->Send(new OhGinJavascriptBridgeHostMsg_HasMethod( + routing_id(), object_id, method_name, &result)); + return result; +} + +std::unique_ptr +OhGinJavascriptBridgeDispatcher::InvokeJavascriptMethod( + ObjectID object_id, + const std::string& method_name, + const base::ListValue& arguments, + OhGinJavascriptBridgeError* error) { + base::ListValue result_wrapper; + render_frame()->Send(new OhGinJavascriptBridgeHostMsg_InvokeMethod( + routing_id(), object_id, method_name, arguments, &result_wrapper, error)); + base::Value* result; + if (result_wrapper.Get(0, &result)) { + return std::unique_ptr(result->DeepCopy()); + } else { + return std::unique_ptr(); + } +} + +OhGinJavascriptBridgeObject* OhGinJavascriptBridgeDispatcher::GetObject( + const ObjectID object_id) { + LOG(INFO) << "GetObject"; + OhGinJavascriptBridgeObject* result = objects_.Lookup(object_id); + if (!result) { + result = + OhGinJavascriptBridgeObject::InjectAnonymous(AsWeakPtr(), object_id); + if (result) + objects_.AddWithID(result, object_id); + } + return result; +} + +void OhGinJavascriptBridgeDispatcher::OnOhGinJavascriptBridgeObjectDeleted( + const OhGinJavascriptBridgeObject* object) { + int object_id = object->object_id(); + // Ignore cleaning up of old object wrappers. + if (objects_.Lookup(object_id) != object) + return; + objects_.Remove(object_id); + render_frame()->Send(new OhGinJavascriptBridgeHostMsg_ObjectWrapperDeleted( + routing_id(), object_id)); +} + +void OhGinJavascriptBridgeDispatcher::OnDestruct() { + delete this; +} +} // namespace NWEB diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h new file mode 100644 index 0000000000..f9707de97e --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h @@ -0,0 +1,63 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_DISPATCHER_H +#define OH_GIN_JAVASCRIPT_BRIDGE_DISPATCHER_H + +#include +#include +#include +#include "base/containers/id_map.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/values.h" +#include "cef/libcef/common/javascript/oh_gin_javascript_bridge_errors.h" +#include "content/public/renderer/render_frame_observer.h" + +namespace NWEB { +class OhGinJavascriptBridgeObject; +class OhGinJavascriptBridgeDispatcher + : public base::SupportsWeakPtr, + public content::RenderFrameObserver { + public: + using ObjectMap = base::IDMap; + using ObjectID = ObjectMap::KeyType; + + explicit OhGinJavascriptBridgeDispatcher(content::RenderFrame* render_frame); + + ~OhGinJavascriptBridgeDispatcher() override; + + // RenderFrameObserver override: + bool OnMessageReceived(const IPC::Message& message) override; + void DidClearWindowObject() override; + + void GetJavascriptMethods(ObjectID object_id, std::set* methods); + bool HasJavascriptMethod(ObjectID object_id, const std::string& method_name); + + std::unique_ptr InvokeJavascriptMethod( + ObjectID object_id, + const std::string& method_name, + const base::ListValue& arguments, + OhGinJavascriptBridgeError* error); + + OhGinJavascriptBridgeObject* GetObject(const ObjectID object_id); + void OnOhGinJavascriptBridgeObjectDeleted( + const OhGinJavascriptBridgeObject* object); + + private: + // RenderFrameObserver implementation. + void OnDestruct() override; + void OnAddNamedObject(const std::string& name, ObjectID object_id); + void OnRemoveNamedObject(const std::string& name); + + typedef std::map NamedObjectMap; + NamedObjectMap named_objects_; + ObjectMap objects_; + bool inside_did_clear_window_object_; + + DISALLOW_COPY_AND_ASSIGN(OhGinJavascriptBridgeDispatcher); +}; +} // namespace NWEB +#endif \ No newline at end of file diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.cc b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.cc new file mode 100644 index 0000000000..cc627de10a --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.cc @@ -0,0 +1,133 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_object.h" + +#include "base/bind.h" +#include "content/public/renderer/render_thread.h" +#include "gin/function_template.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_messages.h" +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h" +#include "libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h" +#include "third_party/blink/public/web/blink.h" +#include "third_party/blink/public/web/web_local_frame.h" + +namespace NWEB { +gin::WrapperInfo OhGinJavascriptBridgeObject::kWrapperInfo = { + gin::kEmbedderNativeGin}; + +// static +OhGinJavascriptBridgeObject* OhGinJavascriptBridgeObject::InjectNamed( + blink::WebLocalFrame* frame, + const base::WeakPtr& dispatcher, + const std::string& object_name, + OhGinJavascriptBridgeDispatcher::ObjectID object_id) { + v8::Isolate* isolate = blink::MainThreadIsolate(); + v8::HandleScope handle_scope(isolate); + v8::Local context = frame->MainWorldScriptContext(); + if (context.IsEmpty()) + return NULL; + + OhGinJavascriptBridgeObject* object = + new OhGinJavascriptBridgeObject(isolate, dispatcher, object_id); + + v8::Context::Scope context_scope(context); + v8::Local global = context->Global(); + gin::Handle controller = + gin::CreateHandle(isolate, object); + // WrappableBase instance deletes itself in case of a wrapper + // creation failure, thus there is no need to delete |object|. + if (controller.IsEmpty()) + return NULL; + + global->Set(context, gin::StringToV8(isolate, object_name), controller.ToV8()) + .Check(); + + return object; +} + +// static +OhGinJavascriptBridgeObject* OhGinJavascriptBridgeObject::InjectAnonymous( + const base::WeakPtr& dispatcher, + OhGinJavascriptBridgeDispatcher::ObjectID object_id) { + return new OhGinJavascriptBridgeObject(blink::MainThreadIsolate(), dispatcher, + object_id); +} + +OhGinJavascriptBridgeObject::OhGinJavascriptBridgeObject( + v8::Isolate* isolate, + const base::WeakPtr& dispatcher, + OhGinJavascriptBridgeDispatcher::ObjectID object_id) + : gin::NamedPropertyInterceptor(isolate, this), + dispatcher_(dispatcher), + object_id_(object_id), + frame_routing_id_(dispatcher_->routing_id()), + template_cache_(isolate) {} + +OhGinJavascriptBridgeObject::~OhGinJavascriptBridgeObject() { + if (dispatcher_) { + dispatcher_->OnOhGinJavascriptBridgeObjectDeleted(this); + } else { + // A wrapper can outlive a render frame, and thus the dispatcher. + // Note that we intercept GinJavaBridgeHostMsg messages in a browser filter + // thus it's OK to send the message with a routing id of a ceased frame. + content::RenderThread::Get()->Send( + new OhGinJavascriptBridgeHostMsg_ObjectWrapperDeleted(frame_routing_id_, + object_id_)); + } +} + +gin::ObjectTemplateBuilder +OhGinJavascriptBridgeObject::GetObjectTemplateBuilder(v8::Isolate* isolate) { + return gin::Wrappable::GetObjectTemplateBuilder( + isolate) + .AddNamedPropertyInterceptor(); +} + +v8::Local OhGinJavascriptBridgeObject::GetNamedProperty( + v8::Isolate* isolate, + const std::string& property) { + std::map::iterator method_pos = + known_methods_.find(property); + if (method_pos == known_methods_.end()) { + if (!dispatcher_) { + return v8::Local(); + } + known_methods_[property] = + dispatcher_->HasJavascriptMethod(object_id_, property); + } + if (known_methods_[property]) { + return GetFunctionTemplate(isolate, property) + ->GetFunction(isolate->GetCurrentContext()) + .FromMaybe(v8::Local()); + } else { + return v8::Local(); + } +} + +std::vector OhGinJavascriptBridgeObject::EnumerateNamedProperties( + v8::Isolate* isolate) { + std::set method_names; + if (dispatcher_) + dispatcher_->GetJavascriptMethods(object_id_, &method_names); + return std::vector(method_names.begin(), method_names.end()); +} + +v8::Local +OhGinJavascriptBridgeObject::GetFunctionTemplate(v8::Isolate* isolate, + const std::string& name) { + LOG(INFO) << "GetFunctionTemplate name : " << name.c_str(); + v8::Local function_template = template_cache_.Get(name); + if (!function_template.IsEmpty()) + return function_template; + function_template = gin::CreateFunctionTemplate( + isolate, base::BindRepeating( + &OhGinJavascriptFunctionInvocationHelper::Invoke, + base::Owned(new OhGinJavascriptFunctionInvocationHelper( + name, dispatcher_)))); + template_cache_.Set(name, function_template); + return function_template; +} +} // namespace NWEB \ No newline at end of file diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.h b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.h new file mode 100644 index 0000000000..f7eb636810 --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_object.h @@ -0,0 +1,75 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_OBJECT_H +#define OH_GIN_JAVASCRIPT_BRIDGE_OBJECT_H + +#include + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h" +#include "gin/handle.h" +#include "gin/interceptor.h" +#include "gin/object_template_builder.h" +#include "gin/wrappable.h" +#include "v8/include/v8-util.h" + +namespace blink { +class WebLocalFrame; +} + +namespace NWEB { +class OhGinJavascriptBridgeObject + : public gin::Wrappable, + public gin::NamedPropertyInterceptor { + public: + static gin::WrapperInfo kWrapperInfo; + + OhGinJavascriptBridgeDispatcher::ObjectID object_id() const { + return object_id_; + } + + // gin::Wrappable. + gin::ObjectTemplateBuilder GetObjectTemplateBuilder( + v8::Isolate* isolate) override; + + // gin::NamedPropertyInterceptor + v8::Local GetNamedProperty(v8::Isolate* isolate, + const std::string& property) override; + std::vector EnumerateNamedProperties( + v8::Isolate* isolate) override; + + static OhGinJavascriptBridgeObject* InjectNamed( + blink::WebLocalFrame* frame, + const base::WeakPtr& dispatcher, + const std::string& object_name, + OhGinJavascriptBridgeDispatcher::ObjectID object_id); + + static OhGinJavascriptBridgeObject* InjectAnonymous( + const base::WeakPtr& dispatcher, + OhGinJavascriptBridgeDispatcher::ObjectID object_id); + + private: + OhGinJavascriptBridgeObject( + v8::Isolate* isolate, + const base::WeakPtr& dispatcher, + OhGinJavascriptBridgeDispatcher::ObjectID object_id); + + ~OhGinJavascriptBridgeObject() override; + + v8::Local GetFunctionTemplate(v8::Isolate* isolate, + const std::string& name); + + base::WeakPtr dispatcher_; + OhGinJavascriptBridgeDispatcher::ObjectID object_id_; + int frame_routing_id_; + std::map known_methods_; + v8::StdGlobalValueMap template_cache_; + + DISALLOW_COPY_AND_ASSIGN(OhGinJavascriptBridgeObject); +}; +} // namespace NWEB +#endif \ No newline at end of file diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.cc b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.cc new file mode 100644 index 0000000000..0a3a9f3670 --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.cc @@ -0,0 +1,178 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h" + +#include +#include + +#include + +#include "base/memory/ptr_util.h" +#include "base/values.h" +#include "gin/array_buffer.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_value.h" +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_object.h" + +namespace NWEB { +OhGinJavascriptBridgeValueConverter::OhGinJavascriptBridgeValueConverter() + : converter_(content::V8ValueConverter::Create()) { + converter_->SetDateAllowed(false); + converter_->SetRegExpAllowed(false); + converter_->SetFunctionAllowed(true); + converter_->SetStrategy(this); +} + +OhGinJavascriptBridgeValueConverter::~OhGinJavascriptBridgeValueConverter() {} + +v8::Local OhGinJavascriptBridgeValueConverter::ToV8Value( + const base::Value* value, + v8::Local context) const { + return converter_->ToV8Value(value, context); +} + +std::unique_ptr OhGinJavascriptBridgeValueConverter::FromV8Value( + v8::Local value, + v8::Local context) const { + return converter_->FromV8Value(value, context); +} + +bool OhGinJavascriptBridgeValueConverter::FromV8Object( + v8::Local value, + std::unique_ptr* out, + v8::Isolate* isolate) { + OhGinJavascriptBridgeObject* unwrapped; + if (!gin::ConvertFromV8(isolate, value, &unwrapped)) { + return false; + } + *out = + OhGinJavascriptBridgeValue::CreateObjectIDValue(unwrapped->object_id()); + return true; +} + +namespace { + +class TypedArraySerializer { + public: + virtual ~TypedArraySerializer() {} + static std::unique_ptr Create( + v8::Local typed_array); + virtual void serializeTo(char* data, + size_t data_length, + base::ListValue* out) = 0; + + protected: + TypedArraySerializer() {} +}; + +template +class TypedArraySerializerImpl : public TypedArraySerializer { + public: + static std::unique_ptr Create( + v8::Local typed_array) { + return base::WrapUnique( + new TypedArraySerializerImpl(typed_array)); + } + + TypedArraySerializerImpl(const TypedArraySerializerImpl&) = delete; + TypedArraySerializerImpl& operator=(const TypedArraySerializerImpl&) = delete; + + void serializeTo(char* data, + size_t data_length, + base::ListValue* out) override { + DCHECK_EQ(data_length, typed_array_->Length() * sizeof(ElementType)); + for (ElementType *element = reinterpret_cast(data), + *end = element + typed_array_->Length(); + element != end; ++element) { + // Serialize the uint32 value as the binary type since base::Value + // supports only int for the integer type, and the uint8 and the uint16 + // with Base::Value since they fit into int. + if (std::is_same::value) { + out->Append(OhGinJavascriptBridgeValue::CreateUInt32Value(*element)); + } else { + out->Append(std::make_unique(ListType(*element))); + } + } + } + + private: + explicit TypedArraySerializerImpl(v8::Local typed_array) + : typed_array_(typed_array) {} + + v8::Local typed_array_; +}; + +// static +std::unique_ptr TypedArraySerializer::Create( + v8::Local typed_array) { + if (typed_array->IsInt8Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsUint8Array() || + typed_array->IsUint8ClampedArray()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsInt16Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsUint16Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsInt32Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsUint32Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsFloat32Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } else if (typed_array->IsFloat64Array()) { + return TypedArraySerializerImpl::Create(typed_array); + } + NOTREACHED(); + return nullptr; +} + +} // namespace + +bool OhGinJavascriptBridgeValueConverter::FromV8ArrayBuffer( + v8::Local value, + std::unique_ptr* out, + v8::Isolate* isolate) { + if (!value->IsTypedArray()) { + *out = OhGinJavascriptBridgeValue::CreateUndefinedValue(); + return true; + } + + char* data = NULL; + size_t data_length = 0; + gin::ArrayBufferView view; + if (ConvertFromV8(isolate, value.As(), &view)) { + data = reinterpret_cast(view.bytes()); + data_length = view.num_bytes(); + } + if (!data) { + *out = OhGinJavascriptBridgeValue::CreateUndefinedValue(); + return true; + } + + std::unique_ptr result = std::make_unique(); + std::unique_ptr serializer( + TypedArraySerializer::Create(value.As())); + serializer->serializeTo(data, data_length, result.get()); + *out = std::move(result); + return true; +} + +bool OhGinJavascriptBridgeValueConverter::FromV8Number( + v8::Local value, + std::unique_ptr* out) { + double double_value = value->Value(); + if (std::isfinite(double_value)) + return false; + *out = OhGinJavascriptBridgeValue::CreateNonFiniteValue(double_value); + return true; +} + +bool OhGinJavascriptBridgeValueConverter::FromV8Undefined( + std::unique_ptr* out) { + *out = OhGinJavascriptBridgeValue::CreateUndefinedValue(); + return true; +} +} // namespace NWEB diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h new file mode 100644 index 0000000000..8795c124ef --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h @@ -0,0 +1,47 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_BRIDGE_VALUE_CONVERTER_H +#define OH_GIN_JAVASCRIPT_BRIDGE_VALUE_CONVERTER_H + +#include + +#include "content/public/renderer/v8_value_converter.h" + +namespace NWEB { +class OhGinJavascriptBridgeValueConverter + : public content::V8ValueConverter::Strategy { + public: + OhGinJavascriptBridgeValueConverter(); + + OhGinJavascriptBridgeValueConverter( + const OhGinJavascriptBridgeValueConverter&) = delete; + OhGinJavascriptBridgeValueConverter& operator=( + const OhGinJavascriptBridgeValueConverter&) = delete; + + ~OhGinJavascriptBridgeValueConverter() override; + + v8::Local ToV8Value(const base::Value* value, + v8::Local context) const; + std::unique_ptr FromV8Value( + v8::Local value, + v8::Local context) const; + + // content::V8ValueConverter::Strategy + bool FromV8Object(v8::Local value, + std::unique_ptr* out, + v8::Isolate* isolate) override; + bool FromV8ArrayBuffer(v8::Local value, + std::unique_ptr* out, + v8::Isolate* isolate) override; + bool FromV8Number(v8::Local value, + std::unique_ptr* out) override; + bool FromV8Undefined(std::unique_ptr* out) override; + + private: + std::unique_ptr converter_; +}; +} // namespace NWEB +#endif diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.cc b/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.cc new file mode 100644 index 0000000000..078c4b84cf --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.cc @@ -0,0 +1,111 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h" + +#include + +#include "base/values.h" +#include "content/public/renderer/v8_value_converter.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_errors.h" +#include "libcef/common/javascript/oh_gin_javascript_bridge_value.h" +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_object.h" +#include "libcef/renderer/javascript/oh_gin_javascript_bridge_value_converter.h" + +namespace { + +const char kMethodInvocationAsConstructorDisallowed[] = + "Javascript bridge method can't be invoked as a constructor"; +const char kMethodInvocationOnNonInjectedObjectDisallowed[] = + "Javascript bridge method can't be invoked on a non-injected object"; +const char kMethodInvocationErrorMessage[] = + "Javascript bridge method invocation error"; + +} // namespace + +namespace NWEB { +OhGinJavascriptFunctionInvocationHelper:: + OhGinJavascriptFunctionInvocationHelper( + const std::string& method_name, + const base::WeakPtr& dispatcher) + : method_name_(method_name), + dispatcher_(dispatcher), + converter_(new OhGinJavascriptBridgeValueConverter()) {} + +OhGinJavascriptFunctionInvocationHelper:: + ~OhGinJavascriptFunctionInvocationHelper() {} + +v8::Local OhGinJavascriptFunctionInvocationHelper::Invoke( + gin::Arguments* args) { + LOG(INFO) << "OhGinJavascriptFunctionInvocationHelper Invoke"; + if (!dispatcher_) { + args->isolate()->ThrowException(v8::Exception::Error( + gin::StringToV8(args->isolate(), kMethodInvocationErrorMessage))); + return v8::Undefined(args->isolate()); + } + + if (args->IsConstructCall()) { + args->isolate()->ThrowException(v8::Exception::Error(gin::StringToV8( + args->isolate(), kMethodInvocationAsConstructorDisallowed))); + return v8::Undefined(args->isolate()); + } + + OhGinJavascriptBridgeObject* object = NULL; + if (!args->GetHolder(&object) || !object) { + args->isolate()->ThrowException(v8::Exception::Error(gin::StringToV8( + args->isolate(), kMethodInvocationOnNonInjectedObjectDisallowed))); + return v8::Undefined(args->isolate()); + } + + base::ListValue arguments; + { + v8::HandleScope handle_scope(args->isolate()); + v8::Local context = args->isolate()->GetCurrentContext(); + v8::Local val; + while (args->GetNext(&val)) { + std::unique_ptr arg(converter_->FromV8Value(val, context)); + if (arg.get()) + arguments.Append(std::move(arg)); + else + arguments.Append(std::make_unique()); + } + } + + OhGinJavascriptBridgeError error; + std::unique_ptr result = dispatcher_->InvokeJavascriptMethod( + object->object_id(), method_name_, arguments, &error); + if (!result.get()) { + args->isolate()->ThrowException(v8::Exception::Error(gin::StringToV8( + args->isolate(), OhGinJavascriptBridgeErrorToString(error)))); + return v8::Undefined(args->isolate()); + } + if (!result->is_blob()) { + return converter_->ToV8Value(result.get(), + args->isolate()->GetCurrentContext()); + } + + std::unique_ptr gin_value = + OhGinJavascriptBridgeValue::FromValue(result.get()); + if (gin_value->IsType(OhGinJavascriptBridgeValue::TYPE_OBJECT_ID)) { + OhGinJavascriptBridgeObject* object_result = NULL; + OhGinJavascriptBridgeDispatcher::ObjectID object_id; + if (gin_value->GetAsObjectID(&object_id)) { + object_result = dispatcher_->GetObject(object_id); + } + if (object_result) { + gin::Handle controller = + gin::CreateHandle(args->isolate(), object_result); + if (controller.IsEmpty()) + return v8::Undefined(args->isolate()); + return controller.ToV8(); + } + } else if (gin_value->IsType(OhGinJavascriptBridgeValue::TYPE_NONFINITE)) { + float float_value; + gin_value->GetAsNonFinite(&float_value); + return v8::Number::New(args->isolate(), float_value); + } + return v8::Undefined(args->isolate()); +} +} // namespace NWEB diff --git a/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h b/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h new file mode 100644 index 0000000000..4f3fd697f3 --- /dev/null +++ b/cef/libcef/renderer/javascript/oh_gin_javascript_function_invocation_helper.h @@ -0,0 +1,40 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OH_GIN_JAVASCRIPT_FUNCTION_INVOCATION_HELPER_H +#define OH_GIN_JAVASCRIPT_FUNCTION_INVOCATION_HELPER_H + +#include + +#include "base/memory/weak_ptr.h" +#include "cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h" +#include "gin/arguments.h" +#include "gin/handle.h" + +namespace NWEB { +class OhGinJavascriptBridgeValueConverter; + +class OhGinJavascriptFunctionInvocationHelper { + public: + OhGinJavascriptFunctionInvocationHelper( + const std::string& method_name, + const base::WeakPtr& dispatcher); + + OhGinJavascriptFunctionInvocationHelper( + const OhGinJavascriptFunctionInvocationHelper&) = delete; + OhGinJavascriptFunctionInvocationHelper& operator=( + const OhGinJavascriptFunctionInvocationHelper&) = delete; + + ~OhGinJavascriptFunctionInvocationHelper(); + + v8::Local Invoke(gin::Arguments* args); + + private: + std::string method_name_; + base::WeakPtr dispatcher_; + std::unique_ptr converter_; +}; +} // namespace NWEB +#endif diff --git a/cef/libcef/renderer/render_frame_observer.cc b/cef/libcef/renderer/render_frame_observer.cc index 0459ab60e5..6504da052f 100644 --- a/cef/libcef/renderer/render_frame_observer.cc +++ b/cef/libcef/renderer/render_frame_observer.cc @@ -20,6 +20,7 @@ #include "libcef/common/app_manager.h" #include "libcef/renderer/blink_glue.h" #include "libcef/renderer/browser_impl.h" +#include "libcef/common/cef_messages.h" #include "libcef/renderer/dom_document_impl.h" #include "libcef/renderer/v8_impl.h" @@ -73,7 +74,7 @@ void CefRenderFrameObserver::FocusedElementChanged( const blink::WebElement& element) { if (!frame_) return; - + frame_->OnFocusedNodeChanged(element); blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); CefRefPtr browserPtr = CefBrowserImpl::GetBrowserForMainFrame(frame->Top()); diff --git a/cef/libcef/renderer/render_frame_observer.h b/cef/libcef/renderer/render_frame_observer.h index efd93bc652..ed505e7960 100644 --- a/cef/libcef/renderer/render_frame_observer.h +++ b/cef/libcef/renderer/render_frame_observer.h @@ -38,6 +38,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { private: void OnLoadStart(); void OnLoadError(); + void FocusedHitDataChange(const blink::WebElement& element); CefFrameImpl* frame_ = nullptr; diff --git a/cef/libcef_dll/cpptoc/access_request_cpptoc.cc b/cef/libcef_dll/cpptoc/access_request_cpptoc.cc new file mode 100644 index 0000000000..d97849ec3b --- /dev/null +++ b/cef/libcef_dll/cpptoc/access_request_cpptoc.cc @@ -0,0 +1,102 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=6b186aa2b1640034df797d439745503309071680$ +// + +#include "libcef_dll/cpptoc/access_request_cpptoc.h" +#include "libcef_dll/shutdown_checker.h" + +namespace { + +// MEMBER FUNCTIONS - Body may be edited by hand. + +cef_string_userfree_t CEF_CALLBACK +access_request_origin(struct _cef_access_request_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefString _retval = CefAccessRequestCppToC::Get(self)->Origin(); + + // Return type: string + return _retval.DetachToUserFree(); +} + +int CEF_CALLBACK +access_request_resource_acess_id(struct _cef_access_request_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + int _retval = CefAccessRequestCppToC::Get(self)->ResourceAcessId(); + + // Return type: simple + return _retval; +} + +void CEF_CALLBACK +access_request_report_request_result(struct _cef_access_request_t* self, + int allowed) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefAccessRequestCppToC::Get(self)->ReportRequestResult(allowed ? true + : false); +} + +} // namespace + +// CONSTRUCTOR - Do not edit by hand. + +CefAccessRequestCppToC::CefAccessRequestCppToC() { + GetStruct()->origin = access_request_origin; + GetStruct()->resource_acess_id = access_request_resource_acess_id; + GetStruct()->report_request_result = access_request_report_request_result; +} + +// DESTRUCTOR - Do not edit by hand. + +CefAccessRequestCppToC::~CefAccessRequestCppToC() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +CefRefPtr CefCppToCRefCounted< + CefAccessRequestCppToC, + CefAccessRequest, + cef_access_request_t>::UnwrapDerived(CefWrapperType type, + cef_access_request_t* s) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCppToCRefCounted::kWrapperType = + WT_ACCESS_REQUEST; diff --git a/cef/libcef_dll/cpptoc/access_request_cpptoc.h b/cef/libcef_dll/cpptoc/access_request_cpptoc.h new file mode 100644 index 0000000000..c5262807d7 --- /dev/null +++ b/cef/libcef_dll/cpptoc/access_request_cpptoc.h @@ -0,0 +1,38 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=7f780d77c50f8f64713a51f886c76adc70e44357$ +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_ACCESS_REQUEST_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_ACCESS_REQUEST_CPPTOC_H_ +#pragma once + +#if !defined(BUILDING_CEF_SHARED) +#error This file can be included DLL-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed DLL-side only. +class CefAccessRequestCppToC + : public CefCppToCRefCounted { + public: + CefAccessRequestCppToC(); + virtual ~CefAccessRequestCppToC(); +}; + +#endif // CEF_LIBCEF_DLL_CPPTOC_ACCESS_REQUEST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc index 6928523ec5..992a81d609 100644 --- a/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d13edb3e144059dce3337ab5781fffbae7a7ead2$ +// $hash=f20a2530c9b5ad72cccd301ee4234a16132c487d$ // #include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h b/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h index ea01945a6a..b6dce7abc8 100644 --- a/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/accessibility_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=948aad5c459d9e8317428559b6c6b7ab0467c0ed$ +// $hash=0605de17534cba62d36fc1160997660c4a38e40b$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_ACCESSIBILITY_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.cc b/cef/libcef_dll/cpptoc/app_cpptoc.cc index c39287fa83..bc6f55efe8 100644 --- a/cef/libcef_dll/cpptoc/app_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/app_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3d9026243d2086b44cd99c460a82848837672131$ +// $hash=ee267b6567062246b9f82b4b50b68d82d2cc939f$ // #include "libcef_dll/cpptoc/app_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.h b/cef/libcef_dll/cpptoc/app_cpptoc.h index 7e391a66e2..c705f806df 100644 --- a/cef/libcef_dll/cpptoc/app_cpptoc.h +++ b/cef/libcef_dll/cpptoc/app_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0ca0d5506a28dbf7e1d36e00e8f8de07da222411$ +// $hash=601455da6a16a7212debdb8184b8f731be4e2f8d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_APP_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc index 44396046df..0317067179 100644 --- a/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/audio_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4874d395bcbe824a8ddd9394cec1b56bfee5000b$ +// $hash=519a82bbea84ea39cadc72c55291e15cb2a74072$ // #include "libcef_dll/cpptoc/audio_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h b/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h index 24bbfacd91..d2574a797a 100644 --- a/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/audio_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b84737f07d28a6a8a602729a851b206d42868833$ +// $hash=352ed71e6c70ef8e5f38e635ed8fc17b2fcc2b4e$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_AUDIO_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc index bcd7d463d1..c9733c0168 100644 --- a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6d0b1ff7c3c5bfdbfb339036c7fa7e36ee2ebaf9$ +// $hash=7497a44116b3cfc86eb309dc940c91c7cca78353$ // #include "libcef_dll/cpptoc/auth_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h index 37a8c23fb9..b9aae72ade 100644 --- a/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/auth_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d230ed608200d25f8efb032971ff796bc4401f62$ +// $hash=036ebbbaaa86b497dda11ef6371e5bc6c9171b04$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_AUTH_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc index 364acc406f..6187dfa3f3 100644 --- a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e33b28b1b5a88aece1ba705cfd2f9e22ab2e04fd$ +// $hash=0f0475ffcd9ea6ca7f91616c52c21b3e51b075f3$ // #include "libcef_dll/cpptoc/before_download_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h index 9005865fb7..fc31cf8417 100644 --- a/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/before_download_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b11017f368ab5c6b1dd1c481dec048ceaf86bbb1$ +// $hash=53a024e4e503f7e107c19ed638684c5708efd6e6$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_BEFORE_DOWNLOAD_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc b/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc index f179d1384d..51659b1677 100644 --- a/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/binary_value_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=60f72b2e1a5118e01de182a9d10d4e2b2c236bd1$ +// $hash=fd59a248f99060800fc3bab5c381784eb3309a57$ // #include "libcef_dll/cpptoc/binary_value_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/binary_value_cpptoc.h b/cef/libcef_dll/cpptoc/binary_value_cpptoc.h index 380907574f..994621aa25 100644 --- a/cef/libcef_dll/cpptoc/binary_value_cpptoc.h +++ b/cef/libcef_dll/cpptoc/binary_value_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8f13b32d7b16d6ad756c50755bc8268ec24d782d$ +// $hash=83361bb9395a566ef5bfcd9d87eade8df222d075$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_BINARY_VALUE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/browser_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_cpptoc.cc index 5bb98a30e7..3105dcd17b 100644 --- a/cef/libcef_dll/cpptoc/browser_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/browser_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,13 +9,15 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b573d2840558cbf17908a16d3e92c3196c84b1c7$ +// $hash=37305a392b6fceed48564b7a7d5f0d2811c537f4$ // #include "libcef_dll/cpptoc/browser_cpptoc.h" #include #include "libcef_dll/cpptoc/browser_host_cpptoc.h" +#include "libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h" #include "libcef_dll/cpptoc/frame_cpptoc.h" +#include "libcef_dll/cpptoc/geolocation_acess_cpptoc.h" #include "libcef_dll/shutdown_checker.h" #include "libcef_dll/transfer_util.h" @@ -98,6 +100,23 @@ void CEF_CALLBACK browser_go_forward(struct _cef_browser_t* self) { CefBrowserCppToC::Get(self)->GoForward(); } +int CEF_CALLBACK browser_can_go_back_or_forward(struct _cef_browser_t* self, + int num_steps) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + bool _retval = CefBrowserCppToC::Get(self)->CanGoBackOrForward(num_steps); + + // Return type: bool + return _retval; +} + int CEF_CALLBACK browser_is_loading(struct _cef_browser_t* self) { shutdown_checker::AssertNotShutdown(); @@ -373,6 +392,42 @@ void CEF_CALLBACK browser_get_frame_names(struct _cef_browser_t* self, transfer_string_list_contents(namesList, names); } +struct _cef_browser_permission_request_delegate_t* CEF_CALLBACK +browser_get_permission_request_delegate(struct _cef_browser_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefRefPtr _retval = + CefBrowserCppToC::Get(self)->GetPermissionRequestDelegate(); + + // Return type: refptr_same + return CefBrowserPermissionRequestDelegateCppToC::Wrap(_retval); +} + +struct _cef_geolocation_acess_t* CEF_CALLBACK +browser_get_geolocation_permissions(struct _cef_browser_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefRefPtr _retval = + CefBrowserCppToC::Get(self)->GetGeolocationPermissions(); + + // Return type: refptr_same + return CefGeolocationAcessCppToC::Wrap(_retval); +} + } // namespace // CONSTRUCTOR - Do not edit by hand. @@ -383,6 +438,7 @@ CefBrowserCppToC::CefBrowserCppToC() { GetStruct()->go_back = browser_go_back; GetStruct()->can_go_forward = browser_can_go_forward; GetStruct()->go_forward = browser_go_forward; + GetStruct()->can_go_back_or_forward = browser_can_go_back_or_forward; GetStruct()->is_loading = browser_is_loading; GetStruct()->reload = browser_reload; GetStruct()->reload_ignore_cache = browser_reload_ignore_cache; @@ -398,6 +454,10 @@ CefBrowserCppToC::CefBrowserCppToC() { GetStruct()->get_frame_count = browser_get_frame_count; GetStruct()->get_frame_identifiers = browser_get_frame_identifiers; GetStruct()->get_frame_names = browser_get_frame_names; + GetStruct()->get_permission_request_delegate = + browser_get_permission_request_delegate; + GetStruct()->get_geolocation_permissions = + browser_get_geolocation_permissions; } // DESTRUCTOR - Do not edit by hand. diff --git a/cef/libcef_dll/cpptoc/browser_cpptoc.h b/cef/libcef_dll/cpptoc/browser_cpptoc.h index 2c92c98b33..08c927b498 100644 --- a/cef/libcef_dll/cpptoc/browser_cpptoc.h +++ b/cef/libcef_dll/cpptoc/browser_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=524016208502fc4afb767c79320d5568ce1987d7$ +// $hash=68e6a8ff4e47ec0c3c767d80746091550b9d11dc$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc index 9514635efa..63bc4cc194 100644 --- a/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/browser_host_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0109529f61a92116f73bc6c0ff47bfd0423b6f07$ +// $hash=30942a6f9c376a901f337c13dbbb65417e9b1c5d$ // #include "libcef_dll/cpptoc/browser_host_cpptoc.h" @@ -23,9 +23,11 @@ #include "libcef_dll/ctocpp/client_ctocpp.h" #include "libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h" #include "libcef_dll/ctocpp/download_image_callback_ctocpp.h" +#include "libcef_dll/ctocpp/java_script_result_callback_ctocpp.h" #include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h" #include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h" #include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h" +#include "libcef_dll/ctocpp/task_ctocpp.h" #include "libcef_dll/shutdown_checker.h" #include "libcef_dll/transfer_util.h" @@ -132,6 +134,26 @@ browser_host_get_browser(struct _cef_browser_host_t* self) { return CefBrowserCppToC::Wrap(_retval); } +void CEF_CALLBACK +browser_host_post_task_to_uithread(struct _cef_browser_host_t* self, + struct _cef_task_t* task) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: task; type: refptr_diff + DCHECK(task); + if (!task) + return; + + // Execute + CefBrowserHostCppToC::Get(self)->PostTaskToUIThread( + CefTaskCToCpp::Wrap(task)); +} + void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self, int force_close) { shutdown_checker::AssertNotShutdown(); @@ -948,6 +970,276 @@ browser_host_set_windowless_frame_rate(struct _cef_browser_host_t* self, CefBrowserHostCppToC::Get(self)->SetWindowlessFrameRate(frame_rate); } +void CEF_CALLBACK browser_host_set_web_preferences( + struct _cef_browser_host_t* self, + const struct _cef_browser_settings_t* browser_settings) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser_settings; type: struct_byref_const + DCHECK(browser_settings); + if (!browser_settings) + return; + + // Translate param: browser_settings; type: struct_byref_const + CefBrowserSettings browser_settingsObj; + if (browser_settings) + browser_settingsObj.Set(*browser_settings, false); + + // Execute + CefBrowserHostCppToC::Get(self)->SetWebPreferences(browser_settingsObj); +} + +void CEF_CALLBACK browser_host_put_user_agent(struct _cef_browser_host_t* self, + const cef_string_t* ua) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: ua; type: string_byref_const + DCHECK(ua); + if (!ua) + return; + + // Execute + CefBrowserHostCppToC::Get(self)->PutUserAgent(CefString(ua)); +} + +cef_string_userfree_t CEF_CALLBACK +browser_host_default_user_agent(struct _cef_browser_host_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefString _retval = CefBrowserHostCppToC::Get(self)->DefaultUserAgent(); + + // Return type: string + return _retval.DetachToUserFree(); +} + +void CEF_CALLBACK +browser_host_set_background_color(struct _cef_browser_host_t* self, int color) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefBrowserHostCppToC::Get(self)->SetBackgroundColor(color); +} + +void CEF_CALLBACK +browser_host_register_ark_jsfunction(struct _cef_browser_host_t* self, + const cef_string_t* object_name, + cef_string_list_t method_list) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: object_name; type: string_byref_const + DCHECK(object_name); + if (!object_name) + return; + // Verify param: method_list; type: string_vec_byref_const + DCHECK(method_list); + if (!method_list) + return; + + // Translate param: method_list; type: string_vec_byref_const + std::vector method_listList; + transfer_string_list_contents(method_list, method_listList); + + // Execute + CefBrowserHostCppToC::Get(self)->RegisterArkJSfunction(CefString(object_name), + method_listList); +} + +void CEF_CALLBACK +browser_host_unregister_ark_jsfunction(struct _cef_browser_host_t* self, + const cef_string_t* object_name, + cef_string_list_t method_list) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: object_name; type: string_byref_const + DCHECK(object_name); + if (!object_name) + return; + // Unverified params: method_list + + // Translate param: method_list; type: string_vec_byref_const + std::vector method_listList; + transfer_string_list_contents(method_list, method_listList); + + // Execute + CefBrowserHostCppToC::Get(self)->UnregisterArkJSfunction( + CefString(object_name), method_listList); +} + +cef_string_userfree_t CEF_CALLBACK +browser_host_title(struct _cef_browser_host_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefString _retval = CefBrowserHostCppToC::Get(self)->Title(); + + // Return type: string + return _retval.DetachToUserFree(); +} + +void CEF_CALLBACK browser_host_get_hit_data(struct _cef_browser_host_t* self, + int* type, + cef_string_t* extra_data) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: type; type: simple_byref + DCHECK(type); + if (!type) + return; + // Verify param: extra_data; type: string_byref + DCHECK(extra_data); + if (!extra_data) + return; + + // Translate param: type; type: simple_byref + int typeVal = type ? *type : 0; + // Translate param: extra_data; type: string_byref + CefString extra_dataStr(extra_data); + + // Execute + CefBrowserHostCppToC::Get(self)->GetHitData(typeVal, extra_dataStr); + + // Restore param: type; type: simple_byref + if (type) + *type = typeVal; +} + +int CEF_CALLBACK +browser_host_page_load_progress(struct _cef_browser_host_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + int _retval = CefBrowserHostCppToC::Get(self)->PageLoadProgress(); + + // Return type: simple + return _retval; +} + +float CEF_CALLBACK browser_host_scale(struct _cef_browser_host_t* self) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + float _retval = CefBrowserHostCppToC::Get(self)->Scale(); + + // Return type: simple + return _retval; +} + +void CEF_CALLBACK +browser_host_load_with_data_and_base_url(struct _cef_browser_host_t* self, + const cef_string_t* baseUrl, + const cef_string_t* data, + const cef_string_t* mimeType, + const cef_string_t* encoding, + const cef_string_t* historyUrl) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Unverified params: baseUrl, data, mimeType, encoding, historyUrl + + // Execute + CefBrowserHostCppToC::Get(self)->LoadWithDataAndBaseUrl( + CefString(baseUrl), CefString(data), CefString(mimeType), + CefString(encoding), CefString(historyUrl)); +} + +void CEF_CALLBACK browser_host_load_with_data(struct _cef_browser_host_t* self, + const cef_string_t* data, + const cef_string_t* mimeType, + const cef_string_t* encoding) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Unverified params: data, mimeType, encoding + + // Execute + CefBrowserHostCppToC::Get(self)->LoadWithData( + CefString(data), CefString(mimeType), CefString(encoding)); +} + +void CEF_CALLBACK +browser_host_add_visited_links(struct _cef_browser_host_t* self, + cef_string_list_t urls) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Unverified params: urls + + // Translate param: urls; type: string_vec_byref_const + std::vector urlsList; + transfer_string_list_contents(urls, urlsList); + + // Execute + CefBrowserHostCppToC::Get(self)->AddVisitedLinks(urlsList); +} + void CEF_CALLBACK browser_host_ime_set_composition(struct _cef_browser_host_t* self, const cef_string_t* text, @@ -1303,12 +1595,38 @@ int CEF_CALLBACK browser_host_is_audio_muted(struct _cef_browser_host_t* self) { return _retval; } +void CEF_CALLBACK browser_host_execute_java_script( + struct _cef_browser_host_t* self, + const cef_string_t* code, + struct _cef_java_script_result_callback_t* callback) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: code; type: string_byref_const + DCHECK(code); + if (!code) + return; + // Verify param: callback; type: refptr_diff + DCHECK(callback); + if (!callback) + return; + + // Execute + CefBrowserHostCppToC::Get(self)->ExecuteJavaScript( + CefString(code), CefJavaScriptResultCallbackCToCpp::Wrap(callback)); +} + } // namespace // CONSTRUCTOR - Do not edit by hand. CefBrowserHostCppToC::CefBrowserHostCppToC() { GetStruct()->get_browser = browser_host_get_browser; + GetStruct()->post_task_to_uithread = browser_host_post_task_to_uithread; GetStruct()->close_browser = browser_host_close_browser; GetStruct()->try_close_browser = browser_host_try_close_browser; GetStruct()->set_focus = browser_host_set_focus; @@ -1358,6 +1676,21 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() { browser_host_get_windowless_frame_rate; GetStruct()->set_windowless_frame_rate = browser_host_set_windowless_frame_rate; + GetStruct()->set_web_preferences = browser_host_set_web_preferences; + GetStruct()->put_user_agent = browser_host_put_user_agent; + GetStruct()->default_user_agent = browser_host_default_user_agent; + GetStruct()->set_background_color = browser_host_set_background_color; + GetStruct()->register_ark_jsfunction = browser_host_register_ark_jsfunction; + GetStruct()->unregister_ark_jsfunction = + browser_host_unregister_ark_jsfunction; + GetStruct()->title = browser_host_title; + GetStruct()->get_hit_data = browser_host_get_hit_data; + GetStruct()->page_load_progress = browser_host_page_load_progress; + GetStruct()->scale = browser_host_scale; + GetStruct()->load_with_data_and_base_url = + browser_host_load_with_data_and_base_url; + GetStruct()->load_with_data = browser_host_load_with_data; + GetStruct()->add_visited_links = browser_host_add_visited_links; GetStruct()->ime_set_composition = browser_host_ime_set_composition; GetStruct()->ime_commit_text = browser_host_ime_commit_text; GetStruct()->ime_finish_composing_text = @@ -1378,6 +1711,7 @@ CefBrowserHostCppToC::CefBrowserHostCppToC() { GetStruct()->is_background_host = browser_host_is_background_host; GetStruct()->set_audio_muted = browser_host_set_audio_muted; GetStruct()->is_audio_muted = browser_host_is_audio_muted; + GetStruct()->execute_java_script = browser_host_execute_java_script; } // DESTRUCTOR - Do not edit by hand. diff --git a/cef/libcef_dll/cpptoc/browser_host_cpptoc.h b/cef/libcef_dll/cpptoc/browser_host_cpptoc.h index 2afe298c8f..3a7c593329 100644 --- a/cef/libcef_dll/cpptoc/browser_host_cpptoc.h +++ b/cef/libcef_dll/cpptoc/browser_host_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=65fa250d1ab296dd74f4047aef707a4a9e41a772$ +// $hash=244bcb519cd21d6febf70c4ce40fbc1cbb18176c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_HOST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc new file mode 100644 index 0000000000..82e01abae7 --- /dev/null +++ b/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.cc @@ -0,0 +1,217 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=2f9f0ebd4c8a44fb9c2d2136e0791770fc72dfe0$ +// + +#include "libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h" +#include "libcef_dll/shutdown_checker.h" + +namespace { + +// MEMBER FUNCTIONS - Body may be edited by hand. + +void CEF_CALLBACK +browser_permission_request_delegate_ask_geolocation_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->AskGeolocationPermission(CefString(origin), callback); +} + +void CEF_CALLBACK +browser_permission_request_delegate_abort_ask_geolocation_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->AbortAskGeolocationPermission(CefString(origin)); +} + +void CEF_CALLBACK +browser_permission_request_delegate_ask_protected_media_identifier_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->AskProtectedMediaIdentifierPermission(CefString(origin), callback); +} + +void CEF_CALLBACK +browser_permission_request_delegate_abort_ask_protected_media_identifier_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->AbortAskProtectedMediaIdentifierPermission(CefString(origin)); +} + +void CEF_CALLBACK browser_permission_request_delegate_ask_midisysex_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self)->AskMIDISysexPermission( + CefString(origin), callback); +} + +void CEF_CALLBACK +browser_permission_request_delegate_abort_ask_midisysex_permission( + struct _cef_browser_permission_request_delegate_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->AbortAskMIDISysexPermission(CefString(origin)); +} + +void CEF_CALLBACK +browser_permission_request_delegate_notify_geolocation_permission( + struct _cef_browser_permission_request_delegate_t* self, + int value, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefBrowserPermissionRequestDelegateCppToC::Get(self) + ->NotifyGeolocationPermission(value ? true : false, CefString(origin)); +} + +} // namespace + +// CONSTRUCTOR - Do not edit by hand. + +CefBrowserPermissionRequestDelegateCppToC:: + CefBrowserPermissionRequestDelegateCppToC() { + GetStruct()->ask_geolocation_permission = + browser_permission_request_delegate_ask_geolocation_permission; + GetStruct()->abort_ask_geolocation_permission = + browser_permission_request_delegate_abort_ask_geolocation_permission; + GetStruct()->ask_protected_media_identifier_permission = + browser_permission_request_delegate_ask_protected_media_identifier_permission; + GetStruct()->abort_ask_protected_media_identifier_permission = + browser_permission_request_delegate_abort_ask_protected_media_identifier_permission; + GetStruct()->ask_midisysex_permission = + browser_permission_request_delegate_ask_midisysex_permission; + GetStruct()->abort_ask_midisysex_permission = + browser_permission_request_delegate_abort_ask_midisysex_permission; + GetStruct()->notify_geolocation_permission = + browser_permission_request_delegate_notify_geolocation_permission; +} + +// DESTRUCTOR - Do not edit by hand. + +CefBrowserPermissionRequestDelegateCppToC:: + ~CefBrowserPermissionRequestDelegateCppToC() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +CefRefPtr +CefCppToCRefCounted:: + UnwrapDerived(CefWrapperType type, + cef_browser_permission_request_delegate_t* s) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCppToCRefCounted< + CefBrowserPermissionRequestDelegateCppToC, + CefBrowserPermissionRequestDelegate, + cef_browser_permission_request_delegate_t>::kWrapperType = + WT_BROWSER_PERMISSION_REQUEST_DELEGATE; diff --git a/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h new file mode 100644 index 0000000000..34e1571c8b --- /dev/null +++ b/cef/libcef_dll/cpptoc/browser_permission_request_delegate_cpptoc.h @@ -0,0 +1,38 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=56d5e14a811fca57a762921bdef1270c44af6b4c$ +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PERMISSION_REQUEST_DELEGATE_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_BROWSER_PERMISSION_REQUEST_DELEGATE_CPPTOC_H_ +#pragma once + +#if !defined(BUILDING_CEF_SHARED) +#error This file can be included DLL-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed DLL-side only. +class CefBrowserPermissionRequestDelegateCppToC + : public CefCppToCRefCounted { + public: + CefBrowserPermissionRequestDelegateCppToC(); + virtual ~CefBrowserPermissionRequestDelegateCppToC(); +}; + +#endif // CEF_LIBCEF_DLL_CPPTOC_BROWSER_PERMISSION_REQUEST_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc index 908e0f7b22..0a3e0b0e0a 100644 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=160f499a80898e5b6934960c4f41764c0610458e$ +// $hash=452f119327aff2ec0aaed162adf85bbd239b9033$ // #include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h index df662553aa..5ee18f0f52 100644 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=780d6faccdcc4a4f1a2a3f1f8b2bd0f780f739be$ +// $hash=ebbabaa3d73f0266003818a764f8ca677a9ec6b2$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_BROWSER_PROCESS_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/callback_cpptoc.cc b/cef/libcef_dll/cpptoc/callback_cpptoc.cc index 6b51cd29cb..5deff72b31 100644 --- a/cef/libcef_dll/cpptoc/callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e4fe3ae042f545ad36a92c641823a25e0502c93d$ +// $hash=01b8f661ca054d4a48ee00f1163011688b32e9f1$ // #include "libcef_dll/cpptoc/callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/callback_cpptoc.h b/cef/libcef_dll/cpptoc/callback_cpptoc.h index 40c13ca4c3..8850a48171 100644 --- a/cef/libcef_dll/cpptoc/callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0f7c4746faf3da0cfc56a9d083dc814e4d753494$ +// $hash=5b2fa7fef3cde7efde7df615769b6361ea81ce46$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.cc b/cef/libcef_dll/cpptoc/client_cpptoc.cc index a8c9c4bed9..2e399963b6 100644 --- a/cef/libcef_dll/cpptoc/client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bdbe1ed03a5ab0ca22668417c329555a3b0d9cea$ +// $hash=f75b1d4f0b40dc405cdad086256df8feee38f56a$ // #include "libcef_dll/cpptoc/client_cpptoc.h" @@ -25,11 +25,13 @@ #include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" #include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" #include "libcef_dll/cpptoc/load_handler_cpptoc.h" +#include "libcef_dll/cpptoc/permission_request_cpptoc.h" #include "libcef_dll/cpptoc/print_handler_cpptoc.h" #include "libcef_dll/cpptoc/render_handler_cpptoc.h" #include "libcef_dll/cpptoc/request_handler_cpptoc.h" #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/frame_ctocpp.h" +#include "libcef_dll/ctocpp/list_value_ctocpp.h" #include "libcef_dll/ctocpp/process_message_ctocpp.h" namespace { @@ -276,6 +278,22 @@ client_get_request_handler(struct _cef_client_t* self) { return CefRequestHandlerCppToC::Wrap(_retval); } +struct _cef_permission_request_t* CEF_CALLBACK +client_get_permission_request(struct _cef_client_t* self) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefRefPtr _retval = + CefClientCppToC::Get(self)->GetPermissionRequest(); + + // Return type: refptr_same + return CefPermissionRequestCppToC::Wrap(_retval); +} + int CEF_CALLBACK client_on_process_message_received(struct _cef_client_t* self, cef_browser_t* browser, @@ -309,6 +327,43 @@ client_on_process_message_received(struct _cef_client_t* self, return _retval; } +int CEF_CALLBACK +client_notify_java_script_result(struct _cef_client_t* self, + struct _cef_list_value_t* args, + const cef_string_t* method, + const cef_string_t* object_name, + struct _cef_list_value_t* result) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: args; type: refptr_diff + DCHECK(args); + if (!args) + return 0; + // Verify param: method; type: string_byref_const + DCHECK(method); + if (!method) + return 0; + // Verify param: object_name; type: string_byref_const + DCHECK(object_name); + if (!object_name) + return 0; + // Verify param: result; type: refptr_diff + DCHECK(result); + if (!result) + return 0; + + // Execute + int _retval = CefClientCppToC::Get(self)->NotifyJavaScriptResult( + CefListValueCToCpp::Wrap(args), CefString(method), CefString(object_name), + CefListValueCToCpp::Wrap(result)); + + // Return type: simple + return _retval; +} + } // namespace // CONSTRUCTOR - Do not edit by hand. @@ -329,7 +384,9 @@ CefClientCppToC::CefClientCppToC() { GetStruct()->get_print_handler = client_get_print_handler; GetStruct()->get_render_handler = client_get_render_handler; GetStruct()->get_request_handler = client_get_request_handler; + GetStruct()->get_permission_request = client_get_permission_request; GetStruct()->on_process_message_received = client_on_process_message_received; + GetStruct()->notify_java_script_result = client_notify_java_script_result; } // DESTRUCTOR - Do not edit by hand. diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.h b/cef/libcef_dll/cpptoc/client_cpptoc.h index 2cc1906fb6..e33730c9b5 100644 --- a/cef/libcef_dll/cpptoc/client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=add3a870eb1069fd05d8c2adae9b89a4ef559e11$ +// $hash=30d4264433606a5e29f5ec2a325f630b278d4be9$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_CLIENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/command_line_cpptoc.cc b/cef/libcef_dll/cpptoc/command_line_cpptoc.cc index 5ee236f051..97e1a5ef50 100644 --- a/cef/libcef_dll/cpptoc/command_line_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/command_line_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=91a5cb8087aef1db3e5b2ac423f345a574b1e67f$ +// $hash=fec108946a9d826210e4fa3746839b56a123316c$ // #include "libcef_dll/cpptoc/command_line_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/command_line_cpptoc.h b/cef/libcef_dll/cpptoc/command_line_cpptoc.h index 9c2cfef3a9..a466cc76fd 100644 --- a/cef/libcef_dll/cpptoc/command_line_cpptoc.h +++ b/cef/libcef_dll/cpptoc/command_line_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=86f69fdf227ecb61f15f83cc1e57aadd93169076$ +// $hash=395fccd246892782a1c4a26a87baa43f75436bd8$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_COMMAND_LINE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc index 7a41014445..dbfc0cab56 100644 --- a/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/completion_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f4cf5ba559fdc51bcc7e5fa88416d509664c5239$ +// $hash=c16d5dc361785c620c9066fc473a443651afa7ab$ // #include "libcef_dll/cpptoc/completion_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h b/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h index c94f9a469d..96b2bb1c78 100644 --- a/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/completion_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dfe9244d4a99e0760b1de909640b1ac625d66cd2$ +// $hash=7ac48d4ac56f3e31947f8f3b9d9bf54a3bc3383c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc index 86f870eee7..9f3981569e 100644 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7d14f8464796fb174c6b8d35d049f20a054ab03b$ +// $hash=a689271e9c27cfd0d6f6fadb8bb624898f165934$ // #include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h index 007d99e65b..f429b4b859 100644 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=559fa8da353ae9f961720df55b72bc59811fcf1e$ +// $hash=51d213cb8d40ba1f608944422e0522749e433a6f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc index 1f0541664a..6c26eac307 100644 --- a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4ff1017b303be65e38e293470384dc891bb26b15$ +// $hash=e2f6dee4f74c0eb0979d7a557b007fb8e495bcbb$ // #include "libcef_dll/cpptoc/context_menu_params_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h index 15fec7b9ef..e4cc567718 100644 --- a/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h +++ b/cef/libcef_dll/cpptoc/context_menu_params_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1e0be158c3f98733b0eff48e68b24d592c4ced20$ +// $hash=9612bbf58cbf1ee4c41d9cec79267e473d130172$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_CONTEXT_MENU_PARAMS_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc index 90420bd7ec..eb095602c2 100644 --- a/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f4b9b2362826114b98103317ecc50839a7bf46b1$ +// $hash=8a64cdcb148bd7c9cad278d57c353ebf48386a16$ // #include "libcef_dll/cpptoc/cookie_access_filter_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h index c9816ea1d5..32c7864d66 100644 --- a/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h +++ b/cef/libcef_dll/cpptoc/cookie_access_filter_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=04d9ec7e72314a01a154debc4742e7921f018efb$ +// $hash=16e58fb5b73a0c13602b01a14afb4f6a882c094d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_ACCESS_FILTER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc index 53caa6c4fc..e5abda9d95 100644 --- a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0307287ed355556f7c6dab1e4a4fd188ce11d919$ +// $hash=de992f1be99ed2d831e840e60f8fb318ca433265$ // #include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" @@ -34,10 +34,105 @@ CEF_EXPORT cef_cookie_manager_t* cef_cookie_manager_get_global_manager( return CefCookieManagerCppToC::Wrap(_retval); } +CEF_EXPORT int cef_cookie_manager_create_cef_cookie( + const cef_string_t* url, + const cef_string_t* value, + struct _cef_cookie_t* cef_cookie) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: url; type: string_byref_const + DCHECK(url); + if (!url) + return 0; + // Verify param: value; type: string_byref_const + DCHECK(value); + if (!value) + return 0; + // Verify param: cef_cookie; type: struct_byref + DCHECK(cef_cookie); + if (!cef_cookie) + return 0; + + // Translate param: cef_cookie; type: struct_byref + CefCookie cef_cookieObj; + if (cef_cookie) + cef_cookieObj.AttachTo(*cef_cookie); + + // Execute + bool _retval = CefCookieManager::CreateCefCookie( + CefString(url), CefString(value), cef_cookieObj); + + // Restore param: cef_cookie; type: struct_byref + if (cef_cookie) + cef_cookieObj.DetachTo(*cef_cookie); + + // Return type: bool + return _retval; +} + namespace { // MEMBER FUNCTIONS - Body may be edited by hand. +int CEF_CALLBACK +cookie_manager_is_accept_cookie_allowed(struct _cef_cookie_manager_t* self) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + bool _retval = CefCookieManagerCppToC::Get(self)->IsAcceptCookieAllowed(); + + // Return type: bool + return _retval; +} + +void CEF_CALLBACK +cookie_manager_put_accept_cookie_enabled(struct _cef_cookie_manager_t* self, + int accept) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefCookieManagerCppToC::Get(self)->PutAcceptCookieEnabled(accept ? true + : false); +} + +int CEF_CALLBACK cookie_manager_is_file_urlscheme_cookies_allowed( + struct _cef_cookie_manager_t* self) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + + // Execute + bool _retval = + CefCookieManagerCppToC::Get(self)->IsFileURLSchemeCookiesAllowed(); + + // Return type: bool + return _retval; +} + +void CEF_CALLBACK cookie_manager_put_accept_file_urlscheme_cookies_enabled( + struct _cef_cookie_manager_t* self, + int allow) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefCookieManagerCppToC::Get(self)->PutAcceptFileURLSchemeCookiesEnabled( + allow ? true : false); +} + int CEF_CALLBACK cookie_manager_visit_all_cookies(struct _cef_cookie_manager_t* self, struct _cef_cookie_visitor_t* visitor) { @@ -124,6 +219,7 @@ int CEF_CALLBACK cookie_manager_delete_cookies(struct _cef_cookie_manager_t* self, const cef_string_t* url, const cef_string_t* cookie_name, + int is_session, struct _cef_delete_cookies_callback_t* callback) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING @@ -134,7 +230,7 @@ cookie_manager_delete_cookies(struct _cef_cookie_manager_t* self, // Execute bool _retval = CefCookieManagerCppToC::Get(self)->DeleteCookies( - CefString(url), CefString(cookie_name), + CefString(url), CefString(cookie_name), is_session ? true : false, CefDeleteCookiesCallbackCToCpp::Wrap(callback)); // Return type: bool @@ -164,6 +260,14 @@ cookie_manager_flush_store(struct _cef_cookie_manager_t* self, // CONSTRUCTOR - Do not edit by hand. CefCookieManagerCppToC::CefCookieManagerCppToC() { + GetStruct()->is_accept_cookie_allowed = + cookie_manager_is_accept_cookie_allowed; + GetStruct()->put_accept_cookie_enabled = + cookie_manager_put_accept_cookie_enabled; + GetStruct()->is_file_urlscheme_cookies_allowed = + cookie_manager_is_file_urlscheme_cookies_allowed; + GetStruct()->put_accept_file_urlscheme_cookies_enabled = + cookie_manager_put_accept_file_urlscheme_cookies_enabled; GetStruct()->visit_all_cookies = cookie_manager_visit_all_cookies; GetStruct()->visit_url_cookies = cookie_manager_visit_url_cookies; GetStruct()->set_cookie = cookie_manager_set_cookie; diff --git a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h index 785436edf6..b1088b7340 100644 --- a/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h +++ b/cef/libcef_dll/cpptoc/cookie_manager_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1506d130763fdc06c9346895dbbc2fd9aed0b65f$ +// $hash=75170ff033e8e382ba463d350493fab6e12e4192$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_MANAGER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc index 6f3be6beb6..d3d5ef0895 100644 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=097662e392b7121bf63eef79696420041d753978$ +// $hash=07483aea0b811fedba3da36f7a598f06edd22faf$ // #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" @@ -59,12 +59,32 @@ int CEF_CALLBACK cookie_visitor_visit(struct _cef_cookie_visitor_t* self, return _retval; } +void CEF_CALLBACK +cookie_visitor_set_cookie_line(struct _cef_cookie_visitor_t* self, + const cef_string_t* cookieLine) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: cookieLine; type: string_byref_const + DCHECK(cookieLine); + if (!cookieLine) + return; + + // Execute + CefCookieVisitorCppToC::Get(self)->SetCookieLine(CefString(cookieLine)); +} + } // namespace // CONSTRUCTOR - Do not edit by hand. CefCookieVisitorCppToC::CefCookieVisitorCppToC() { GetStruct()->visit = cookie_visitor_visit; + GetStruct()->set_cookie_line = cookie_visitor_set_cookie_line; } // DESTRUCTOR - Do not edit by hand. diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h index 2d3e4f4a22..130318cd07 100644 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=badac918a8a378ce2d89a3c2d5c4fe9cdaaa7d15$ +// $hash=2c087a5613a69038aa9bba45c46a56d96c6a60ba$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_COOKIE_VISITOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc index 096a8b64a0..8c5b758b23 100644 --- a/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=35218b8c1049df57946037a75907ea3a2774d473$ +// $hash=0d2b19ca10e7a4ad389d3ce8de83addc1cad4b63$ // #include "libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h b/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h index 2da23ce189..5f8c4f6db1 100644 --- a/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/delete_cookies_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=867dea9b048c71bbbb7ba593a60cfd9c572646e2$ +// $hash=424b81efdcb5b86629d8388df5df13b1229155bb$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DELETE_COOKIES_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc b/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc index d3edfa574e..534d94072a 100644 --- a/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d675fee9716fb6801ed17dea7d57a7c427c4ba5f$ +// $hash=a8a10af1258edd37dbb8d079a10943070c1e9c4c$ // #include "libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h b/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h index 80c9939e1e..cd0396a86b 100644 --- a/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h +++ b/cef/libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=41e7f0fbaa447820c81bf49d1f02040a04d814a3$ +// $hash=309236e96bdbd2d39e63f94872d2de18552bec80$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DEV_TOOLS_MESSAGE_OBSERVER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc index f0822febac..6dcffbb174 100644 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=01fbdd3bbe7d3cfd39c7d9ae93d8930ac6bd8f39$ +// $hash=639576c610ca3898809cdee6d19c45253e9ea4d2$ // #include "libcef_dll/cpptoc/dialog_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h index d587913fcb..d1dbb38f3a 100644 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7a95491bece16f5cac5eb7b50188a27b22ee6f9d$ +// $hash=52c108ee7b518b733b331b7d172f16bf3126fe3d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DIALOG_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc index 657b28622c..450903a13b 100644 --- a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=75a1a43dc9ee88124580e8eff4f7c86b13f03625$ +// $hash=c55e53ae76eba8e90a364cd6768764a4c56967ff$ // #include "libcef_dll/cpptoc/dictionary_value_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h index db288ad47b..4b2aeae7eb 100644 --- a/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h +++ b/cef/libcef_dll/cpptoc/dictionary_value_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e436cb8a857b96370525bfb29ff2045d0bfc6ec6$ +// $hash=ddb7429c3059bb7af3a285adde53aab78a99d39d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DICTIONARY_VALUE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc index c8605c5c88..6f0058a9a1 100644 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=caf5dead1197de40a4038520f33e48739949d4a0$ +// $hash=b990f1a9bafcdd5be19363932738a3f2e778e769$ // #include "libcef_dll/cpptoc/display_handler_cpptoc.h" @@ -101,6 +101,57 @@ display_handler_on_favicon_urlchange(struct _cef_display_handler_t* self, CefBrowserCToCpp::Wrap(browser), icon_urlsList); } +void CEF_CALLBACK +display_handler_on_received_touch_icon_url(struct _cef_display_handler_t* self, + cef_browser_t* browser, + const cef_string_t* icon_url, + int precomposed) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + // Verify param: icon_url; type: string_byref_const + DCHECK(icon_url); + if (!icon_url) + return; + + // Execute + CefDisplayHandlerCppToC::Get(self)->OnReceivedTouchIconUrl( + CefBrowserCToCpp::Wrap(browser), CefString(icon_url), + precomposed ? true : false); +} + +void CEF_CALLBACK +display_handler_on_received_icon(struct _cef_display_handler_t* self, + const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: data; type: simple_byaddr + DCHECK(data); + if (!data) + return; + + // Execute + CefDisplayHandlerCppToC::Get(self)->OnReceivedIcon(data, width, height, + color_type, alpha_type); +} + void CEF_CALLBACK display_handler_on_fullscreen_mode_change(struct _cef_display_handler_t* self, cef_browser_t* browser, @@ -295,6 +346,9 @@ CefDisplayHandlerCppToC::CefDisplayHandlerCppToC() { GetStruct()->on_address_change = display_handler_on_address_change; GetStruct()->on_title_change = display_handler_on_title_change; GetStruct()->on_favicon_urlchange = display_handler_on_favicon_urlchange; + GetStruct()->on_received_touch_icon_url = + display_handler_on_received_touch_icon_url; + GetStruct()->on_received_icon = display_handler_on_received_icon; GetStruct()->on_fullscreen_mode_change = display_handler_on_fullscreen_mode_change; GetStruct()->on_tooltip = display_handler_on_tooltip; diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h b/cef/libcef_dll/cpptoc/display_handler_cpptoc.h index 8e15fb7d36..9d5121a244 100644 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/display_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f73c1983623b5163268cccd0526d7772a987173b$ +// $hash=db9ca0d224aa971d8912fc577c53cc9abe52fe58$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DISPLAY_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc b/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc index aa9e6a8511..4850dcd185 100644 --- a/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/domdocument_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6478a60c9da50d426e6e4baaa2a08b87e1263179$ +// $hash=c4cad301694f35ea716d7c4376252140fcb0d78f$ // #include "libcef_dll/cpptoc/domdocument_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/domdocument_cpptoc.h b/cef/libcef_dll/cpptoc/domdocument_cpptoc.h index 48910ee02d..919eb2a288 100644 --- a/cef/libcef_dll/cpptoc/domdocument_cpptoc.h +++ b/cef/libcef_dll/cpptoc/domdocument_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c424b9ae21add2404156a766a322bb5843570492$ +// $hash=8aea7ead4b6cbdefba65a1234213fee4eb4a1952$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMDOCUMENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/domnode_cpptoc.cc b/cef/libcef_dll/cpptoc/domnode_cpptoc.cc index cbf2e2b0d1..6496648c82 100644 --- a/cef/libcef_dll/cpptoc/domnode_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/domnode_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=178f5f1c60b6e540f465abc8d7fead1a90c044c6$ +// $hash=d352693e8728b1ed586dc62d69a91dd92667760a$ // #include "libcef_dll/cpptoc/domnode_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/domnode_cpptoc.h b/cef/libcef_dll/cpptoc/domnode_cpptoc.h index 85e42d6a98..a9325b62b0 100644 --- a/cef/libcef_dll/cpptoc/domnode_cpptoc.h +++ b/cef/libcef_dll/cpptoc/domnode_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=38aef0aaf02bbd77f9b53cbde53bcaf92cc62800$ +// $hash=e5c97231e7d369e8fb4bd73611ec49d7289af076$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMNODE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc index 37c2b1a233..fd1cff6281 100644 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=be3a37f8b7472c46512ce6fb910957d36a03da5e$ +// $hash=f809bcb5a3f1246b3a94aebe14ad36bbb7e185c7$ // #include "libcef_dll/cpptoc/domvisitor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h index 07356d2aa3..84a2b75baa 100644 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dd9ebd1d2d03dc18467d9e944925b5ce6768dc22$ +// $hash=974358c3bab311f8a19af125f5ccf2dfd13ad8e7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOMVISITOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc index e922b99d29..8c2aa1f202 100644 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=eb3787c594889d79bb9c1cfed9bdc5ed6b55f7aa$ +// $hash=496b226297ba7d5fa5e7e7bd4117c417e26fae59$ // #include "libcef_dll/cpptoc/download_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h b/cef/libcef_dll/cpptoc/download_handler_cpptoc.h index 185eea5692..cd7580f8ab 100644 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/download_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7f7550fe074374d10b0601de008eaa81c72f8758$ +// $hash=d8c8f94bad7ee32841d16658b106158880edb5e0$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc index 47402be7ab..9b31d1e296 100644 --- a/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bd98cacb709cbd923c79cf8d61847e0bd6a2e3d9$ +// $hash=9313088260606d8b5a57b7e75c1d37e724924a40$ // #include "libcef_dll/cpptoc/download_image_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h b/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h index ab340cba33..c7d6125bbb 100644 --- a/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/download_image_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a3b02330389789479f880c0b333632c3c2ddf835$ +// $hash=c5f83abc0a8e18b3f0c87d39f83df687dfff22e1$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_IMAGE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc index 9c406cf9d4..7ef2878221 100644 --- a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b5c79b2579c5bd4abcd4514214aa2bad8e6c5d08$ +// $hash=7cb000dca30be501541fc16036c585a3cd6618cb$ // #include "libcef_dll/cpptoc/download_item_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h index 0c0610c2c6..bd9dec4ef2 100644 --- a/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/download_item_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0437928c10d1860236103d10041bfc2093b29e15$ +// $hash=d0baa6c264292da99e5c909d18450486435c9a8e$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/download_item_cpptoc.cc b/cef/libcef_dll/cpptoc/download_item_cpptoc.cc index 24adcedf08..357d285c90 100644 --- a/cef/libcef_dll/cpptoc/download_item_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/download_item_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c8e0b5428ea91a7fc739e52e632d66b5a64c9b47$ +// $hash=64b3cee6b2de98140a1dc6f6aabff6b2c4ac7d78$ // #include "libcef_dll/cpptoc/download_item_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/download_item_cpptoc.h b/cef/libcef_dll/cpptoc/download_item_cpptoc.h index 38c0546f3d..559b6c8f2d 100644 --- a/cef/libcef_dll/cpptoc/download_item_cpptoc.h +++ b/cef/libcef_dll/cpptoc/download_item_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4daa4f692a70672c84ac6aa3131d94ef7db16769$ +// $hash=72609007d48530320ae4a0f210c4604108d896d9$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_ITEM_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc b/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc index 3e4eaa50d8..6e682e5d89 100644 --- a/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/drag_data_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=da31b4510fabf162d7a456350d493511c7aa115b$ +// $hash=2a39ab30ca26c5c63ce557b31f86a5557cd96ebc$ // #include "libcef_dll/cpptoc/drag_data_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/drag_data_cpptoc.h b/cef/libcef_dll/cpptoc/drag_data_cpptoc.h index aea7ebbc2b..fbeafd0745 100644 --- a/cef/libcef_dll/cpptoc/drag_data_cpptoc.h +++ b/cef/libcef_dll/cpptoc/drag_data_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a09c182c6c031b3ab85700173d5597ef9667468e$ +// $hash=c267ab21bb2e49ecade7ba3c7545003d7e072373$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_DATA_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc index 21f5edf82a..833c0cbeef 100644 --- a/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/drag_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ea86117d7727f8a72eb4d6bdd3abb39f6f986ddd$ +// $hash=53febc1355422739c9de942f67f52fb4de462571$ // #include "libcef_dll/cpptoc/drag_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h b/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h index a1eb28ca6d..865b8c94a9 100644 --- a/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/drag_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7ef7668148af4ad90257fe5e469ba360fb27cad2$ +// $hash=39ab6f4e1f88efb2d726995d7075c904e11091e6$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_DRAG_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc index e2a1d75a8e..efc5b12922 100644 --- a/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=27526065862cb1b69968994cea5258a59bfa9c30$ +// $hash=67836a9b2dfec98cab93231cb7e07ca2b9696123$ // #include "libcef_dll/cpptoc/end_tracing_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h b/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h index 6f990429ba..89668d4d52 100644 --- a/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/end_tracing_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9c3325aa86df8f76a5e517c609a8560c1bc32ff1$ +// $hash=0769e0fec9a6f3c0e33d35b23ebf1bec4a205844$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_END_TRACING_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/extension_cpptoc.cc b/cef/libcef_dll/cpptoc/extension_cpptoc.cc index 950a28a334..f601bb51c6 100644 --- a/cef/libcef_dll/cpptoc/extension_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/extension_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=46f1330dc50f407b9d0048c0110fa03ef1496fb7$ +// $hash=5ae76b861609dc9f1b0d033dcebf514d8ef68a57$ // #include "libcef_dll/cpptoc/extension_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/extension_cpptoc.h b/cef/libcef_dll/cpptoc/extension_cpptoc.h index 4ff4075fda..f2c06267c0 100644 --- a/cef/libcef_dll/cpptoc/extension_cpptoc.h +++ b/cef/libcef_dll/cpptoc/extension_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=53061b2630f0dbffa826ecd372ae6f8c911c3e16$ +// $hash=46725937bd7ba35ca8ea8fb2d1bbdeac0c53dc80$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc index 5878f1b499..2aaccfbc5a 100644 --- a/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/extension_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5f749f292c2c8c39e7c1bb01b84a36ec8d182e2a$ +// $hash=7cdd0564d9b129bf9f068764d4d1588645445d5b$ // #include "libcef_dll/cpptoc/extension_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h b/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h index 5ae40e2c4a..fc3ff5d6a6 100644 --- a/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/extension_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5cac87c4d641ef2037416771a535c4cd3b9c2a0f$ +// $hash=b695266a9c10c4fc0b68f96b64a77cc5c0235827$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_EXTENSION_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc index 5866e20267..7a4bdbcf8d 100644 --- a/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=87cc07146ea03201324443a1abb7bc6fdb4dd472$ +// $hash=d334e579f498ad7727721dfe4e10ad810b81035a$ // #include "libcef_dll/cpptoc/file_dialog_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h index 10bedbc839..046c02aa5f 100644 --- a/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/file_dialog_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2d6cfc2f723c4cb0afbe193fb540af66c3261715$ +// $hash=2b6c5e5bd0bb44f1c916b317bccb0e0794c28f91$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_FILE_DIALOG_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc index 897837f228..7130f8058d 100644 --- a/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/find_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0d144f7fa17062b3708f16a0232a9a0c7f0467d8$ +// $hash=022bd3d1f8fd0eb3de156647dd4f50d688747534$ // #include "libcef_dll/cpptoc/find_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/find_handler_cpptoc.h b/cef/libcef_dll/cpptoc/find_handler_cpptoc.h index c7cc001343..0d2193718e 100644 --- a/cef/libcef_dll/cpptoc/find_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/find_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=880a3e0dab84306fb5f44c6b2a28c62e149beda9$ +// $hash=c6408d6714984291379f0113e7806cac21aee934$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_FIND_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc index a8f33a7c96..2549edd6d6 100644 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fb56495a48efa0319e4ed8789305c5106707e7b6$ +// $hash=6d554e767e9e5eea0d9caefba61e35fbe4fff231$ // #include "libcef_dll/cpptoc/focus_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h index ab2a586449..d384176fe8 100644 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dd23aa5e43b06eb8d4975d17cd61c47b77998736$ +// $hash=def50c909d368ef1d03f1932f2b0283c3cbf8165$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_FOCUS_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/frame_cpptoc.cc b/cef/libcef_dll/cpptoc/frame_cpptoc.cc index 06db65ffc5..9c3a4a4fdd 100644 --- a/cef/libcef_dll/cpptoc/frame_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/frame_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d9b002e6ccad765d9a03d757e97e35cdc35c95b6$ +// $hash=e94035efbcc27884df78e43f4540ac38002c01e7$ // #include "libcef_dll/cpptoc/frame_cpptoc.h" @@ -388,6 +388,24 @@ void CEF_CALLBACK frame_visit_dom(struct _cef_frame_t* self, CefFrameCppToC::Get(self)->VisitDOM(CefDOMVisitorCToCpp::Wrap(visitor)); } +void CEF_CALLBACK +frame_load_header_url(struct _cef_frame_t* self, + const cef_string_t* url, + const cef_string_t* additionalHttpHeaders) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Unverified params: url, additionalHttpHeaders + + // Execute + CefFrameCppToC::Get(self)->LoadHeaderUrl(CefString(url), + CefString(additionalHttpHeaders)); +} + struct _cef_urlrequest_t* CEF_CALLBACK frame_create_urlrequest(struct _cef_frame_t* self, struct _cef_request_t* request, @@ -467,6 +485,7 @@ CefFrameCppToC::CefFrameCppToC() { GetStruct()->get_browser = frame_get_browser; GetStruct()->get_v8context = frame_get_v8context; GetStruct()->visit_dom = frame_visit_dom; + GetStruct()->load_header_url = frame_load_header_url; GetStruct()->create_urlrequest = frame_create_urlrequest; GetStruct()->send_process_message = frame_send_process_message; } diff --git a/cef/libcef_dll/cpptoc/frame_cpptoc.h b/cef/libcef_dll/cpptoc/frame_cpptoc.h index 935e97f3f5..3e1e27fe92 100644 --- a/cef/libcef_dll/cpptoc/frame_cpptoc.h +++ b/cef/libcef_dll/cpptoc/frame_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2f4364d696c512ecbe2a16fe77bd1cf3b7c9a34b$ +// $hash=5154f627049509d38f098549ea08fb26a0712963$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_FRAME_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc b/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc new file mode 100644 index 0000000000..da6eb4aac5 --- /dev/null +++ b/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.cc @@ -0,0 +1,138 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=a21b3afd08841726e90bdc044e0dd0d22b277264$ +// + +#include "libcef_dll/cpptoc/geolocation_acess_cpptoc.h" +#include "libcef_dll/shutdown_checker.h" + +namespace { + +// MEMBER FUNCTIONS - Body may be edited by hand. + +int CEF_CALLBACK +geolocation_acess_contain_origin(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return 0; + + // Execute + bool _retval = + CefGeolocationAcessCppToC::Get(self)->ContainOrigin(CefString(origin)); + + // Return type: bool + return _retval; +} + +int CEF_CALLBACK geolocation_acess_is_origin_access_enabled( + struct _cef_geolocation_acess_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return 0; + + // Execute + bool _retval = CefGeolocationAcessCppToC::Get(self)->IsOriginAccessEnabled( + CefString(origin)); + + // Return type: bool + return _retval; +} + +void CEF_CALLBACK +geolocation_acess_enabled(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefGeolocationAcessCppToC::Get(self)->Enabled(CefString(origin)); +} + +void CEF_CALLBACK +geolocation_acess_disabled(struct _cef_geolocation_acess_t* self, + const cef_string_t* origin) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefGeolocationAcessCppToC::Get(self)->Disabled(CefString(origin)); +} + +} // namespace + +// CONSTRUCTOR - Do not edit by hand. + +CefGeolocationAcessCppToC::CefGeolocationAcessCppToC() { + GetStruct()->contain_origin = geolocation_acess_contain_origin; + GetStruct()->is_origin_access_enabled = + geolocation_acess_is_origin_access_enabled; + GetStruct()->enabled = geolocation_acess_enabled; + GetStruct()->disabled = geolocation_acess_disabled; +} + +// DESTRUCTOR - Do not edit by hand. + +CefGeolocationAcessCppToC::~CefGeolocationAcessCppToC() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +CefRefPtr CefCppToCRefCounted< + CefGeolocationAcessCppToC, + CefGeolocationAcess, + cef_geolocation_acess_t>::UnwrapDerived(CefWrapperType type, + cef_geolocation_acess_t* s) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCppToCRefCounted::kWrapperType = + WT_GEOLOCATION_ACESS; diff --git a/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h b/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h new file mode 100644 index 0000000000..97b335d034 --- /dev/null +++ b/cef/libcef_dll/cpptoc/geolocation_acess_cpptoc.h @@ -0,0 +1,38 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=42966754a9927c84debb6edfd37f8c41873ee268$ +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_ACESS_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_ACESS_CPPTOC_H_ +#pragma once + +#if !defined(BUILDING_CEF_SHARED) +#error This file can be included DLL-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed DLL-side only. +class CefGeolocationAcessCppToC + : public CefCppToCRefCounted { + public: + CefGeolocationAcessCppToC(); + virtual ~CefGeolocationAcessCppToC(); +}; + +#endif // CEF_LIBCEF_DLL_CPPTOC_GEOLOCATION_ACESS_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc index f8c7687701..4aeb4e9714 100644 --- a/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=569f3d8665058812dba8a4ea648d8f3fa224418a$ +// $hash=3f24789c79862889b5a0454c743bf70f71a98faf$ // #include "libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h b/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h index 20b1dd05c6..3ed16a181a 100644 --- a/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/get_extension_resource_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e821ff90ff963596a694524c1cb7104d09d6fb41$ +// $hash=8e0f89043319ecad378af6125bd4fcdbd8bdd34e$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_GET_EXTENSION_RESOURCE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/image_cpptoc.cc b/cef/libcef_dll/cpptoc/image_cpptoc.cc index 970541d8a7..81dc865b26 100644 --- a/cef/libcef_dll/cpptoc/image_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/image_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8fbc29a756ba6dd4fa94ff1c886070c9e7feb1bc$ +// $hash=e9ee6df7e0e77e54dea7e2c1e4b24cdc88b79344$ // #include "libcef_dll/cpptoc/image_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/image_cpptoc.h b/cef/libcef_dll/cpptoc/image_cpptoc.h index 0a09903248..acd84570c2 100644 --- a/cef/libcef_dll/cpptoc/image_cpptoc.h +++ b/cef/libcef_dll/cpptoc/image_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3e15b61b6e7e019575ccf32f374ab4666b1b7cb$ +// $hash=e82ca8d18a0367d4061f67afd33a8a486f338238$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_IMAGE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc new file mode 100644 index 0000000000..1a0adf8512 --- /dev/null +++ b/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.cc @@ -0,0 +1,72 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=b98959cda67200ef6a434297c5e9de53a2e948fb$ +// + +#include "libcef_dll/cpptoc/java_script_result_callback_cpptoc.h" +#include "libcef_dll/shutdown_checker.h" + +namespace { + +// MEMBER FUNCTIONS - Body may be edited by hand. + +void CEF_CALLBACK java_script_result_callback_on_java_script_exe_result( + struct _cef_java_script_result_callback_t* self, + const cef_string_t* result) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: result; type: string_byref_const + DCHECK(result); + if (!result) + return; + + // Execute + CefJavaScriptResultCallbackCppToC::Get(self)->OnJavaScriptExeResult( + CefString(result)); +} + +} // namespace + +// CONSTRUCTOR - Do not edit by hand. + +CefJavaScriptResultCallbackCppToC::CefJavaScriptResultCallbackCppToC() { + GetStruct()->on_java_script_exe_result = + java_script_result_callback_on_java_script_exe_result; +} + +// DESTRUCTOR - Do not edit by hand. + +CefJavaScriptResultCallbackCppToC::~CefJavaScriptResultCallbackCppToC() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +CefRefPtr +CefCppToCRefCounted:: + UnwrapDerived(CefWrapperType type, cef_java_script_result_callback_t* s) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType + CefCppToCRefCounted::kWrapperType = + WT_JAVA_SCRIPT_RESULT_CALLBACK; diff --git a/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h b/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h new file mode 100644 index 0000000000..0f6e4290d3 --- /dev/null +++ b/cef/libcef_dll/cpptoc/java_script_result_callback_cpptoc.h @@ -0,0 +1,40 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=fe951e9554ef1ba97fc78a2caac2f154497bde3f$ +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_JAVA_SCRIPT_RESULT_CALLBACK_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_JAVA_SCRIPT_RESULT_CALLBACK_CPPTOC_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_browser_capi.h" +#include "include/capi/cef_client_capi.h" +#include "include/cef_browser.h" +#include "include/cef_client.h" +#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed wrapper-side only. +class CefJavaScriptResultCallbackCppToC + : public CefCppToCRefCounted { + public: + CefJavaScriptResultCallbackCppToC(); + virtual ~CefJavaScriptResultCallbackCppToC(); +}; + +#endif // CEF_LIBCEF_DLL_CPPTOC_JAVA_SCRIPT_RESULT_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc index 3df4c9bd61..7b6b2d8d60 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6ffe0d2a76866636dbe932db3b5c264ff2ef1034$ +// $hash=8a66dc7024a4d368e8368b1be42deff60f4966dc$ // #include "libcef_dll/cpptoc/jsdialog_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h index 5a514d6efb..1c6e3b5147 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/jsdialog_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4cd0f7c3665c4adfba42d2a50a381ee94776913a$ +// $hash=5bc7b389cab53db3487532fbcae4ad156c814710$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc index 92b2215dfd..432323d8c3 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=94f71f6f646166bd1c1fe8db5e4e1c03ddcf6d75$ +// $hash=41c06df7feb0288f02c644bd633cce3f1754beba$ // #include "libcef_dll/cpptoc/jsdialog_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h index ad74fb0150..d855c3a20e 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=40374c94c3d8f6e28a61dce0c1b0462b5abd8d5d$ +// $hash=507a9b3192b98d0fad632714a8a4a4f97e5c19a3$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_JSDIALOG_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc index 65ddb2e91c..c9b7a0fa96 100644 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=deae14bf0e2fcd80ba93ae9de3253443c1b1d9b6$ +// $hash=9f55775c0fcff5993efe9d8c9db75001d4335743$ // #include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h index f08777a24c..2d01998aa3 100644 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1c78a6ae6ed347871e4a97e854ef2f32c67dc493$ +// $hash=5d3509b80dac95b50b7d3c7053562169055ad361$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_KEYBOARD_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc index 364d90e260..31b0867ab0 100644 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=93afcd99785dd19d59f12b709d337fabba820c6b$ +// $hash=f9e1fa4fa79e3b66d9d147fd0cdb14da459de85b$ // #include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h index 978850dbb5..94eca4fb27 100644 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=74997d31acc32fc121746305fd2ba912272a6310$ +// $hash=85c8f684b4799cf1410174b0e29a41b192eaf7a4$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_LIFE_SPAN_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/list_value_cpptoc.cc b/cef/libcef_dll/cpptoc/list_value_cpptoc.cc index 815f318a44..db4fc4e9f1 100644 --- a/cef/libcef_dll/cpptoc/list_value_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/list_value_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c7bbc5ff79015ca4787974d652b7918b745dda71$ +// $hash=2d2041c7571bd613f92c2d80c100e92e7439df6e$ // #include "libcef_dll/cpptoc/list_value_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/list_value_cpptoc.h b/cef/libcef_dll/cpptoc/list_value_cpptoc.h index 742f542f52..4385aa5c0c 100644 --- a/cef/libcef_dll/cpptoc/list_value_cpptoc.h +++ b/cef/libcef_dll/cpptoc/list_value_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=edd583b0f3513aacf19964855f67a4cd35cbe8d8$ +// $hash=85db2149d4c843eae2145e9015c2062d8ad45695$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_LIST_VALUE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc index cf0eab2b68..ced6a1faaf 100644 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,12 +9,14 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7b4c1790884bfd1c7df2b912a6891523d1ce46a2$ +// $hash=b9eb6961bd51d881bd4b0aff6e1c2ad16de8bc93$ // #include "libcef_dll/cpptoc/load_handler_cpptoc.h" #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/frame_ctocpp.h" +#include "libcef_dll/ctocpp/request_ctocpp.h" +#include "libcef_dll/ctocpp/response_ctocpp.h" #include "libcef_dll/shutdown_checker.h" namespace { @@ -131,6 +133,62 @@ void CEF_CALLBACK load_handler_on_load_error(struct _cef_load_handler_t* self, CefString(errorText), CefString(failedUrl)); } +void CEF_CALLBACK +load_handler_on_load_error_with_request(struct _cef_load_handler_t* self, + struct _cef_request_t* request, + int is_main_frame, + int has_user_gesture, + int error_code, + const cef_string_t* error_text) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: request; type: refptr_diff + DCHECK(request); + if (!request) + return; + // Verify param: error_text; type: string_byref_const + DCHECK(error_text); + if (!error_text) + return; + + // Execute + CefLoadHandlerCppToC::Get(self)->OnLoadErrorWithRequest( + CefRequestCToCpp::Wrap(request), is_main_frame ? true : false, + has_user_gesture ? true : false, error_code, CefString(error_text)); +} + +void CEF_CALLBACK load_handler_on_http_error(struct _cef_load_handler_t* self, + struct _cef_request_t* request, + int is_main_frame, + int has_user_gesture, + struct _cef_response_t* response) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: request; type: refptr_diff + DCHECK(request); + if (!request) + return; + // Verify param: response; type: refptr_diff + DCHECK(response); + if (!response) + return; + + // Execute + CefLoadHandlerCppToC::Get(self)->OnHttpError( + CefRequestCToCpp::Wrap(request), is_main_frame ? true : false, + has_user_gesture ? true : false, CefResponseCToCpp::Wrap(response)); +} + } // namespace // CONSTRUCTOR - Do not edit by hand. @@ -140,6 +198,9 @@ CefLoadHandlerCppToC::CefLoadHandlerCppToC() { GetStruct()->on_load_start = load_handler_on_load_start; GetStruct()->on_load_end = load_handler_on_load_end; GetStruct()->on_load_error = load_handler_on_load_error; + GetStruct()->on_load_error_with_request = + load_handler_on_load_error_with_request; + GetStruct()->on_http_error = load_handler_on_http_error; } // DESTRUCTOR - Do not edit by hand. diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h b/cef/libcef_dll/cpptoc/load_handler_cpptoc.h index 7acadc696d..31ed258d8b 100644 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/load_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=818e0839f6db5135dcc902d0498d69d6006458a2$ +// $hash=67a49693f79a526ebb12c8352c13de8bf7c64784$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_LOAD_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_observer_cpptoc.cc b/cef/libcef_dll/cpptoc/media_observer_cpptoc.cc index 9c5858a42d..bc6e8dde4a 100644 --- a/cef/libcef_dll/cpptoc/media_observer_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_observer_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bde209e2a39bc62b9b1b75be9c2f9129d7cecef5$ +// $hash=2e7db3a335f170dad7a1793f5695593b8c75d853$ // #include "libcef_dll/cpptoc/media_observer_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_observer_cpptoc.h b/cef/libcef_dll/cpptoc/media_observer_cpptoc.h index d1091c12a1..efcedd1945 100644 --- a/cef/libcef_dll/cpptoc/media_observer_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_observer_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a070750660b9f972e0433f55de75a536a39a6bb8$ +// $hash=c3191e4923e9708b864d6cb5c21bd5da2fe41645$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_OBSERVER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_route_cpptoc.cc b/cef/libcef_dll/cpptoc/media_route_cpptoc.cc index 86d39da6dd..d591021eaa 100644 --- a/cef/libcef_dll/cpptoc/media_route_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_route_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=623b9c69c53f0839f3aaa619ac734955909e46a9$ +// $hash=2c4dc1026a21a2712fc84c1393d4c69c0335f484$ // #include "libcef_dll/cpptoc/media_route_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_route_cpptoc.h b/cef/libcef_dll/cpptoc/media_route_cpptoc.h index a074bac443..bacd9e11ae 100644 --- a/cef/libcef_dll/cpptoc/media_route_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_route_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b547199c709e2c5b6d4435a80cc8bb3303f5cbc6$ +// $hash=d1a941bd47da6a5d5da6f4ce72f48d480351621f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_ROUTE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc index 2c7ef896b8..151338582f 100644 --- a/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e051d7ed2be481b7686aada8a7977b8aefd459fc$ +// $hash=1f70badd10a66ed36402c4227f30d45e6696981d$ // #include "libcef_dll/cpptoc/media_route_create_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.h b/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.h index 3f9bf4540e..49b6de2b22 100644 --- a/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_route_create_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=02a902b8d31e4a9b72a6278911ee6ea21ce6ce5f$ +// $hash=0f872bf3a0c0c80e6c5c34b66d877f982005a436$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_ROUTE_CREATE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_router_cpptoc.cc b/cef/libcef_dll/cpptoc/media_router_cpptoc.cc index bacf732ebd..8b4825cf21 100644 --- a/cef/libcef_dll/cpptoc/media_router_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_router_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f60f51701b15100a8ad9463adfe0deb37c2d6b4f$ +// $hash=55a817af6b8dc3408785410b47e5d01313ebc9dd$ // #include "libcef_dll/cpptoc/media_router_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_router_cpptoc.h b/cef/libcef_dll/cpptoc/media_router_cpptoc.h index b3418a8cac..1814ebf023 100644 --- a/cef/libcef_dll/cpptoc/media_router_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_router_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e07704cc1fb37383b5b00f5ac323983f9c552b6c$ +// $hash=5e358f83742bcd0fb129a1471791cfa899c81cd1$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_ROUTER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_sink_cpptoc.cc b/cef/libcef_dll/cpptoc/media_sink_cpptoc.cc index f109680b4a..15621f1f0a 100644 --- a/cef/libcef_dll/cpptoc/media_sink_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_sink_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=59bdc13468b5e75d07e67e6efae44ebfbdb5b632$ +// $hash=59c15e457142b252222f01e36ea626bed5ed2b7a$ // #include "libcef_dll/cpptoc/media_sink_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_sink_cpptoc.h b/cef/libcef_dll/cpptoc/media_sink_cpptoc.h index 23a4f48ffc..50ea41f6b6 100644 --- a/cef/libcef_dll/cpptoc/media_sink_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_sink_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7e39b2f13f61bc0b9d71ddf631107260a9e1f52d$ +// $hash=23e239facf0fd4194647f916443cda73fee1d0bc$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_SINK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc index dd5f56c4c1..b6b99a14b6 100644 --- a/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f72f4f67e71c6e6a6a2d7d25ad2f5972bbb8eee0$ +// $hash=159abfe9b788acf428465451ee232ee1675ea1a5$ // #include "libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h b/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h index 24b82059d9..1de9a0b39b 100644 --- a/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_sink_device_info_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=aafa509263c356c67b39ba0b5ad3fde290799853$ +// $hash=4244b2b416ab896697de189d6c14d49df41d8dd5$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_SINK_DEVICE_INFO_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/media_source_cpptoc.cc b/cef/libcef_dll/cpptoc/media_source_cpptoc.cc index 2909de2974..4697d0682b 100644 --- a/cef/libcef_dll/cpptoc/media_source_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/media_source_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ea934494226ae5a1bb4cbeb26d212b7efabf3e50$ +// $hash=91e3e2f2fb4914cbe8df7a30938f728a3f147fed$ // #include "libcef_dll/cpptoc/media_source_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/media_source_cpptoc.h b/cef/libcef_dll/cpptoc/media_source_cpptoc.h index 6a5bc61dcc..903e7cc593 100644 --- a/cef/libcef_dll/cpptoc/media_source_cpptoc.h +++ b/cef/libcef_dll/cpptoc/media_source_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=62fa6ace7c43ac1a9fe6bf9dd62788c55ceb90f2$ +// $hash=4188fa2250ae3351fc7779cb35dfef4eabbf500e$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MEDIA_SOURCE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc b/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc index 6011e8ebca..809b218473 100644 --- a/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/menu_model_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b07972813a8b9cc4388e5695ce42be1bd426b201$ +// $hash=587be50ef3aefc00fadcf6fec431ebecc305b3eb$ // #include "libcef_dll/cpptoc/menu_model_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/menu_model_cpptoc.h b/cef/libcef_dll/cpptoc/menu_model_cpptoc.h index 2c96aa31b9..f8882f06df 100644 --- a/cef/libcef_dll/cpptoc/menu_model_cpptoc.h +++ b/cef/libcef_dll/cpptoc/menu_model_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f6d8870cf5c1b9754833f07f8af3a8eb27272bbc$ +// $hash=8c46e7f774742f9834a61bc7657fdc03a0ed580c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc index 895a97bf0b..ecc7682476 100644 --- a/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a933c4e3784f03b6cd290387ae2c8377ac74c8b6$ +// $hash=d46082f24a6ad01677700ac68ad424cc4951efed$ // #include "libcef_dll/cpptoc/menu_model_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h index 42db61797e..4f4a4e749f 100644 --- a/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/menu_model_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=49e74e666689969a5accd5ab3a99e2f0341a9664$ +// $hash=c48cb7ff4b3e506b4e1ca8b1442bfe91d260ec67$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc b/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc index d251cdd398..9db40c38fa 100644 --- a/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=87427c3e4da420f7735c6932d287234b30647293$ +// $hash=081579d10d7dd1ad8906d54350c2b63f97930fd2$ // #include "libcef_dll/cpptoc/navigation_entry_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h b/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h index 8d4a6845a5..f4857ed61e 100644 --- a/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h +++ b/cef/libcef_dll/cpptoc/navigation_entry_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d346b124edf760018dc1f8cb852e20684a5a9223$ +// $hash=888591dac662cceb022bc320c159fcba58fc6e24$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc index a048660853..3fe2dba37c 100644 --- a/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c27e2f2b230edc452cd99942da0d93f6fd8e36ac$ +// $hash=dc5e1a5dece19a5168915d1a6816ac4a52c1078f$ // #include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h index 267885b31b..30c02d6f87 100644 --- a/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5137a6b5ed8f29153a81a4768e3f06b6a64131c4$ +// $hash=112f7c12c88d09e4d300cd3d8bf1f72b1be54596$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_NAVIGATION_ENTRY_VISITOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc index 8bfafc9cd1..5a5d810c4f 100644 --- a/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=367b1db695ac57bee59fa23d156b363e0ca37800$ +// $hash=388a87f728a292dc4e2101724656ac09b8fdaa1d$ // #include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h b/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h index 4e6581b4de..df0c88723c 100644 --- a/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/pdf_print_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=22d6219fd55dd3b6c2f46d45d456e8f39fe32d2b$ +// $hash=0dfa6d58ed63c1e3be9992486e404a642df6e32a$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PDF_PRINT_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc b/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc new file mode 100644 index 0000000000..4038e2c5cf --- /dev/null +++ b/cef/libcef_dll/cpptoc/permission_request_cpptoc.cc @@ -0,0 +1,117 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=a0c1e9d26c0b0129b85719532cd7312019c2d5f3$ +// + +#include "libcef_dll/cpptoc/permission_request_cpptoc.h" +#include "libcef_dll/ctocpp/access_request_ctocpp.h" + +namespace { + +// MEMBER FUNCTIONS - Body may be edited by hand. + +void CEF_CALLBACK +permission_request_on_geolocation_show(struct _cef_permission_request_t* self, + const cef_string_t* origin) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: origin; type: string_byref_const + DCHECK(origin); + if (!origin) + return; + + // Execute + CefPermissionRequestCppToC::Get(self)->OnGeolocationShow(CefString(origin)); +} + +void CEF_CALLBACK +permission_request_on_geolocation_hide(struct _cef_permission_request_t* self) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + + // Execute + CefPermissionRequestCppToC::Get(self)->OnGeolocationHide(); +} + +void CEF_CALLBACK +permission_request_on_permission_request(struct _cef_permission_request_t* self, + cef_access_request_t* request) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: request; type: refptr_diff + DCHECK(request); + if (!request) + return; + + // Execute + CefPermissionRequestCppToC::Get(self)->OnPermissionRequest( + CefAccessRequestCToCpp::Wrap(request)); +} + +void CEF_CALLBACK permission_request_on_permission_request_canceled( + struct _cef_permission_request_t* self, + cef_access_request_t* request) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: request; type: refptr_diff + DCHECK(request); + if (!request) + return; + + // Execute + CefPermissionRequestCppToC::Get(self)->OnPermissionRequestCanceled( + CefAccessRequestCToCpp::Wrap(request)); +} + +} // namespace + +// CONSTRUCTOR - Do not edit by hand. + +CefPermissionRequestCppToC::CefPermissionRequestCppToC() { + GetStruct()->on_geolocation_show = permission_request_on_geolocation_show; + GetStruct()->on_geolocation_hide = permission_request_on_geolocation_hide; + GetStruct()->on_permission_request = permission_request_on_permission_request; + GetStruct()->on_permission_request_canceled = + permission_request_on_permission_request_canceled; +} + +// DESTRUCTOR - Do not edit by hand. + +CefPermissionRequestCppToC::~CefPermissionRequestCppToC() {} + +template <> +CefRefPtr CefCppToCRefCounted< + CefPermissionRequestCppToC, + CefPermissionRequest, + cef_permission_request_t>::UnwrapDerived(CefWrapperType type, + cef_permission_request_t* s) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCppToCRefCounted::kWrapperType = + WT_PERMISSION_REQUEST; diff --git a/cef/libcef_dll/cpptoc/permission_request_cpptoc.h b/cef/libcef_dll/cpptoc/permission_request_cpptoc.h new file mode 100644 index 0000000000..fc597ec736 --- /dev/null +++ b/cef/libcef_dll/cpptoc/permission_request_cpptoc.h @@ -0,0 +1,38 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=b4bca43d1905283a291f6df6cf1a15bccf569618$ +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_PERMISSION_REQUEST_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_PERMISSION_REQUEST_CPPTOC_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/cpptoc/cpptoc_ref_counted.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed wrapper-side only. +class CefPermissionRequestCppToC + : public CefCppToCRefCounted { + public: + CefPermissionRequestCppToC(); + virtual ~CefPermissionRequestCppToC(); +}; + +#endif // CEF_LIBCEF_DLL_CPPTOC_PERMISSION_REQUEST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/post_data_cpptoc.cc b/cef/libcef_dll/cpptoc/post_data_cpptoc.cc index 947a330cf6..2b1d0e145f 100644 --- a/cef/libcef_dll/cpptoc/post_data_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/post_data_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=67abcc878fdc07aa0b582231112579ca6ebe8b8a$ +// $hash=935efc8f333c6df95b783e1e80bb84aa26d55b9b$ // #include "libcef_dll/cpptoc/post_data_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/post_data_cpptoc.h b/cef/libcef_dll/cpptoc/post_data_cpptoc.h index 9fd2970c2f..ff139f20d0 100644 --- a/cef/libcef_dll/cpptoc/post_data_cpptoc.h +++ b/cef/libcef_dll/cpptoc/post_data_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=79c5dd393effb0d41ce765318f01806c3cd60689$ +// $hash=c73c8a6c74113ead0251ca0afb007d2baa02030b$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc index 2c69cc2516..1dff9418b3 100644 --- a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e1a562a85bb9c9e50f44c027549f6c62d7d8cc4c$ +// $hash=6148547c3504062984362b43db9e95ee68ef1358$ // #include "libcef_dll/cpptoc/post_data_element_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h index 8a258ef95a..176e3081bf 100644 --- a/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h +++ b/cef/libcef_dll/cpptoc/post_data_element_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ad5cfd1bc723af050b7592fdce1b552075700503$ +// $hash=e29b5318c16ccbffa354d79176698d1709048e32$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_POST_DATA_ELEMENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc index c5f1dfb92f..ac4a1fbd24 100644 --- a/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3667aba62287be7ba66687ab5ffb17c6de3dce5a$ +// $hash=5332b8cb609fa0f5b98e607878678808d21da3a4$ // #include "libcef_dll/cpptoc/print_dialog_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h index 46bf5c6b9a..f16cff04f2 100644 --- a/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/print_dialog_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b289d0263d8851dcca9cb4c786e7a1c3802670ce$ +// $hash=88e44e22bb56d51ba9a60f38f59b89bb3e372748$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_DIALOG_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc index ebfdcd5127..dd6c36379e 100644 --- a/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/print_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=15d1e044a5bc40ca25c72f070a9b996907c4c0cb$ +// $hash=9c26e4bf9952a26541915f64dad82080f09dfd58$ // #include "libcef_dll/cpptoc/print_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/print_handler_cpptoc.h b/cef/libcef_dll/cpptoc/print_handler_cpptoc.h index 068178739d..da73686680 100644 --- a/cef/libcef_dll/cpptoc/print_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/print_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=525179c2c2bf4727855e0fa8610fba5ec050b19d$ +// $hash=49bb73be2c56a31fff2e88875360591dd31bdd8c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc index 76fa51739f..45ec93c715 100644 --- a/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0917dcc9b47dd275751465207eb18b8858ca5f08$ +// $hash=3becd112f5c17b36328e77fcdcd296cdf73291a3$ // #include "libcef_dll/cpptoc/print_job_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h b/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h index 9a87766e6c..ec169ba4a0 100644 --- a/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/print_job_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f25c991aa9f03e084f4e8765049c77479fae971f$ +// $hash=d3c680caf88e14fa8cd3c846fe44870900f82ea1$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_JOB_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc b/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc index 61d355b240..4138aaf281 100644 --- a/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/print_settings_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d091416dceb419a83f57451aa8681bdf130fc477$ +// $hash=8840518039eff950764302105148c5da0b0c996a$ // #include "libcef_dll/cpptoc/print_settings_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/print_settings_cpptoc.h b/cef/libcef_dll/cpptoc/print_settings_cpptoc.h index eda0806a9e..6e6eea2140 100644 --- a/cef/libcef_dll/cpptoc/print_settings_cpptoc.h +++ b/cef/libcef_dll/cpptoc/print_settings_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5b1890f35e0a8f01c5c9bac48f8c2e42861d57cf$ +// $hash=ab8680da4bc909d2c1a6cf723fafc1a561bfeb44$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PRINT_SETTINGS_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/process_message_cpptoc.cc b/cef/libcef_dll/cpptoc/process_message_cpptoc.cc index 835700840a..f6473634e0 100644 --- a/cef/libcef_dll/cpptoc/process_message_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/process_message_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3ab263fc6c8dc30dc97b56bbc8d32cc35dc3847$ +// $hash=b63f665e68e4dc6269c3e88b81068190ea90abb3$ // #include "libcef_dll/cpptoc/process_message_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/process_message_cpptoc.h b/cef/libcef_dll/cpptoc/process_message_cpptoc.h index 583a61bb44..76f2c5d97b 100644 --- a/cef/libcef_dll/cpptoc/process_message_cpptoc.h +++ b/cef/libcef_dll/cpptoc/process_message_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fefd94ebe8945a74e786c9b904f23b376ddb9f50$ +// $hash=e70a96835042a2ebf0a60f2130f31d24f1ca59fd$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_PROCESS_MESSAGE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc index 4616c5827b..ca8ec58e35 100644 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=468a8a6d744062b47fc004adeb279e6beb2bbb54$ +// $hash=a0976edc09e822700d8f402b2dae7af4c434d86f$ // #include "libcef_dll/cpptoc/read_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h b/cef/libcef_dll/cpptoc/read_handler_cpptoc.h index 64799edc97..eda92ed97c 100644 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/read_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e68ee258e8059cc525294b21556ea97751c35d1f$ +// $hash=3c16def2c698c26a175b1087db819d3894a264fa$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_READ_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc index ee783c953c..d93b0ba0a9 100644 --- a/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5f7db6dda8ac868e8ec94b93e3ae7d2dd7d0cf64$ +// $hash=4c77ff49deadd30ff0af3ead43a916848931fb1b$ // #include "libcef_dll/cpptoc/register_cdm_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.h b/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.h index 7c9bbced6f..a121545126 100644 --- a/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/register_cdm_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9817a192fb9476a843c3ccd0467e781adf426b91$ +// $hash=a5d158768dd2928b13a86e1023ce218db69e8dd9$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REGISTER_CDM_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/registration_cpptoc.cc b/cef/libcef_dll/cpptoc/registration_cpptoc.cc index 78c8fe6579..5d959db487 100644 --- a/cef/libcef_dll/cpptoc/registration_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/registration_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ec2642c7c8adb8df19ecc2a8a4ae1e8be5c203a0$ +// $hash=bfa5ab4142b6fe56939a45241a39bb74f3a84acb$ // #include "libcef_dll/cpptoc/registration_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/registration_cpptoc.h b/cef/libcef_dll/cpptoc/registration_cpptoc.h index 0943ae4344..e623e5f7d4 100644 --- a/cef/libcef_dll/cpptoc/registration_cpptoc.h +++ b/cef/libcef_dll/cpptoc/registration_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e417a268c700c6ba91f9b00484a11d105d884dd0$ +// $hash=edd002ac63a0564820617ad44c5c30f9674b8122$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REGISTRATION_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc index ebe577ee5d..424040a880 100644 --- a/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f6410f1d692fb2ccbd0cae2e388db6ee8b22cc1e$ +// $hash=f2d63ae1b93668305c70a02fec40da44f9a0ffcd$ // #include "libcef_dll/cpptoc/render_handler_cpptoc.h" @@ -399,6 +399,28 @@ render_handler_on_scroll_offset_changed(struct _cef_render_handler_t* self, CefBrowserCToCpp::Wrap(browser), x, y); } +void CEF_CALLBACK +render_handler_on_root_layer_changed(struct _cef_render_handler_t* self, + cef_browser_t* browser, + int height, + int width) { + shutdown_checker::AssertNotShutdown(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + + // Execute + CefRenderHandlerCppToC::Get(self)->OnRootLayerChanged( + CefBrowserCToCpp::Wrap(browser), height, width); +} + void CEF_CALLBACK render_handler_on_ime_composition_range_changed( struct _cef_render_handler_t* self, cef_browser_t* browser, @@ -508,6 +530,7 @@ CefRenderHandlerCppToC::CefRenderHandlerCppToC() { GetStruct()->update_drag_cursor = render_handler_update_drag_cursor; GetStruct()->on_scroll_offset_changed = render_handler_on_scroll_offset_changed; + GetStruct()->on_root_layer_changed = render_handler_on_root_layer_changed; GetStruct()->on_ime_composition_range_changed = render_handler_on_ime_composition_range_changed; GetStruct()->on_text_selection_changed = diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_handler_cpptoc.h index 70ea47d510..c213ddf908 100644 --- a/cef/libcef_dll/cpptoc/render_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/render_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9f3f5fdcfa22ae564d435713479c2cb1b0b17e94$ +// $hash=18b7f5398b817f5d20f26aa4e139faa4f91cfe0b$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc index f9f1aa6c51..b675c9d38e 100644 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4fc8972b57ed97feef5f00dcfa77e32b8d63cb9a$ +// $hash=59a7b8ee629ec03f3079c92ebd4feb6e711ec0f2$ // #include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h index 1911161bf3..599203043e 100644 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9d0edd7e100abdfe53bf0b84a58fbd681d83fe0d$ +// $hash=8d832edacd5ccc0baac1314aaa9424ba2ab4837c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_PROCESS_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/request_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/request_callback_cpptoc.cc index 37a7359c21..9e7a0462f8 100644 --- a/cef/libcef_dll/cpptoc/request_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bee998a59050e372ea10d1ce146532c074b1a3ec$ +// $hash=b19244d48f2b415a9a71b27ba76b4986677899d5$ // #include "libcef_dll/cpptoc/request_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/request_callback_cpptoc.h b/cef/libcef_dll/cpptoc/request_callback_cpptoc.h index 5c145aeb38..17c35211fb 100644 --- a/cef/libcef_dll/cpptoc/request_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bd2b56bd152e80651c9a3de4472891d7cf65b130$ +// $hash=29146c480878ee0e015ab1f4bdf87299ffc95a06$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/request_context_cpptoc.cc b/cef/libcef_dll/cpptoc/request_context_cpptoc.cc index fd3d1af8bf..cd3e0f9bb6 100644 --- a/cef/libcef_dll/cpptoc/request_context_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_context_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=38ae668703b71d27d2bcd7cd9230817edd5b8f41$ +// $hash=69c5dc4e787496678696a7aa0f1f5eea80355ea8$ // #include "libcef_dll/cpptoc/request_context_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/request_context_cpptoc.h b/cef/libcef_dll/cpptoc/request_context_cpptoc.h index b74c4f0f37..bf9847b8d1 100644 --- a/cef/libcef_dll/cpptoc/request_context_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_context_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f0b104243778fce7d1ada4de1a80311443ba37d4$ +// $hash=7350e36d25125a3560d0e0da5b46daa60295c7a7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc index fe68610a3b..844db087e0 100644 --- a/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9172186519dc33742d7c302e7276c5ce8536a95b$ +// $hash=1789068218bd055e77d1699cf733cc2769612569$ // #include "libcef_dll/cpptoc/request_context_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h b/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h index 3e7fa58fcb..aaa029d91b 100644 --- a/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_context_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=eee4c56e63dbec7ee8fa2b515b53d274b90c0366$ +// $hash=e1cebce8a08c570f02235a53bab5f6aa0b13699c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CONTEXT_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/request_cpptoc.cc b/cef/libcef_dll/cpptoc/request_cpptoc.cc index 302afa5ce6..ee7cd8b9be 100644 --- a/cef/libcef_dll/cpptoc/request_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7c8a996b228efdb02dd4d3d88fc12b58a1f74558$ +// $hash=b1a7f857e453a625325a1a2847e60990eecc61ea$ // #include "libcef_dll/cpptoc/request_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/request_cpptoc.h b/cef/libcef_dll/cpptoc/request_cpptoc.h index f404dfc140..b93e0ba163 100644 --- a/cef/libcef_dll/cpptoc/request_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f090904a66e29e8638eb9868724a4c02e5102594$ +// $hash=25a489e9a54195be43325a811956c66f578fbeb0$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc index 9f4b313f64..001faf062d 100644 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=baa4e92404f1c0b975c3724e649afb4ef04250f0$ +// $hash=d737e87912d409f23e7b078a6c7d56bed2a5df95$ // #include "libcef_dll/cpptoc/request_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h b/cef/libcef_dll/cpptoc/request_handler_cpptoc.h index b211145a45..70c502128e 100644 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=18317612a895e22529b31aadd74c40698f482a7a$ +// $hash=4cda9dc12a20ead4f6889fd26a176da22ca67c50$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_REQUEST_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc index bf3074c637..6ec72fcf3a 100644 --- a/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=52c60d1a07505b36d99272e58c1b362b03a2af45$ +// $hash=d6f5224414a15d32a42ed2862b30c0076d0b5d95$ // #include "libcef_dll/cpptoc/resolve_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h b/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h index 46cb01e0df..76e790de03 100644 --- a/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resolve_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6ea24a272a8125c550aea82b66715d92613312d7$ +// $hash=659df5decaf5cab4624f6f15b8bceeed0bd2d228$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOLVE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc index 94f794d9de..97ad75f998 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5512a41467d67fd269e9486f48b83febc2700feb$ +// $hash=5081aa41e87ea1a44df19f1df060a478b3b902d8$ // #include "libcef_dll/cpptoc/resource_bundle_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h b/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h index 5163c4c1e8..429418a493 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_bundle_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=50333b23ddd95f3e6650e517455e0d4245a458dd$ +// $hash=808eba3682873dd7b948ed9f572d9960df9a1b2d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc index 3648ba1413..8e9a45951a 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7395ebd664ffbbba2b7e4f427159e50c60689cb4$ +// $hash=486d1b31ccfd53e10dec622d3ae024c23b50e2c2$ // #include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h index cf2fd6db6d..12d1d945c5 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=58f37dffaf226ab0203e485545ffb8a1a477447c$ +// $hash=26b5dfed49b7182c1bdf52f50547ccb26c4850fe$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_BUNDLE_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc index 6271aa467d..078bd359c9 100644 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9d03ddc3b4f887626177014127f9280966904ae2$ +// $hash=72d9dc0e438de96161f262353c153c11b76f8ad0$ // #include "libcef_dll/cpptoc/resource_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h index fb4819f0d3..c3ed893b8d 100644 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ca46bb20cee655f78932b73a336a27e49d1dcbee$ +// $hash=a2b9dcc0ff22bd3f1b0ecb70a3e10b6c1c7a0ed7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc index ed15b7de69..baffa65472 100644 --- a/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=646cdf4de0b0ae6bbf28c229a2eec6f1b56f5455$ +// $hash=9d07f53404d3b90d1e386e37b0ed4535afb57b39$ // #include "libcef_dll/cpptoc/resource_read_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h b/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h index 3ed745b852..c1b4d1a597 100644 --- a/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_read_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8218cb5006c7b8e2e793135c32a3f88d525f218b$ +// $hash=7cd5016181dd61511cb1c1d3176d8aff5e5fba82$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_READ_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc index 5c758bb417..3ffa101a39 100644 --- a/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1009f2ed21a03d2a6e47372def61b0696055d4e1$ +// $hash=5ad46295870e861e60d7097341aeac4f7a279076$ // #include "libcef_dll/cpptoc/resource_request_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h index bbfffde4e7..813e38e8d4 100644 --- a/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_request_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f48fef57eb0141917d0ba9243a1d9962fbcffc9e$ +// $hash=a8c2b0d3df6a4c6b336084598084d14f62860a53$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_REQUEST_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc index 7288e19baa..41bbad0322 100644 --- a/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f9bc0556a97ff271f7f8275f2c7572c3cdeb728c$ +// $hash=3b4968443aafd1ee42fcc9a5e7b466b38fb98d28$ // #include "libcef_dll/cpptoc/resource_skip_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h b/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h index 40ef7a0dc8..c173a16715 100644 --- a/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_skip_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1f294352ecdbb87074f531745e7f57e814fdc0b9$ +// $hash=decf49c2d8a337c353d149e9b9392065740eb06d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESOURCE_SKIP_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/response_cpptoc.cc b/cef/libcef_dll/cpptoc/response_cpptoc.cc index 369c11779a..1cb1db789f 100644 --- a/cef/libcef_dll/cpptoc/response_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/response_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7740b26377fd4a31c265028286cbbd209b04fcd9$ +// $hash=1dc0f59d37e6979ba3f431463671f0feefc45c31$ // #include "libcef_dll/cpptoc/response_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/response_cpptoc.h b/cef/libcef_dll/cpptoc/response_cpptoc.h index 00066017f4..209f550a13 100644 --- a/cef/libcef_dll/cpptoc/response_cpptoc.h +++ b/cef/libcef_dll/cpptoc/response_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5ad7427f99c87d5835595d8a5640abc3013fd914$ +// $hash=9bd9fdb8fe353f1af3ac543074cb74b12cdab0c5$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc b/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc index 2f3b88d276..1bc437f06f 100644 --- a/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/response_filter_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=003bbf99e94890b125932370463f311e7c4a7c7f$ +// $hash=b6721a12a6b018187b3ccc87557beb29be130100$ // #include "libcef_dll/cpptoc/response_filter_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/response_filter_cpptoc.h b/cef/libcef_dll/cpptoc/response_filter_cpptoc.h index f97e49b403..b79d579543 100644 --- a/cef/libcef_dll/cpptoc/response_filter_cpptoc.h +++ b/cef/libcef_dll/cpptoc/response_filter_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=23d91cdc83bb3c1178929374ffaad52afa34ecf6$ +// $hash=6ef35ca53f2bd4523397d3f56b02ca9b40a811f9$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RESPONSE_FILTER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc index 4d24d798de..8cf46c8366 100644 --- a/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ac442dda0212dff044db09ad7494390a0f958321$ +// $hash=d76ba7de3a561c71b88250340676e56dc7a9f84a$ // #include "libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h b/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h index 1c300fa470..20124e44f3 100644 --- a/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/run_context_menu_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ede8ce9ad59f1ea741c9452efeb265e5526ffd91$ +// $hash=d8003b6de1b89c64b2d5b53ea1665dda982effb9$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_CONTEXT_MENU_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc index 4c37484a8a..33705ecbbf 100644 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3ba417ae0dbb742d60ca1c951b0f7ddb10b6de0f$ +// $hash=2e6aa9015192a3704df073f7dad0c6fa3b05f76c$ // #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h index b3daf4e72f..50dc062cb0 100644 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8ebd2d542077939621bfe048c6bedc20bf3a27dd$ +// $hash=6542e83e5f1a6694575c89e628ee11da17bb6624$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_RUN_FILE_DIALOG_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc index 620197b95c..759f5f9dc1 100644 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3509f4fb5121ac3039512c2130c3ca183a16225$ +// $hash=abd81866575f873556b4ae40313ea65c89219756$ // #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h index d5be9fd2af..1c442fae76 100644 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h +++ b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=50876172d9b7287097ba325cabd3376a2ae2c516$ +// $hash=b119c6e375aee04bc83623c73f61b7eb39af16f5$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_HANDLER_FACTORY_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc index 027ccb45c9..aee5e11789 100644 --- a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fb064c5b9b4ceaecf90c62a1a7e4611564102e0a$ +// $hash=c028de29ae5b48ed41d4e8b8ae3df9a0ee765e14$ // #include "libcef_dll/cpptoc/scheme_registrar_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h index b2c9fcb77a..6f0265be6a 100644 --- a/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h +++ b/cef/libcef_dll/cpptoc/scheme_registrar_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6552a6d6837ccb887c480f2843aa1c9293e97908$ +// $hash=f14ceae023fe1f52e53b26edb60667203b919178$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SCHEME_REGISTRAR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc index 7349ed7cc2..d14d94523a 100644 --- a/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cad8f1d219443b418638ccd23ebbd67ccb3b8d26$ +// $hash=5017f5bece20966b0972418228301ef32e05f740$ // #include "libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h b/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h index 912e835923..9905463d3e 100644 --- a/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/select_client_certificate_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=44e43ff76e1aab77f8cd07fe1e6368adc98e3fbc$ +// $hash=e397708024c85cf066c0b7b76f1fae74b3a3e4d6$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SELECT_CLIENT_CERTIFICATE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/server_cpptoc.cc b/cef/libcef_dll/cpptoc/server_cpptoc.cc index 7ddae1814e..f6be3490c7 100644 --- a/cef/libcef_dll/cpptoc/server_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/server_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ced96d5bbb943e808ada67499a45f9804e14266f$ +// $hash=d0cfc5e4c052a2d1fe43d1c0ae264642db03c04c$ // #include "libcef_dll/cpptoc/server_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/server_cpptoc.h b/cef/libcef_dll/cpptoc/server_cpptoc.h index f3b1745730..fb99d54f7e 100644 --- a/cef/libcef_dll/cpptoc/server_cpptoc.h +++ b/cef/libcef_dll/cpptoc/server_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a9a800064a03237d1656b23f808496eed8027c7b$ +// $hash=a36274939df284287ac49a8ec9321f8188d4fddb$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SERVER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc index e40d14a1d2..2688d1cc03 100644 --- a/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/server_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=db2d9db129a9cb038550aaed5b369fd5966efcff$ +// $hash=2ef239c7779477feb8808f2198e7d2063ab74156$ // #include "libcef_dll/cpptoc/server_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/server_handler_cpptoc.h b/cef/libcef_dll/cpptoc/server_handler_cpptoc.h index 364e2cdf18..a4c951c65a 100644 --- a/cef/libcef_dll/cpptoc/server_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/server_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1b89d52363b81a035b7461d182da854d6ffbf8b5$ +// $hash=754575fa090b971fc9105fecda97a407ef0d2484$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SERVER_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc index 4dfc728fd5..b4beccccd3 100644 --- a/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6d1a19f985de02d3f1dbefaec252104a308dcdde$ +// $hash=99f02c8911b913161cfd3834e19bbdc0ba542409$ // #include "libcef_dll/cpptoc/set_cookie_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h b/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h index 645dc7b00d..72e2112499 100644 --- a/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/set_cookie_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f896cf1503ab99f6aead1377eb6b5db0c9d806a2$ +// $hash=3e86bf9e36a3ef63e6777dcafee8847bd4965a60$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SET_COOKIE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc b/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc index 275e5ad51e..7251adfda8 100644 --- a/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/sslinfo_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=22fbf97fe6b133eac83b7bdbd929a9ce04fa0a64$ +// $hash=78b529fc88b9701f7cf8d40097576704b0ef35fc$ // #include "libcef_dll/cpptoc/sslinfo_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h b/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h index 0fb1b9568b..3dc2625904 100644 --- a/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h +++ b/cef/libcef_dll/cpptoc/sslinfo_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=45f9e1bcce252fdb368f20aec89ec3d23c7211a6$ +// $hash=00ab5a37c56c5bd5f14ae97f72338a32615214b7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SSLINFO_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc b/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc index 69bb8a7cef..92073dfc08 100644 --- a/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/sslstatus_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bc0333234bd952d5896be62cb562f2ac92516abc$ +// $hash=8596e5de45842c1e1de8e6377c2b7d932218c370$ // #include "libcef_dll/cpptoc/sslstatus_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h b/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h index 0ae88ae66a..2d45ad4280 100644 --- a/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h +++ b/cef/libcef_dll/cpptoc/sslstatus_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=762fba67b4bb4e4f5a303821bf8a98339afcd502$ +// $hash=8f0a00c305a6defdcbf4caa2ea437cefe49a191f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_SSLSTATUS_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc index cd68fcd463..3d6b7f7378 100644 --- a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b53dc925c532a604ca8b8cf416de165c54a94fc1$ +// $hash=fcbdc299c4f34868f817a9b77777a9b88f3cf07b$ // #include "libcef_dll/cpptoc/stream_reader_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h index bc07d1c4dc..df8cc7fd6f 100644 --- a/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h +++ b/cef/libcef_dll/cpptoc/stream_reader_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b1240c638e3fad11bcd2c87d8fc1ca39aee94d3d$ +// $hash=c98bd38e350a4b24d11039a326e8df7fb86bfc75$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_READER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc index 3b0bf72342..d402161f2d 100644 --- a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2f0e3b13ebf81334c1fb402c7939b34e4a068969$ +// $hash=ac20659d83a6efb764f3b55756dbc8c686fc5363$ // #include "libcef_dll/cpptoc/stream_writer_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h index fbaaf0e987..815bc3feba 100644 --- a/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h +++ b/cef/libcef_dll/cpptoc/stream_writer_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4589904bcfef73d0616a59b9df2745ef29dc70a2$ +// $hash=9204925136614f1d4e4f4609ea6ee30dad0c2782$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_STREAM_WRITER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc index 9226d3224b..34e6a844d3 100644 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b800f03ccea29e0ba32523580a275d272f6c19c3$ +// $hash=cad58a7370ef2b36aacb2fdf527fe1c061f4a868$ // #include "libcef_dll/cpptoc/string_visitor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h index 67562b50ae..672cf3dab8 100644 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=57b8950e457e10dfad601f860c417c6d0ad6f17e$ +// $hash=4cf29c1d2d715dee4855acda840ca47d5f1fabbf$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_STRING_VISITOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.cc b/cef/libcef_dll/cpptoc/task_cpptoc.cc index a146568676..ef51cfac7b 100644 --- a/cef/libcef_dll/cpptoc/task_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/task_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=25bdf4853f83cad4c6a52f9c71b1adb844037237$ +// $hash=47bacb389bbb262f0be39b49c5d6251b8bf1c507$ // #include "libcef_dll/cpptoc/task_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.h b/cef/libcef_dll/cpptoc/task_cpptoc.h index 41800478e4..cdf9aab98e 100644 --- a/cef/libcef_dll/cpptoc/task_cpptoc.h +++ b/cef/libcef_dll/cpptoc/task_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dc0807d059995b4a761f7a004d5e8b47d065beb7$ +// $hash=a22ba7af43964082c9e8570da140389ca9953a12$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc b/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc index 148cd2b962..435cada85f 100644 --- a/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/task_runner_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f5eaf3c559833f8ce78d113dda78b190914df6fa$ +// $hash=7c1bd7fe9f9c91bc488299a2278f83a0850befe7$ // #include "libcef_dll/cpptoc/task_runner_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/task_runner_cpptoc.h b/cef/libcef_dll/cpptoc/task_runner_cpptoc.h index 0841ff8cd7..9a8f6ded34 100644 --- a/cef/libcef_dll/cpptoc/task_runner_cpptoc.h +++ b/cef/libcef_dll/cpptoc/task_runner_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1f82d9405dee6f40bc5fe99869e353255948fa66$ +// $hash=3422c7340cee9aaf51c62fa1868b3e665ef34b2f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TASK_RUNNER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc index d516caaf6d..8cee6f13d9 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a102f383e3ecac5237310b2e5aa5b2fd37474188$ +// $hash=63050d13fb457d0d986bb29fe3256158d1e4aac5$ // #include "libcef_dll/cpptoc/test/translator_test_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h index 0bbf096a1a..60be8a4191 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=06ab26befdae74cbd76ccd42a03fe8bd081ac526$ +// $hash=aeae16842d711fd6e5d54cd14333d27cbc06c400$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc index 2feff7fa5e..d3ac64f498 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9352a58297b965828c846e704f7beded7b214103$ +// $hash=5eb9ef23f60f99db031e0e3da6cdfc81c979f5ff$ // #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h index a32cfbce07..e32aee6a7f 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=715c153a19458d1f8b6995f6d73b31a8c713f221$ +// $hash=f84f12aa3e444b6ae98c620147bdacf6c32af8df$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc index 7128c7a5bd..22ddee2c75 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=abf78d6b770cfcdba9a00a7b678a25cae7fcf2c3$ +// $hash=f331b4d8e20683281cee5cf873950c236fc6cffd$ // #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h index 1622b3311e..2f752aed77 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fc78ce1822a50d514a9de65ff76bc9d7784fb73c$ +// $hash=abcdf3e219cfeac25ddf87a82c173189d0707bbd$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc index 35d051454e..2709126202 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=18a2293805270394a2f06cdef8506f35ce7fff80$ +// $hash=693175fcf035e056074e56a8a5e39e3f5d1c218d$ // #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h index 417db8ed74..f9c3a09381 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c2b113097543bc9deab538235114a6b3e8aa4d9c$ +// $hash=602040c56e366821ec632f5675d22d5b1787d046$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc index 524a7654e8..b807842346 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3e59ef1f14df516b26d02d1e01e9866a5028480f$ +// $hash=8331f68f4339fbe375428550af8c793d455ef432$ // #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h index ad18fc52fd..a95b9af96f 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e85638774b8efd48be23c487a32360017b6525a5$ +// $hash=80d99f15db9d7a39f51b24769104d2daeb100ef7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc index 0b3e3fca07..b0a9754827 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9f1aa8c20ec6f5e8a9805a101de3105ae9482013$ +// $hash=215ecf50a38a26a660ebd9c9784ddba9ef9ac336$ // #include "libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h index 9b725cf852..c0011d3ce7 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_ref_ptr_library_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=56ebac8344629561284cf0eb12fe32faaec5e015$ +// $hash=cf13344b75658fdc4d727598a1ca9cf1d2d9aebe$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc index 5222856249..6912405ebf 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6ad6a0fbc8d5de1c2cb88d782387091957306c09$ +// $hash=ba3de8f4ffca578355877eb66e19a61e337fab63$ // #include "libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h index f90aea1ae5..afb925f57f 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f581abe3c376579f1a5ad8ca89ea30b31bc47e04$ +// $hash=3a46ac0b98d0a79f8506ffc09a5c3cdcca353f29$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc index b1f60a6486..ca2550d5e7 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7fbfdb7d8fd3b7e41ba55f2138e9752f301a2438$ +// $hash=e3323b5409f3d5e9832687e6a248cf62423c3f61$ // #include "libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h index b54885e5d7..591e1c7c41 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=40e35e75e19b912885f7369554f9e1b6b3e3ae8f$ +// $hash=c639d2f671cbfeb508e95a481c0d81ee92b87c29$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc index 22cd0629b4..e9fa6be980 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2f64a37b4735c7d91035aec2fffa263d7d27942b$ +// $hash=87acc501bb139036eaf90bf24f0a2863fe43de7c$ // #include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h index 138e884895..104f2992ef 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=44bb5b309ca442edd3dc1cb71d4bb645a8d3f96a$ +// $hash=26db238e377ea4db7b6c005d00dcaf270be64ce6$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc index 63ecd5eba6..9fab61ec60 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cd7a42714195bed68aef8a200c7e1a38681558f2$ +// $hash=3899a0ed70d6fa40bbce192abd0ab7d63f8926e7$ // #include "libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h index 71f69b780b..b6ee58dab1 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_child_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=71c2cd8bad04a8155d6ee8cc60814d251d237732$ +// $hash=87924524eab4c309d13dc3e9656c601fd65c7449$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc index d07e594748..55ef550925 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9e0c499cc30e7e762de3d5969ab6795ec50ffc08$ +// $hash=fdee62d52347780efcf7fd71b80df6188ce96dc0$ // #include "libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h index f5a08f0b9b..dbdd75ed09 100644 --- a/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h +++ b/cef/libcef_dll/cpptoc/test/translator_test_scoped_library_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=23092b277a91aadd4a0bf09f96def851e1ecc10b$ +// $hash=43b0a0576a86ba1d2dda27c83af22554da773221$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/thread_cpptoc.cc b/cef/libcef_dll/cpptoc/thread_cpptoc.cc index 93fdf2ff1e..b48ba593ce 100644 --- a/cef/libcef_dll/cpptoc/thread_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/thread_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=76c1b0d469d69125099c72250f1882d5ac9dd6c3$ +// $hash=9975067d09206080d5237a7d1e8dd70155deb554$ // #include "libcef_dll/cpptoc/thread_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/thread_cpptoc.h b/cef/libcef_dll/cpptoc/thread_cpptoc.h index a22025a403..66da3dbc79 100644 --- a/cef/libcef_dll/cpptoc/thread_cpptoc.h +++ b/cef/libcef_dll/cpptoc/thread_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bc01937181dbc0a88c396039a65927282bfb7c2d$ +// $hash=820a6a8e017c6ba2a19f5c0b8db0f8aa628a0cfa$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_THREAD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc index 80235e4d89..dc44527004 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1eada3207c7afba6965694bf87faff6839c1d955$ +// $hash=db92b5330f0b984051a202144f77b389501a260e$ // #include "libcef_dll/cpptoc/urlrequest_client_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h index 863723cfe4..085a600082 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bf2501304e3a0c929b83b1a50bd62a6535183dd2$ +// $hash=6ab5f8f6ff4a68382bd5e239ad2c8e2c12c39c6d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CLIENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc index 9c75f2152f..805b66a820 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=babedf1f88ab9ebee69197984318ec63d68cbe17$ +// $hash=6193670d2d0577eaf226bd1825cde7b3f70c0f68$ // #include "libcef_dll/cpptoc/urlrequest_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h index c8595c3b84..b798d65885 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h +++ b/cef/libcef_dll/cpptoc/urlrequest_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4c2ae733562688b1dcd04b328a16c109125d00b0$ +// $hash=1902918d90c40d3b524c0f7adcb56dc9a565df4d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_URLREQUEST_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc index 7d4e5ed419..a6bfe77e3b 100644 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2154b968dc696995bce9e9f1e99078196cc75070$ +// $hash=35161ccb0b72898e250d905b4b245b4839fe7ecc$ // #include "libcef_dll/cpptoc/v8accessor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h index ed351000b9..dd68c064bb 100644 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3c32ab7ccf4b9d152086d2cdab33a6a818faa359$ +// $hash=cbf062496a14d367e643c3e52afd460df4176fde$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ACCESSOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc index 620c41d57d..9c5e28070d 100644 --- a/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1368f0e4f6a8f5cac7b4d78f4ff6e1db59270635$ +// $hash=0a7885c5553c99c1ff7539c8aba3a340aa6f3d08$ // #include "libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h b/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h index 166e1b553a..a5b0463b7b 100644 --- a/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8array_buffer_release_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f81c22987c573f1f41e87bf1476d485da44b7161$ +// $hash=aa87e37fdfa915cb160cb4b7577c46b9e903a698$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8ARRAY_BUFFER_RELEASE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8context_cpptoc.cc b/cef/libcef_dll/cpptoc/v8context_cpptoc.cc index 26e674ced9..fc02f3c249 100644 --- a/cef/libcef_dll/cpptoc/v8context_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8context_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=82140c8c02aa0cf379737c20e86ba64e2f190307$ +// $hash=5fb43e3f68ef5f431fe6d6f84d399dc0cd292d7d$ // #include "libcef_dll/cpptoc/v8context_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8context_cpptoc.h b/cef/libcef_dll/cpptoc/v8context_cpptoc.h index 5831969363..073ea9e248 100644 --- a/cef/libcef_dll/cpptoc/v8context_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8context_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f784e9bcdfef9208ebec6b7668cbb159937f31d5$ +// $hash=e0d02da9f3e8216559bd80e50b0e3d061455b0af$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8CONTEXT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc b/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc index d8c779c77b..c142b061d5 100644 --- a/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8exception_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fb2881ca02cd3b2ce66eb00412cbe16d08e260a3$ +// $hash=bcf73c22701825bb552e78ece2e62c1e6b8da282$ // #include "libcef_dll/cpptoc/v8exception_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8exception_cpptoc.h b/cef/libcef_dll/cpptoc/v8exception_cpptoc.h index a0fb1060d6..83f329540c 100644 --- a/cef/libcef_dll/cpptoc/v8exception_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8exception_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d91b6b735d39d79b7d0a683f6d1217893449d433$ +// $hash=8d6ac0b98bc8a8efc173365c7542907fe1d229ae$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8EXCEPTION_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc b/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc index 4f3d539e2e..63fe01b9c9 100644 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=93370fe9d4bdbd5eeb425fd1909ef746b48c3b9a$ +// $hash=7a072d883f46856cf79bf868560689797b31e362$ // #include "libcef_dll/cpptoc/v8handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h b/cef/libcef_dll/cpptoc/v8handler_cpptoc.h index c51e480f72..bbf4e955e4 100644 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6be8fd993c46effa1b6c0a953c253d478a14c302$ +// $hash=8a1d3087cb27c365c8972bc22f712c8433db37a7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc b/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc index 40ccdb127d..6a590da10e 100644 --- a/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=eff938a85e5387ea919802ce138423478e0fab90$ +// $hash=fd651a7fef9dbbce9765c8200660c4057808e6cc$ // #include "libcef_dll/cpptoc/v8interceptor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h b/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h index a7014270fa..e13ff18779 100644 --- a/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8interceptor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=17ac0fc7cb770fcd11639676dcf60dcbb76ee992$ +// $hash=ea56a3340775acdee89516a9e1107f725e0f8c47$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8INTERCEPTOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc b/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc index 09f097eef8..68cf92f231 100644 --- a/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ea27a5d024714e139668a6ff73c91869aaa38440$ +// $hash=bcf0ccd2d4220eaa8f31b1f4f9b64440f81f563e$ // #include "libcef_dll/cpptoc/v8stack_frame_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h b/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h index 940617d6c6..2c4659cbd5 100644 --- a/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8stack_frame_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=106979c7e1d467ec8ef04ffa8bc29523239b5622$ +// $hash=08e9e87d39ea58ed8bd7edc6dbf7cf2873218eee$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8STACK_FRAME_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc b/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc index 0a93e94b7b..6e33464a3c 100644 --- a/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4e92d16ae1359b0cb86fe0de90a18a9d891c8cba$ +// $hash=69faf917e01945c29e5f20a00abbcc69aac7c0a7$ // #include "libcef_dll/cpptoc/v8stack_trace_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h b/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h index 724ea349b1..d7c2f079f5 100644 --- a/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8stack_trace_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4829a14f35a33b02245ccf712f6be30b1395fbef$ +// $hash=01a737cd8e6ea8e747d0a404c4b370a620eada94$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8STACK_TRACE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/v8value_cpptoc.cc b/cef/libcef_dll/cpptoc/v8value_cpptoc.cc index 98e18132d5..49dd142b07 100644 --- a/cef/libcef_dll/cpptoc/v8value_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8value_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=288b1bb2700fef65ace91a58f8b422dae6bc45da$ +// $hash=0cb915346153880872b44bd1f857c24787ed52af$ // #include "libcef_dll/cpptoc/v8value_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/v8value_cpptoc.h b/cef/libcef_dll/cpptoc/v8value_cpptoc.h index d2ce26306e..363743ce1f 100644 --- a/cef/libcef_dll/cpptoc/v8value_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8value_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b557553701e3677888ba29ed0a9822cc29eda5f1$ +// $hash=0d07225656f5400129aca5cef75bbefcaaacb70d$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_V8VALUE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/value_cpptoc.cc b/cef/libcef_dll/cpptoc/value_cpptoc.cc index 7dd4997ac5..1d4001b723 100644 --- a/cef/libcef_dll/cpptoc/value_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/value_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=794e611061ac906fbcb965ae98cc888a98bd4532$ +// $hash=680adcc74e385af7d83fa8b28b36b2215bc20f2b$ // #include "libcef_dll/cpptoc/value_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/value_cpptoc.h b/cef/libcef_dll/cpptoc/value_cpptoc.h index 3ca9dc59ed..72b6a3dab4 100644 --- a/cef/libcef_dll/cpptoc/value_cpptoc.h +++ b/cef/libcef_dll/cpptoc/value_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d11c48929fdd9d70276a704906ef50af00aae3df$ +// $hash=108679f1ab32ec8b2e0ffe77602e89603f6c279f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VALUE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc b/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc index 4f4e62d619..4e7d723cde 100644 --- a/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=55c7899976647c9475d834793fcde505a8f6f1c2$ +// $hash=95678987551b26755e5dc718c3cad2e975b574c7$ // #include "libcef_dll/cpptoc/views/box_layout_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h b/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h index a9f25ef123..e67288a57d 100644 --- a/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/box_layout_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2055b5f83c5c858cabf72c8f63a5e13e9a0cc2bc$ +// $hash=e665defe8e51c3405d75a3f1d9f382f6e9e9f81f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BOX_LAYOUT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc b/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc index bed65f7d6c..76a3e17c86 100644 --- a/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=312985bb5cc971d1fe9d77af1f985f6a544e9db5$ +// $hash=0a875e943251bc65ff4c55034d00d481d8fbdf3a$ // #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h b/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h index 4dffc73c51..f4e36ae4f1 100644 --- a/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/browser_view_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=794d1abc9f7a68954a7690ac5be01bb93c83fedd$ +// $hash=dc07da6d436a7d99817045690a3932010cd1acfd$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc index 6cdb81427d..438686a921 100644 --- a/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8e8daae6a8ed718582045ea42e16906813b77337$ +// $hash=dabaa6ca5d073ae87ea2e2ce0abc846ccdfc9dc3$ // #include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h index 0774cee5d8..feb502ae7e 100644 --- a/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2b3f4fa67ceac32d479043f0b8012c36a4c4ee1f$ +// $hash=5bd6bbfbc74b0059f073463c28b74c9b31916e59$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/button_cpptoc.cc b/cef/libcef_dll/cpptoc/views/button_cpptoc.cc index d8cea85c0d..7ceb13b8bd 100644 --- a/cef/libcef_dll/cpptoc/views/button_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/button_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a0060b09d6eb4bbeeb69e4b80dccccee394d600e$ +// $hash=52a1826441955ccb7d07f28dfa804bae496ff48e$ // #include "libcef_dll/cpptoc/views/button_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/button_cpptoc.h b/cef/libcef_dll/cpptoc/views/button_cpptoc.h index 944b991b0d..5848a3fd83 100644 --- a/cef/libcef_dll/cpptoc/views/button_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/button_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2c5ca0129836b556c9146b810ef8bf7bb873b966$ +// $hash=60660c0973fee97e850fcf4026b57a6f367ea294$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc index 2870db70e8..fd4fe03c04 100644 --- a/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=52a0deb8b7ae62e474acb1474cf922c3e9a04f14$ +// $hash=c89d335c457addc921b568a9ccde121030513b40$ // #include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h index 1869fa31db..3a682e09bc 100644 --- a/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/button_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2f943860c8504116aea73d809c15f219634ab556$ +// $hash=f3b8ad78e8614f873ee581697ac29cad49a19260$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/display_cpptoc.cc b/cef/libcef_dll/cpptoc/views/display_cpptoc.cc index 2957c4fdbf..470fee9d11 100644 --- a/cef/libcef_dll/cpptoc/views/display_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/display_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b0c8aeb7a75132760dd02766bf2d65281f0bc67e$ +// $hash=546b8f890852fb4df26a85aec6b83effe1bdc6e6$ // #include "libcef_dll/cpptoc/views/display_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/display_cpptoc.h b/cef/libcef_dll/cpptoc/views/display_cpptoc.h index d243baa4e6..6ae1863347 100644 --- a/cef/libcef_dll/cpptoc/views/display_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/display_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=054ef978c8c9f0610df054bb1a3b647e53be6223$ +// $hash=5918cca150c476ead77121bb93599c763a3e13e7$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_DISPLAY_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc b/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc index 2fa5f8e4a4..b6b3a99c2a 100644 --- a/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e4ddec3146fc599b00b66f4d3cc78d8e4b0eaecf$ +// $hash=304f5db25f7e2a1e4cf169f7cc205013bb06f861$ // #include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h b/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h index a4e9917593..a9bdbaf9d5 100644 --- a/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/fill_layout_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=21e023a1fbb99519b90100b3201daf7682496dae$ +// $hash=e2bad567245e3e1bdf240be33a3b0008ec0e3b18$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_FILL_LAYOUT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc b/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc index d3c8c812d0..83bec2804d 100644 --- a/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/label_button_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f723bc389e8df80f926a3e1952d9ba0241fcb494$ +// $hash=a96ce9b8eee3c8e913c5c2d6381de123b8d601b1$ // #include "libcef_dll/cpptoc/views/label_button_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h b/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h index 04e6664ef4..a26b71ad35 100644 --- a/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/label_button_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=29843560ec7fb719e92becfc772acaf5ced59aae$ +// $hash=60d980037705be97fb1113e0b23b0e4bdd29b801$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LABEL_BUTTON_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc b/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc index a1a9436e05..5976c28b09 100644 --- a/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/layout_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e1cf6f305fd3e893ea1bc77dc038ed9a9c6ed3cf$ +// $hash=91327244b4a4c037841a54ea2a06ebe42efe5477$ // #include "libcef_dll/cpptoc/views/layout_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/layout_cpptoc.h b/cef/libcef_dll/cpptoc/views/layout_cpptoc.h index 580bdddcbe..93ac800c7a 100644 --- a/cef/libcef_dll/cpptoc/views/layout_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/layout_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3b9f9d17929f8437425963bd504f921c26e5bee0$ +// $hash=8044bcf51ec6feacc1a186f6780c9076f5c1ec74$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LAYOUT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc b/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc index 9d15b707ea..213effeaee 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=97c8a26550af49abfe4a1fcf1d8d54193c5fb3b1$ +// $hash=c0fc689d709721780faf361fd43b378e25439844$ // #include "libcef_dll/cpptoc/views/menu_button_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h b/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h index 8beca592a1..6b38233af5 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/menu_button_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=41e45dc77543824f879e6ddc105f9ce80a0911e5$ +// $hash=d3b01ef1bca22e454dd4375df90a5a3fbd0f11f3$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc index f76e3053b4..3ed9de638f 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2fcd1d4d2126285209e1fa782beccbb363693bf3$ +// $hash=4f4242bd924c155690581077a8b0b4590cd408d8$ // #include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h index 1a1fc360b0..0ecc9e377e 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ab21c3c6610b8ef0c734e3ea7c19b32d44071d5b$ +// $hash=670b8f7f67a5eacd3288724ec6439c56248477ec$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc b/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc index bbbab941a6..daa1e5fdd8 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6279b4ee41f95e4d027b25ae77d2d2af1b6941d4$ +// $hash=c6db7f8e7c031a323e9da96aed3aee7fd7a4f558$ // #include "libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h b/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h index 9c89212ea4..51cac8072d 100644 --- a/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/menu_button_pressed_lock_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e3c523d36e1ec61e2b6669628ad89c14e1744c0f$ +// $hash=072279b56eeeaf089107f5f78ee431c907afda46$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_PRESSED_LOCK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc b/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc index a9bcb8be75..f382077804 100644 --- a/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/panel_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=46ba2afdb3ede88d0eb37df2726ab5ff33fb6983$ +// $hash=51e0790655403b1c9abba77caa46f2033f806de5$ // #include "libcef_dll/cpptoc/views/panel_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/panel_cpptoc.h b/cef/libcef_dll/cpptoc/views/panel_cpptoc.h index 87d1846e60..ae2d99182a 100644 --- a/cef/libcef_dll/cpptoc/views/panel_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/panel_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ac7fe015e824ddc135e36c36231701ffcfe5ee53$ +// $hash=4fd7a58485d8ef00e6b2dff8ffdfcb1405eb4fcc$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc index 11f8ebfd15..df7cd62c5e 100644 --- a/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dd29f2990766a766a27dece7e39501eb11a296fd$ +// $hash=f75ba2e00c473e04734ef00098a4e10e5ce9d688$ // #include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h index 3c53a1b31a..05fb713501 100644 --- a/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/panel_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=aa7440de70e2a83ba939fd4f9ae12e2dd6b80873$ +// $hash=821d48d74b437c7a0387b1d0ac1875621873b2e4$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc b/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc index af6ad2e71c..8df578b78a 100644 --- a/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=88d6df521d18ef28e9e2e7cbe31ecf6c96351430$ +// $hash=7d41cd981c074663db79ce49259364111d0401f5$ // #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h b/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h index 361dd29e30..a08983a1fc 100644 --- a/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/scroll_view_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f1215fc51778cca8d72256162b43e56c5f29ffba$ +// $hash=a5d02fd363950248101f5113ceeee2c280dd831c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_SCROLL_VIEW_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc b/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc index 78286cae9e..35a188b2c8 100644 --- a/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/textfield_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fd6b1cf787b563525dac101a765b7c399356e00c$ +// $hash=b2d1a60f738cc52cd39da493194af5723fd8c885$ // #include "libcef_dll/cpptoc/views/textfield_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h b/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h index a7f2d17422..730d6486d2 100644 --- a/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/textfield_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d58e06f073a0c78505b9e4d00bafcdcff671dcb6$ +// $hash=2e8b2aebc574d685d1c39e7cb96b2e8c724a6d9c$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc index 7282c488c6..3836e21d0a 100644 --- a/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e35b635ec442c8910b02aca64d48760b1360c868$ +// $hash=41ad820d3032bfe9ec4585eb53b2d0d7f1dc46bd$ // #include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h index 12e3d75308..75abe63a36 100644 --- a/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b9692a2b56e13b7dd25ca500dc1635fc5eb4ecb0$ +// $hash=157e47e42dbb25aa2effd5bd085228d1dc3ad061$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/view_cpptoc.cc b/cef/libcef_dll/cpptoc/views/view_cpptoc.cc index 3a7dcc2670..30c9257169 100644 --- a/cef/libcef_dll/cpptoc/views/view_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/view_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0884539e94e09316a9e516d93d77743c6287fe9a$ +// $hash=5d515cf9d8b0af16456faf6ff6ca82c55bc1d76d$ // #include "libcef_dll/cpptoc/views/view_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/view_cpptoc.h b/cef/libcef_dll/cpptoc/views/view_cpptoc.h index 14e4e5cc00..e508ab45a5 100644 --- a/cef/libcef_dll/cpptoc/views/view_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/view_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4b4df24ff3715625a44428b2fdc2cc1fed0f2a8c$ +// $hash=725abc7d1f25861799c54c827de37617b23a1bd5$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc index 9a06b6ff45..f3867bcb45 100644 --- a/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7c6283658d49420281d02b4793f65f478f261461$ +// $hash=561afa1705a1c0f0028365ac9ff9fb5f5b897490$ // #include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h index 1c9ae65722..38d6332b82 100644 --- a/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/view_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6be75d9c3a5eeaf6683ae920e175e0c597071328$ +// $hash=ebd265b4907f2531eacce52bd6cfd1f8848b7abf$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/window_cpptoc.cc b/cef/libcef_dll/cpptoc/views/window_cpptoc.cc index 6a5e0a9b6b..3404972088 100644 --- a/cef/libcef_dll/cpptoc/views/window_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/window_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1d17ae751431af3baf83b3386f1cab410964a17f$ +// $hash=a5be2f155956625b336fc3549328fef2f382a218$ // #include "libcef_dll/cpptoc/views/window_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/window_cpptoc.h b/cef/libcef_dll/cpptoc/views/window_cpptoc.h index 997d6082d9..de348f70d4 100644 --- a/cef/libcef_dll/cpptoc/views/window_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/window_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4af1ddb7edf5abafbd0bc925fa4e5be641dd1b23$ +// $hash=5b14236c7e00a7dafa47fdc32ce78d347de477a1$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc b/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc index b3fb171353..950f9a93b7 100644 --- a/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a201b988556a825fffe39f58e378664b93795c72$ +// $hash=2ab619afac5d34044d99093eca2cac4e644ba6ee$ // #include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h b/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h index 39d2325932..dff58e097e 100644 --- a/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/views/window_delegate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=958f75d98ec087824d5ae5e078cdf9f434541de9$ +// $hash=594a3ff498c14872187e0ae8d466a023664c92b6$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_DELEGATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc b/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc index 111746431a..f65b2038dc 100644 --- a/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/waitable_event_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=114c67ca2a781a0ddee594fba0f5ca1a4567b465$ +// $hash=ea0c4c4d8c202a47a9b5b63a57525dc726c1e40e$ // #include "libcef_dll/cpptoc/waitable_event_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h b/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h index 9ea6b72a25..cc466b7b3e 100644 --- a/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h +++ b/cef/libcef_dll/cpptoc/waitable_event_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=96249ce7f6494368cd77c16154b1c5ef13a5c698$ +// $hash=f19f05824d06a9aadd3ad10b58e2041eb855a66e$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_WAITABLE_EVENT_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc index bd6157cad2..36698f5db9 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c10eca449f7442521ac633f2f76b39246e7a560f$ +// $hash=f251bc08b09854c1d999ef9d88706ceeba3a9259$ // #include "libcef_dll/cpptoc/web_plugin_info_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h index 1ac734288e..54ac02fb6d 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h +++ b/cef/libcef_dll/cpptoc/web_plugin_info_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=af50aa803ca11f21aca5fdb7b429d0fbf13ec66a$ +// $hash=6b84c31a12d45d8707befeb476e6977f59c3e6e2$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc index f09358a1e3..2e59fce423 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b03fce6f309fac406b62e608d68483dc939dc56f$ +// $hash=df08a3fe475bba8107cfc45af61a31c4d0295014$ // #include "libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h index 18439ce9ce..283d371956 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6b8315284960854edb188cc131335d7c2efabfd9$ +// $hash=5d5192e483c62143bf6b16ee292fe5e5f471e198$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_INFO_VISITOR_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc index 6375c13173..50cab6cb83 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ceaecd9124811dc01c7d3b0aa222b1dc9e0964c7$ +// $hash=42ed9f3aa6aef7580eabb0a94981f1b7b5760d16$ // #include "libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h index 2b39cc5357..4d8c795c83 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6154c085fda09c2a369f3e7da73e6b63858bf919$ +// $hash=35a890b3dfa88746ee48ed0c94f351098213d163$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_WEB_PLUGIN_UNSTABLE_CALLBACK_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc index 89af834003..8de6eb3a2e 100644 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=10172f5d19b0add78894f56fe139b1d6819febd0$ +// $hash=208b9651cb7a357f7665e6d449c6ba974dfae9e3$ // #include "libcef_dll/cpptoc/write_handler_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h b/cef/libcef_dll/cpptoc/write_handler_cpptoc.h index e13816574b..dfcfd5b41d 100644 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/write_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=100ed73457186f2dae10d236cc534f908f371dbd$ +// $hash=b6360b7899237a1d616dd8c1cff016d397acbcd3$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_WRITE_HANDLER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc b/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc index 5ae1b4dc3d..abbd87a9ba 100644 --- a/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c590e9344004031c7cfe302bcb138635268b1251$ +// $hash=08b0ac0ef8621f8ce81753616044a5e04dc4a191$ // #include "libcef_dll/cpptoc/x509cert_principal_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h b/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h index cc69f57fe9..244854b81a 100644 --- a/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h +++ b/cef/libcef_dll/cpptoc/x509cert_principal_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0065be19dffd62f262e1c60cb45f6e46745234d1$ +// $hash=2041bbbdcbf9434c1a5205ebae8438d47725aa1f$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_X509CERT_PRINCIPAL_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc b/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc index c157410047..e510b4d192 100644 --- a/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/x509certificate_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=28d75543e047ea62864cad815e6ff3bcd65b46cf$ +// $hash=cac3e88ea15965e3a7786500606845b0b6157212$ // #include "libcef_dll/cpptoc/x509certificate_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h b/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h index b54c58a81a..29644da070 100644 --- a/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h +++ b/cef/libcef_dll/cpptoc/x509certificate_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=677401b52a4c53e2ccacff0a36070b2e074d38b5$ +// $hash=6eb11abb213e5b3e50494c956c51d6286020ca39$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_X509CERTIFICATE_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc index 2fd24cc8bc..ae117e5f24 100644 --- a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2b6f6a88740653aabe8cb154633433afff15ece5$ +// $hash=3ac5f5c45a59bad3310db431653227ceac42186e$ // #include "libcef_dll/cpptoc/xml_reader_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h index 76acc9c567..5f32d62c81 100644 --- a/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h +++ b/cef/libcef_dll/cpptoc/xml_reader_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dab3976baaad474d4ea7764562382969b1071491$ +// $hash=397fee4bf9eb4c1dc2117bba9ac2b63542335196$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_XML_READER_CPPTOC_H_ diff --git a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc index 641d9e1a79..a53a7a724e 100644 --- a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=29cc6dc5f0d84a3c743bfceb1e94d8679d7dc85a$ +// $hash=9fe9e9199e284af22669ba2abfb715d0e7ae8de3$ // #include "libcef_dll/cpptoc/zip_reader_cpptoc.h" diff --git a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h index 15889f219e..c04789a0c9 100644 --- a/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h +++ b/cef/libcef_dll/cpptoc/zip_reader_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a5ace913fb83fef08e7678ce2b9fdaedae5cde1d$ +// $hash=10530d641ffc50165b89d16e76230b9ab3f9aca5$ // #ifndef CEF_LIBCEF_DLL_CPPTOC_ZIP_READER_CPPTOC_H_ diff --git a/cef/libcef_dll/ctocpp/access_request_ctocpp.cc b/cef/libcef_dll/ctocpp/access_request_ctocpp.cc new file mode 100644 index 0000000000..4d7e095ef4 --- /dev/null +++ b/cef/libcef_dll/ctocpp/access_request_ctocpp.cc @@ -0,0 +1,92 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=05b34b1c04c69b654aad9a8136efbe83693d255f$ +// + +#include "libcef_dll/ctocpp/access_request_ctocpp.h" +#include "libcef_dll/shutdown_checker.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") CefString CefAccessRequestCToCpp::Origin() { + shutdown_checker::AssertNotShutdown(); + + cef_access_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, origin)) + return CefString(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_string_userfree_t _retval = _struct->origin(_struct); + + // Return type: string + CefString _retvalStr; + _retvalStr.AttachToUserFree(_retval); + return _retvalStr; +} + +NO_SANITIZE("cfi-icall") int CefAccessRequestCToCpp::ResourceAcessId() { + shutdown_checker::AssertNotShutdown(); + + cef_access_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, resource_acess_id)) + return 0; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->resource_acess_id(_struct); + + // Return type: simple + return _retval; +} + +NO_SANITIZE("cfi-icall") +void CefAccessRequestCToCpp::ReportRequestResult(bool allowed) { + shutdown_checker::AssertNotShutdown(); + + cef_access_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, report_request_result)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->report_request_result(_struct, allowed); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefAccessRequestCToCpp::CefAccessRequestCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefAccessRequestCToCpp::~CefAccessRequestCToCpp() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +cef_access_request_t* +CefCToCppRefCounted::UnwrapDerived(CefWrapperType type, + CefAccessRequest* c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCToCppRefCounted::kWrapperType = + WT_ACCESS_REQUEST; diff --git a/cef/libcef_dll/ctocpp/access_request_ctocpp.h b/cef/libcef_dll/ctocpp/access_request_ctocpp.h new file mode 100644 index 0000000000..a20536f2f7 --- /dev/null +++ b/cef/libcef_dll/ctocpp/access_request_ctocpp.h @@ -0,0 +1,43 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=1d85af65e5e48373ca6ecb843bb0fcb8e4483aee$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_ACCESS_REQUEST_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_ACCESS_REQUEST_CTOCPP_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed wrapper-side only. +class CefAccessRequestCToCpp + : public CefCToCppRefCounted { + public: + CefAccessRequestCToCpp(); + virtual ~CefAccessRequestCToCpp(); + + // CefAccessRequest methods. + CefString Origin() OVERRIDE; + int ResourceAcessId() OVERRIDE; + void ReportRequestResult(bool allowed) OVERRIDE; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_ACCESS_REQUEST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc index 9c7436f0c3..544ecf2731 100644 --- a/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=88c8e7eb206fa64ab57b424defd9af24da6d5491$ +// $hash=ced6517a7c7149502b418c5fb06386ff30777630$ // #include "libcef_dll/ctocpp/accessibility_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h b/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h index de92d2ca56..17804af634 100644 --- a/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/accessibility_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=88719c35cf2cbe25a0896961f0d75815d326ef12$ +// $hash=7ab53ef41cd69320ac6441e514582fd583203207$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_ACCESSIBILITY_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/app_ctocpp.cc b/cef/libcef_dll/ctocpp/app_ctocpp.cc index 9e29935d1c..6d60e8f0cd 100644 --- a/cef/libcef_dll/ctocpp/app_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/app_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7384d804f1ca18e02e55a7003aa5c286ebe89d30$ +// $hash=9986455b9b29bd88504e9b4c2b73bfebc87cfc61$ // #include "libcef_dll/ctocpp/app_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/app_ctocpp.h b/cef/libcef_dll/ctocpp/app_ctocpp.h index ed94af321b..bac5ba4bb1 100644 --- a/cef/libcef_dll/ctocpp/app_ctocpp.h +++ b/cef/libcef_dll/ctocpp/app_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f5d630da8a054d8d8d7ca37345132302dcd2d0fc$ +// $hash=b1a38565477fd1c436d8a62bfa9d41747f7fe30f$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_APP_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc index 016fd311cc..fcba4e0879 100644 --- a/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/audio_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8bd4a48d7cb2e9aaf628d65431588c1e83e854da$ +// $hash=e2df55073d0fb809dcd4cf0f6bb7ed36dcd4f73c$ // #include "libcef_dll/ctocpp/audio_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h b/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h index 80e49dab53..cdb6138637 100644 --- a/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/audio_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ccd696c315ecbc8cf3252c54a9bd71ac28d5550d$ +// $hash=9de91dcf5136e07c0d5c06ad9be8173b918f668a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_AUDIO_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc index ba8f1e61b2..f0acf803eb 100644 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5ccac5c93309829f907d949c81c547d0abf0625b$ +// $hash=3ae38c17cba153dbca73496eae905202ac09bfeb$ // #include "libcef_dll/ctocpp/auth_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h index 974bdbe175..d8ca62c457 100644 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e3a2949721f228e60049d3aee74253efd1d53f0d$ +// $hash=2e08ff9c5744055783e66c5f5068412c23bdfb6a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_AUTH_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc index d41ead3c3e..35b0bb6593 100644 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2cebe88a087dbe955014937d99e976810b27975c$ +// $hash=dab6c53c94db70fbeb54b440584a5147c52fe082$ // #include "libcef_dll/ctocpp/before_download_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h index caf64abd59..dc1313ca88 100644 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b54f6ec001036bb2cab243ced337eafd7cf22ec8$ +// $hash=bc1c58374243e92f6cae5d66edf446523546d18a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BEFORE_DOWNLOAD_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc index ba1c34b7fe..307b982cde 100644 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=78c713e9d60aaa468df5d5cdb224991756b92ce0$ +// $hash=80a91b8a85dc537cb49cbd5eaea974f92fbf9cde$ // #include "libcef_dll/ctocpp/binary_value_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h b/cef/libcef_dll/ctocpp/binary_value_ctocpp.h index b02d4ad731..668f33d7ce 100644 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/binary_value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6722d4d826fa46825fe93093de549794e765cbbe$ +// $hash=3ee6de3b032cce7c85b08ec86f330815d467b381$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BINARY_VALUE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_ctocpp.cc index 588f67df1d..ab518cb458 100644 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/browser_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,13 +9,15 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7d80a2edec79db9cb7be6bc23a1103a9f55c66c1$ +// $hash=669b83a0500ef99c8537d8f00fe746c28e09b31a$ // #include "libcef_dll/ctocpp/browser_ctocpp.h" #include #include "libcef_dll/ctocpp/browser_host_ctocpp.h" +#include "libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h" #include "libcef_dll/ctocpp/frame_ctocpp.h" +#include "libcef_dll/ctocpp/geolocation_acess_ctocpp.h" #include "libcef_dll/shutdown_checker.h" #include "libcef_dll/transfer_util.h" @@ -95,6 +97,23 @@ NO_SANITIZE("cfi-icall") void CefBrowserCToCpp::GoForward() { _struct->go_forward(_struct); } +NO_SANITIZE("cfi-icall") +bool CefBrowserCToCpp::CanGoBackOrForward(int num_steps) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, can_go_back_or_forward)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->can_go_back_or_forward(_struct, num_steps); + + // Return type: bool + return _retval ? true : false; +} + NO_SANITIZE("cfi-icall") bool CefBrowserCToCpp::IsLoading() { shutdown_checker::AssertNotShutdown(); @@ -372,6 +391,43 @@ void CefBrowserCToCpp::GetFrameNames(std::vector& names) { } } +NO_SANITIZE("cfi-icall") +CefRefPtr CefBrowserCToCpp:: + GetPermissionRequestDelegate() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, get_permission_request_delegate)) + return nullptr; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_browser_permission_request_delegate_t* _retval = + _struct->get_permission_request_delegate(_struct); + + // Return type: refptr_same + return CefBrowserPermissionRequestDelegateCToCpp::Wrap(_retval); +} + +NO_SANITIZE("cfi-icall") +CefRefPtr CefBrowserCToCpp::GetGeolocationPermissions() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, get_geolocation_permissions)) + return nullptr; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_geolocation_acess_t* _retval = + _struct->get_geolocation_permissions(_struct); + + // Return type: refptr_same + return CefGeolocationAcessCToCpp::Wrap(_retval); +} + // CONSTRUCTOR - Do not edit by hand. CefBrowserCToCpp::CefBrowserCToCpp() {} diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.h b/cef/libcef_dll/ctocpp/browser_ctocpp.h index 23c9266543..c8ac3665f4 100644 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.h +++ b/cef/libcef_dll/ctocpp/browser_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0413031a4d40137ab08d1bd99af0216e88ebf6ea$ +// $hash=5a8d946ed143178608c22b2952d6f82e46b52976$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ @@ -41,6 +41,7 @@ class CefBrowserCToCpp void GoBack() OVERRIDE; bool CanGoForward() OVERRIDE; void GoForward() OVERRIDE; + bool CanGoBackOrForward(int num_steps) OVERRIDE; bool IsLoading() OVERRIDE; void Reload() OVERRIDE; void ReloadIgnoreCache() OVERRIDE; @@ -56,6 +57,9 @@ class CefBrowserCToCpp size_t GetFrameCount() OVERRIDE; void GetFrameIdentifiers(std::vector& identifiers) OVERRIDE; void GetFrameNames(std::vector& names) OVERRIDE; + CefRefPtr GetPermissionRequestDelegate() + OVERRIDE; + CefRefPtr GetGeolocationPermissions() OVERRIDE; }; #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc index 1a57545931..558aa1e34d 100644 --- a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,16 +9,18 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e53c3c194d40a9bdee41a348a1c9fd65822e4ba9$ +// $hash=fda8e729ccaccaa70336cc4f897f53098e7430f3$ // #include "libcef_dll/ctocpp/browser_host_ctocpp.h" #include "libcef_dll/cpptoc/client_cpptoc.h" #include "libcef_dll/cpptoc/dev_tools_message_observer_cpptoc.h" #include "libcef_dll/cpptoc/download_image_callback_cpptoc.h" +#include "libcef_dll/cpptoc/java_script_result_callback_cpptoc.h" #include "libcef_dll/cpptoc/navigation_entry_visitor_cpptoc.h" #include "libcef_dll/cpptoc/pdf_print_callback_cpptoc.h" #include "libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h" +#include "libcef_dll/cpptoc/task_cpptoc.h" #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" #include "libcef_dll/ctocpp/drag_data_ctocpp.h" @@ -98,6 +100,25 @@ CefRefPtr CefBrowserHostCToCpp::GetBrowser() { return CefBrowserCToCpp::Wrap(_retval); } +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::PostTaskToUIThread(CefRefPtr task) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, post_task_to_uithread)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: task; type: refptr_diff + DCHECK(task.get()); + if (!task.get()) + return; + + // Execute + _struct->post_task_to_uithread(_struct, CefTaskCppToC::Wrap(task)); +} + NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::CloseBrowser(bool force_close) { shutdown_checker::AssertNotShutdown(); @@ -835,6 +856,268 @@ void CefBrowserHostCToCpp::SetWindowlessFrameRate(int frame_rate) { _struct->set_windowless_frame_rate(_struct, frame_rate); } +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::SetWebPreferences( + const CefBrowserSettings& browser_settings) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, set_web_preferences)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->set_web_preferences(_struct, &browser_settings); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::PutUserAgent(const CefString& ua) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, put_user_agent)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: ua; type: string_byref_const + DCHECK(!ua.empty()); + if (ua.empty()) + return; + + // Execute + _struct->put_user_agent(_struct, ua.GetStruct()); +} + +NO_SANITIZE("cfi-icall") CefString CefBrowserHostCToCpp::DefaultUserAgent() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, default_user_agent)) + return CefString(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_string_userfree_t _retval = _struct->default_user_agent(_struct); + + // Return type: string + CefString _retvalStr; + _retvalStr.AttachToUserFree(_retval); + return _retvalStr; +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::SetBackgroundColor(int color) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, set_background_color)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->set_background_color(_struct, color); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::RegisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, register_ark_jsfunction)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: object_name; type: string_byref_const + DCHECK(!object_name.empty()); + if (object_name.empty()) + return; + + // Translate param: method_list; type: string_vec_byref_const + cef_string_list_t method_listList = cef_string_list_alloc(); + DCHECK(method_listList); + if (method_listList) + transfer_string_list_contents(method_list, method_listList); + + // Execute + _struct->register_ark_jsfunction(_struct, object_name.GetStruct(), + method_listList); + + // Restore param:method_list; type: string_vec_byref_const + if (method_listList) + cef_string_list_free(method_listList); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::UnregisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, unregister_ark_jsfunction)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: object_name; type: string_byref_const + DCHECK(!object_name.empty()); + if (object_name.empty()) + return; + // Unverified params: method_list + + // Translate param: method_list; type: string_vec_byref_const + cef_string_list_t method_listList = cef_string_list_alloc(); + DCHECK(method_listList); + if (method_listList) + transfer_string_list_contents(method_list, method_listList); + + // Execute + _struct->unregister_ark_jsfunction(_struct, object_name.GetStruct(), + method_listList); + + // Restore param:method_list; type: string_vec_byref_const + if (method_listList) + cef_string_list_free(method_listList); +} + +NO_SANITIZE("cfi-icall") CefString CefBrowserHostCToCpp::Title() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, title)) + return CefString(); + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_string_userfree_t _retval = _struct->title(_struct); + + // Return type: string + CefString _retvalStr; + _retvalStr.AttachToUserFree(_retval); + return _retvalStr; +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::GetHitData(int& type, CefString& extra_data) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, get_hit_data)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->get_hit_data(_struct, &type, extra_data.GetWritableStruct()); +} + +NO_SANITIZE("cfi-icall") int CefBrowserHostCToCpp::PageLoadProgress() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, page_load_progress)) + return 0; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->page_load_progress(_struct); + + // Return type: simple + return _retval; +} + +NO_SANITIZE("cfi-icall") float CefBrowserHostCToCpp::Scale() { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, scale)) + return 0; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + float _retval = _struct->scale(_struct); + + // Return type: simple + return _retval; +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::LoadWithDataAndBaseUrl(const CefString& baseUrl, + const CefString& data, + const CefString& mimeType, + const CefString& encoding, + const CefString& historyUrl) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, load_with_data_and_base_url)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Unverified params: baseUrl, data, mimeType, encoding, historyUrl + + // Execute + _struct->load_with_data_and_base_url( + _struct, baseUrl.GetStruct(), data.GetStruct(), mimeType.GetStruct(), + encoding.GetStruct(), historyUrl.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::LoadWithData(const CefString& data, + const CefString& mimeType, + const CefString& encoding) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, load_with_data)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Unverified params: data, mimeType, encoding + + // Execute + _struct->load_with_data(_struct, data.GetStruct(), mimeType.GetStruct(), + encoding.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::AddVisitedLinks(const std::vector& urls) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, add_visited_links)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Unverified params: urls + + // Translate param: urls; type: string_vec_byref_const + cef_string_list_t urlsList = cef_string_list_alloc(); + DCHECK(urlsList); + if (urlsList) + transfer_string_list_contents(urls, urlsList); + + // Execute + _struct->add_visited_links(_struct, urlsList); + + // Restore param:urls; type: string_vec_byref_const + if (urlsList) + cef_string_list_free(urlsList); +} + NO_SANITIZE("cfi-icall") void CefBrowserHostCToCpp::ImeSetComposition( const CefString& text, @@ -1126,6 +1409,33 @@ NO_SANITIZE("cfi-icall") bool CefBrowserHostCToCpp::IsAudioMuted() { return _retval ? true : false; } +NO_SANITIZE("cfi-icall") +void CefBrowserHostCToCpp::ExecuteJavaScript( + const CefString& code, + CefRefPtr callback) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_host_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, execute_java_script)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: code; type: string_byref_const + DCHECK(!code.empty()); + if (code.empty()) + return; + // Verify param: callback; type: refptr_diff + DCHECK(callback.get()); + if (!callback.get()) + return; + + // Execute + _struct->execute_java_script( + _struct, code.GetStruct(), + CefJavaScriptResultCallbackCppToC::Wrap(callback)); +} + // CONSTRUCTOR - Do not edit by hand. CefBrowserHostCToCpp::CefBrowserHostCToCpp() {} diff --git a/cef/libcef_dll/ctocpp/browser_host_ctocpp.h b/cef/libcef_dll/ctocpp/browser_host_ctocpp.h index e630d54cdf..f7d93e799d 100644 --- a/cef/libcef_dll/ctocpp/browser_host_ctocpp.h +++ b/cef/libcef_dll/ctocpp/browser_host_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=95928a6e1311ff0406b502076defccc441d0b57c$ +// $hash=cf6e8c80db9579bc35d920ab4c35659a6535c355$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ @@ -38,6 +38,7 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted GetBrowser() OVERRIDE; + void PostTaskToUIThread(CefRefPtr task) OVERRIDE; void CloseBrowser(bool force_close) OVERRIDE; bool TryCloseBrowser() OVERRIDE; void SetFocus(bool focus) OVERRIDE; @@ -107,6 +108,29 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted& method_list) OVERRIDE; + void UnregisterArkJSfunction( + const CefString& object_name, + const std::vector& method_list) OVERRIDE; + CefString Title() OVERRIDE; + void GetHitData(int& type, CefString& extra_data) OVERRIDE; + int PageLoadProgress() OVERRIDE; + float Scale() OVERRIDE; + void LoadWithDataAndBaseUrl(const CefString& baseUrl, + const CefString& data, + const CefString& mimeType, + const CefString& encoding, + const CefString& historyUrl) OVERRIDE; + void LoadWithData(const CefString& data, + const CefString& mimeType, + const CefString& encoding) OVERRIDE; + void AddVisitedLinks(const std::vector& urls) OVERRIDE; void ImeSetComposition(const CefString& text, const std::vector& underlines, const CefRange& replacement_range, @@ -134,6 +158,9 @@ class CefBrowserHostCToCpp : public CefCToCppRefCounted callback) OVERRIDE; }; #endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_HOST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc new file mode 100644 index 0000000000..0076560af5 --- /dev/null +++ b/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.cc @@ -0,0 +1,194 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=4a9c34d8dd8e49725dd7288c3a8c3e2a978c977c$ +// + +#include "libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h" +#include "libcef_dll/shutdown_checker.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp::AskGeolocationPermission( + const CefString& origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, ask_geolocation_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->ask_geolocation_permission(_struct, origin.GetStruct(), callback); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp::AbortAskGeolocationPermission( + const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, abort_ask_geolocation_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->abort_ask_geolocation_permission(_struct, origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp:: + AskProtectedMediaIdentifierPermission(const CefString& origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, ask_protected_media_identifier_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->ask_protected_media_identifier_permission( + _struct, origin.GetStruct(), callback); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp:: + AbortAskProtectedMediaIdentifierPermission(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, + abort_ask_protected_media_identifier_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->abort_ask_protected_media_identifier_permission(_struct, + origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp::AskMIDISysexPermission( + const CefString& origin, + cef_permission_callback_t callback) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, ask_midisysex_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->ask_midisysex_permission(_struct, origin.GetStruct(), callback); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp::AbortAskMIDISysexPermission( + const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, abort_ask_midisysex_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->abort_ask_midisysex_permission(_struct, origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefBrowserPermissionRequestDelegateCToCpp::NotifyGeolocationPermission( + bool value, + const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_browser_permission_request_delegate_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, notify_geolocation_permission)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->notify_geolocation_permission(_struct, value, origin.GetStruct()); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefBrowserPermissionRequestDelegateCToCpp:: + CefBrowserPermissionRequestDelegateCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefBrowserPermissionRequestDelegateCToCpp:: + ~CefBrowserPermissionRequestDelegateCToCpp() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +cef_browser_permission_request_delegate_t* +CefCToCppRefCounted:: + UnwrapDerived(CefWrapperType type, CefBrowserPermissionRequestDelegate* c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCToCppRefCounted< + CefBrowserPermissionRequestDelegateCToCpp, + CefBrowserPermissionRequestDelegate, + cef_browser_permission_request_delegate_t>::kWrapperType = + WT_BROWSER_PERMISSION_REQUEST_DELEGATE; diff --git a/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h new file mode 100644 index 0000000000..a3e876d8bc --- /dev/null +++ b/cef/libcef_dll/ctocpp/browser_permission_request_delegate_ctocpp.h @@ -0,0 +1,53 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=3800e05c5c712373a59863b4f35f117d46efe6f4$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed wrapper-side only. +class CefBrowserPermissionRequestDelegateCToCpp + : public CefCToCppRefCounted { + public: + CefBrowserPermissionRequestDelegateCToCpp(); + virtual ~CefBrowserPermissionRequestDelegateCToCpp(); + + // CefBrowserPermissionRequestDelegate methods. + void AskGeolocationPermission(const CefString& origin, + cef_permission_callback_t callback) OVERRIDE; + void AbortAskGeolocationPermission(const CefString& origin) OVERRIDE; + void AskProtectedMediaIdentifierPermission( + const CefString& origin, + cef_permission_callback_t callback) OVERRIDE; + void AbortAskProtectedMediaIdentifierPermission( + const CefString& origin) OVERRIDE; + void AskMIDISysexPermission(const CefString& origin, + cef_permission_callback_t callback) OVERRIDE; + void AbortAskMIDISysexPermission(const CefString& origin) OVERRIDE; + void NotifyGeolocationPermission(bool value, + const CefString& origin) OVERRIDE; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_BROWSER_PERMISSION_REQUEST_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc index e2cd36eef6..2338c499f1 100644 --- a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5efe4243d536139501e58591c6f875e08001c8b7$ +// $hash=3302f28c60da03b9f5ba5fa110523b353765d1a3$ // #include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h index 5b2ff68b7e..3871506b1a 100644 --- a/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/browser_process_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=719a890627d0b2ba0746415c0dd8631e387567fe$ +// $hash=7a13d15a99d1c92a757b776bb00d932296012054$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_BROWSER_PROCESS_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.cc b/cef/libcef_dll/ctocpp/callback_ctocpp.cc index aba308705a..c0030004cb 100644 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fd4031a2727c68a81e72554cbda477d1afc8c7d0$ +// $hash=ef330e0d61e143966544b8a80f04b72dc32ec4e3$ // #include "libcef_dll/ctocpp/callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.h b/cef/libcef_dll/ctocpp/callback_ctocpp.h index 52e70d76c6..f39dd72b55 100644 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d5bd0e618c060e9410fdd4760d1e941e443a8010$ +// $hash=1aace6941332689eb062b20f56f7bbf20c88adbb$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/client_ctocpp.cc b/cef/libcef_dll/ctocpp/client_ctocpp.cc index d002e41c92..417ffa3815 100644 --- a/cef/libcef_dll/ctocpp/client_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/client_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,12 +9,13 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=19d21957d8b7f66de8c88b9085abb2a08718582d$ +// $hash=731c789683b43e6ce9d520fc546d6ecae160adb3$ // #include "libcef_dll/ctocpp/client_ctocpp.h" #include "libcef_dll/cpptoc/browser_cpptoc.h" #include "libcef_dll/cpptoc/frame_cpptoc.h" +#include "libcef_dll/cpptoc/list_value_cpptoc.h" #include "libcef_dll/cpptoc/process_message_cpptoc.h" #include "libcef_dll/ctocpp/audio_handler_ctocpp.h" #include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" @@ -28,6 +29,7 @@ #include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" #include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" #include "libcef_dll/ctocpp/load_handler_ctocpp.h" +#include "libcef_dll/ctocpp/permission_request_ctocpp.h" #include "libcef_dll/ctocpp/print_handler_ctocpp.h" #include "libcef_dll/ctocpp/render_handler_ctocpp.h" #include "libcef_dll/ctocpp/request_handler_ctocpp.h" @@ -260,6 +262,21 @@ CefRefPtr CefClientCToCpp::GetRequestHandler() { return CefRequestHandlerCToCpp::Wrap(_retval); } +NO_SANITIZE("cfi-icall") +CefRefPtr CefClientCToCpp::GetPermissionRequest() { + cef_client_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, get_permission_request)) + return nullptr; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_permission_request_t* _retval = _struct->get_permission_request(_struct); + + // Return type: refptr_same + return CefPermissionRequestCToCpp::Wrap(_retval); +} + NO_SANITIZE("cfi-icall") bool CefClientCToCpp::OnProcessMessageReceived( CefRefPtr browser, @@ -294,6 +311,43 @@ bool CefClientCToCpp::OnProcessMessageReceived( return _retval ? true : false; } +NO_SANITIZE("cfi-icall") +int CefClientCToCpp::NotifyJavaScriptResult(CefRefPtr args, + const CefString& method, + const CefString& object_name, + CefRefPtr result) { + cef_client_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, notify_java_script_result)) + return 0; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: args; type: refptr_diff + DCHECK(args.get()); + if (!args.get()) + return 0; + // Verify param: method; type: string_byref_const + DCHECK(!method.empty()); + if (method.empty()) + return 0; + // Verify param: object_name; type: string_byref_const + DCHECK(!object_name.empty()); + if (object_name.empty()) + return 0; + // Verify param: result; type: refptr_diff + DCHECK(result.get()); + if (!result.get()) + return 0; + + // Execute + int _retval = _struct->notify_java_script_result( + _struct, CefListValueCppToC::Wrap(args), method.GetStruct(), + object_name.GetStruct(), CefListValueCppToC::Wrap(result)); + + // Return type: simple + return _retval; +} + // CONSTRUCTOR - Do not edit by hand. CefClientCToCpp::CefClientCToCpp() {} diff --git a/cef/libcef_dll/ctocpp/client_ctocpp.h b/cef/libcef_dll/ctocpp/client_ctocpp.h index 1447c181fe..6d043e9499 100644 --- a/cef/libcef_dll/ctocpp/client_ctocpp.h +++ b/cef/libcef_dll/ctocpp/client_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a640d4535140448a46340432470dbd1ef4f90b69$ +// $hash=b1e9eaf26431d056aa0df0d95752ec49e36fb80c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ @@ -48,10 +48,15 @@ class CefClientCToCpp CefRefPtr GetPrintHandler() override; CefRefPtr GetRenderHandler() override; CefRefPtr GetRequestHandler() override; + CefRefPtr GetPermissionRequest() override; bool OnProcessMessageReceived(CefRefPtr browser, CefRefPtr frame, CefProcessId source_process, CefRefPtr message) override; + int NotifyJavaScriptResult(CefRefPtr args, + const CefString& method, + const CefString& object_name, + CefRefPtr result) override; }; #endif // CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc b/cef/libcef_dll/ctocpp/command_line_ctocpp.cc index 4100a7fa58..a96b067677 100644 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/command_line_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=531127653166c6f4b50f25669ceef0a54ec56b0d$ +// $hash=cc3c62b07c8e4d6f019637a0338673ac21ffa017$ // #include "libcef_dll/ctocpp/command_line_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.h b/cef/libcef_dll/ctocpp/command_line_ctocpp.h index 4f07d37e95..cbda77d4d2 100644 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.h +++ b/cef/libcef_dll/ctocpp/command_line_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=10d0f381490e63f0b95af48a93ea47e92459b5a3$ +// $hash=b6e282cb71505ee72dab59c709ba43d19a2ff75c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_COMMAND_LINE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc index c6d0d31baa..4b9308d956 100644 --- a/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/completion_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e6d440c8efb493a131c11c206ec5fceecd832660$ +// $hash=f65d432f0ca5891aa466010183e437ba5e2007be$ // #include "libcef_dll/ctocpp/completion_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h b/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h index bbe457d0d1..a934d50e22 100644 --- a/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/completion_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d5dfb24f2fe539edb35ef1bae35d6f7e3d4b96e5$ +// $hash=d8c3f928349e064d8afe7853d4a47c90c1ed0114$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc index 6c98c6c59a..3a765cddb5 100644 --- a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=58fe9756e31c44400e2a3a124ac9c7256ad50710$ +// $hash=7b91234844f040546245a09f4724142efdf929ff$ // #include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h index 6ba5e46c56..badf3a0475 100644 --- a/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/context_menu_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bc4ee07c77b4eca133c2aecc9324225a651659c6$ +// $hash=3dba1df692cc69ba3aab91b989cceb9a7d363858$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc index 5a7bb62b72..093210852e 100644 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dad7a3eb64c0bc6c4eddd2935513af61f7e8b510$ +// $hash=233d530cb984468703b97752bda1178191d4ba75$ // #include "libcef_dll/ctocpp/context_menu_params_ctocpp.h" @@ -230,7 +230,7 @@ CefContextMenuParams::MediaType CefContextMenuParamsCToCpp::GetMediaType() { NO_SANITIZE("cfi-icall") CefContextMenuParams::MediaStateFlags -CefContextMenuParamsCToCpp::GetMediaStateFlags() { + CefContextMenuParamsCToCpp::GetMediaStateFlags() { shutdown_checker::AssertNotShutdown(); cef_context_menu_params_t* _struct = GetStruct(); @@ -351,7 +351,7 @@ bool CefContextMenuParamsCToCpp::IsSpellCheckEnabled() { NO_SANITIZE("cfi-icall") CefContextMenuParams::EditStateFlags -CefContextMenuParamsCToCpp::GetEditStateFlags() { + CefContextMenuParamsCToCpp::GetEditStateFlags() { shutdown_checker::AssertNotShutdown(); cef_context_menu_params_t* _struct = GetStruct(); diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h index 679150917f..50b7d6f7a9 100644 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h +++ b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7de11c340a42046de92ca4cb8c5852269f3a3101$ +// $hash=dd3077d53438007cdacbcecdd410ab62693af484$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_CONTEXT_MENU_PARAMS_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc index 40ba61d08d..3156b1db01 100644 --- a/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fddf7eda3f3506c482f637c9d59526a4e7411b30$ +// $hash=b1ae8622378ad8661289554e6c542e970850aaed$ // #include "libcef_dll/ctocpp/cookie_access_filter_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h index 259ff47f59..0170c33256 100644 --- a/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h +++ b/cef/libcef_dll/ctocpp/cookie_access_filter_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3aa5bd130237bc6adfff1393b4ecce39e6b96610$ +// $hash=7a3357796fd02da5a233d4dfa6b8c7194ba8f969$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_ACCESS_FILTER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc index 3873685fb6..dc94d161fe 100644 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2682019770bd002410e9e292747e861c907d3c0c$ +// $hash=fc72d18dc6fecabfa6080413cf31ad31b1cfa958$ // #include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" @@ -35,8 +35,84 @@ CefRefPtr CefCookieManager::GetGlobalManager( return CefCookieManagerCToCpp::Wrap(_retval); } +NO_SANITIZE("cfi-icall") +bool CefCookieManager::CreateCefCookie(const CefString& url, + const CefString& value, + CefCookie& cef_cookie) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: url; type: string_byref_const + DCHECK(!url.empty()); + if (url.empty()) + return false; + // Verify param: value; type: string_byref_const + DCHECK(!value.empty()); + if (value.empty()) + return false; + + // Execute + int _retval = cef_cookie_manager_create_cef_cookie( + url.GetStruct(), value.GetStruct(), &cef_cookie); + + // Return type: bool + return _retval ? true : false; +} + // VIRTUAL METHODS - Body may be edited by hand. +NO_SANITIZE("cfi-icall") bool CefCookieManagerCToCpp::IsAcceptCookieAllowed() { + cef_cookie_manager_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, is_accept_cookie_allowed)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->is_accept_cookie_allowed(_struct); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +void CefCookieManagerCToCpp::PutAcceptCookieEnabled(bool accept) { + cef_cookie_manager_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, put_accept_cookie_enabled)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->put_accept_cookie_enabled(_struct, accept); +} + +NO_SANITIZE("cfi-icall") +bool CefCookieManagerCToCpp::IsFileURLSchemeCookiesAllowed() { + cef_cookie_manager_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, is_file_urlscheme_cookies_allowed)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = _struct->is_file_urlscheme_cookies_allowed(_struct); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +void CefCookieManagerCToCpp::PutAcceptFileURLSchemeCookiesEnabled(bool allow) { + cef_cookie_manager_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, put_accept_file_urlscheme_cookies_enabled)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->put_accept_file_urlscheme_cookies_enabled(_struct, allow); +} + NO_SANITIZE("cfi-icall") bool CefCookieManagerCToCpp::VisitAllCookies( CefRefPtr visitor) { @@ -117,6 +193,7 @@ NO_SANITIZE("cfi-icall") bool CefCookieManagerCToCpp::DeleteCookies( const CefString& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) { cef_cookie_manager_t* _struct = GetStruct(); if (CEF_MEMBER_MISSING(_struct, delete_cookies)) @@ -127,9 +204,9 @@ bool CefCookieManagerCToCpp::DeleteCookies( // Unverified params: url, cookie_name, callback // Execute - int _retval = - _struct->delete_cookies(_struct, url.GetStruct(), cookie_name.GetStruct(), - CefDeleteCookiesCallbackCppToC::Wrap(callback)); + int _retval = _struct->delete_cookies( + _struct, url.GetStruct(), cookie_name.GetStruct(), is_session, + CefDeleteCookiesCallbackCppToC::Wrap(callback)); // Return type: bool return _retval ? true : false; diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h index ce8e6def02..bbac3e21b5 100644 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h +++ b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=86450b60ca929d794339574809c956ab0fec709e$ +// $hash=72c7b7341d1fe0f7fc35b539d6a1cca430880423$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_MANAGER_CTOCPP_H_ @@ -35,6 +35,10 @@ class CefCookieManagerCToCpp virtual ~CefCookieManagerCToCpp(); // CefCookieManager methods. + bool IsAcceptCookieAllowed() OVERRIDE; + void PutAcceptCookieEnabled(bool accept) OVERRIDE; + bool IsFileURLSchemeCookiesAllowed() OVERRIDE; + void PutAcceptFileURLSchemeCookiesEnabled(bool allow) OVERRIDE; bool VisitAllCookies(CefRefPtr visitor) OVERRIDE; bool VisitUrlCookies(const CefString& url, bool includeHttpOnly, @@ -44,6 +48,7 @@ class CefCookieManagerCToCpp CefRefPtr callback) OVERRIDE; bool DeleteCookies(const CefString& url, const CefString& cookie_name, + bool is_session, CefRefPtr callback) OVERRIDE; bool FlushStore(CefRefPtr callback) OVERRIDE; }; diff --git a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc index 2dbbf4b39b..c915510144 100644 --- a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2b0c8dcc7ec49951ed82d0e8f558f658c23f6f39$ +// $hash=46632d6c9d6e3c6891abc90323313bea54d7419e$ // #include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" @@ -44,6 +44,25 @@ bool CefCookieVisitorCToCpp::Visit(const CefCookie& cookie, return _retval ? true : false; } +NO_SANITIZE("cfi-icall") +void CefCookieVisitorCToCpp::SetCookieLine(const CefString& cookieLine) { + shutdown_checker::AssertNotShutdown(); + + cef_cookie_visitor_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, set_cookie_line)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: cookieLine; type: string_byref_const + DCHECK(!cookieLine.empty()); + if (cookieLine.empty()) + return; + + // Execute + _struct->set_cookie_line(_struct, cookieLine.GetStruct()); +} + // CONSTRUCTOR - Do not edit by hand. CefCookieVisitorCToCpp::CefCookieVisitorCToCpp() {} diff --git a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h index aa2b3549e8..62d0072362 100644 --- a/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/cookie_visitor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e909793a47c685b6f44715054b8c70a7ac0b4f91$ +// $hash=c1dca55691f6d564ad2a69b38acd141982368895$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ @@ -39,6 +39,7 @@ class CefCookieVisitorCToCpp int count, int total, bool& deleteCookie) override; + void SetCookieLine(const CefString& cookieLine) override; }; #endif // CEF_LIBCEF_DLL_CTOCPP_COOKIE_VISITOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc index 3b7495e845..4f5301ec81 100644 --- a/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5be97fa191527448a88038052eb241a54ff712fb$ +// $hash=765b5a3f3e0ac077f2ff72541ae26ca342c4ca78$ // #include "libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h b/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h index d9e6ab7d30..90f109ac9e 100644 --- a/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/delete_cookies_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=da90ac900e20cefc280747d50c0cdb7e1dcde7dc$ +// $hash=cd33af6263f686958bccf5907e1c4622950a7a40$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DELETE_COOKIES_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc b/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc index 64e6a062a1..367af2dd9a 100644 --- a/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6f78ef72de066205d4329c231dd586fae8519cd6$ +// $hash=610f96da1baaa48d1aa7fcff8a4c4fb33d2965ab$ // #include "libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h b/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h index a6a7494158..99eb59beed 100644 --- a/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h +++ b/cef/libcef_dll/ctocpp/dev_tools_message_observer_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=231453d0138596f50c2656d038fd662551526474$ +// $hash=3b8cfdd8e4bc8e1981634fdd6a78f8eb9a23da4b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DEV_TOOLS_MESSAGE_OBSERVER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc index c47e38d115..3377b564ca 100644 --- a/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=946f52d8495dcf0b0ed28f82d0a43075969f0674$ +// $hash=cac933371fc47c864230d4537ef1da76cd7e4d8e$ // #include "libcef_dll/ctocpp/dialog_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h b/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h index 7b17e7f47f..f2e0798a16 100644 --- a/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/dialog_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=126691efff37723df43af451c4d9876194f37c16$ +// $hash=4c07a40d3bd171adf3ae3cc4aa935bc7eca4aa5e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DIALOG_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc index a4d793c2a1..f726373820 100644 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=28f4836ace572b3b61ed33f655892b261b290ae3$ +// $hash=70aa25f8ab57f0c152666a730aff4247684108f9$ // #include "libcef_dll/ctocpp/dictionary_value_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h index f72952a0b9..4f5ecd7375 100644 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=77a328d9997c59ff25bcd943be0d878432cdbfea$ +// $hash=6990edd89182c61d4d75bc863a1125b910308716$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DICTIONARY_VALUE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc index 5051beb331..cb7743a77a 100644 --- a/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/display_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9c6cd57fec248c032f4b036f76b519913f973d05$ +// $hash=98fa3d9e050e833252d3abe3ca7e8fe83154b25f$ // #include "libcef_dll/ctocpp/display_handler_ctocpp.h" @@ -105,6 +105,57 @@ void CefDisplayHandlerCToCpp::OnFaviconURLChange( cef_string_list_free(icon_urlsList); } +NO_SANITIZE("cfi-icall") +void CefDisplayHandlerCToCpp::OnReceivedTouchIconUrl( + CefRefPtr browser, + const CefString& icon_url, + bool precomposed) { + shutdown_checker::AssertNotShutdown(); + + cef_display_handler_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_received_touch_icon_url)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: browser; type: refptr_diff + DCHECK(browser.get()); + if (!browser.get()) + return; + // Verify param: icon_url; type: string_byref_const + DCHECK(!icon_url.empty()); + if (icon_url.empty()) + return; + + // Execute + _struct->on_received_touch_icon_url(_struct, CefBrowserCppToC::Wrap(browser), + icon_url.GetStruct(), precomposed); +} + +NO_SANITIZE("cfi-icall") +void CefDisplayHandlerCToCpp::OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) { + shutdown_checker::AssertNotShutdown(); + + cef_display_handler_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_received_icon)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: data; type: simple_byaddr + DCHECK(data); + if (!data) + return; + + // Execute + _struct->on_received_icon(_struct, data, width, height, color_type, + alpha_type); +} + NO_SANITIZE("cfi-icall") void CefDisplayHandlerCToCpp::OnFullscreenModeChange( CefRefPtr browser, diff --git a/cef/libcef_dll/ctocpp/display_handler_ctocpp.h b/cef/libcef_dll/ctocpp/display_handler_ctocpp.h index 46cf7d1c95..35822b73b3 100644 --- a/cef/libcef_dll/ctocpp/display_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/display_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=16499007f73a511e2aa6dd175965e26cc5f8b1ba$ +// $hash=07af406c978c7eef163785b97dce854126fc6052$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DISPLAY_HANDLER_CTOCPP_H_ @@ -43,6 +43,14 @@ class CefDisplayHandlerCToCpp const CefString& title) override; void OnFaviconURLChange(CefRefPtr browser, const std::vector& icon_urls) override; + void OnReceivedTouchIconUrl(CefRefPtr browser, + const CefString& icon_url, + bool precomposed) override; + void OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) override; void OnFullscreenModeChange(CefRefPtr browser, bool fullscreen) override; bool OnTooltip(CefRefPtr browser, CefString& text) override; diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc b/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc index 09983c2fe5..3506a6b90e 100644 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a83ef828be13e2b67b7fa61bceaeff1dc269d632$ +// $hash=e5f17a1d61c8211bcf16be848e8aaf48934c5b0c$ // #include "libcef_dll/ctocpp/domdocument_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h b/cef/libcef_dll/ctocpp/domdocument_ctocpp.h index ec5d46c784..51bc133ca7 100644 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domdocument_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=be5aeaffe84056cb5b1f032eaa8db30142b5916b$ +// $hash=dc5be45ff3472cdcd51acd395f96c0ee82ebc27c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMDOCUMENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc b/cef/libcef_dll/ctocpp/domnode_ctocpp.cc index c3bac08c7b..566e426bf9 100644 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domnode_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dee9e45990bc87669285dae6b0f78782e15bdbc0$ +// $hash=64846f6de30a56d2aaed093cbfd9959c7cc2f1af$ // #include "libcef_dll/ctocpp/domnode_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.h b/cef/libcef_dll/ctocpp/domnode_ctocpp.h index 7fed8231b3..44e55e4092 100644 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domnode_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0261f2feb842f255f84c013f69076056e9710d98$ +// $hash=0c827dc44314ab47ab0ba0092aff3f58ddfc141e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMNODE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc index 9886715c22..3ece62f9ed 100644 --- a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5d6aa6cab8aee93452a868bee9833d7b1536117e$ +// $hash=c3351e11fd6ae488bd77aeba4b4c8485f24119ad$ // #include "libcef_dll/ctocpp/domvisitor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h index 4a773ac851..b1cf8b622a 100644 --- a/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domvisitor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f28987d270ea7522a3ead7a1dcd520e1bf4e6b9e$ +// $hash=950252a2903cd57d097fb9dcd4eacf0761914e7a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOMVISITOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc index 0b3dc2eb1b..981d59333f 100644 --- a/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b06c6391432eaddc2d8653b1afe2ba7155dddaf3$ +// $hash=c4e47ffd023b528b9c5b658126f4a1d9fd05cf98$ // #include "libcef_dll/ctocpp/download_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/download_handler_ctocpp.h b/cef/libcef_dll/ctocpp/download_handler_ctocpp.h index c85fcf91ac..a74b923cf1 100644 --- a/cef/libcef_dll/ctocpp/download_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/download_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c88c3c71eab51921583fd73f515f0dac2e23f14b$ +// $hash=172a12dd9e68b65afff9eef5b93f0e480beaf904$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc index 7de309c166..73a483afcb 100644 --- a/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=88e1ac8e51f7255059242ed85dbb2c071c595ffe$ +// $hash=8568e306d0db860b1cd222f7c6dba344f349cb2d$ // #include "libcef_dll/ctocpp/download_image_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h b/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h index 8fccab1dea..ff4558668f 100644 --- a/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/download_image_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=73f30c6f17708de7c3633a30e01a2bb672afbc83$ +// $hash=fa13abafcf97f6a71d08ca7ec67d45a71d636603$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_IMAGE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc index 50fa61d19c..0608133157 100644 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fb09a7e7db1267d0653fff64c419ab573496614f$ +// $hash=092e50c318b7d1c933ffb293ff062df17bfbb736$ // #include "libcef_dll/ctocpp/download_item_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h index ccadf6a588..b1bcf4a373 100644 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7f1556d32762b7eb0c65afbb7d4c5014a97a96c9$ +// $hash=de956d3f54d0b28636c76d9c3a306b124c164a97$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_ctocpp.cc index 11a172a65d..66f136e42f 100644 --- a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_item_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3052f807e8bd2d9d41e8147d6f14b26a38cbeaeb$ +// $hash=05c6527a7cdeb9495bca9da965956fb3006a7bdd$ // #include "libcef_dll/ctocpp/download_item_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/download_item_ctocpp.h b/cef/libcef_dll/ctocpp/download_item_ctocpp.h index 1e1ed58eba..8cdb343e7d 100644 --- a/cef/libcef_dll/ctocpp/download_item_ctocpp.h +++ b/cef/libcef_dll/ctocpp/download_item_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a536d8825fc85c5248fcdf5316bdf760e9f4a5e6$ +// $hash=dd66cdd93b90eac63bef4639134076a3ea180f12$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DOWNLOAD_ITEM_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc b/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc index c51ecf34de..fc33a78e53 100644 --- a/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/drag_data_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=aa1596cb76a36c6adce59bd1d7623c636c1a4740$ +// $hash=57352ff85ca98fc34a0f2c58afbb1224ce1a1f09$ // #include "libcef_dll/ctocpp/drag_data_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/drag_data_ctocpp.h b/cef/libcef_dll/ctocpp/drag_data_ctocpp.h index a8d37b80c4..952ef289b2 100644 --- a/cef/libcef_dll/ctocpp/drag_data_ctocpp.h +++ b/cef/libcef_dll/ctocpp/drag_data_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e5579ef142f0eb3873c7fd526320919b000f57ee$ +// $hash=e3022098b1513ebfea27dab4213100777389cf99$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DRAG_DATA_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc index 2ce35c09a1..ccf11d8fb5 100644 --- a/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/drag_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=86c335a8c888ca3a7e08d6cb320b91389bc2232c$ +// $hash=83bbaf05bb87f369d819d4202110581c3bbe60a1$ // #include "libcef_dll/ctocpp/drag_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h b/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h index 4940eb73d2..47488db5e3 100644 --- a/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/drag_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=23257e88edd1dbe17b69adbaff5bbdd52149a075$ +// $hash=87c40d04da449f1144f962dff8b3e0b5a1d70db7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_DRAG_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc index 9f12dfe493..9489292a43 100644 --- a/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a9fa1d67bf81497a442096b2969a08ccee88b952$ +// $hash=7f660f5500f6e299ef56d598c71ade363f5581b9$ // #include "libcef_dll/ctocpp/end_tracing_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h b/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h index e19d85f544..81b82fc180 100644 --- a/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/end_tracing_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=38b8d10de419daefd1b6021283e0e7b373308948$ +// $hash=43c23da2432e1336afcd21889ae744bcc109e3ed$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_END_TRACING_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/extension_ctocpp.cc b/cef/libcef_dll/ctocpp/extension_ctocpp.cc index 693a12ffe2..a891cd0190 100644 --- a/cef/libcef_dll/ctocpp/extension_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/extension_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=57e6d3169944358208705cf0bad4edfd8a6c3d16$ +// $hash=de6b935b77168bd9b44f26643c510f360f8b6ebd$ // #include "libcef_dll/ctocpp/extension_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/extension_ctocpp.h b/cef/libcef_dll/ctocpp/extension_ctocpp.h index 578f87f039..c41547e5c4 100644 --- a/cef/libcef_dll/ctocpp/extension_ctocpp.h +++ b/cef/libcef_dll/ctocpp/extension_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=faae935a841ecb55281ac5c8ff3621b2624c048f$ +// $hash=262f7398fd22effc7269c27ba5cb7e96ddea8b30$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc index e390a27473..b6826310cf 100644 --- a/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/extension_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5dee9e8035c63468d7749612f94abf592ca2c2d9$ +// $hash=befb9e9bd438e431bb55b7c67413d9d7a7b263f2$ // #include "libcef_dll/ctocpp/extension_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h b/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h index c825b14032..b8bd638ea6 100644 --- a/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/extension_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8f93565c27a717559fea6e381b2f8d70fbf9d601$ +// $hash=147ef76bff631531a075ac9a2c823d3e9f84c409$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_EXTENSION_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc index 822bc96057..3b90ba5a36 100644 --- a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=03ee4c71a45e6c010a1a5c16d42c8dc5b0e61658$ +// $hash=8fecb808fb6a84d630d1e8c5380a5ffd900b3654$ // #include "libcef_dll/ctocpp/file_dialog_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h index 1d66f25d53..028ee3de68 100644 --- a/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/file_dialog_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=333ff5ff1b7dacb0ef4aa1f025d97babd4c2f252$ +// $hash=155436adc4090718e65a2348fa60dbd393c6fe2e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_FILE_DIALOG_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc index 3a01df75da..a12e2e089c 100644 --- a/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/find_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=65c786d5d1090df5c1bf74d2fae323dc70fe05d3$ +// $hash=22af1e946668e89411cc87596b88c8a47880a78a$ // #include "libcef_dll/ctocpp/find_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/find_handler_ctocpp.h b/cef/libcef_dll/ctocpp/find_handler_ctocpp.h index 21d89a53fb..ce9cffbae8 100644 --- a/cef/libcef_dll/ctocpp/find_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/find_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=84888f5fdae1eb1f132f1fcbaae81f3b4f87353b$ +// $hash=d6ed1e4a341c9deecc217c49ecd52f444d18e236$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_FIND_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc index da04ab7996..42f46d1d12 100644 --- a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cbd8868643e361e9e9cd94bf2fadf91c2b7f4e47$ +// $hash=fe5dc43b11c24ea7a1e9a1c31846cd433a425a48$ // #include "libcef_dll/ctocpp/focus_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h index 0ef4ce5814..0c31eca72d 100644 --- a/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/focus_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1e99b84b9c7ed06898fe3db94c158f9a5db96ca9$ +// $hash=7a41bfc84063e89ae6a9a02ad4252b6145e06d48$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_FOCUS_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/frame_ctocpp.cc b/cef/libcef_dll/ctocpp/frame_ctocpp.cc index 4fd7242218..68afd7bd7b 100644 --- a/cef/libcef_dll/ctocpp/frame_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/frame_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=18dfd50f3a29afda039123f968d8d3c93763682b$ +// $hash=58457cf1e745964f12e1266265fbc1fc1b0ebcd4$ // #include "libcef_dll/ctocpp/frame_ctocpp.h" @@ -395,6 +395,24 @@ void CefFrameCToCpp::VisitDOM(CefRefPtr visitor) { _struct->visit_dom(_struct, CefDOMVisitorCppToC::Wrap(visitor)); } +NO_SANITIZE("cfi-icall") +void CefFrameCToCpp::LoadHeaderUrl(const CefString& url, + const CefString& additionalHttpHeaders) { + shutdown_checker::AssertNotShutdown(); + + cef_frame_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, load_header_url)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Unverified params: url, additionalHttpHeaders + + // Execute + _struct->load_header_url(_struct, url.GetStruct(), + additionalHttpHeaders.GetStruct()); +} + NO_SANITIZE("cfi-icall") CefRefPtr CefFrameCToCpp::CreateURLRequest( CefRefPtr request, diff --git a/cef/libcef_dll/ctocpp/frame_ctocpp.h b/cef/libcef_dll/ctocpp/frame_ctocpp.h index 5201b14a60..b9eaf9d149 100644 --- a/cef/libcef_dll/ctocpp/frame_ctocpp.h +++ b/cef/libcef_dll/ctocpp/frame_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=398e1f63c0456dac74d288e3dc7a7b23e488b78a$ +// $hash=adb1a1944137c612548a541cf350ea48c059c80d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_FRAME_CTOCPP_H_ @@ -64,6 +64,8 @@ class CefFrameCToCpp CefRefPtr GetBrowser() OVERRIDE; CefRefPtr GetV8Context() OVERRIDE; void VisitDOM(CefRefPtr visitor) OVERRIDE; + void LoadHeaderUrl(const CefString& url, + const CefString& additionalHttpHeaders) OVERRIDE; CefRefPtr CreateURLRequest( CefRefPtr request, CefRefPtr client) OVERRIDE; diff --git a/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc b/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc new file mode 100644 index 0000000000..8be91dcf1a --- /dev/null +++ b/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.cc @@ -0,0 +1,126 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=3997657ceba0e011684fe481bdcc221dacd24369$ +// + +#include "libcef_dll/ctocpp/geolocation_acess_ctocpp.h" +#include "libcef_dll/shutdown_checker.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") +bool CefGeolocationAcessCToCpp::ContainOrigin(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_acess_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, contain_origin)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return false; + + // Execute + int _retval = _struct->contain_origin(_struct, origin.GetStruct()); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +bool CefGeolocationAcessCToCpp::IsOriginAccessEnabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_acess_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, is_origin_access_enabled)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return false; + + // Execute + int _retval = _struct->is_origin_access_enabled(_struct, origin.GetStruct()); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +void CefGeolocationAcessCToCpp::Enabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_acess_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, enabled)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->enabled(_struct, origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefGeolocationAcessCToCpp::Disabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_acess_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, disabled)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->disabled(_struct, origin.GetStruct()); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefGeolocationAcessCToCpp::CefGeolocationAcessCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefGeolocationAcessCToCpp::~CefGeolocationAcessCToCpp() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +cef_geolocation_acess_t* CefCToCppRefCounted< + CefGeolocationAcessCToCpp, + CefGeolocationAcess, + cef_geolocation_acess_t>::UnwrapDerived(CefWrapperType type, + CefGeolocationAcess* c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCToCppRefCounted::kWrapperType = + WT_GEOLOCATION_ACESS; diff --git a/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h b/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h new file mode 100644 index 0000000000..b1d761f88e --- /dev/null +++ b/cef/libcef_dll/ctocpp/geolocation_acess_ctocpp.h @@ -0,0 +1,44 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=f2ca67e142bb0f055586312cd94ae6fffd11215b$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_ACESS_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_ACESS_CTOCPP_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed wrapper-side only. +class CefGeolocationAcessCToCpp + : public CefCToCppRefCounted { + public: + CefGeolocationAcessCToCpp(); + virtual ~CefGeolocationAcessCToCpp(); + + // CefGeolocationAcess methods. + bool ContainOrigin(const CefString& origin) OVERRIDE; + bool IsOriginAccessEnabled(const CefString& origin) OVERRIDE; + void Enabled(const CefString& origin) OVERRIDE; + void Disabled(const CefString& origin) OVERRIDE; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_ACESS_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.cc b/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.cc new file mode 100644 index 0000000000..7dd9b0ff06 --- /dev/null +++ b/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.cc @@ -0,0 +1,128 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=73842333eb5449db43ec1be9bc603b2c40509ed8$ +// + +#include "libcef_dll/ctocpp/geolocation_permissions_ctocpp.h" +#include "libcef_dll/shutdown_checker.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") +bool CefGeolocationPermissionsCToCpp::ContainOrigin(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_permissions_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, has_origin)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return false; + + // Execute + int _retval = _struct->has_origin(_struct, origin.GetStruct()); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +bool CefGeolocationPermissionsCToCpp::IsOriginAccessEnabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_permissions_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, is_origin_allowed)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return false; + + // Execute + int _retval = _struct->is_origin_allowed(_struct, origin.GetStruct()); + + // Return type: bool + return _retval ? true : false; +} + +NO_SANITIZE("cfi-icall") +void CefGeolocationPermissionsCToCpp::Enabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_permissions_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, allow)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->allow(_struct, origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefGeolocationPermissionsCToCpp::Disabled(const CefString& origin) { + shutdown_checker::AssertNotShutdown(); + + cef_geolocation_permissions_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, deny)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->deny(_struct, origin.GetStruct()); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefGeolocationPermissionsCToCpp::CefGeolocationPermissionsCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefGeolocationPermissionsCToCpp::~CefGeolocationPermissionsCToCpp() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +cef_geolocation_permissions_t* CefCToCppRefCounted< + CefGeolocationPermissionsCToCpp, + CefGeolocationAcess, + cef_geolocation_permissions_t>::UnwrapDerived(CefWrapperType type, + CefGeolocationAcess* + c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType + CefCToCppRefCounted::kWrapperType = + WT_GEOLOCATION_PERMISSIONS; diff --git a/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.h b/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.h new file mode 100644 index 0000000000..96d242166d --- /dev/null +++ b/cef/libcef_dll/ctocpp/geolocation_permissions_ctocpp.h @@ -0,0 +1,44 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=5f3afeee4027ff42444edd3ec1616f93ce318300$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_PERMISSIONS_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_PERMISSIONS_CTOCPP_H_ +#pragma once + +#if !defined(WRAPPING_CEF_SHARED) +#error This file can be included wrapper-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed wrapper-side only. +class CefGeolocationPermissionsCToCpp + : public CefCToCppRefCounted { + public: + CefGeolocationPermissionsCToCpp(); + virtual ~CefGeolocationPermissionsCToCpp(); + + // CefGeolocationAcess methods. + bool ContainOrigin(const CefString& origin) OVERRIDE; + bool IsOriginAccessEnabled(const CefString& origin) OVERRIDE; + void Enabled(const CefString& origin) OVERRIDE; + void Disabled(const CefString& origin) OVERRIDE; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_GEOLOCATION_PERMISSIONS_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc index 944cd1a97d..faee8d5127 100644 --- a/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=63092d32e63d924b5988159ff2bc522c9f260628$ +// $hash=2747a6d847a7abbc8adcde347308ff7826918884$ // #include "libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h b/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h index b95acef386..e77b25bcc5 100644 --- a/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/get_extension_resource_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1e4ced3624db151e599c0928a7a87211d5dd8d57$ +// $hash=44da630a6ed47bd22d00d86535bbd9b1bf4dafec$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_GET_EXTENSION_RESOURCE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/image_ctocpp.cc b/cef/libcef_dll/ctocpp/image_ctocpp.cc index a7f6fa8b1a..b766c79cd0 100644 --- a/cef/libcef_dll/ctocpp/image_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/image_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d15699feba25e9efccdef1fc4d5f66d214aa9169$ +// $hash=33aeaefa103664f5cead6898d2f957d8a9a97a92$ // #include "libcef_dll/ctocpp/image_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/image_ctocpp.h b/cef/libcef_dll/ctocpp/image_ctocpp.h index 699a1286ea..53e33373ba 100644 --- a/cef/libcef_dll/ctocpp/image_ctocpp.h +++ b/cef/libcef_dll/ctocpp/image_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=417397bf09d546377dfa4c067d5c569b0348abff$ +// $hash=1c7c9cf8d572383333b3938c8c54e7a8a1437bdd$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_IMAGE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc new file mode 100644 index 0000000000..7e7ca331e7 --- /dev/null +++ b/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.cc @@ -0,0 +1,65 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=d54225cb81f976412f5924f0342241e5e1c15604$ +// + +#include "libcef_dll/ctocpp/java_script_result_callback_ctocpp.h" +#include "libcef_dll/shutdown_checker.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") +void CefJavaScriptResultCallbackCToCpp::OnJavaScriptExeResult( + const CefString& result) { + shutdown_checker::AssertNotShutdown(); + + cef_java_script_result_callback_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_java_script_exe_result)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: result; type: string_byref_const + DCHECK(!result.empty()); + if (result.empty()) + return; + + // Execute + _struct->on_java_script_exe_result(_struct, result.GetStruct()); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefJavaScriptResultCallbackCToCpp::CefJavaScriptResultCallbackCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefJavaScriptResultCallbackCToCpp::~CefJavaScriptResultCallbackCToCpp() { + shutdown_checker::AssertNotShutdown(); +} + +template <> +cef_java_script_result_callback_t* +CefCToCppRefCounted:: + UnwrapDerived(CefWrapperType type, CefJavaScriptResultCallback* c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType + CefCToCppRefCounted::kWrapperType = + WT_JAVA_SCRIPT_RESULT_CALLBACK; diff --git a/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h b/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h new file mode 100644 index 0000000000..b09edef38a --- /dev/null +++ b/cef/libcef_dll/ctocpp/java_script_result_callback_ctocpp.h @@ -0,0 +1,43 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=2e761fc082e89fe46754e498234c96e873d519dc$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_JAVA_SCRIPT_RESULT_CALLBACK_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_JAVA_SCRIPT_RESULT_CALLBACK_CTOCPP_H_ +#pragma once + +#if !defined(BUILDING_CEF_SHARED) +#error This file can be included DLL-side only +#endif + +#include "include/capi/cef_browser_capi.h" +#include "include/capi/cef_client_capi.h" +#include "include/cef_browser.h" +#include "include/cef_client.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed DLL-side only. +class CefJavaScriptResultCallbackCToCpp + : public CefCToCppRefCounted { + public: + CefJavaScriptResultCallbackCToCpp(); + virtual ~CefJavaScriptResultCallbackCToCpp(); + + // CefJavaScriptResultCallback methods. + void OnJavaScriptExeResult(const CefString& result) override; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_JAVA_SCRIPT_RESULT_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc index dce51979e4..ad5341aba0 100644 --- a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7d7d71b2dfcf9b0ec721b2866bc6dd12c1738680$ +// $hash=8fa9cd400d5a9ecce87183cdbbee8673845b2228$ // #include "libcef_dll/ctocpp/jsdialog_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h index bcce53f1dc..87c8897c35 100644 --- a/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/jsdialog_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=036ba78ec1797ee75002a5562fd0b0b97dff7392$ +// $hash=8f7c82772ef53e16bb7ee2bd9eeb0b9c6753a9d0$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc index e6ed36dcc8..5293e9098d 100644 --- a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7fa5b6402a5933b42f28ae3d3e3af21bd7a14f12$ +// $hash=cf3f4ea060216018445b03ed1626f0698c01839b$ // #include "libcef_dll/ctocpp/jsdialog_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h index 907a65d638..24f690eafa 100644 --- a/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/jsdialog_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0982628dad4b4542003a6932c9bbca1b8bda438b$ +// $hash=d486b4a8044df978ea21be7c6a48841ea48d7ad7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_JSDIALOG_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc index 8d1d20f14e..c9c167cbcc 100644 --- a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8b801f58d72582082384b6f712aaebc96d9e2d53$ +// $hash=d5ba873aeb2b734e753d47420bbe10e290e8658d$ // #include "libcef_dll/ctocpp/keyboard_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h index b078dae840..48818cf815 100644 --- a/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/keyboard_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c8c04ba8d1a0cce53417bf5824189288e0c38840$ +// $hash=ab70636733b9287db1e87f11f8c73610afa35337$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_KEYBOARD_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc index 59c2378aca..7a94a3483c 100644 --- a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0540cd6df681993544511bbd5dd8c8a40e0f8b9e$ +// $hash=374e065650a2c8fb36590542723d8e171f5de9ad$ // #include "libcef_dll/ctocpp/life_span_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h index b014708d3b..da2893672d 100644 --- a/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/life_span_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7d7057b99a886fda1aefd86fe66591dc7f9f84f3$ +// $hash=0061dae2023d2285c9f3e3d2bd9bfa4603208535$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_LIFE_SPAN_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/list_value_ctocpp.cc b/cef/libcef_dll/ctocpp/list_value_ctocpp.cc index 72d0193dd2..9194d1da62 100644 --- a/cef/libcef_dll/ctocpp/list_value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/list_value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=76b9241cf4cdceea6408f9404ccef0690e83e26f$ +// $hash=93f45c1e39dc2ba72a6cb44bc3d762f3870f2ef2$ // #include "libcef_dll/ctocpp/list_value_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/list_value_ctocpp.h b/cef/libcef_dll/ctocpp/list_value_ctocpp.h index e2d0e4fbe2..747a53dcf5 100644 --- a/cef/libcef_dll/ctocpp/list_value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/list_value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=643127d0c9772dbab1980c797ceef47a12f00f48$ +// $hash=12ac5ebafd2e805008d3ed0f0b4ea562029d8ea3$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_LIST_VALUE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc index d81edc48e0..ea239aadf4 100644 --- a/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/load_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,12 +9,14 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=28e44ecfd603542d959a55d20af2ed8991b3e06d$ +// $hash=a815207886f2b474bff70f4f988a4407bcb3d42a$ // #include "libcef_dll/ctocpp/load_handler_ctocpp.h" #include "libcef_dll/cpptoc/browser_cpptoc.h" #include "libcef_dll/cpptoc/frame_cpptoc.h" +#include "libcef_dll/cpptoc/request_cpptoc.h" +#include "libcef_dll/cpptoc/response_cpptoc.h" #include "libcef_dll/shutdown_checker.h" // VIRTUAL METHODS - Body may be edited by hand. @@ -128,6 +130,63 @@ void CefLoadHandlerCToCpp::OnLoadError(CefRefPtr browser, errorText.GetStruct(), failedUrl.GetStruct()); } +NO_SANITIZE("cfi-icall") +void CefLoadHandlerCToCpp::OnLoadErrorWithRequest(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + int error_code, + const CefString& error_text) { + shutdown_checker::AssertNotShutdown(); + + cef_load_handler_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_load_error_with_request)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: request; type: refptr_diff + DCHECK(request.get()); + if (!request.get()) + return; + // Verify param: error_text; type: string_byref_const + DCHECK(!error_text.empty()); + if (error_text.empty()) + return; + + // Execute + _struct->on_load_error_with_request(_struct, CefRequestCppToC::Wrap(request), + is_main_frame, has_user_gesture, + error_code, error_text.GetStruct()); +} + +NO_SANITIZE("cfi-icall") +void CefLoadHandlerCToCpp::OnHttpError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr response) { + shutdown_checker::AssertNotShutdown(); + + cef_load_handler_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_http_error)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: request; type: refptr_diff + DCHECK(request.get()); + if (!request.get()) + return; + // Verify param: response; type: refptr_diff + DCHECK(response.get()); + if (!response.get()) + return; + + // Execute + _struct->on_http_error(_struct, CefRequestCppToC::Wrap(request), + is_main_frame, has_user_gesture, + CefResponseCppToC::Wrap(response)); +} + // CONSTRUCTOR - Do not edit by hand. CefLoadHandlerCToCpp::CefLoadHandlerCToCpp() {} diff --git a/cef/libcef_dll/ctocpp/load_handler_ctocpp.h b/cef/libcef_dll/ctocpp/load_handler_ctocpp.h index 4bebc8723c..0ef91fc464 100644 --- a/cef/libcef_dll/ctocpp/load_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/load_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1f37820ecbaa80912b6d5659cc3d165a524eba4f$ +// $hash=dcaaaa3afd30e1e4be34e0d22cedacddc71e41d0$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ @@ -49,6 +49,15 @@ class CefLoadHandlerCToCpp : public CefCToCppRefCounted request, + bool is_main_frame, + bool has_user_gesture, + int error_code, + const CefString& error_text) override; + void OnHttpError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr response) override; }; #endif // CEF_LIBCEF_DLL_CTOCPP_LOAD_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_observer_ctocpp.cc b/cef/libcef_dll/ctocpp/media_observer_ctocpp.cc index d3bff26989..46d7c96f54 100644 --- a/cef/libcef_dll/ctocpp/media_observer_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_observer_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0b4d805c7313e553fe3b0f47905810172d666df7$ +// $hash=53afe2dd1a5d413790a04a6d622bf0175302da00$ // #include "libcef_dll/ctocpp/media_observer_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_observer_ctocpp.h b/cef/libcef_dll/ctocpp/media_observer_ctocpp.h index ef40b9226c..5e95fc5d76 100644 --- a/cef/libcef_dll/ctocpp/media_observer_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_observer_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=39f0cc0430368e97f71cf2096b5e76e70a2445e5$ +// $hash=2ad630d884be7968333098308a5bb25c608a037e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_OBSERVER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc index d5b844129f..a2db7997ff 100644 --- a/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ef5393916b6e3a97556d6d1e8c7b799a12f53f7b$ +// $hash=7766e19198313fadc94a2f99f5869a33b0c3069c$ // #include "libcef_dll/ctocpp/media_route_create_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.h b/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.h index 78c837c757..5174c0260a 100644 --- a/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_route_create_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a8a6fac342156f3c8a2b6b0c9e6ecbcfed456334$ +// $hash=567434633bea7215a9cce6591342116152136320$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_ROUTE_CREATE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_route_ctocpp.cc b/cef/libcef_dll/ctocpp/media_route_ctocpp.cc index ccde1e2c3a..570931251d 100644 --- a/cef/libcef_dll/ctocpp/media_route_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_route_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1491fa52e0a88044e5902809fcc6e56da42f3216$ +// $hash=3df118413888e04f3e10121c80e68014de545462$ // #include "libcef_dll/ctocpp/media_route_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_route_ctocpp.h b/cef/libcef_dll/ctocpp/media_route_ctocpp.h index 036d7fb9de..c0d26ceb7d 100644 --- a/cef/libcef_dll/ctocpp/media_route_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_route_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2332af38a85b938ce097ee671f957fa20622004e$ +// $hash=7c90b25cbcf30d260f705680de21e3a114af7642$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_ROUTE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_router_ctocpp.cc b/cef/libcef_dll/ctocpp/media_router_ctocpp.cc index 51e76b58fb..fe3aa2fb72 100644 --- a/cef/libcef_dll/ctocpp/media_router_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_router_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8e7b2e3e8124ede620b8a04116656550949f89f1$ +// $hash=33a691883b3956a4e2fa2937ab8dc42dc80d78c8$ // #include "libcef_dll/ctocpp/media_router_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_router_ctocpp.h b/cef/libcef_dll/ctocpp/media_router_ctocpp.h index c10562496b..ba12ab31a2 100644 --- a/cef/libcef_dll/ctocpp/media_router_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_router_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f17d39aa48d464eddc04143796492dd36563f773$ +// $hash=65b2a9af763c644cc0444314ef63b0c98c7e1c98$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_ROUTER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_sink_ctocpp.cc b/cef/libcef_dll/ctocpp/media_sink_ctocpp.cc index e5d4fa9811..afd0dd2924 100644 --- a/cef/libcef_dll/ctocpp/media_sink_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_sink_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=50a71dcdcaa9669a6ac927e5e555266fcadb6be3$ +// $hash=01d0b01e291c90ceba7c416ff9dd56c10eb46f3b$ // #include "libcef_dll/ctocpp/media_sink_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_sink_ctocpp.h b/cef/libcef_dll/ctocpp/media_sink_ctocpp.h index 909adabc67..2779315282 100644 --- a/cef/libcef_dll/ctocpp/media_sink_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_sink_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cd0189f46038a0f941bfd592127ce29866257b40$ +// $hash=1e9ba43e9c736e58e0ec49687408d7e44253f42a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc index 05f621e8d4..00a6de90ec 100644 --- a/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f04f1f70369822fc963af542e03e95db02d3c0de$ +// $hash=9664002969db52fb75ab4f02ecd72aa7c4473115$ // #include "libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h b/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h index 631d2ffab2..89104bccbb 100644 --- a/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fadb149e3874c78219a545fa3c373515e9ef8a0d$ +// $hash=7d9031bd579a9d4b9ee12b54d44ab0eb4aad62c3$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_DEVICE_INFO_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/media_source_ctocpp.cc b/cef/libcef_dll/ctocpp/media_source_ctocpp.cc index c499eea012..75896db6f2 100644 --- a/cef/libcef_dll/ctocpp/media_source_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/media_source_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=10b01c1ea00ea8a7ef4b1a26b6e227a93755d7e8$ +// $hash=aa6efd61a1ebf39506a9cb655dd1c07168dc3d33$ // #include "libcef_dll/ctocpp/media_source_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/media_source_ctocpp.h b/cef/libcef_dll/ctocpp/media_source_ctocpp.h index ee708064a4..05f0fd35e5 100644 --- a/cef/libcef_dll/ctocpp/media_source_ctocpp.h +++ b/cef/libcef_dll/ctocpp/media_source_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0f4a7c8d49d309dfcd2bbb739d0497c9e805678b$ +// $hash=33a042c9ae8867e363396723f3600554feee84da$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SOURCE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc b/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc index e098b87104..7bf4664867 100644 --- a/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/menu_model_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3d73717837ad42de475cc883fbc0243072bd3a26$ +// $hash=16bf2696e26746eddb06f7c6003eec81d3fc1c23$ // #include "libcef_dll/ctocpp/menu_model_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/menu_model_ctocpp.h b/cef/libcef_dll/ctocpp/menu_model_ctocpp.h index 8544560047..34a47d0d49 100644 --- a/cef/libcef_dll/ctocpp/menu_model_ctocpp.h +++ b/cef/libcef_dll/ctocpp/menu_model_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=46e412e9d4ce0d6af2b3c065e731b73e93d885d4$ +// $hash=7f9101216683ca800cfde376ddc3c8500d86d728$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc index dafc7bd499..407692062f 100644 --- a/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=90fe1e689682edacce57a4c24a1eeb08ff4afd7a$ +// $hash=09421982fe76735de86b67b1f7d8828a1cc36f6e$ // #include "libcef_dll/ctocpp/menu_model_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h index 1755872b1b..6fc6c44150 100644 --- a/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/menu_model_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=845390c0396c10c059a57f28bef6c8a3c2b684ae$ +// $hash=0dcaca76119b9db970c61a30ba90d841f2fb7186$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc b/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc index 1507666ebb..47cbe987d0 100644 --- a/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b522ba519ba41df6dd21c70ec49c385d3561d849$ +// $hash=824aed5040e7aee5f9bf2079eafdf6d612b7d2d0$ // #include "libcef_dll/ctocpp/navigation_entry_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h b/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h index 41d937da58..52e0b8c32a 100644 --- a/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h +++ b/cef/libcef_dll/ctocpp/navigation_entry_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=990d05c70f40b68b043cac0ad1e13f7004864bbe$ +// $hash=7592055d6e74a862e5b0661966637527e2fd90d2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc index 891380dbfe..e9f156b0bd 100644 --- a/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bf2e34ba5f2073b0f4662fff0fb14d9f27b0bc50$ +// $hash=057910c31bf56f3bb5def469638942802300c7d8$ // #include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h index 39352267e3..f619bfc41d 100644 --- a/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e559882064e6791f9f755fa9958871e568ab9a92$ +// $hash=478d39c2ee5c0e2dcd0e0923d47b20bc05e8a3b7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_NAVIGATION_ENTRY_VISITOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc index 046a804fc4..74720e7fdc 100644 --- a/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2bc8707239e1177eb19ae4a16c0ebd0ce4516b93$ +// $hash=970ecf239bb133f5c62c372762e00ba913e492a2$ // #include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h b/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h index fe3da7d7fa..ba235369d5 100644 --- a/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/pdf_print_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c17abbf5797081fea86172c9e40165a9aeac7efc$ +// $hash=6ec768e5cc0ef58766105bee24c3841367995a1e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PDF_PRINT_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc b/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc new file mode 100644 index 0000000000..1b5876d571 --- /dev/null +++ b/cef/libcef_dll/ctocpp/permission_request_ctocpp.cc @@ -0,0 +1,108 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=12f03dbc264ba05a28f5dc8273117ca6c6c74b8b$ +// + +#include "libcef_dll/ctocpp/permission_request_ctocpp.h" +#include "libcef_dll/cpptoc/access_request_cpptoc.h" + +// VIRTUAL METHODS - Body may be edited by hand. + +NO_SANITIZE("cfi-icall") +void CefPermissionRequestCToCpp::OnGeolocationShow(const CefString& origin) { + cef_permission_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_geolocation_show)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: origin; type: string_byref_const + DCHECK(!origin.empty()); + if (origin.empty()) + return; + + // Execute + _struct->on_geolocation_show(_struct, origin.GetStruct()); +} + +NO_SANITIZE("cfi-icall") void CefPermissionRequestCToCpp::OnGeolocationHide() { + cef_permission_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_geolocation_hide)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + _struct->on_geolocation_hide(_struct); +} + +NO_SANITIZE("cfi-icall") +void CefPermissionRequestCToCpp::OnPermissionRequest( + CefRefPtr request) { + cef_permission_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_permission_request)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: request; type: refptr_diff + DCHECK(request.get()); + if (!request.get()) + return; + + // Execute + _struct->on_permission_request(_struct, + CefAccessRequestCppToC::Wrap(request)); +} + +NO_SANITIZE("cfi-icall") +void CefPermissionRequestCToCpp::OnPermissionRequestCanceled( + CefRefPtr request) { + cef_permission_request_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_permission_request_canceled)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: request; type: refptr_diff + DCHECK(request.get()); + if (!request.get()) + return; + + // Execute + _struct->on_permission_request_canceled( + _struct, CefAccessRequestCppToC::Wrap(request)); +} + +// CONSTRUCTOR - Do not edit by hand. + +CefPermissionRequestCToCpp::CefPermissionRequestCToCpp() {} + +// DESTRUCTOR - Do not edit by hand. + +CefPermissionRequestCToCpp::~CefPermissionRequestCToCpp() {} + +template <> +cef_permission_request_t* CefCToCppRefCounted< + CefPermissionRequestCToCpp, + CefPermissionRequest, + cef_permission_request_t>::UnwrapDerived(CefWrapperType type, + CefPermissionRequest* c) { + NOTREACHED() << "Unexpected class type: " << type; + return nullptr; +} + +template <> +CefWrapperType CefCToCppRefCounted::kWrapperType = + WT_PERMISSION_REQUEST; diff --git a/cef/libcef_dll/ctocpp/permission_request_ctocpp.h b/cef/libcef_dll/ctocpp/permission_request_ctocpp.h new file mode 100644 index 0000000000..2ed4bcebca --- /dev/null +++ b/cef/libcef_dll/ctocpp/permission_request_ctocpp.h @@ -0,0 +1,45 @@ +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// +// $hash=d3dcf1dc594597e78adcd93c64e185a6223992d1$ +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_PERMISSION_REQUEST_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_PERMISSION_REQUEST_CTOCPP_H_ +#pragma once + +#if !defined(BUILDING_CEF_SHARED) +#error This file can be included DLL-side only +#endif + +#include "include/capi/cef_permission_request_capi.h" +#include "include/cef_permission_request.h" +#include "libcef_dll/ctocpp/ctocpp_ref_counted.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed DLL-side only. +class CefPermissionRequestCToCpp + : public CefCToCppRefCounted { + public: + CefPermissionRequestCToCpp(); + virtual ~CefPermissionRequestCToCpp(); + + // CefPermissionRequest methods. + void OnGeolocationShow(const CefString& origin) override; + void OnGeolocationHide() override; + void OnPermissionRequest(CefRefPtr request) override; + void OnPermissionRequestCanceled( + CefRefPtr request) override; +}; + +#endif // CEF_LIBCEF_DLL_CTOCPP_PERMISSION_REQUEST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/post_data_ctocpp.cc b/cef/libcef_dll/ctocpp/post_data_ctocpp.cc index 28cbdf8e2b..123d5c364a 100644 --- a/cef/libcef_dll/ctocpp/post_data_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/post_data_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=68732af95710438f0d2af338dd2b24d51c52f6b1$ +// $hash=7a24d4020666f0277e76e190926df2081637a174$ // #include "libcef_dll/ctocpp/post_data_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/post_data_ctocpp.h b/cef/libcef_dll/ctocpp/post_data_ctocpp.h index 8d7f1ae3ab..fbc141ceca 100644 --- a/cef/libcef_dll/ctocpp/post_data_ctocpp.h +++ b/cef/libcef_dll/ctocpp/post_data_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4f27c0931e83f3f5b140eaeeffaf976dd751b1d2$ +// $hash=12c1c14c4041b778fbcff69cd57ee3a41124b776$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc index afc9d30e20..ac01ab2ad7 100644 --- a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b2fbcfc48bc4b1969c28e8f10a998a003bacca77$ +// $hash=027842b89846614ba6d0e3056db65004bc3a6b06$ // #include "libcef_dll/ctocpp/post_data_element_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h index 21d2ff8863..85c1a46c26 100644 --- a/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h +++ b/cef/libcef_dll/ctocpp/post_data_element_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6ba7cc0530f7160b93a18d692512755b3fcb633b$ +// $hash=9e1e390bfc2af0256f422ca204af60a53ce84292$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_POST_DATA_ELEMENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc index c6ac75fecf..27c6e0b331 100644 --- a/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=33b3e45502d0b48d2cc14aaa83373d12c3e0f1dc$ +// $hash=2e3cda6569368540518b84119205e1e5f6e0d36b$ // #include "libcef_dll/ctocpp/print_dialog_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h index 20f3b63403..1777757d11 100644 --- a/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/print_dialog_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=991c4e5902ba3fc4de818d4d124dccb10dfb5d52$ +// $hash=27350ac036c20ac24186e9250816873f9e4c0e35$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_DIALOG_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc index 8f2025964d..b5f02d80bf 100644 --- a/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/print_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5c1f65c2b1b111d248d5b7b27ddcb59b06594923$ +// $hash=f81708853d5cb6ee2fb397f401787068b722b060$ // #include "libcef_dll/ctocpp/print_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/print_handler_ctocpp.h b/cef/libcef_dll/ctocpp/print_handler_ctocpp.h index 204d9e5044..e82154e3e7 100644 --- a/cef/libcef_dll/ctocpp/print_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/print_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5592945a1621a79ccff78a053a98e68bf08d9a8b$ +// $hash=861bf98595a13f8c42a23b5742471332c066b57a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc index a8768c7355..072666c9d1 100644 --- a/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5be7390f9203b4e881de1fcb69f835f19818a2f3$ +// $hash=c952b7985eb56fd18e552e4905a5563380277bac$ // #include "libcef_dll/ctocpp/print_job_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h b/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h index c219017800..fe03116440 100644 --- a/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/print_job_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0c54d50effa8f690b879fd6ba0cdc1b3221c1cf5$ +// $hash=991490679f135c2cbda7e0f22dba88e162440ed2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_JOB_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc b/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc index 0706a56459..04880402b9 100644 --- a/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/print_settings_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=81d4ac9fdd16de0622995a85cc463ca4b118139f$ +// $hash=70eeeda85eb67d546066854051f2f921fadcca18$ // #include "libcef_dll/ctocpp/print_settings_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/print_settings_ctocpp.h b/cef/libcef_dll/ctocpp/print_settings_ctocpp.h index 81f152aa8c..b4d4b53ae4 100644 --- a/cef/libcef_dll/ctocpp/print_settings_ctocpp.h +++ b/cef/libcef_dll/ctocpp/print_settings_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9e906ae27be45f6d7996a566cf6d43060dd87069$ +// $hash=66dddeb455e83f4a56d68eaea4d402267729c47a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PRINT_SETTINGS_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/process_message_ctocpp.cc b/cef/libcef_dll/ctocpp/process_message_ctocpp.cc index c7652aa6e1..afa319731a 100644 --- a/cef/libcef_dll/ctocpp/process_message_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/process_message_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4c4e96f11773cedab61cd03417534348d4d69711$ +// $hash=7ab779c6c98a1bd2385f14d514304a28ef58717f$ // #include "libcef_dll/ctocpp/process_message_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/process_message_ctocpp.h b/cef/libcef_dll/ctocpp/process_message_ctocpp.h index b0d50061c9..e06f471cf7 100644 --- a/cef/libcef_dll/ctocpp/process_message_ctocpp.h +++ b/cef/libcef_dll/ctocpp/process_message_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c6de5a60b4d438f164b9915b9adc1e1c319c0f53$ +// $hash=046196d936aa82e7581a7387b2f6dd27e9f3a90e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_PROCESS_MESSAGE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc index 188b913a24..858a1cc301 100644 --- a/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/read_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cae87f4fd617852ca5e45aea6fea51bc85317b67$ +// $hash=0332caff5ce6230d2cb2d7663fc0bbfac8e45069$ // #include "libcef_dll/ctocpp/read_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/read_handler_ctocpp.h b/cef/libcef_dll/ctocpp/read_handler_ctocpp.h index fa874fb180..a1b88e03fb 100644 --- a/cef/libcef_dll/ctocpp/read_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/read_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4f3dd3394b3ae65c936602bd537e105ea1b030fc$ +// $hash=f3d43ae771f8e17084fd9397fd4e2bef9471ea73$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_READ_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc index 694ae365e4..10b68c07ef 100644 --- a/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cf53fb30f47eeda9354fa60731d554ea757a47ac$ +// $hash=40583eaf5b031c6f6d149e4b78f731c40fc84d18$ // #include "libcef_dll/ctocpp/register_cdm_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.h b/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.h index 9775e9ec40..6289167d79 100644 --- a/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/register_cdm_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=202e9ab7dd5d4dc53daa2f716e0dd74c623ecd8c$ +// $hash=19283660196a59102c9acf03565a932026f6062b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REGISTER_CDM_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/registration_ctocpp.cc b/cef/libcef_dll/ctocpp/registration_ctocpp.cc index ea1bf2ba4a..fad182ef7b 100644 --- a/cef/libcef_dll/ctocpp/registration_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/registration_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7f10b2c40262aaaf1b2943a28e468e87667d57b5$ +// $hash=36f275457b15025ac7b979eca3179cd127f45ffb$ // #include "libcef_dll/ctocpp/registration_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/registration_ctocpp.h b/cef/libcef_dll/ctocpp/registration_ctocpp.h index 1fff4da7ad..00c48e0213 100644 --- a/cef/libcef_dll/ctocpp/registration_ctocpp.h +++ b/cef/libcef_dll/ctocpp/registration_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bd5157a829fab277a56e86b8f70deb7eae16fb38$ +// $hash=84ca9a25ae345642994cc1b44cd71f90e7406f19$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REGISTRATION_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc index 5bda63ac50..2840c8e455 100644 --- a/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/render_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9eb4dcf3fdacae57758ab29d6dc457e6d9ea92a9$ +// $hash=c49c659f1eb3f77224ec5a1bb68b2c1b1cd0d955$ // #include "libcef_dll/ctocpp/render_handler_ctocpp.h" @@ -341,6 +341,28 @@ void CefRenderHandlerCToCpp::OnScrollOffsetChanged( y); } +NO_SANITIZE("cfi-icall") +void CefRenderHandlerCToCpp::OnRootLayerChanged(CefRefPtr browser, + int height, + int width) { + shutdown_checker::AssertNotShutdown(); + + cef_render_handler_t* _struct = GetStruct(); + if (CEF_MEMBER_MISSING(_struct, on_root_layer_changed)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: browser; type: refptr_diff + DCHECK(browser.get()); + if (!browser.get()) + return; + + // Execute + _struct->on_root_layer_changed(_struct, CefBrowserCppToC::Wrap(browser), + height, width); +} + NO_SANITIZE("cfi-icall") void CefRenderHandlerCToCpp::OnImeCompositionRangeChanged( CefRefPtr browser, diff --git a/cef/libcef_dll/ctocpp/render_handler_ctocpp.h b/cef/libcef_dll/ctocpp/render_handler_ctocpp.h index 3f32296ec8..dfeed9cc6e 100644 --- a/cef/libcef_dll/ctocpp/render_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/render_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=250d5b59061799513e4aeaab46ca728082127806$ +// $hash=be7d8da1b315dfa07566846d90b95848fae0f83b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_HANDLER_CTOCPP_H_ @@ -67,6 +67,9 @@ class CefRenderHandlerCToCpp void OnScrollOffsetChanged(CefRefPtr browser, double x, double y) override; + void OnRootLayerChanged(CefRefPtr browser, + int height, + int width) override; void OnImeCompositionRangeChanged(CefRefPtr browser, const CefRange& selected_range, const RectList& character_bounds) override; diff --git a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc index 4d4e1f4d52..e7143908f2 100644 --- a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4cc516704229f90c49852b46f932b8882b4bf8d4$ +// $hash=ff8f6b33244916e65041e46461e5f1129c2c242d$ // #include "libcef_dll/ctocpp/render_process_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h index c5d808a3e3..b587be7aa2 100644 --- a/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b6af4ad8b6507e539170e35b6c6e16c58c921eb9$ +// $hash=c87a2a5637615d6b7994f80cef17651c73cdb8e2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RENDER_PROCESS_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/request_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/request_callback_ctocpp.cc index 3e552308dd..7f912043aa 100644 --- a/cef/libcef_dll/ctocpp/request_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/request_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9fb040d47f4b6627904cc50518d0293bfe11d25d$ +// $hash=e562ec21e0cd256643af02c7794dcba9a8447918$ // #include "libcef_dll/ctocpp/request_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/request_callback_ctocpp.h b/cef/libcef_dll/ctocpp/request_callback_ctocpp.h index 7666530356..4a7a987c89 100644 --- a/cef/libcef_dll/ctocpp/request_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/request_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1ede257dfc48418e456f733bff7a062e8b841efe$ +// $hash=21b9b01cafe388bfca99042b72b70a16f8704bca$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/request_context_ctocpp.cc b/cef/libcef_dll/ctocpp/request_context_ctocpp.cc index d358aed81e..c1297f2a05 100644 --- a/cef/libcef_dll/ctocpp/request_context_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/request_context_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=67bc021917c8f7d1e386859bbfae6e007b292f45$ +// $hash=856dc903108cc2e295f4ddc67f820d36a1896472$ // #include "libcef_dll/ctocpp/request_context_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/request_context_ctocpp.h b/cef/libcef_dll/ctocpp/request_context_ctocpp.h index 314110af2f..a8abb88cef 100644 --- a/cef/libcef_dll/ctocpp/request_context_ctocpp.h +++ b/cef/libcef_dll/ctocpp/request_context_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0aff81f2ccc5881001e9fd61cc6e349253fb2ac5$ +// $hash=e0837e0c338f59260e5c52a490edfbbb82490e01$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc index 3e744f2582..28953ad9f3 100644 --- a/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e857bba04c337c16c2ea4ebce2e99c00d10280e1$ +// $hash=7d59490393a71bacad28096ecf95211d1f3c3303$ // #include "libcef_dll/ctocpp/request_context_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h b/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h index b4d5b92bc1..76b73e91d0 100644 --- a/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/request_context_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=448e862b43cb41f8f01519501733ef9bbe0d1607$ +// $hash=7e6ec1e205a0f3b516d8c503bdaa10f5e7bcc274$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/request_ctocpp.cc b/cef/libcef_dll/ctocpp/request_ctocpp.cc index 3be0627c98..5626e4c25d 100644 --- a/cef/libcef_dll/ctocpp/request_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/request_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=82d97339b034e8ba484ecca0ed92d6b0c13f21b3$ +// $hash=b1dd4486a797ac139f453e02e3a49c74b7568ca8$ // #include "libcef_dll/ctocpp/request_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/request_ctocpp.h b/cef/libcef_dll/ctocpp/request_ctocpp.h index a53848cb43..dd2b599ea5 100644 --- a/cef/libcef_dll/ctocpp/request_ctocpp.h +++ b/cef/libcef_dll/ctocpp/request_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=77fee821efba296de9f9c01aa42f77596fb381d1$ +// $hash=c4b9e409b8ebcd1d460b66913e81742ab7c92782$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc index a6d88fc4dd..aaa756b980 100644 --- a/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/request_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cac9a84a4ddb5aa01e9c6fc97f5c4bcb4f4c368f$ +// $hash=5df945d13e76eb21611ae848d99505eaae5e7602$ // #include "libcef_dll/ctocpp/request_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/request_handler_ctocpp.h b/cef/libcef_dll/ctocpp/request_handler_ctocpp.h index ef74cbc8bc..32b5dac844 100644 --- a/cef/libcef_dll/ctocpp/request_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/request_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=771c124f112f02314f57b5f9bd475afe6cef3242$ +// $hash=dff7280d248bbc08733c6765a3ddfe5ae3978348$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc index d0f1c0099e..d348c199a6 100644 --- a/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=80b9eb74012b88e0d43fc4d4996130aac8fc0511$ +// $hash=c71d6fd8b0ee493102fdae90612f15b01e4a9f6b$ // #include "libcef_dll/ctocpp/resolve_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h b/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h index c94c9a4ab5..b1f00880bc 100644 --- a/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resolve_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1f07689db3a9b68d0fb50aef636486885aef6ea0$ +// $hash=493826dcfb1c8e1b46489225a74332552d591d63$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOLVE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc index 6a5fc7cd37..66bc65cc31 100644 --- a/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=01882602db6e3a075edeceecec82063f1e3a4d8f$ +// $hash=a62aa669321b0f86ea3508ce31ea5b1a0bc3f9b5$ // #include "libcef_dll/ctocpp/resource_bundle_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h b/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h index 072ad85949..2687e1046e 100644 --- a/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_bundle_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=00c386274cefb6ae461544f93cea6df7d2a6f367$ +// $hash=245ec814ff08ef80a2c11830e0d4493150544ede$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc index e5ba02f3c8..722f909420 100644 --- a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=202d1371e39e1211d2db18afcc0610a341725b2b$ +// $hash=12556834893a7ae50b8f8bef2b71915fa1a141ca$ // #include "libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h index c689054e22..354a15e078 100644 --- a/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_bundle_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bb6805610f1eb4d2bf1931dbf910b4603786ef4f$ +// $hash=ba179fe7fc169637ab6f1727351a81952c82826d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_BUNDLE_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc index aae931436c..4396a57db1 100644 --- a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3167c77e6d2a2fc436fd3691b2f6681bccba3fd1$ +// $hash=16d3a6bd2555917b295d7dbb3ccd95ccfc35b111$ // #include "libcef_dll/ctocpp/resource_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h index e90d7d6c59..ae74e58fd3 100644 --- a/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bd1bde0a4122e06dfccc7cf8ad47448ed6276a35$ +// $hash=2b60744909728ffbff2e846438bf122a61fec5c7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc index f0c94d8cd1..1e9523ef77 100644 --- a/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cbb99c39dde3ebfe149fa2051c63c813f86f3926$ +// $hash=c251aa59688ffe5c12d2ec3c8a4a896d016e86a0$ // #include "libcef_dll/ctocpp/resource_read_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h b/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h index f1115e7747..3a38441651 100644 --- a/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_read_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1678dd45fdeac3cf3f0674138791fa2eb51f08e2$ +// $hash=5225eea48911cd7a7df5f6b6d2ddc1c445d7e460$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_READ_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc index 8937d0c9a9..096427d9db 100644 --- a/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a53f4f53f8063044f5c82870f2cef1ef89a91d83$ +// $hash=451a51625d4a8e229e9f29dba9148314d126cfb0$ // #include "libcef_dll/ctocpp/resource_request_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h b/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h index 4f7636eb2e..4fa41c22a6 100644 --- a/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_request_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0168c1a4e9321014b8a0a9434ea85f89de100cc7$ +// $hash=f5d801ab34b0a86b9c19ce0bcaeb97a965785705$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_REQUEST_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc index 6321981860..cdafb7bea0 100644 --- a/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b2d1fb3d20a88e971781e3fea9034b579b73b33e$ +// $hash=df7b14a723e4f2b9dd7946fddfbe8dc9652ccb75$ // #include "libcef_dll/ctocpp/resource_skip_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h b/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h index 0e90c6fa0a..b9a274f045 100644 --- a/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/resource_skip_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e5f6f5e49687972c21461aa8055a17aa73d9f5dc$ +// $hash=6f3f45c5e29c0d6b3b3bf59e0dad240c6850aad4$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESOURCE_SKIP_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/response_ctocpp.cc b/cef/libcef_dll/ctocpp/response_ctocpp.cc index 0d127812bc..e34c60e857 100644 --- a/cef/libcef_dll/ctocpp/response_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/response_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=095a5d712639de515ace623f92b3098b029936c8$ +// $hash=ac30aa16fee147cd041b64db7f2743d578dc6384$ // #include "libcef_dll/ctocpp/response_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/response_ctocpp.h b/cef/libcef_dll/ctocpp/response_ctocpp.h index a1b1a5dcb5..4d89fbcf51 100644 --- a/cef/libcef_dll/ctocpp/response_ctocpp.h +++ b/cef/libcef_dll/ctocpp/response_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=82ca98c4f8fbbac643f826f882ae4e4efe80e821$ +// $hash=39a5419239b8bb9345d71ad873cab02adc682f71$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc b/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc index 0d46d8814b..90d82249ae 100644 --- a/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/response_filter_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3f3fa1f1cb167a65ad7e968b5b3c62354e83e32$ +// $hash=ddb4710d1e5bc73df68f132d56661b0d22520ad9$ // #include "libcef_dll/ctocpp/response_filter_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/response_filter_ctocpp.h b/cef/libcef_dll/ctocpp/response_filter_ctocpp.h index 5e94723ec1..a1f7a5eff4 100644 --- a/cef/libcef_dll/ctocpp/response_filter_ctocpp.h +++ b/cef/libcef_dll/ctocpp/response_filter_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e8747c2fe177d25d623680bd6144e179a50df203$ +// $hash=3e7c6b0f991e335db755172d65e2a03e5e00a270$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RESPONSE_FILTER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc index 664e8d1c71..dede7b1aab 100644 --- a/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=63a8d238ef8d6d46bc4950db235b5960d2eb42a2$ +// $hash=f77743d285768c21bd89b9955d47176ef52f1e1a$ // #include "libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h b/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h index e9c82b7ad6..58ed604c56 100644 --- a/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/run_context_menu_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=15e8c2e8426ce3f7ea6662aa7dc1a51bf541a3d2$ +// $hash=837fb72b6eccf8e7048e1ba8017846b261a4c3b2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_CONTEXT_MENU_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc index ce41c989aa..fb42b0d4cf 100644 --- a/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dd5b08b33086b2ef0c9899029228c615bd75555d$ +// $hash=cb29585261ed25ddd2ee1b4b5c890565e72e5d22$ // #include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h b/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h index 5af79fbfed..2b4fc7dde8 100644 --- a/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cf11a44cbafd136e5c36633b393bc2f49685cb10$ +// $hash=63d2d1da715395296899acc4ed165cf7dae4d78c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_RUN_FILE_DIALOG_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc index c2219f471b..9be13e699b 100644 --- a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a81d84e127dfa02a8093d6144b934b1528e63792$ +// $hash=5e94a999784332a91c40a4608644bf7dc36e0729$ // #include "libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h index 1783069491..8e1d45052d 100644 --- a/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h +++ b/cef/libcef_dll/ctocpp/scheme_handler_factory_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2e8b90402803dda047746a07de047eeb28836386$ +// $hash=ff0cb366799a5abce0f4e43bd98fcaf993fad77d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_HANDLER_FACTORY_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc index 10c474483d..c86d129734 100644 --- a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7e35edcef126b362aef8f288a1bdbb516ac2d9b3$ +// $hash=3f55a43485f2833e5000e7444d57ef47ff7af0e9$ // #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h index d5109a7085..b2d1d7bed6 100644 --- a/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h +++ b/cef/libcef_dll/ctocpp/scheme_registrar_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ca1012f1234d42169d2f513c39f05866cdc24f02$ +// $hash=1155632639cae3bcc3923fd590c5712359c4908e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SCHEME_REGISTRAR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc index 8c8f234926..6d2ac0ee92 100644 --- a/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0f367fb3849adf120197cf9dc38f91ea1d050abd$ +// $hash=97852992a8406868d2b0dedf08a538a78b1cde9c$ // #include "libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h b/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h index bf055d8cb8..d3d36a9fcb 100644 --- a/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/select_client_certificate_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=868c4d33bd4776ca5f2044d2707f2a78f16bd074$ +// $hash=d18f32f1cb6917a6f6e83be4321e36aad309ea8b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SELECT_CLIENT_CERTIFICATE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/server_ctocpp.cc b/cef/libcef_dll/ctocpp/server_ctocpp.cc index 1891681396..51fe2ead4b 100644 --- a/cef/libcef_dll/ctocpp/server_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/server_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=080b8ca695bf378c062506977ebe001297effdb5$ +// $hash=d8cfb6cafc2a9aa0cffe4a998071e8a96b04740b$ // #include "libcef_dll/ctocpp/server_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/server_ctocpp.h b/cef/libcef_dll/ctocpp/server_ctocpp.h index 1f92857cb7..113dc4b5ff 100644 --- a/cef/libcef_dll/ctocpp/server_ctocpp.h +++ b/cef/libcef_dll/ctocpp/server_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0e1ecc65bf21127a32292fe7e84378bacbf649ed$ +// $hash=0669fa6732d15e3079341843673c17f4578c3747$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SERVER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc index 217882a5f3..b82fd8f5b1 100644 --- a/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/server_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ee34f4005745102926018e7c4bdeef7fcb16ca32$ +// $hash=a14c40cc86f5fd61d548d981c99c59a559619eda$ // #include "libcef_dll/ctocpp/server_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/server_handler_ctocpp.h b/cef/libcef_dll/ctocpp/server_handler_ctocpp.h index 227847b544..08df48f950 100644 --- a/cef/libcef_dll/ctocpp/server_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/server_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=20281fa6c712f4f712e6371dfed2e184227ff89c$ +// $hash=b9b38b204c2b9d385ebefb11aa0b45efcd684cbc$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SERVER_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc index 53c2486cd9..63048eec4b 100644 --- a/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4dc50d118e2ee97dff3eadbb8474743c873b1b7f$ +// $hash=5767c600167159c0ad3f5d10461f1bf107c668cc$ // #include "libcef_dll/ctocpp/set_cookie_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h b/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h index 69d695f626..f4ca2b5612 100644 --- a/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/set_cookie_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8c3441fdc78f2f566903a7c2dbb8660954e677cc$ +// $hash=83c8143e3d126fca9a02f8e5ffa75bf99d291518$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SET_COOKIE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc b/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc index a173d2d0f2..81512b8b69 100644 --- a/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/sslinfo_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ce4a97355d799789b70c90757138b5c639da55a8$ +// $hash=67037943cdfae2a56924694d302a4b5697dc9a22$ // #include "libcef_dll/ctocpp/sslinfo_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h b/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h index f3326b17fb..a0bc9e7f5b 100644 --- a/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h +++ b/cef/libcef_dll/ctocpp/sslinfo_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ce3dfac0c94806a0e33ba0783482c3c3f2dada1c$ +// $hash=2ed723f95adb888bd72792ea622f466d27eff641$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SSLINFO_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc b/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc index cf40a1c9b9..b0392d95c4 100644 --- a/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/sslstatus_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=037e9e9e94f032a78fa6b2f870b1959b3c41a854$ +// $hash=18492d14d83b0dfd272ddd9dd95a2fc292bf8904$ // #include "libcef_dll/ctocpp/sslstatus_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h b/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h index 246fb8c0f1..66a1b4e238 100644 --- a/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h +++ b/cef/libcef_dll/ctocpp/sslstatus_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a3876890dd91d430af51c1f0ce639e8449453bc3$ +// $hash=36e17cab076ba840f97b3c90045548b2d47c0c3a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_SSLSTATUS_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc index 92a009d4a8..522ebdea88 100644 --- a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8f50e68fb34d73fef8f33ce31423ac74bbd4841b$ +// $hash=964179bd73f8b5fa8d8adbd955deb7e720caaca7$ // #include "libcef_dll/ctocpp/stream_reader_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h index cb25318df3..8aa36e1e84 100644 --- a/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h +++ b/cef/libcef_dll/ctocpp/stream_reader_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9e52f14c3559e2cc88c422105b9cea12a5be65b9$ +// $hash=9797745dea00aea7c768c2ed96c6c05af8053d20$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_READER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc index f43660df52..d11649c31b 100644 --- a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f79416c520b2744118ca54319dc1ce0d57ca10b8$ +// $hash=e32b4745b887e33f589cb04e8b46a7317686e4c2$ // #include "libcef_dll/ctocpp/stream_writer_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h index 7ef7648650..40eee3aaf9 100644 --- a/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h +++ b/cef/libcef_dll/ctocpp/stream_writer_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=35633443453d19b5089b4bfa493b42f1497064f6$ +// $hash=7aca7e4794048577217de35c3a8eab52ab4ab9b7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_STREAM_WRITER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc index 55279345da..c1ece7b76f 100644 --- a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f9a94b45084ce5da324706dcc36605d478e200b3$ +// $hash=97c52e0e29be9e4452825fb57d4014221c537baa$ // #include "libcef_dll/ctocpp/string_visitor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h index bf57acd90c..c107e783ea 100644 --- a/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/string_visitor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f9e763cd2d5babce18e4584c315ee279bb2ed7c5$ +// $hash=470dd514d2a3091216588819ee28296424649b57$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_STRING_VISITOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/task_ctocpp.cc b/cef/libcef_dll/ctocpp/task_ctocpp.cc index 1909003d20..d621f77995 100644 --- a/cef/libcef_dll/ctocpp/task_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/task_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9e0bf935d4cb59b78ea08501b990ba401a3bc4fd$ +// $hash=b99582b454aa33c5e9b2fa3f891ed0754621c377$ // #include "libcef_dll/ctocpp/task_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/task_ctocpp.h b/cef/libcef_dll/ctocpp/task_ctocpp.h index 58d24bafb2..0fdb427d2e 100644 --- a/cef/libcef_dll/ctocpp/task_ctocpp.h +++ b/cef/libcef_dll/ctocpp/task_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=cdf9967908bbc36202fab5804cf12566f3743527$ +// $hash=ec78aa696165cd02a3b7f19e877b89d58518d5ad$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc b/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc index 449335bd2f..89bf91e95c 100644 --- a/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/task_runner_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f103c70132477cac5ba83a5a5a33d73d94fb84c0$ +// $hash=c4e54b985b45c9cf57f70a3c560fb1d6c5230f9a$ // #include "libcef_dll/ctocpp/task_runner_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/task_runner_ctocpp.h b/cef/libcef_dll/ctocpp/task_runner_ctocpp.h index d5e031e973..02fd8ed932 100644 --- a/cef/libcef_dll/ctocpp/task_runner_ctocpp.h +++ b/cef/libcef_dll/ctocpp/task_runner_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2f61617ce59c2fe7ac1ad6f9944646ca712931cf$ +// $hash=ed29a7e48a3c44c14ad26a22fe2dbd595a253724$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc index af3527075f..2c354cd6ee 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ff27c226ced0b2651b858eadea688d164dfa777e$ +// $hash=43f755239342406e0300dc9508b0c52a8a6fe8e8$ // #include "libcef_dll/ctocpp/test/translator_test_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h index 9a2ff9e3fe..01596482ff 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=db05a06c80f30f0d25b2eec12b50bbf0310e36fb$ +// $hash=b58ddca240db2fb0fc1bdedf70c64b7b21f30e69$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc index 2d89e7ac7b..89c9f27dba 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=a92a6f312228d01293ecb6197e7105d8f1c9fc19$ +// $hash=6aacf410858db1defe08179c985f4466fca2751f$ // #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h index 62bc2be0af..944ad33402 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=451ca857138ff1d4540a0626549f9ecb0b391e59$ +// $hash=f3c4158147b008b8fff038ff6f731419a9950c4d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc index 0720373300..014e615300 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3e4c3d73f50654bf23ff5e23ec18102818f60f00$ +// $hash=ca187683ddab3822fcf3d957c76ed27db6e8e433$ // #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h index ab2970c1da..0c06f5828d 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_client_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c4901e13820abd27a4ac5e9a67a9a94f08ca8a11$ +// $hash=2e2a98039972801804b3b4d7b1d1220406489ad3$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_CLIENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc index a4f56c3051..8713b04d02 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=86fc8175e83449b99699a879e1b2a9279058704f$ +// $hash=5e599a9605e47372695d89a86eab37827e5971f2$ // #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h index 3599497403..b404a984d3 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6a66e2e38975072adf919a3b585ce94b254a7639$ +// $hash=6879832c76fd2d8c82259db714adac84c71d8913$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc index a4b1f2f7c3..de345e9eed 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b5974d668995480f482832f5e64c212b82c715d1$ +// $hash=8559b9fd1e73bb91333d687174f5730e67f1f0f2$ // #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h index 4e44691bc8..36cf35a8f8 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0d111f8f1933fc569fa28128a85c269fb6b0e173$ +// $hash=0fad7ec9b17e6ccd0af8f32290745438e1c11b91$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc index 0f681f8f2d..52a05afcb8 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3885a1c1f273b7a7558fbd3128636b9cfa23b791$ +// $hash=f320ce71f5396e28767dfdb2292c87a8c2396cf8$ // #include "libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h index 28d51db42a..847b296fc4 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_ref_ptr_library_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=abede61a749b1cbb1f546918c32601cb707a6ed7$ +// $hash=7e04728098bdaabddebe04874ee5b90acc87109b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_REF_PTR_LIBRARY_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc index 650cbf185c..2d9a98250d 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1750bdef7a5b01b56a7c7bd34aeb22994434f436$ +// $hash=fa5ba1bf14400032e49a447b7fe9dbe9cf1ba397$ // #include "libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h index 6bb32d555c..7476a3f9cf 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=572919914dd3e3c22d62a34c203ca73831cdb732$ +// $hash=4ab24d3002067939ef0106a8686ca59559b2270e$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc index c32a2f90aa..431593d8bb 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bfa7d52202c1d09dfa86e05df4f60f3b9264e19c$ +// $hash=47bbdadfb28bf00824856270be679932f99df645$ // #include "libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h index 1f384e914a..8ca713b78e 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_client_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d5b70ad6c7c25b3edfefd8f058d814943ed386d0$ +// $hash=d0a9d6ca17834c09fbd63e06ebb38c337dc64f62$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_CLIENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc index cd5e9f8308..491addae2c 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ede3c78c823b9db15c86b9e25dd666a516237541$ +// $hash=2663f92f7373738d13ee8d194684e6f818afa950$ // #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h index a8215a9fe4..ef6f048ff8 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3cbadd1fe76cfdd2cdc69bf74ef5cecded4678a0$ +// $hash=f79248bfdf3bf130b2bef7e2f7d682cfb01bf315$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc index aed7fc4549..4e2761c3e7 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3218861c702d3419a97a3a49b87898e1afc3d55e$ +// $hash=8d662be456cc9fb61fba3adfe7661079c7207444$ // #include "libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h index 52cd06e156..239ea596ab 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_child_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f7643df00ccbcefbbca15979c07763502de4af2e$ +// $hash=6acbb967fdae293649ef3f86fd44bb51a6bdacf1$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CHILD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc index 324b1d51cc..981a595cd1 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=93bec9c1c78c75b71ca887b790977d027f197a79$ +// $hash=a064c6cc20c7399979309f9bdd471272bb37747a$ // #include "libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h index 2cbf56e9c2..f650acdbf8 100644 --- a/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h +++ b/cef/libcef_dll/ctocpp/test/translator_test_scoped_library_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=32beea0e95a0acdbf22d552970d719382785554a$ +// $hash=0935d3f5ae7629fb1c05b3fee01992af3148c15b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_TEST_TRANSLATOR_TEST_SCOPED_LIBRARY_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/thread_ctocpp.cc b/cef/libcef_dll/ctocpp/thread_ctocpp.cc index 2cdfa05c20..9409fb6c2d 100644 --- a/cef/libcef_dll/ctocpp/thread_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/thread_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e5d301643a4d2a5e6af8566f30d76ecf798ddee9$ +// $hash=207fe292d5fec167e20971c9948d0b183e6b3b20$ // #include "libcef_dll/ctocpp/thread_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/thread_ctocpp.h b/cef/libcef_dll/ctocpp/thread_ctocpp.h index ce8f0ceb19..9176d2325f 100644 --- a/cef/libcef_dll/ctocpp/thread_ctocpp.h +++ b/cef/libcef_dll/ctocpp/thread_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=67c710cc8e62052d841bcadb7aacc1ccddb4b54f$ +// $hash=a6e88ef581ddca2825ad28105dd77f31b71c50c9$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_THREAD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc index e112598ed2..8e6bf46caf 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=741dc4b7ad30068a5334f7aad44018dbaa4e1c29$ +// $hash=54962c13fcad1a38aaad37a7dae6744090ebee97$ // #include "libcef_dll/ctocpp/urlrequest_client_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h index 9b5ba975e7..7cef3061cc 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h +++ b/cef/libcef_dll/ctocpp/urlrequest_client_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3d73c0e6186268e2b01fdea08c6b0568a7e83531$ +// $hash=31b2f537bea0b8088a861224b42c313ee87927d6$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CLIENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc index 7144ad1b6a..6acd4a9cd2 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=38e348c618868d4a2d018f8d6dbb4bae36e98c6e$ +// $hash=d3d0a83754df9a39d8f951ea488dd5417d20e9b2$ // #include "libcef_dll/ctocpp/urlrequest_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h index 80ac486213..2e88c99c41 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h +++ b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7751e600cb13017cbdfac3eae39dc7c94d2afec9$ +// $hash=b35cb83be82518c5b1a9d95e3062a9748bfa1c62$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_URLREQUEST_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc index 52f291f93b..8b6fd3bd71 100644 --- a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e2d3ed0d58c0888c784526deaf4d36bb04765939$ +// $hash=c2815712e9960e6850bb646ba0009fe42e8a2624$ // #include "libcef_dll/ctocpp/v8accessor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h index 7bcd78745f..6b552a781e 100644 --- a/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8accessor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3cdc33e16cb7a55d0b249a9a7a0bd90563ce264$ +// $hash=0c7b83fe013c87d35cf3c944e53ec7afef0ac11a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8ACCESSOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc index dc3b820ea6..aa062aa4a6 100644 --- a/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fe202cc53e5a33730f30d401042e712da0f67aaa$ +// $hash=04697e01edeb16ce60053867fa2b11d03dec3427$ // #include "libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h b/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h index 7ed88cf727..b1d10766a0 100644 --- a/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8array_buffer_release_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1711598fdde49e880b5f7cb99da4517f1d3c8f09$ +// $hash=e494919a69c37ed2aa5dcd0f8ddfcbbdafba2ebb$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8ARRAY_BUFFER_RELEASE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc b/cef/libcef_dll/ctocpp/v8context_ctocpp.cc index e0dae6b3cd..d6f4bdc054 100644 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8context_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f35a129486c5242f3f2063b529b8c2cf97a6faed$ +// $hash=8d8c4cf20f877a5eb60b47fb55d938940bb10c82$ // #include "libcef_dll/ctocpp/v8context_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.h b/cef/libcef_dll/ctocpp/v8context_ctocpp.h index 08857be37c..36cd939b66 100644 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8context_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=033d22b4a0516a84c2b319ee46a033af7a8009b2$ +// $hash=fa43162137ab92deca52489511794e1c9cd28d0c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8CONTEXT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc b/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc index 78410437b8..374d81edc7 100644 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6a0c3e4e5cb161ed124b5688ce3719d44588d1b0$ +// $hash=49589f2e4ad8e5598df9411f613dd717fe6a3852$ // #include "libcef_dll/ctocpp/v8exception_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h b/cef/libcef_dll/ctocpp/v8exception_ctocpp.h index 2aefb41483..199ffda98e 100644 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8exception_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b6fc50fa3a6e0156743a5c3fce97b1a683e1720a$ +// $hash=e4e96d04ed604a7628db640e7e4cd9f219aabf03$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8EXCEPTION_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc b/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc index c97d632f61..47bc30d371 100644 --- a/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b3e0e604cd187d5b73c1bf378734214457d68311$ +// $hash=365e5e2b4e3ced4e615fa504a0cb68c66854fc37$ // #include "libcef_dll/ctocpp/v8handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8handler_ctocpp.h b/cef/libcef_dll/ctocpp/v8handler_ctocpp.h index 6d3fd3a013..f4acf3ec35 100644 --- a/cef/libcef_dll/ctocpp/v8handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bc6a214c0c54093b9a8b83a5a44b192307e4b10c$ +// $hash=0207510d301deece41373f5693eaed1a8fd185b8$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc b/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc index ecb1443638..32b52b1f71 100644 --- a/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f80e0608bce92dbff7e3b6377a727f4fc71ab8b2$ +// $hash=d466cd3a17a35074eedcb222b9acd2063c297fe2$ // #include "libcef_dll/ctocpp/v8interceptor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h b/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h index a92c3b7722..f7e646274c 100644 --- a/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8interceptor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ec3b8546155193e09dbfad36b935d5866357c20f$ +// $hash=301ccb6fb65513bc2e6197c7fa1712c5e33f2bcf$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8INTERCEPTOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc index 5b17553442..009efe1a08 100644 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=26bac2fc65cf78053cd85f665bcd4c034fe85b07$ +// $hash=5dad5940fbf85e63683112a937d47dbe52f1b64a$ // #include "libcef_dll/ctocpp/v8stack_frame_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h index ae18bfa2f9..2837420d07 100644 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d8338dcb3a42fe51b2be32870283801bf5c3367b$ +// $hash=23ccdae0421547bb56eaf433ea7c607a6bef578f$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_FRAME_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc index 0953a2dc18..d51002ad6b 100644 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8c7d2704a26a5e4a3a2916c8f338d1da55dc1159$ +// $hash=bf78c133604e1535633ac8c93ca153bcefe2718d$ // #include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h index 81bf42a988..e56d4b6bcd 100644 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=293e9949e304f81acfd28e41be9b43000feb2bca$ +// $hash=9cbeedd31def9f1e0f2e423c575ba2cef5f05400$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8STACK_TRACE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc b/cef/libcef_dll/ctocpp/v8value_ctocpp.cc index 2ccdee0fb0..6b716896ea 100644 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bca752bef24a557dc0e7a958ed2fe434fc0950d4$ +// $hash=7863f5701d466f8d5a5c91962e14b14b500315a3$ // #include "libcef_dll/ctocpp/v8value_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.h b/cef/libcef_dll/ctocpp/v8value_ctocpp.h index ddb675fbf0..5cc7bdcc3a 100644 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=910a0180e7ea517327b439aec32d6e4cede15e80$ +// $hash=685b550819fe0cdb03e24bf989828b2e7cce4485$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/value_ctocpp.cc b/cef/libcef_dll/ctocpp/value_ctocpp.cc index 053b27a8f9..192c9cfc2e 100644 --- a/cef/libcef_dll/ctocpp/value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=01641d605a4274ff4fd6697618469f34ccc77a7a$ +// $hash=9f75af2c3d5e4411027b6f26bcc0d31728baed34$ // #include "libcef_dll/ctocpp/value_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/value_ctocpp.h b/cef/libcef_dll/ctocpp/value_ctocpp.h index d737f67859..a424b506f9 100644 --- a/cef/libcef_dll/ctocpp/value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5ade4141053ca1aa2f8c97eb4b93ab02af2aaf33$ +// $hash=56d61ad314449577492010f6609feaa6ec14099d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VALUE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc b/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc index 31fa15a29b..b8787d66c0 100644 --- a/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=bf44ff25f91ee40b3e8167f6936afa9498780cc7$ +// $hash=40ce0ebcedcd5995a5a3147049e5b34c016b8519$ // #include "libcef_dll/ctocpp/views/box_layout_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h b/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h index 939190a71f..7462bfc1ec 100644 --- a/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/box_layout_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=50dddd7ad5a249b2c8cfe95d766c3294c359b288$ +// $hash=566d0c9b929476e71cf8c658ed5b26b203796ca2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BOX_LAYOUT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc b/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc index d2420a9f72..fbf0878b9b 100644 --- a/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=912a0807db8bc1405188d61961545cc8e540aacf$ +// $hash=c6708708ced4b89e1448ed8371d7cb2a7bc480f4$ // #include "libcef_dll/ctocpp/views/browser_view_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h b/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h index af2222ccc2..372a997462 100644 --- a/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/browser_view_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f17d395c61d650a824016d14bc06d0cb9db9a6e6$ +// $hash=0e351243369daff89716c9debc5135e6827a6726$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc index 40f6734d3f..17bcb1cdef 100644 --- a/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9aed01b6014f1c22815e7847eba321d75dbfa45d$ +// $hash=a94b101b94086af801cf7ac8eff13354ba96550b$ // #include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h" @@ -75,12 +75,11 @@ void CefBrowserViewDelegateCToCpp::OnBrowserDestroyed( } NO_SANITIZE("cfi-icall") -CefRefPtr -CefBrowserViewDelegateCToCpp::GetDelegateForPopupBrowserView( - CefRefPtr browser_view, - const CefBrowserSettings& settings, - CefRefPtr client, - bool is_devtools) { +CefRefPtr CefBrowserViewDelegateCToCpp:: + GetDelegateForPopupBrowserView(CefRefPtr browser_view, + const CefBrowserSettings& settings, + CefRefPtr client, + bool is_devtools) { shutdown_checker::AssertNotShutdown(); cef_browser_view_delegate_t* _struct = GetStruct(); @@ -141,7 +140,7 @@ bool CefBrowserViewDelegateCToCpp::OnPopupBrowserViewCreated( NO_SANITIZE("cfi-icall") CefBrowserViewDelegate::ChromeToolbarType -CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { + CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { shutdown_checker::AssertNotShutdown(); cef_browser_view_delegate_t* _struct = GetStruct(); @@ -158,8 +157,8 @@ CefBrowserViewDelegateCToCpp::GetChromeToolbarType() { } NO_SANITIZE("cfi-icall") -CefSize CefBrowserViewDelegateCToCpp::GetPreferredSize( - CefRefPtr view) { +CefSize + CefBrowserViewDelegateCToCpp::GetPreferredSize(CefRefPtr view) { shutdown_checker::AssertNotShutdown(); cef_view_delegate_t* _struct = diff --git a/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h index 371638af5e..63e3be2426 100644 --- a/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=20b067cabc4baa4c9edecaffb38a2ebb28524ccc$ +// $hash=da85fe3e18272f65134c7586cf94fd41784f9bae$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BROWSER_VIEW_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/button_ctocpp.cc b/cef/libcef_dll/ctocpp/views/button_ctocpp.cc index 043f41fad8..c0bad28fb8 100644 --- a/cef/libcef_dll/ctocpp/views/button_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/button_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b359b8f9e2c70946ed9831869100e82774a5ea2d$ +// $hash=af9995eb4c92687eac363aa4722bb0214ab1588e$ // #include "libcef_dll/ctocpp/views/button_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/button_ctocpp.h b/cef/libcef_dll/ctocpp/views/button_ctocpp.h index af803bb16b..68a5c42eed 100644 --- a/cef/libcef_dll/ctocpp/views/button_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/button_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=2741cab25f5633f178ba1f924abe58e418f1f084$ +// $hash=bab8d54de14f05a413e8fc65aa21793d19ad122b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc index 8f71a16123..2481e1e364 100644 --- a/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fc962d2832eeb3dee99e9a201f234d4a4b4d6f0f$ +// $hash=759bdf6e675ddd3a2f0eb622356232346ce02162$ // #include "libcef_dll/ctocpp/views/button_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h index cffab417e2..97f34a6399 100644 --- a/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/button_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6a72a71a9becd6103d44719ed88b000d576d95eb$ +// $hash=376915b5bf2da4101167af17eb8c3ca3ad8db1f7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/display_ctocpp.cc b/cef/libcef_dll/ctocpp/views/display_ctocpp.cc index 59562010ed..9a6477c2e2 100644 --- a/cef/libcef_dll/ctocpp/views/display_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/display_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=410bbb9dbc1b836136b420ffa4d821326159fe7e$ +// $hash=ba41b36a0cdd335f2a964665576aaf50d8be9c55$ // #include "libcef_dll/ctocpp/views/display_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/display_ctocpp.h b/cef/libcef_dll/ctocpp/views/display_ctocpp.h index bb5dfe4375..00050d1e3d 100644 --- a/cef/libcef_dll/ctocpp/views/display_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/display_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5f9d1b14172e8cbd5071f836319840c439b0c74f$ +// $hash=79f3a320fac5905198d42a3b53df37eced5a4c0a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_DISPLAY_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc b/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc index cf83576fb8..b8de0a3a70 100644 --- a/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=196a1684038f46e2067c6faadfd58667f6bdf498$ +// $hash=dafea3abdc32cc7dd8552bbdf5bd2bb32e816c5f$ // #include "libcef_dll/ctocpp/views/fill_layout_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h b/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h index 7a0b50e25d..c7815e2367 100644 --- a/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/fill_layout_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=333a603b19a7093fcb7303382626a9542172da24$ +// $hash=edcc9287e560452dd4dde022b9c166455e959d2f$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_FILL_LAYOUT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc b/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc index 0667587714..32475abf83 100644 --- a/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/label_button_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7e8ef08cc7510dc0ca0b580ae4d8031cb7acc268$ +// $hash=b88aef8ea10f897dc9d8a409b8083693b4c1a4ee$ // #include "libcef_dll/ctocpp/views/label_button_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h b/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h index e7b32f62ea..9afb0cee6f 100644 --- a/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/label_button_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=303a2dc851723c3bf14c8dc8d58168d75d7f173a$ +// $hash=10cbee6b8780c34ac47db87d3fec9286ae7547c9$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LABEL_BUTTON_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc b/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc index b1d7a75107..f336044420 100644 --- a/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/layout_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b23ba6d5b25baf2cfe38578368fbec5ea2769907$ +// $hash=6607a4c252dafd39ba695b5d4ecfb14286d70672$ // #include "libcef_dll/ctocpp/views/layout_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/layout_ctocpp.h b/cef/libcef_dll/ctocpp/views/layout_ctocpp.h index 02d4d52623..7e956dd33d 100644 --- a/cef/libcef_dll/ctocpp/views/layout_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/layout_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4f7c396f1ffa7895fcf12595e623f6466f396b2a$ +// $hash=bca67132316cf340babc0457a7728bfbbad55dc2$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_LAYOUT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc b/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc index 308d8447b8..ef76ecef7d 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8f766b8f5a014054dcc79f504d34d0df27f75f9d$ +// $hash=aad03d06e87ab5901e44bdb5589232bfef133537$ // #include "libcef_dll/ctocpp/views/menu_button_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h b/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h index c25b5d7de6..664a4e3364 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/menu_button_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b8208488ed5afed11401a1e2dd647af06a8fe25a$ +// $hash=f3adf1e33126dc8df0cb2087e6da4d87569ae1b8$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc index 89d2e9c61c..9bfe838600 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9ecd07954f90dc14ddf36072285c942f2ee8082f$ +// $hash=ba83047a0e8f5cbc30c5438b9d1344c84dda638d$ // #include "libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h index cfdf7c1695..f8627086c2 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/menu_button_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7836ec7b53349057b1d1d75c6ba8506620bed53d$ +// $hash=7470b3c7a3986cd3cbbbbb484d88fac00fe32a22$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc b/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc index ab26a6c8e7..3d9127cafb 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=81e02ced6b0354b18971801f02dee14243699b79$ +// $hash=684914b489c5d322b41d61d46f5d387675da2c30$ // #include "libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h b/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h index f9df5eb4ab..fed9e9be2f 100644 --- a/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/menu_button_pressed_lock_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b9629230d3cd22c16cb3c6125cb20d31d5308bda$ +// $hash=ea81c8b651b803c0d78b06a850c409da3e632b44$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_PRESSED_LOCK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc b/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc index 3aa7739a0e..a8d1877508 100644 --- a/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/panel_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3e77ca44ea8a99a3fc8c335cca58b4cbc790e9cb$ +// $hash=f5c2df20f4b31533822ac3f5b4f2bc623b4cef98$ // #include "libcef_dll/ctocpp/views/panel_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/panel_ctocpp.h b/cef/libcef_dll/ctocpp/views/panel_ctocpp.h index 242849532f..ebc311563f 100644 --- a/cef/libcef_dll/ctocpp/views/panel_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/panel_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=190c731496daef9548f00ed5306c89dac367f035$ +// $hash=983c98e6a56fec46770cde83d5c9b500c32569bf$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc index 0553e58966..e3b9e9608f 100644 --- a/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4bffffc0fe09523839a08109aef1e3de90f6e25c$ +// $hash=d22d1a4b06badcf9dde2731dceb782a4a26754ca$ // #include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h index 5830b5eddd..898cbca060 100644 --- a/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/panel_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d508126f22cba29931a4d53aecbdaaca7dd39b9d$ +// $hash=97314a7d775123710e30d5cb577522d82668afab$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc b/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc index 0a459c6ace..c55fcb36d9 100644 --- a/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8c2b3c821c18076ce40392ea339c177c66d53cc2$ +// $hash=93f714e0318bf826518c32b46bcad1ef228a6d66$ // #include "libcef_dll/ctocpp/views/scroll_view_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h b/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h index 939ae3aac5..8fa0406dea 100644 --- a/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/scroll_view_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=0a09eb1829f89d4f677c43909e0d4e1727ba1758$ +// $hash=2fd0fb3cec5a7211fb2121a644ebccc36e4fb06d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_SCROLL_VIEW_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc b/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc index 30b3c3049e..5f0d3af247 100644 --- a/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/textfield_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=132a40648e492f00f21d6762ff63d4491e8060c3$ +// $hash=75f0e7ca7793781032c055104e275f39a13bddb9$ // #include "libcef_dll/ctocpp/views/textfield_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h b/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h index 0beb9c123c..d68c0992cc 100644 --- a/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/textfield_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f57b9f72a806aecacaa984faf584fdf7c1c99301$ +// $hash=e07b698a905f01b008c99e0e7a7a0f7f1fcceed7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc index d2d841a3d6..8956ce249a 100644 --- a/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8582eda62f90bab166d04bb6a2f8783a98fabe15$ +// $hash=04d04a0da9c1afb8e475b32941a0be5f5c6ff846$ // #include "libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h index dd2af45863..dc4ae92cbd 100644 --- a/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/textfield_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3a83b906a29ba302874b73804e457680d2b7251e$ +// $hash=304355beb3188c856d75fb9b51a4ca69f1cb815d$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/view_ctocpp.cc b/cef/libcef_dll/ctocpp/views/view_ctocpp.cc index 631c02cf30..f130aa0fda 100644 --- a/cef/libcef_dll/ctocpp/views/view_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/view_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d791f23eeaa056cdc478743acd452c1d60a4fd00$ +// $hash=34ee98e682e61eafd7cfdd22ff2419ab399b15f4$ // #include "libcef_dll/ctocpp/views/view_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/view_ctocpp.h b/cef/libcef_dll/ctocpp/views/view_ctocpp.h index fb48b96b0f..0f877ce392 100644 --- a/cef/libcef_dll/ctocpp/views/view_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/view_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=841ccd4760ce1b41c48476df1575b1ac61661a23$ +// $hash=a3e0a96f62afa3dc0a61a25e71c41209efa658a7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc index a0351ab67c..023de30f86 100644 --- a/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=7a6d2ca91509c2e6c510d5c9585a74c2fe10499b$ +// $hash=b6cc59e6fa1ba6b871f152f75c7f5875a7068172$ // #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h index c1465a6ff9..8fad2af4d3 100644 --- a/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/view_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f049a053042a00be15899439f324a376ee309dbb$ +// $hash=fce672472de411169f81476a6ce779bc9f31846c$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_VIEW_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/window_ctocpp.cc b/cef/libcef_dll/ctocpp/views/window_ctocpp.cc index 6905ef7695..c05d7bbede 100644 --- a/cef/libcef_dll/ctocpp/views/window_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/window_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6480777364c6c194652bf69ef2bb087c0805eddf$ +// $hash=4df98951ff8475f4b02a4b9efad8bd82ac9b5ea8$ // #include "libcef_dll/ctocpp/views/window_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/window_ctocpp.h b/cef/libcef_dll/ctocpp/views/window_ctocpp.h index e680f68c74..ca6e2f4554 100644 --- a/cef/libcef_dll/ctocpp/views/window_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/window_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=6aa7373f97dc08f125b239bd6018bc9ad2c52c3c$ +// $hash=d0176d98368bf239b93d2c65932b6f4fce62802a$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc b/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc index 6e724157ed..115b56e488 100644 --- a/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=dda345b957ac58c71770da1cf4813ce16ea568b8$ +// $hash=c0a17efae4f7dc02fa35f774999b290c4f70d96c$ // #include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h b/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h index 5790e9a73d..4b84fd4326 100644 --- a/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/views/window_delegate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4e5e470d6aa929b3b2d4286eb4bcdc90dba052dc$ +// $hash=3478d6b39e5fee0d77086b34b717b47ff267e2e7$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_WINDOW_DELEGATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc b/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc index 5febe1d854..175fe0601c 100644 --- a/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/waitable_event_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d1714ee1ee61285942fd381b92cb197503320efb$ +// $hash=4d16f6afcc06cee186ba3aa5752dc5933e6b57f4$ // #include "libcef_dll/ctocpp/waitable_event_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h b/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h index c0016d530b..66b5b645e6 100644 --- a/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h +++ b/cef/libcef_dll/ctocpp/waitable_event_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f5669491fd2475dc9755a6e624a737312711d2d3$ +// $hash=8dc1c2feaee54c36914be2bbcdcfd4a7c9a42107$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_WAITABLE_EVENT_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc index e1779cc86e..6638dba62e 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1ba28481accff89ed45808c7bf4ea45f58ad4bfb$ +// $hash=9d4817b23d989f8ebda6d7be594bca00fe84c3a6$ // #include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h index 64a055165c..849b2e87a1 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h +++ b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=012c4dec0875476356fe25c479539a4481a550c3$ +// $hash=7d528ce85760411eb45e53ed2c33ae9012c5ca19$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc index 92d937bce3..50615c2372 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=5327077faa6f56201e5e4b1334f505899341e06f$ +// $hash=387ecb28b55d3ece3eb4fcf0e119918fd5e36fd7$ // #include "libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h index 9004cfa6cd..b2dbc50fa4 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h +++ b/cef/libcef_dll/ctocpp/web_plugin_info_visitor_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=1c1a81686fed72638be69dd0bef2ae468ae0700c$ +// $hash=eb32b50c8f9ec072541fe4effffd00159f99ad0b$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_INFO_VISITOR_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc index 29640902b9..eafe8956d6 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=71e7051f64bfaf814c4d16874c3b49204d2c6bce$ +// $hash=feef390ffa570224c4ff5ef11ecce9cb87b32f65$ // #include "libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h index f5848ff1f7..004acc20eb 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/web_plugin_unstable_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=245c0ca666ccbc844a44c9c4ad8676b82656ee93$ +// $hash=b3c9d90a4db5994aa5283611044dceffc5ef2baa$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_WEB_PLUGIN_UNSTABLE_CALLBACK_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc b/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc index 2916b45f4c..4efb2d1a7c 100644 --- a/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/write_handler_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=d5e6c2b29cf08f7aa4586f919c0c90b810fb4727$ +// $hash=728e5a2aa03b7884d5001f784dcf6bc6fb79254a$ // #include "libcef_dll/ctocpp/write_handler_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/write_handler_ctocpp.h b/cef/libcef_dll/ctocpp/write_handler_ctocpp.h index ed4f73f268..b302f19cda 100644 --- a/cef/libcef_dll/ctocpp/write_handler_ctocpp.h +++ b/cef/libcef_dll/ctocpp/write_handler_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b49e30471f4102194bf6d1c64b5277e368901f58$ +// $hash=f6c9ec7aa1916be4cc120149c9e174751fc3ea77$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_WRITE_HANDLER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc b/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc index 391ea9f3f7..23a7bb776b 100644 --- a/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=f23f6d879d43ceea6d21e76c20942c242464deb8$ +// $hash=1799aec02f9d2491056fbf3042b4ba89498adaf4$ // #include "libcef_dll/ctocpp/x509cert_principal_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h b/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h index 4bb4a8c6d7..ff7b2dc291 100644 --- a/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h +++ b/cef/libcef_dll/ctocpp/x509cert_principal_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=4bf290893db30f92b41162cf2cd47457f94b9940$ +// $hash=13b7a4dd2d7677a378def6201fcf32495ec89701$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_X509CERT_PRINCIPAL_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc b/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc index 71584b8282..5dc3e32e11 100644 --- a/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/x509certificate_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=fa094f8add3043e35ad18783484c11aa2b883fa7$ +// $hash=b5ab278c54b7ed9046b43a7f362a18ebc8bde146$ // #include "libcef_dll/ctocpp/x509certificate_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h b/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h index 1179cbd7cf..23adbfa10b 100644 --- a/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h +++ b/cef/libcef_dll/ctocpp/x509certificate_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=96506815984e01c7670fededdc24ea0b5b6b4cee$ +// $hash=858a4d6e0fb14d1f20ad386c90efbfe2f3778ac4$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_X509CERTIFICATE_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc index d6a7ce2366..617f05151b 100644 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=579edc584404eea55aa9e33a0dc789b1a1afa5ce$ +// $hash=9fc59c7d9a9acbf92fde0cfceda151c4936c136b$ // #include "libcef_dll/ctocpp/xml_reader_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h index 817c6834e8..f1c4128598 100644 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h +++ b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ba444818045821388677e80af1f848b3938a7f1b$ +// $hash=65bd41873882fe44f3a8274b9a5b2abc0be9bc4f$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_XML_READER_CTOCPP_H_ diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc index de1eee085a..381241d341 100644 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=883eb778e50772e1cb2901f59693e837790847c6$ +// $hash=f01ac0e38723b8786f115a14dbca8d4d3d1a57bf$ // #include "libcef_dll/ctocpp/zip_reader_ctocpp.h" diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h index 31c8bfc5ae..6d63d873dd 100644 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h +++ b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e405cb0ca0caf967b58bc31d542bf346d6989022$ +// $hash=5467459fccd6d42323c5ce2e6338423ee98026db$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_ZIP_READER_CTOCPP_H_ diff --git a/cef/libcef_dll/libcef_dll.cc b/cef/libcef_dll/libcef_dll.cc index f9c52222c0..a6ffa54d33 100644 --- a/cef/libcef_dll/libcef_dll.cc +++ b/cef/libcef_dll/libcef_dll.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b2f22315d4021be203ececa54d5bb8c651f60dfc$ +// $hash=4c84753487cbffec964954a78088e667f63df1e3$ // #include "include/capi/cef_app_capi.h" diff --git a/cef/libcef_dll/views_stub.cc b/cef/libcef_dll/views_stub.cc index 70b15bc112..5ebce32154 100644 --- a/cef/libcef_dll/views_stub.cc +++ b/cef/libcef_dll/views_stub.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=912ed008854d84294dca15c3c9e1b9a362c4a886$ +// $hash=892496158fbb51c0534dfbdfd4597daef6b21da7$ // #include "include/views/cef_browser_view.h" diff --git a/cef/libcef_dll/wrapper/libcef_dll_dylib.cc b/cef/libcef_dll/wrapper/libcef_dll_dylib.cc index 67655ef1dc..1158ab5b75 100644 --- a/cef/libcef_dll/wrapper/libcef_dll_dylib.cc +++ b/cef/libcef_dll/wrapper/libcef_dll_dylib.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=9fbe1de9cf7f32c551c535e190d4c82b4947765d$ +// $hash=63f62b21e8d9e400f6e19f11f93ddb3f838e7620$ // #include @@ -201,6 +201,9 @@ typedef struct _cef_command_line_t* (*cef_command_line_get_global_ptr)(); typedef struct _cef_cookie_manager_t* ( *cef_cookie_manager_get_global_manager_ptr)( struct _cef_completion_callback_t*); +typedef int (*cef_cookie_manager_create_cef_cookie_ptr)(const cef_string_t*, + const cef_string_t*, + struct _cef_cookie_t*); typedef struct _cef_drag_data_t* (*cef_drag_data_create_ptr)(); typedef struct _cef_image_t* (*cef_image_create_ptr)(); typedef struct _cef_media_router_t* (*cef_media_router_get_global_ptr)( @@ -578,6 +581,7 @@ struct libcef_pointers { cef_command_line_get_global_ptr cef_command_line_get_global; cef_cookie_manager_get_global_manager_ptr cef_cookie_manager_get_global_manager; + cef_cookie_manager_create_cef_cookie_ptr cef_cookie_manager_create_cef_cookie; cef_drag_data_create_ptr cef_drag_data_create; cef_image_create_ptr cef_image_create; cef_media_router_get_global_ptr cef_media_router_get_global; @@ -793,6 +797,7 @@ int libcef_init_pointers(const char* path) { INIT_ENTRY(cef_command_line_create); INIT_ENTRY(cef_command_line_get_global); INIT_ENTRY(cef_cookie_manager_get_global_manager); + INIT_ENTRY(cef_cookie_manager_create_cef_cookie); INIT_ENTRY(cef_drag_data_create); INIT_ENTRY(cef_image_create); INIT_ENTRY(cef_media_router_get_global); @@ -1094,8 +1099,8 @@ int cef_create_url(const struct _cef_urlparts_t* parts, cef_string_t* url) { } NO_SANITIZE("cfi-icall") -cef_string_userfree_t cef_format_url_for_security_display( - const cef_string_t* origin_url) { +cef_string_userfree_t + cef_format_url_for_security_display(const cef_string_t* origin_url) { return g_libcef_pointers.cef_format_url_for_security_display(origin_url); } @@ -1307,6 +1312,14 @@ struct _cef_cookie_manager_t* cef_cookie_manager_get_global_manager( return g_libcef_pointers.cef_cookie_manager_get_global_manager(callback); } +NO_SANITIZE("cfi-icall") +int cef_cookie_manager_create_cef_cookie(const cef_string_t* url, + const cef_string_t* value, + struct _cef_cookie_t* cef_cookie) { + return g_libcef_pointers.cef_cookie_manager_create_cef_cookie(url, value, + cef_cookie); +} + NO_SANITIZE("cfi-icall") struct _cef_drag_data_t* cef_drag_data_create() { return g_libcef_pointers.cef_drag_data_create(); } @@ -1581,46 +1594,54 @@ struct _cef_translator_test_t* cef_translator_test_create() { } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_ref_ptr_library_t* -cef_translator_test_ref_ptr_library_create(int value) { +struct + _cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create( + int value) { return g_libcef_pointers.cef_translator_test_ref_ptr_library_create(value); } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_ref_ptr_library_child_t* -cef_translator_test_ref_ptr_library_child_create(int value, int other_value) { +struct + _cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create( + int value, + int other_value) { return g_libcef_pointers.cef_translator_test_ref_ptr_library_child_create( value, other_value); } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_ref_ptr_library_child_child_t* -cef_translator_test_ref_ptr_library_child_child_create(int value, - int other_value, - int other_other_value) { +struct + _cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create( + int value, + int other_value, + int other_other_value) { return g_libcef_pointers .cef_translator_test_ref_ptr_library_child_child_create( value, other_value, other_other_value); } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_scoped_library_t* -cef_translator_test_scoped_library_create(int value) { +struct + _cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create( + int value) { return g_libcef_pointers.cef_translator_test_scoped_library_create(value); } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_scoped_library_child_t* -cef_translator_test_scoped_library_child_create(int value, int other_value) { +struct + _cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create( + int value, + int other_value) { return g_libcef_pointers.cef_translator_test_scoped_library_child_create( value, other_value); } NO_SANITIZE("cfi-icall") -struct _cef_translator_test_scoped_library_child_child_t* -cef_translator_test_scoped_library_child_child_create(int value, - int other_value, - int other_other_value) { +struct + _cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create( + int value, + int other_value, + int other_other_value) { return g_libcef_pointers .cef_translator_test_scoped_library_child_child_create(value, other_value, other_other_value); diff --git a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc b/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc index 7fc8d57281..d57bf25a63 100644 --- a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ b/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b43931d8bb81fbfd7a55c011ac6e5b471b3a30ac$ +// $hash=c9dcf926082220ee6e62f4f7742d5c7df0ae6399$ // #include "include/capi/cef_app_capi.h" diff --git a/cef/libcef_dll/wrapper_types.h b/cef/libcef_dll/wrapper_types.h index 61734c211e..eb0eb8371e 100644 --- a/cef/libcef_dll/wrapper_types.h +++ b/cef/libcef_dll/wrapper_types.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=8e09f43f2c7faf35a14e7367b2156f4d4e89b74d$ +// $hash=9ed6ec0a8c3e23163d32a47dc35933b6602d8470$ // #ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_ @@ -19,6 +19,7 @@ enum CefWrapperType { WT_BASE_REF_COUNTED = 1, WT_BASE_SCOPED, + WT_ACCESS_REQUEST, WT_ACCESSIBILITY_HANDLER, WT_APP, WT_AUDIO_HANDLER, @@ -28,6 +29,7 @@ enum CefWrapperType { WT_BOX_LAYOUT, WT_BROWSER, WT_BROWSER_HOST, + WT_BROWSER_PERMISSION_REQUEST_DELEGATE, WT_BROWSER_PROCESS_HANDLER, WT_BROWSER_VIEW, WT_BROWSER_VIEW_DELEGATE, @@ -65,10 +67,12 @@ enum CefWrapperType { WT_FIND_HANDLER, WT_FOCUS_HANDLER, WT_FRAME, + WT_GEOLOCATION_ACESS, WT_GET_EXTENSION_RESOURCE_CALLBACK, WT_IMAGE, WT_JSDIALOG_CALLBACK, WT_JSDIALOG_HANDLER, + WT_JAVA_SCRIPT_RESULT_CALLBACK, WT_KEYBOARD_HANDLER, WT_LABEL_BUTTON, WT_LAYOUT, @@ -92,6 +96,7 @@ enum CefWrapperType { WT_PANEL, WT_PANEL_DELEGATE, WT_PDF_PRINT_CALLBACK, + WT_PERMISSION_REQUEST, WT_POST_DATA, WT_POST_DATA_ELEMENT, WT_PRINT_DIALOG_CALLBACK, diff --git a/chrome/browser/offline_pages/offline_page_utils.cc b/chrome/browser/offline_pages/offline_page_utils.cc index 422bb582f0..750012338a 100644 --- a/chrome/browser/offline_pages/offline_page_utils.cc +++ b/chrome/browser/offline_pages/offline_page_utils.cc @@ -121,6 +121,7 @@ void DoCalculateSizeBetween( std::move(callback).Run(total_size); } +#if defined(OS_ANDROID) content::WebContents* GetWebContentsByFrameID(int render_process_id, int render_frame_id) { content::RenderFrameHost* render_frame_host = @@ -129,7 +130,9 @@ content::WebContents* GetWebContentsByFrameID(int render_process_id, return NULL; return content::WebContents::FromRenderFrameHost(render_frame_host); } +#endif +#if defined(OS_ANDROID) content::WebContents::Getter GetWebContentsGetter( content::WebContents* web_contents) { // The FrameTreeNode ID should be used to access the WebContents. @@ -146,6 +149,7 @@ content::WebContents::Getter GetWebContentsGetter( web_contents->GetMainFrame()->GetProcess()->GetID(), web_contents->GetMainFrame()->GetRoutingID()); } +#endif void AcquireFileAccessPermissionDoneForScheduleDownload( content::WebContents* web_contents, diff --git a/chrome/browser/plugins/plugin_info_host_impl.cc b/chrome/browser/plugins/plugin_info_host_impl.cc index ed191bd7f9..302d6dcc78 100644 --- a/chrome/browser/plugins/plugin_info_host_impl.cc +++ b/chrome/browser/plugins/plugin_info_host_impl.cc @@ -143,6 +143,7 @@ PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile) profile->GetPrefs()); run_all_flash_in_allow_mode_.Init(prefs::kRunAllFlashInAllowMode, profile->GetPrefs()); + #if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_CEF) if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) diff --git a/chrome/browser/plugins/plugin_utils.cc b/chrome/browser/plugins/plugin_utils.cc index a1117001ad..831d5794ec 100644 --- a/chrome/browser/plugins/plugin_utils.cc +++ b/chrome/browser/plugins/plugin_utils.cc @@ -6,7 +6,7 @@ #include "base/values.h" #include "cef/libcef/features/runtime.h" -#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/profiles/profile_io_data.h" #include "chrome/common/plugin_utils.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings_types.h" diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 4a0a8f429e..49d5ca9a07 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -396,7 +396,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); - if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir_.empty()) + if (!user_data_dir_.empty() && ProfileShortcutManager::IsFeatureEnabled()) profile_shortcut_manager_ = ProfileShortcutManager::Create(this); } diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h index f44ed58d92..47c31af2c1 100644 --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h @@ -155,6 +155,8 @@ class ProfileManager : public content::NotificationObserver, // Get the Profile last used (the Profile to which owns the most recently // focused window) with this Chrome build. If no signed profile has been // stored in Local State, hand back the Default profile. + // TODO(https://crbug.com/1195201): Remove `user_data_dir` parameter since it + // always must match `user_data_dir_` field. virtual Profile* GetLastUsedProfile(const base::FilePath& user_data_dir); // Get the path of the last used profile, or if that's undefined, the default diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index b200857173..a912d66269 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc @@ -562,7 +562,6 @@ BrowserView::BrowserView() : BrowserView(nullptr) {} BrowserView::BrowserView(std::unique_ptr browser) : views::ClientView(nullptr, nullptr), - browser_(std::move(browser)), accessibility_mode_observer_( std::make_unique(this)) { if (browser) diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc index 5cc8109549..c591206e62 100644 --- a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc @@ -1030,6 +1030,8 @@ void PageInfoBubbleView::HandleMoreInfoRequestAsync(int view_id) { PageInfo::PAGE_INFO_CERTIFICATE_DIALOG_OPENED); #if !defined(OS_OHOS) ShowCertificateViewer(web_contents(), top_window, certificate_.get()); +#else + //// TODO for OHOS #endif } break; diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h index 099adbdc8b..1074394efe 100644 --- a/components/password_manager/core/browser/password_manager_client.h +++ b/components/password_manager/core/browser/password_manager_client.h @@ -342,6 +342,7 @@ class PasswordManagerClient { const GURL& frame_url) = 0; #endif +#if defined(PASSWORD_REUSE_DETECTION_ENABLED) // Checks the safe browsing reputation of the webpage where password reuse // happens. This is called by the PasswordReuseDetectionManager when a // protected password is typed on the wrong domain. This may trigger a @@ -354,6 +355,7 @@ class PasswordManagerClient { const std::string& username, const std::vector& matching_reused_credentials, bool password_field_exists) = 0; +#endif // Records a Chrome Sync event that GAIA password reuse was detected. virtual void LogPasswordReuseDetectedEvent() = 0; diff --git a/components/password_manager/core/browser/password_reuse_detection_manager.cc b/components/password_manager/core/browser/password_reuse_detection_manager.cc index 491cdacd13..4a82f32cad 100644 --- a/components/password_manager/core/browser/password_reuse_detection_manager.cc +++ b/components/password_manager/core/browser/password_reuse_detection_manager.cc @@ -170,10 +170,12 @@ void PasswordReuseDetectionManager::OnReuseCheckDone( ? reused_protected_password_hash->username : ""; +#if defined(PASSWORD_REUSE_DETECTION_ENABLED) client_->CheckProtectedPasswordEntry( reused_password_type, username, std::move(all_matching_reused_credentials_).extract(), password_field_detected); +#endif all_matching_reused_credentials_.clear(); } diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc index a0fc635ce9..80fbe080b1 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -512,11 +512,17 @@ void GLRenderer::ReleaseRenderPassTextures() { void GLRenderer::DiscardPixels() { if (!use_discard_framebuffer_) return; +#if defined(OS_OHOS) + // use GL_COLOR_ATTACHMENT0_EXT directly to avoid INVALID_ENUM ERROR in + // GLES2DecoderImpl::InvalidateFramebufferImpl temporarily + GLenum attachments[] = {static_cast(GL_COLOR_ATTACHMENT0_EXT)}; +#else bool using_default_framebuffer = !current_framebuffer_texture_ && output_surface_->capabilities().uses_default_gl_framebuffer; GLenum attachments[] = {static_cast( using_default_framebuffer ? GL_COLOR_EXT : GL_COLOR_ATTACHMENT0_EXT)}; +#endif gl_->DiscardFramebufferEXT(GL_FRAMEBUFFER, base::size(attachments), attachments); } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index a63f357a8a..157b489c3a 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -2088,6 +2088,21 @@ source_set("browser") { ] } + if (is_ohos) { + import("//build/config/ohos/config.gni") + sources += [ + "media/ohos/ohos_media_player_renderer.cc", + "media/ohos/ohos_media_player_renderer.h", + ] + + libs = [ + "surface.z", + "media_client.z", + ] + include_dirs = ohos_src_includes + lib_dirs = ohos_libs_dir + } + if (is_win) { sources += [ "accessibility/accessibility_event_recorder_uia_win.cc", diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc index 5848ee6863..d3f1a12a21 100644 --- a/content/browser/browser_context.cc +++ b/content/browser/browser_context.cc @@ -575,7 +575,8 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { const bool kUseInMemoryDBDefault = false; bool use_in_memory_db = base::GetFieldTrialParamByFeatureAsBool( media::kMediaCapabilitiesWithParameters, kUseInMemoryDBParamName, - kUseInMemoryDBDefault) || GetPath().empty(); + kUseInMemoryDBDefault) || + GetPath().empty(); std::unique_ptr stats_db; if (use_in_memory_db) { diff --git a/content/browser/media/frameless_media_interface_proxy.cc b/content/browser/media/frameless_media_interface_proxy.cc index dc71e7c719..a0c48542cb 100644 --- a/content/browser/media/frameless_media_interface_proxy.cc +++ b/content/browser/media/frameless_media_interface_proxy.cc @@ -65,13 +65,15 @@ void FramelessMediaInterfaceProxy::CreateFlingingRenderer( client_extenion, mojo::PendingReceiver receiver) {} +#endif // defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void FramelessMediaInterfaceProxy::CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, mojo::PendingReceiver receiver, mojo::PendingReceiver renderer_extension_receiver) {} -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) #if defined(OS_WIN) // Unimplemented method as this requires CDM and media::Renderer services with diff --git a/content/browser/media/frameless_media_interface_proxy.h b/content/browser/media/frameless_media_interface_proxy.h index 7198bc6cec..6aee2a9884 100644 --- a/content/browser/media/frameless_media_interface_proxy.h +++ b/content/browser/media/frameless_media_interface_proxy.h @@ -50,13 +50,15 @@ class CONTENT_EXPORT FramelessMediaInterfaceProxy final const base::UnguessableToken& overlay_plane_id, mojo::PendingReceiver receiver) final; #endif -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, mojo::PendingReceiver receiver, mojo::PendingReceiver renderer_extension_receiver) final; +#endif // defined(OS_ANDROID) || defined(OS_OHOS) +#if defined(OS_ANDROID) void CreateFlingingRenderer( const std::string& presentation_id, mojo::PendingRemote diff --git a/content/browser/media/media_interface_proxy.cc b/content/browser/media/media_interface_proxy.cc index a570a90966..886c40d31e 100644 --- a/content/browser/media/media_interface_proxy.cc +++ b/content/browser/media/media_interface_proxy.cc @@ -63,6 +63,11 @@ #include "base/time/time.h" #endif // defined(OS_WIN) +#if defined(OS_OHOS) +#include "content/browser/media/ohos/ohos_media_player_renderer.h" +#include "media/mojo/services/mojo_renderer_service.h" // nogncheck +#endif + #if defined(OS_ANDROID) #include "content/browser/media/android/media_player_renderer.h" #include "content/browser/media/flinging_renderer.h" @@ -465,7 +470,9 @@ void MediaInterfaceProxy::CreateFlingingRenderer( media::MojoRendererService::Create(nullptr, std::move(flinging_renderer), std::move(receiver)); } +#endif +#if defined(OS_ANDROID) || defined(OS_OHOS) void MediaInterfaceProxy::CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, @@ -476,7 +483,11 @@ void MediaInterfaceProxy::CreateMediaPlayerRenderer( media::MojoRendererService::Create( nullptr, +#if defined(OS_ANDROID) std::make_unique( +#else + std::make_unique( +#endif render_frame_host_->GetProcess()->GetID(), render_frame_host_->GetRoutingID(), static_cast(render_frame_host_) diff --git a/content/browser/media/media_interface_proxy.h b/content/browser/media/media_interface_proxy.h index 61fec19350..a1c481c2df 100644 --- a/content/browser/media/media_interface_proxy.h +++ b/content/browser/media/media_interface_proxy.h @@ -74,13 +74,15 @@ class MediaInterfaceProxy final : public media::mojom::InterfaceFactory { mojo::PendingRemote client_extension, mojo::PendingReceiver receiver) final; +#endif // defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, mojo::PendingReceiver receiver, mojo::PendingReceiver renderer_extension_request) final; -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) #if defined(OS_WIN) void CreateMediaFoundationRenderer( mojo::PendingReceiver receiver, diff --git a/content/browser/media/ohos/ohos_media_player_renderer.cc b/content/browser/media/ohos/ohos_media_player_renderer.cc new file mode 100644 index 0000000000..69bbd72e2f --- /dev/null +++ b/content/browser/media/ohos/ohos_media_player_renderer.cc @@ -0,0 +1,194 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/browser/media/ohos/ohos_media_player_renderer.h" + +#include + +#include "base/bind.h" +#include "base/callback_helpers.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" +#include "content/public/browser/content_browser_client.h" +#include "content/public/browser/render_process_host.h" +#include "content/public/browser/storage_partition.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/content_client.h" +#include "media/base/timestamp_constants.h" + +namespace content { + +namespace { +const float kDefaultVolume = 1.0; +} // namespace + +OHOSMediaPlayerRenderer::OHOSMediaPlayerRenderer( + int process_id, + int routing_id, + WebContents* web_contents, + mojo::PendingReceiver renderer_extension_receiver, + mojo::PendingRemote client_extension_remote) + : client_extension_(std::move(client_extension_remote)), + has_error_(false), + volume_(kDefaultVolume), + renderer_extension_receiver_(this, + std::move(renderer_extension_receiver)) {} + +OHOSMediaPlayerRenderer::~OHOSMediaPlayerRenderer() {} + +void OHOSMediaPlayerRenderer::Initialize( + media::MediaResource* media_resource, + media::RendererClient* client, + media::PipelineStatusCallback init_cb) { + renderer_client_ = client; + if (media_resource->GetType() != media::MediaResource::Type::URL) { + DLOG(ERROR) << "MediaResource is not of Type URL"; + std::move(init_cb).Run(media::PIPELINE_ERROR_INITIALIZATION_FAILED); + return; + } + + CreateMediaPlayer(media_resource->GetMediaUrlParams(), std::move(init_cb)); +} + +void OHOSMediaPlayerRenderer::CreateMediaPlayer( + const media::MediaUrlParams& url_params, + media::PipelineStatusCallback init_cb) { + const std::string user_agent = GetContentClient()->browser()->GetUserAgent(); + media_player_.reset(new media::OHOSMediaPlayerBridge( + url_params.media_url, url_params.site_for_cookies, + url_params.top_frame_origin, user_agent, + false, // hide_url_log + this, url_params.allow_credentials, url_params.is_hls)); + int32_t ret = media_player_->Initialize(); + if (ret == 0) { + UpdateVolume(); + std::move(init_cb).Run(media::PIPELINE_OK); + initialized_ = true; + } else { + std::move(init_cb).Run(media::PIPELINE_ERROR_INITIALIZATION_FAILED); + } +} + +void OHOSMediaPlayerRenderer::SetLatencyHint( + base::Optional latency_hint) {} + +void OHOSMediaPlayerRenderer::Flush(base::OnceClosure flush_cb) { + std::move(flush_cb).Run(); +} + +void OHOSMediaPlayerRenderer::StartPlayingFrom(base::TimeDelta time) { + if (has_error_ || !media_player_) + return; + media_player_->SeekTo(time); + renderer_client_->OnBufferingStateChange( + media::BufferingState::BUFFERING_HAVE_ENOUGH, + media::BufferingStateChangeReason::BUFFERING_CHANGE_REASON_UNKNOWN); +} + +void OHOSMediaPlayerRenderer::SetPlaybackRate(double playback_rate) { + if (has_error_) + return; + if (playback_rate <= 0) { + media_player_->Pause(); + } else { + OHOS::Media::PlaybackRateMode mode; + if (playback_rate < 1) { + mode = OHOS::Media::SPEED_FORWARD_0_75_X; + } else if (playback_rate < 1.25) { + mode = OHOS::Media::SPEED_FORWARD_1_00_X; + } else if (playback_rate < 1.75) { + mode = OHOS::Media::SPEED_FORWARD_1_25_X; + } else if (playback_rate < 2) { + mode = OHOS::Media::SPEED_FORWARD_1_75_X; + } else { + mode = OHOS::Media::SPEED_FORWARD_2_00_X; + } + media_player_->SetPlaybackSpeed(mode); + media_player_->Start(); + } + OnMediaDurationChanged(media_player_->GetDuration()); +} + +void OHOSMediaPlayerRenderer::InitiateScopedSurfaceRequest( + InitiateScopedSurfaceRequestCallback callback) {} + +void OHOSMediaPlayerRenderer::FinishPaint(int32_t fd) { + if (media_player_) { + media_player_->FinishPaint(fd); + } +} + +void OHOSMediaPlayerRenderer::OnFrameAvailable(int fd, + uint32_t size, + int32_t width, + int32_t height) { + if (client_extension_) { + auto ohos_buffer = media::mojom::OhosSurfaceBufferHandle::New(); + ohos_buffer->buffer_size = size; + base::ScopedFD buffer_fd(dup(fd)); + ohos_buffer->fd_browser = fd; + ohos_buffer->width = width; + ohos_buffer->height = height; + ohos_buffer->buffer_fd = mojo::PlatformHandle(std::move(buffer_fd)); + client_extension_->OnFrameUpdate(std::move(ohos_buffer)); + } +} + +void OHOSMediaPlayerRenderer::OnMediaDurationChanged(base::TimeDelta duration) { + if (duration.is_zero()) + duration = media::kInfiniteDuration; + + if (duration_ != duration) { + duration_ = duration; + client_extension_->OnDurationChange(duration); + } +} + +void OHOSMediaPlayerRenderer::OnPlaybackComplete() { + renderer_client_->OnEnded(); +} + +void OHOSMediaPlayerRenderer::OnError(int error) { + if (error == + media::OHOSMediaPlayerBridge::MediaErrorType::MEDIA_ERROR_INVALID_CODE) { + return; + } + LOG(ERROR) << __func__ << " Error: " << error; + has_error_ = true; + if (initialized_) { + renderer_client_->OnError(media::PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED); + } +} + +void OHOSMediaPlayerRenderer::OnVideoSizeChanged(int width, int height) { + gfx::Size new_size = gfx::Size(width, height); + if (video_size_ != new_size) { + video_size_ = new_size; + // Send via |client_extension_| instead of |renderer_client_|, so + // MediaPlayerRendererClient can update its texture size. + // MPRClient will then continue propagating changes via its RendererClient. + client_extension_->OnVideoSizeChange(video_size_); + } +} + +void OHOSMediaPlayerRenderer::SetVolume(float volume) { + volume_ = volume; + UpdateVolume(); +} + +void OHOSMediaPlayerRenderer::UpdateVolume() { + if (media_player_) + media_player_->SetVolume(volume_); +} + +base::TimeDelta OHOSMediaPlayerRenderer::GetMediaTime() { + if (media_player_) { + return media_player_->GetMediaTime(); + } + return base::TimeDelta::FromMilliseconds(0); +} + +} // namespace content diff --git a/content/browser/media/ohos/ohos_media_player_renderer.h b/content/browser/media/ohos/ohos_media_player_renderer.h new file mode 100644 index 0000000000..38c5d0c224 --- /dev/null +++ b/content/browser/media/ohos/ohos_media_player_renderer.h @@ -0,0 +1,115 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_BROWSER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_H_ +#define CONTENT_BROWSER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_H_ + +#include "base/callback.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/unguessable_token.h" +#include "content/common/content_export.h" +#include "content/public/browser/render_frame_host.h" +#include "media/base/media_log.h" +#include "media/base/media_resource.h" +#include "media/base/ohos/ohos_media_player_bridge.h" +#include "media/base/renderer.h" +#include "media/base/renderer_client.h" +#include "media/mojo/mojom/renderer_extensions.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "mojo/public/cpp/bindings/remote.h" +#include "url/gurl.h" + +namespace content { +class WebContents; + +class CONTENT_EXPORT OHOSMediaPlayerRenderer + : public media::Renderer, + public media::mojom::MediaPlayerRendererExtension, + public media::OHOSMediaPlayerBridge::Client { + public: + using RendererExtension = media::mojom::MediaPlayerRendererExtension; + using ClientExtension = media::mojom::MediaPlayerRendererClientExtension; + + OHOSMediaPlayerRenderer( + int process_id, + int routing_id, + WebContents* web_contents, + mojo::PendingReceiver renderer_extension_receiver, + mojo::PendingRemote client_extension_remote); + + ~OHOSMediaPlayerRenderer() override; + + // media::Renderer implementation + void Initialize(media::MediaResource* media_resource, + media::RendererClient* client, + media::PipelineStatusCallback init_cb) override; + void SetLatencyHint(base::Optional latency_hint) override; + void Flush(base::OnceClosure flush_cb) override; + void StartPlayingFrom(base::TimeDelta time) override; + + void SetPlaybackRate(double playback_rate) override; + void SetVolume(float volume) override; + base::TimeDelta GetMediaTime() override; + + // media::OHOSMediaPlayerBridge::Client implementation + void OnFrameAvailable(int fd, + uint32_t size, + int32_t width, + int32_t height) override; + void OnMediaDurationChanged(base::TimeDelta duration) override; + void OnPlaybackComplete() override; + void OnError(int error) override; + void OnVideoSizeChanged(int width, int height) override; + + // media::mojom::MediaPlayerRendererExtension implementation. + // + // Registers a request in the content::ScopedSurfaceRequestManager, and + // returns the token associated to the request. The token can then be used to + // complete the request via the gpu::ScopedSurfaceRequestConduit. + // A completed request will call back to OnScopedSurfaceRequestCompleted(). + // + // NOTE: If a request is already pending, calling this method again will + // safely cancel the pending request before registering a new one. + void InitiateScopedSurfaceRequest( + InitiateScopedSurfaceRequestCallback callback) override; + void FinishPaint(int32_t fd) override; + + private: + void CreateMediaPlayer(const media::MediaUrlParams& params, + media::PipelineStatusCallback init_cb); + + void UpdateVolume(); + + mojo::Remote client_extension_; + + media::RendererClient* renderer_client_; + + std::unique_ptr media_player_; + + // Current duration of the media. + base::TimeDelta duration_; + + // Indicates if a serious error has been encountered by the |media_player_|. + bool has_error_; + + gfx::Size video_size_; + + float volume_; + + bool initialized_ = false; + + mojo::Receiver renderer_extension_receiver_; + + // NOTE: Weak pointers must be invalidated before all other member variables. + base::WeakPtrFactory weak_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(OHOSMediaPlayerRenderer); +}; + +} // namespace content + +#endif // CONTENT_BROWSER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_H_ diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc index 96372e9474..fcd76a294e 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc @@ -1016,6 +1016,7 @@ void NavigationControllerImpl::LoadURL(const GURL& url, params.referrer = referrer; params.transition_type = transition; params.extra_headers = extra_headers; + params.override_user_agent = NavigationController::UA_OVERRIDE_TRUE; LoadURLWithParams(params); } diff --git a/content/browser/speech/tts_ohos.cc b/content/browser/speech/tts_ohos.cc index c4ba8612d9..24b801ff0a 100644 --- a/content/browser/speech/tts_ohos.cc +++ b/content/browser/speech/tts_ohos.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 2be0a83293..3e19bacca3 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -1499,7 +1499,6 @@ void WebContentsImpl::UpdateZoom() { rwh->SynchronizeVisualProperties(); } - void WebContentsImpl::UpdateZoomIfNecessary(const std::string& scheme, const std::string& host) { OPTIONAL_TRACE_EVENT2("content", "WebContentsImpl::UpdateZoomIfNecessary", @@ -2759,16 +2758,16 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { } if (!view_) { - WebContentsViewDelegate* delegate = - GetContentClient()->browser()->GetWebContentsViewDelegate(this); + WebContentsViewDelegate* delegate = + GetContentClient()->browser()->GetWebContentsViewDelegate(this); - if (browser_plugin_guest_) { - view_ = std::make_unique( - this, delegate, &render_view_host_delegate_view_); - } else { - view_.reset(CreateWebContentsView(this, delegate, - &render_view_host_delegate_view_)); - } + if (browser_plugin_guest_) { + view_ = std::make_unique( + this, delegate, &render_view_host_delegate_view_); + } else { + view_.reset(CreateWebContentsView(this, delegate, + &render_view_host_delegate_view_)); + } } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); @@ -3199,8 +3198,8 @@ void WebContentsImpl::ExitFullscreenMode(bool will_cause_resize) { // required. if (!will_cause_resize) { if (RenderWidgetHostView* rwhv = GetRenderWidgetHostView()) { - if (RenderWidgetHost* render_widget_host = rwhv->GetRenderWidgetHost()) - render_widget_host->SynchronizeVisualProperties(); + if (RenderWidgetHost* render_widget_host = rwhv->GetRenderWidgetHost()) + render_widget_host->SynchronizeVisualProperties(); } } @@ -3620,12 +3619,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = !is_new_browsing_instance; if (delegate_) { - delegate_->GetCustomWebContentsView(this, - params.target_url, - render_process_id, - opener->GetRoutingID(), - &create_params.view, - &create_params.delegate_view); + delegate_->GetCustomWebContentsView( + this, params.target_url, render_process_id, opener->GetRoutingID(), + &create_params.view, &create_params.delegate_view); } std::unique_ptr new_contents; @@ -4023,9 +4019,10 @@ bool WebContentsImpl::ShouldIgnoreUnresponsiveRenderer() { if (suppress_unresponsive_renderer_count_ > 0) return true; - // Ignore unresponsive renderers if the debugger is attached to them since the - // unresponsiveness might be a result of the renderer sitting on a breakpoint. - // + // Ignore unresponsive renderers if the debugger is attached to them since + // the unresponsiveness might be a result of the renderer sitting on a + // breakpoint. + // #ifdef OS_WIN // Check if a windows debugger is attached to the renderer process. base::ProcessHandle process_handle = @@ -4648,8 +4645,8 @@ void WebContentsImpl::SaveFrameWithHeaders( policy_exception_justification: "Not implemented." })"); auto params = std::make_unique( - url, frame_host->GetProcess()->GetID(), - frame_host->GetRoutingID(), traffic_annotation); + url, frame_host->GetProcess()->GetID(), frame_host->GetRoutingID(), + traffic_annotation); params->set_referrer(referrer.url); params->set_referrer_policy( Referrer::ReferrerPolicyForUrlRequest(referrer.policy)); @@ -5633,6 +5630,7 @@ bool WebContentsImpl::IsWebPreferencesSet() const { void WebContentsImpl::SetWebPreferences( const blink::web_pref::WebPreferences& prefs) { OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::SetWebPreferences"); + web_preferences_ = std::make_unique(prefs); // Get all the RenderViewHosts (except the ones for currently back-forward // cached pages), and make them send the current WebPreferences @@ -6182,7 +6180,7 @@ void WebContentsImpl::LoadingStateChanged(bool to_different_document, int type = is_loading ? NOTIFICATION_LOAD_START : NOTIFICATION_LOAD_STOP; NotificationDetails det = NotificationService::NoDetails(); if (details) - det = Details(details); + det = Details(details); NotificationService::current()->Notify( type, Source(&GetController()), det); } @@ -7009,7 +7007,8 @@ void WebContentsImpl::DidChangeLoadProgress() { // immediately if enough time has passed. base::TimeDelta min_delay = base::TimeDelta::FromMilliseconds(kMinimumDelayBetweenLoadingUpdatesMS); - bool delay_elapsed = loading_last_progress_update_.is_null() || + bool delay_elapsed = + loading_last_progress_update_.is_null() || base::TimeTicks::Now() - loading_last_progress_update_ > min_delay; if (load_progress == 0.0 || load_progress == 1.0 || delay_elapsed) { @@ -7141,10 +7140,9 @@ void WebContentsImpl::DocumentOnLoadCompleted( render_frame_host); // TODO(avi): Remove. http://crbug.com/170921 - NotificationService::current()->Notify( - NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, - Source(this), - NotificationService::NoDetails()); + NotificationService::current()->Notify(NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, + Source(this), + NotificationService::NoDetails()); } void WebContentsImpl::UpdateTitle(RenderFrameHostImpl* render_frame_host, @@ -7513,7 +7511,8 @@ void WebContentsImpl::SubframeCrashed( } void WebContentsImpl::BeforeUnloadFiredFromRenderManager( - bool proceed, const base::TimeTicks& proceed_time, + bool proceed, + const base::TimeTicks& proceed_time, bool* proceed_to_fire_unload) { OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::BeforeUnloadFiredFromRenderManager"); @@ -7699,8 +7698,7 @@ void WebContentsImpl::ClearWebContentsAndroid() { web_contents_android_.reset(); } -void WebContentsImpl::ActivateNearestFindResult(float x, - float y) { +void WebContentsImpl::ActivateNearestFindResult(float x, float y) { OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::ActivateNearestFindResult"); GetOrCreateFindRequestManager()->ActivateNearestFindResult(x, y); @@ -7750,8 +7748,8 @@ void WebContentsImpl::OnDialogClosed(int render_process_id, bool dialog_was_suppressed, bool success, const std::u16string& user_input) { - RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, - render_frame_id); + RenderFrameHostImpl* rfh = + RenderFrameHostImpl::FromID(render_process_id, render_frame_id); OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::OnDialogClosed", "render_frame_host", rfh); last_dialog_suppressed_ = dialog_was_suppressed; diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index 3cdc94634e..dd529be39b 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -215,6 +215,14 @@ target(link_target_type, "renderer") { ] } + if (is_ohos) { + sources += [ + "media/ohos/ohos_media_player_renderer_client.cc", + "media/ohos/ohos_media_player_renderer_client.h", + "media/ohos/ohos_media_player_renderer_client_factory.cc", + "media/ohos/ohos_media_player_renderer_client_factory.h", + ] + } if (is_linux || is_chromeos || is_ohos) { sources += [ "renderer_main_platform_delegate_linux.cc" ] diff --git a/content/renderer/media/media_factory.cc b/content/renderer/media/media_factory.cc index 58b55ea5a7..06a512c666 100644 --- a/content/renderer/media/media_factory.cc +++ b/content/renderer/media/media_factory.cc @@ -109,6 +109,10 @@ #include "media/mojo/clients/win/media_foundation_renderer_client_factory.h" #endif // defined(OS_WIN) +#if defined(OS_OHOS) +#include "content/renderer/media/ohos/ohos_media_player_renderer_client_factory.h" +#endif + namespace { class FrameFetchContext : public media::ResourceFetchContext { public: @@ -564,6 +568,14 @@ MediaFactory::CreateRendererFactorySelector( use_media_player_renderer = UseMediaPlayerRenderer(url); #endif // defined(OS_ANDROID) +#if defined(OS_OHOS) + auto ohos_media_player_factory = + std::make_unique( + CreateMojoRendererFactory()); + factory_selector->AddFactory(FactoryType::kOHOSMediaPlayer, + std::move(ohos_media_player_factory)); +#endif + #if defined(OS_ANDROID) DCHECK(interface_broker_); diff --git a/content/renderer/media/media_interface_factory.cc b/content/renderer/media/media_interface_factory.cc index 6991ed927c..83062de1c0 100644 --- a/content/renderer/media/media_interface_factory.cc +++ b/content/renderer/media/media_interface_factory.cc @@ -95,7 +95,7 @@ void MediaInterfaceFactory::CreateCastRenderer( } #endif -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void MediaInterfaceFactory::CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, @@ -117,7 +117,9 @@ void MediaInterfaceFactory::CreateMediaPlayerRenderer( std::move(client_extension_remote), std::move(receiver), std::move(renderer_extension_receiver)); } +#endif // defined(OS_ANDROID) || defined(OS_OHOS) +#if defined(OS_ANDROID) void MediaInterfaceFactory::CreateFlingingRenderer( const std::string& presentation_id, mojo::PendingRemote diff --git a/content/renderer/media/media_interface_factory.h b/content/renderer/media/media_interface_factory.h index 53b425ddc7..179c3791c2 100644 --- a/content/renderer/media/media_interface_factory.h +++ b/content/renderer/media/media_interface_factory.h @@ -62,13 +62,15 @@ class CONTENT_EXPORT MediaInterfaceFactory final mojo::PendingRemote client_extension, mojo::PendingReceiver receiver) final; +#endif // defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, mojo::PendingReceiver receiver, mojo::PendingReceiver renderer_extension_receiver) final; -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) #if defined(OS_WIN) void CreateMediaFoundationRenderer( mojo::PendingReceiver receiver, diff --git a/content/renderer/media/ohos/ohos_media_player_renderer_client.cc b/content/renderer/media/ohos/ohos_media_player_renderer_client.cc new file mode 100644 index 0000000000..4f2b9c1043 --- /dev/null +++ b/content/renderer/media/ohos/ohos_media_player_renderer_client.cc @@ -0,0 +1,141 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/renderer/media/ohos/ohos_media_player_renderer_client.h" + +#include +#include +#include + +#include "base/logging.h" +#include "media/base/video_frame.h" + +namespace content { + +OHOSMediaPlayerRendererClient::OHOSMediaPlayerRendererClient( + mojo::PendingRemote renderer_extension_remote, + mojo::PendingReceiver client_extension_receiver, + scoped_refptr media_task_runner, + std::unique_ptr mojo_renderer, + media::VideoRendererSink* sink) + : MojoRendererWrapper(std::move(mojo_renderer)), + client_(nullptr), + sink_(sink), + media_task_runner_(std::move(media_task_runner)), + delayed_bind_client_extension_receiver_( + std::move(client_extension_receiver)), + delayed_bind_renderer_extention_remote_( + std::move(renderer_extension_remote)) {} + +OHOSMediaPlayerRendererClient::~OHOSMediaPlayerRendererClient() { + while (!cached_buffers_.empty()) { + CachedBuffer &temp_buffer = cached_buffers_.front(); + munmap(temp_buffer.mapped_, temp_buffer.buffer_size_); + close(temp_buffer.fd_); + cached_buffers_.pop_front(); + } +} + +void OHOSMediaPlayerRendererClient::Initialize( + media::MediaResource* media_resource, + media::RendererClient* client, + media::PipelineStatusCallback init_cb) { + DCHECK(media_task_runner_->BelongsToCurrentThread()); + DCHECK(!init_cb_); + + // Consume and bind the delayed PendingRemote and PendingReceiver now that we + // are on |media_task_runner_|. + renderer_extension_remote_.Bind( + std::move(delayed_bind_renderer_extention_remote_), media_task_runner_); + client_extension_receiver_.Bind( + std::move(delayed_bind_client_extension_receiver_), media_task_runner_); + + media_resource_ = media_resource; + client_ = client; + init_cb_ = std::move(init_cb); + MojoRendererWrapper::Initialize( + media_resource, client_, + base::BindOnce( + &OHOSMediaPlayerRendererClient::OnRemoteRendererInitialized, + weak_factory_.GetWeakPtr())); + sink_->SetFinishPaintCallback( + base::BindRepeating(&OHOSMediaPlayerRendererClient::OnFinishPaintCallback, + weak_factory_.GetWeakPtr())); +} + +void OHOSMediaPlayerRendererClient::OnFinishPaintCallback() { + if (!media_task_runner_->BelongsToCurrentThread()) { + media_task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&OHOSMediaPlayerRendererClient::OnFinishPaintCallback, + base::Unretained(this))); + return; + } + if (cached_buffers_.size() > 1) { + CachedBuffer &temp_buffer = cached_buffers_.front(); + munmap(temp_buffer.mapped_, temp_buffer.buffer_size_); + close(temp_buffer.fd_); + renderer_extension_remote_->FinishPaint(temp_buffer.fd_browser_); + cached_buffers_.pop_front(); + } +} + +void OHOSMediaPlayerRendererClient::OnRemoteRendererInitialized( + media::PipelineStatus status) { + DCHECK(media_task_runner_->BelongsToCurrentThread()); + DCHECK(!init_cb_.is_null()); + + if (status == media::PIPELINE_OK) { + // Signal that we're using MediaPlayer so that we can properly differentiate + // within our metrics. + media::PipelineStatistics stats; + stats.video_decoder_info = {true, false, + media::VideoDecoderType::kMediaCodec}; + stats.audio_decoder_info = {true, false, + media::AudioDecoderType::kMediaCodec}; + client_->OnStatisticsUpdate(stats); + } + std::move(init_cb_).Run(status); +} + +void OHOSMediaPlayerRendererClient::OnVideoSizeChange(const gfx::Size& size) { + client_->OnVideoNaturalSizeChange(size); +} + +void OHOSMediaPlayerRendererClient::OnDurationChange(base::TimeDelta duration) { + DCHECK(media_task_runner_->BelongsToCurrentThread()); + media_resource_->ForwardDurationChangeToDemuxerHost(duration); +} + +void OHOSMediaPlayerRendererClient::OnFrameUpdate( + media::mojom::OhosSurfaceBufferHandlePtr ohos_surface_buffer_handle) { + if (!media_task_runner_->BelongsToCurrentThread()) { + media_task_runner_->PostTask( + FROM_HERE, base::BindOnce(&OHOSMediaPlayerRendererClient::OnFrameUpdate, + base::Unretained(this), + std::move(ohos_surface_buffer_handle))); + return; + } + auto fd = ohos_surface_buffer_handle->buffer_fd.TakeFD().release(); + uint32_t buffer_size = ohos_surface_buffer_handle->buffer_size; + int fd_browser = ohos_surface_buffer_handle->fd_browser; + int32_t width = ohos_surface_buffer_handle->width; + int32_t height = ohos_surface_buffer_handle->height; + + uint8_t* mapped = + (uint8_t*)mmap(NULL, buffer_size, PROT_READ, MAP_SHARED, fd, 0); + const base::TimeDelta kZero; + + media::VideoPixelFormat format = media::VideoPixelFormat::PIXEL_FORMAT_ABGR; + gfx::Size size = gfx::Size(width, height); + scoped_refptr frame = media::VideoFrame::WrapExternalData( + format, size, gfx::Rect(size), size, mapped, buffer_size, kZero); + + auto unique_frame = media::VideoFrame::WrapVideoFrame( + frame, frame->format(), frame->visible_rect(), frame->natural_size()); + sink_->PaintSingleFrame(std::move(unique_frame)); + cached_buffers_.push_back(CachedBuffer{fd_browser, fd, mapped, buffer_size}); +} + +} // namespace content \ No newline at end of file diff --git a/content/renderer/media/ohos/ohos_media_player_renderer_client.h b/content/renderer/media/ohos/ohos_media_player_renderer_client.h new file mode 100644 index 0000000000..8f1f6cf0da --- /dev/null +++ b/content/renderer/media/ohos/ohos_media_player_renderer_client.h @@ -0,0 +1,102 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_H_ +#define CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_H_ + +#include + +#include "base/callback.h" +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "base/single_thread_task_runner.h" +#include "content/common/content_export.h" +#include "media/base/media_resource.h" +#include "media/base/renderer.h" +#include "media/base/renderer_client.h" +#include "media/base/video_renderer_sink.h" +#include "media/mojo/clients/mojo_renderer.h" +#include "media/mojo/clients/mojo_renderer_wrapper.h" +#include "media/mojo/mojom/renderer_extensions.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "mojo/public/cpp/bindings/remote.h" + +namespace content { + +struct CachedBuffer { + int fd_browser_; + int fd_; + uint8_t* mapped_; + uint32_t buffer_size_; +}; + +class OHOSMediaPlayerRendererClient + : public media::mojom::MediaPlayerRendererClientExtension, + public media::MojoRendererWrapper { + public: + using RendererExtention = media::mojom::MediaPlayerRendererExtension; + using ClientExtention = media::mojom::MediaPlayerRendererClientExtension; + OHOSMediaPlayerRendererClient( + mojo::PendingRemote renderer_extension_remote, + mojo::PendingReceiver client_extension_receiver, + scoped_refptr media_task_runner, + std::unique_ptr mojo_renderer, + media::VideoRendererSink* sink); + ~OHOSMediaPlayerRendererClient() override; + + // Renderer implementation. + void Initialize(media::MediaResource* media_resource, + media::RendererClient* client, + media::PipelineStatusCallback init_cb) override; + + // media::mojom::MediaPlayerRendererClientExtension implementation + void OnDurationChange(base::TimeDelta duration) override; + void OnVideoSizeChange(const gfx::Size& size) override; + void OnFrameUpdate(media::mojom::OhosSurfaceBufferHandlePtr + ohos_surface_buffer_handle) override; + + private: + void OnRemoteRendererInitialized(media::PipelineStatus status); + void OnFinishPaintCallback(); + + media::MediaResource* media_resource_; + + std::deque cached_buffers_; + + media::RendererClient* client_; + + media::VideoRendererSink* sink_; + + scoped_refptr media_task_runner_; + + media::PipelineStatusCallback init_cb_; + + // This class is constructed on the main task runner, and used on + // |media_task_runner_|. These member are used to delay calls to Bind() for + // |renderer_extension_ptr_| and |client_extension_binding_|, until we are on + // |media_task_runner_|. + // Both are set in the constructor, and consumed in Initialize(). + mojo::PendingReceiver + delayed_bind_client_extension_receiver_; + mojo::PendingRemote + delayed_bind_renderer_extention_remote_; + + // Used to call methods on the MediaPlayerRenderer in the browser process. + mojo::Remote renderer_extension_remote_; + + // Used to receive events from MediaPlayerRenderer in the browser process. + mojo::Receiver client_extension_receiver_{ + this}; + + // NOTE: Weak pointers must be invalidated before all other member variables. + base::WeakPtrFactory weak_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(OHOSMediaPlayerRendererClient); +}; + +} // namespace content + +#endif // CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_H_ diff --git a/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.cc b/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.cc new file mode 100644 index 0000000000..876b3c61b0 --- /dev/null +++ b/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.cc @@ -0,0 +1,55 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "content/renderer/media/ohos/ohos_media_player_renderer_client_factory.h" + +#include "content/renderer/media/ohos/ohos_media_player_renderer_client.h" +#include "media/mojo/clients/mojo_renderer.h" +#include "media/mojo/clients/mojo_renderer_factory.h" +#include "media/mojo/mojom/renderer_extensions.mojom.h" + +namespace content { + +OHOSMediaPlayerRendererClientFactory::OHOSMediaPlayerRendererClientFactory( + std::unique_ptr mojo_renderer_factory) + : mojo_renderer_factory_(std::move(mojo_renderer_factory)) {} + +OHOSMediaPlayerRendererClientFactory::~OHOSMediaPlayerRendererClientFactory() {} + +std::unique_ptr +OHOSMediaPlayerRendererClientFactory::CreateRenderer( + const scoped_refptr& media_task_runner, + const scoped_refptr& worker_task_runner, + media::AudioRendererSink* audio_renderer_sink, + media::VideoRendererSink* video_renderer_sink, + media::RequestOverlayInfoCB request_overlay_info_cb, + const gfx::ColorSpace& target_color_space) { + mojo::PendingRemote + renderer_extension_remote; + auto renderer_extension_receiver = + renderer_extension_remote.InitWithNewPipeAndPassReceiver(); + + mojo::PendingRemote + client_extension_remote; + auto client_extension_receiver = + client_extension_remote.InitWithNewPipeAndPassReceiver(); + + std::unique_ptr mojo_renderer = + mojo_renderer_factory_->CreateMediaPlayerRenderer( + std::move(renderer_extension_receiver), + std::move(client_extension_remote), media_task_runner, + video_renderer_sink); + + return std::make_unique( + std::move(renderer_extension_remote), + std::move(client_extension_receiver), media_task_runner, + std::move(mojo_renderer), video_renderer_sink); +} + +media::MediaResource::Type +OHOSMediaPlayerRendererClientFactory::GetRequiredMediaResourceType() { + return media::MediaResource::Type::URL; +} + +} // namespace content diff --git a/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.h b/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.h new file mode 100644 index 0000000000..c0fc62d6b9 --- /dev/null +++ b/content/renderer/media/ohos/ohos_media_player_renderer_client_factory.h @@ -0,0 +1,45 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_FACTORY_H_ +#define CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_FACTORY_H_ + +#include + +#include "base/callback.h" +#include "base/macros.h" +#include "base/single_thread_task_runner.h" +#include "content/common/content_export.h" +#include "media/base/renderer_factory.h" +#include "media/mojo/clients/mojo_renderer_factory.h" + +namespace content { + +// The default class for creating a MediaPlayerRendererClient +// and its associated MediaPlayerRenderer. +class CONTENT_EXPORT OHOSMediaPlayerRendererClientFactory + : public media::RendererFactory { + public: + OHOSMediaPlayerRendererClientFactory( + std::unique_ptr mojo_renderer_factory); + ~OHOSMediaPlayerRendererClientFactory() override; + + std::unique_ptr CreateRenderer( + const scoped_refptr& media_task_runner, + const scoped_refptr& worker_task_runner, + media::AudioRendererSink* audio_renderer_sink, + media::VideoRendererSink* video_renderer_sink, + media::RequestOverlayInfoCB request_surface_cb, + const gfx::ColorSpace& target_color_space) override; + + // The MediaPlayerRenderer uses a Type::URL. + media::MediaResource::Type GetRequiredMediaResourceType() override; + + private: + std::unique_ptr mojo_renderer_factory_; +}; + +} // namespace content + +#endif // CONTENT_RENDERER_MEDIA_OHOS_MEDIA_PLAYER_RENDERER_CLIENT_FACTORY_H_ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index e2e39cc41a..3c9ab9200a 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -243,6 +243,10 @@ #include "content/renderer/java/gin_java_bridge_dispatcher.h" #endif +#if defined(OS_OHOS) +#include "cef/libcef/renderer/javascript/oh_gin_javascript_bridge_dispatcher.h" +#endif + using base::Time; using base::TimeDelta; using blink::ContextMenuData; @@ -2029,6 +2033,10 @@ RenderFrameImpl::RenderFrameImpl(CreateParams params) #if defined(OS_ANDROID) new GinJavaBridgeDispatcher(this); #endif + +#if defined(OS_OHOS) + new NWEB::OhGinJavascriptBridgeDispatcher(this); +#endif } mojom::FrameHost* RenderFrameImpl::GetFrameHost() { diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index 9db98fb1e0..9685aad3a0 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc @@ -788,6 +788,8 @@ GpuControlList::OsType GpuControlList::GetOsType() { return kOsLinux; #elif defined(OS_MAC) return kOsMacosx; +#elif defined(OS_OHOS) + return kOsOHOS; #else return kOsAny; #endif diff --git a/gpu/config/gpu_control_list.h b/gpu/config/gpu_control_list.h index 8a27b1c2bc..8ca7f70d96 100644 --- a/gpu/config/gpu_control_list.h +++ b/gpu/config/gpu_control_list.h @@ -31,6 +31,7 @@ class GPU_EXPORT GpuControlList { kOsChromeOS, kOsAndroid, kOsFuchsia, + kOsOHOS, kOsAny }; diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h index e9414b1807..a929a919d3 100644 --- a/ipc/ipc_message_start.h +++ b/ipc/ipc_message_start.h @@ -24,6 +24,7 @@ enum IPCMessageStart { NaClHostMsgStart, EncryptedMediaMsgStart, GinJavaBridgeMsgStart, + OhGinJavascriptBridgeMsgStart, ChromeUtilityPrintingMsgStart, ExtensionsGuestViewMsgStart, GuestViewMsgStart, diff --git a/media/base/null_video_sink.cc b/media/base/null_video_sink.cc index 3e23b2e8dc..197bdc447e 100644 --- a/media/base/null_video_sink.cc +++ b/media/base/null_video_sink.cc @@ -100,4 +100,8 @@ void NullVideoSink::PaintSingleFrame(scoped_refptr frame, new_frame_cb_.Run(std::move(frame)); } +#if defined(OS_OHOS) +void NullVideoSink::SetFinishPaintCallback(base::RepeatingClosure callback) {} +#endif + } // namespace media diff --git a/media/base/null_video_sink.h b/media/base/null_video_sink.h index 988799c488..4dc2fb8532 100644 --- a/media/base/null_video_sink.h +++ b/media/base/null_video_sink.h @@ -37,6 +37,9 @@ class MEDIA_EXPORT NullVideoSink : public VideoRendererSink { void Stop() override; void PaintSingleFrame(scoped_refptr frame, bool repaint_duplicate_frame) override; +#if defined(OS_OHOS) + void SetFinishPaintCallback(base::RepeatingClosure callback) override; +#endif void set_tick_clock_for_testing(const base::TickClock* tick_clock) { tick_clock_ = tick_clock; diff --git a/media/base/ohos/BUILD.gn b/media/base/ohos/BUILD.gn new file mode 100644 index 0000000000..96b060fe0a --- /dev/null +++ b/media/base/ohos/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright 2022 The Huawei Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if (is_ohos) { + import("//build/config/ohos/config.gni") + source_set("ohos") { + visibility = [ + "//media", + "//media/filters", + ] + + sources = [ + "ohos_media_player_bridge.cc", + "ohos_media_player_bridge.h", + "ohos_media_player_callback.cc", + "ohos_media_player_callback.h", + "ohos_media_player_listener.cc", + "ohos_media_player_listener.h", + ] + configs += [ "//media:subcomponent_config" ] + deps = [ + "//media/base", + "//url", + ] + libs = [ + "surface.z", + "media_client.z", + ] + include_dirs = ohos_src_includes + lib_dirs = ohos_libs_dir + } +} \ No newline at end of file diff --git a/media/base/ohos/ohos_media_player_bridge.cc b/media/base/ohos/ohos_media_player_bridge.cc new file mode 100644 index 0000000000..882a855a4c --- /dev/null +++ b/media/base/ohos/ohos_media_player_bridge.cc @@ -0,0 +1,214 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/base/ohos/ohos_media_player_bridge.h" + +#include +#include +#include "base/logging.h" +#include "base/threading/thread_task_runner_handle.h" + +namespace media { + +OHOSMediaPlayerBridge::OHOSMediaPlayerBridge( + const GURL& url, + const GURL& site_for_cookies, + const url::Origin& top_frame_origin, + const std::string& user_agent, + bool hide_url_log, + Client* client, + bool allow_credentials, + bool is_hls) + : client_(client), url_(url) {} + +OHOSMediaPlayerBridge::~OHOSMediaPlayerBridge() { + cached_buffers_.clear(); +} + +int32_t OHOSMediaPlayerBridge::Initialize() { + if (url_.SchemeIsBlob()) { + NOTREACHED(); + return -1; + } + task_runner_ = base::ThreadTaskRunnerHandle::Get(); + player_ = OHOS::Media::PlayerFactory::CreatePlayer(); + std::shared_ptr media_player_callback = + std::make_shared(task_runner_, + weak_factory_.GetWeakPtr()); + int32_t ret = player_->SetPlayerCallback(media_player_callback); + if (ret != 0) { + LOG(ERROR) << "SetPlayerCallback error::ret=" << ret; + return ret; + } + if (url_.SchemeIsFile()) { + ret = SetFdSource(url_.GetContent()); + } else { + ret = player_->SetSource(url_.spec()); + } + if (ret != 0) { + LOG(ERROR) << "SetSource error::ret=" << ret; + return ret; + } + consumer_surface_ = OHOS::Surface::CreateSurfaceAsConsumer(); + listener_ = new OHOSMediaPlayerListener( + task_runner_, weak_factory_.GetWeakPtr(), consumer_surface_); + consumer_surface_->RegisterConsumerListener(listener_); + consumer_surface_->SetUserData(surfaceFormat, + std::to_string(PIXEL_FMT_RGBA_8888)); + consumer_surface_->SetQueueSize(3); + ret = player_->SetVideoSurface(consumer_surface_); + if (ret != 0) { + LOG(ERROR) << "SetVideoSurface error::ret=" << ret; + return ret; + } + ret = player_->Prepare(); + if (ret != 0) { + LOG(ERROR) << "Prepare error::ret=" << ret << " url=" << url_.spec(); + return ret; + } + return ret; +} + +void OHOSMediaPlayerBridge::Start() { + if (player_ && player_state_ != OHOS::Media::PLAYER_STARTED) { + int32_t ret = player_->Play(); + if (ret != 0) { + LOG(ERROR) << "Play error::ret=" << ret; + } + } +} + +void OHOSMediaPlayerBridge::Pause() { + if (player_ && player_state_ == OHOS::Media::PLAYER_STARTED) { + int32_t ret = player_->Pause(); + if (ret != 0) { + LOG(ERROR) << "Pause error::ret=" << ret; + } + } +} + +void OHOSMediaPlayerBridge::SeekTo(base::TimeDelta time) { + if (player_) { + seeking_ = true; + pending_seek_ = time; + int32_t ret = player_->Seek(time.InMilliseconds(), + OHOS::Media::PlayerSeekMode::SEEK_CLOSEST); + if (ret != 0) { + LOG(ERROR) << "Seek error::ret=" << ret; + } + } +} + +void OHOSMediaPlayerBridge::SetVolume(float volume) { + if (player_) { + int32_t ret = player_->SetVolume(volume, volume); + if (ret != 0) { + LOG(ERROR) << "SetVolume error::ret=" << ret; + } + } +} + +base::TimeDelta OHOSMediaPlayerBridge::GetDuration() { + if (player_) { + int32_t time = -1; + (void)player_->GetDuration(time); + return base::TimeDelta::FromMilliseconds(time); + } + return base::TimeDelta(); +} + +base::TimeDelta OHOSMediaPlayerBridge::GetMediaTime() { + if (player_) { + if (seeking_) { + return pending_seek_; + } else { + int32_t time = -1; + (void)player_->GetCurrentTime(time); + return base::TimeDelta::FromMilliseconds(time); + } + } + return base::TimeDelta::FromMilliseconds(0); +} + +void OHOSMediaPlayerBridge::FinishPaint(int fd) { + if (!task_runner_->BelongsToCurrentThread()) { + task_runner_->PostTask(FROM_HERE, + base::BindOnce(&OHOSMediaPlayerBridge::FinishPaint, + weak_factory_.GetWeakPtr(), fd)); + return; + } + + if (cached_buffers_.front()->GetBufferHandle()->reserve[0] != fd) { + LOG(ERROR) << "match fd error render fd=" << fd << " browser fd=" + << cached_buffers_.front()->GetBufferHandle()->reserve[0]; + } + OHOS::SurfaceError ret = + consumer_surface_->ReleaseBuffer(cached_buffers_.front(), -1); + if (ret != OHOS::SURFACE_ERROR_OK) { + LOG(ERROR) << "release buffer fail, ret=" << ret; + } + cached_buffers_.pop_front(); +} + +void OHOSMediaPlayerBridge::SetPlaybackSpeed( + OHOS::Media::PlaybackRateMode mode) { + if (player_) { + int32_t ret = player_->SetPlaybackSpeed(mode); + if (ret != 0) { + LOG(ERROR) << "SetPlaybackSpeed error::ret=" << ret; + } + } +} + +void OHOSMediaPlayerBridge::OnEnd() { + client_->OnPlaybackComplete(); +} + +void OHOSMediaPlayerBridge::OnError(int32_t error_code) { + client_->OnError(error_code); +} + +void OHOSMediaPlayerBridge::OnSeekDone() { + seeking_ = false; +} + +void OHOSMediaPlayerBridge::OnPlayerStateUpdate( + OHOS::Media::PlayerStates player_state) { + player_state_ = player_state; +} + +void OHOSMediaPlayerBridge::OnBufferAvailable( + OHOS::sptr buffer) { + if (!task_runner_->BelongsToCurrentThread()) { + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&OHOSMediaPlayerBridge::OnBufferAvailable, + weak_factory_.GetWeakPtr(), std::move(buffer))); + return; + } + client_->OnFrameAvailable(buffer->GetBufferHandle()->reserve[0], + buffer->GetSize(), buffer->GetWidth(), + buffer->GetHeight()); + cached_buffers_.push_back(buffer); +} + +int32_t OHOSMediaPlayerBridge::SetFdSource(const std::string& path) { + int32_t fd = open(path.c_str(), O_RDONLY); + if (fd < 0) { + LOG(ERROR) << "SetFdSource error:Open file failed"; + return -1; + } + struct stat64 buffer; + if (fstat64(fd, &buffer) != 0) { + LOG(ERROR) << "SetFdSource error:Get file state failed"; + (void)close(fd); + return -1; + } + int64_t length = static_cast(buffer.st_size); + int32_t ret = player_->SetSource(fd, 0, length); + (void)close(fd); + return ret; +} + +} // namespace media diff --git a/media/base/ohos/ohos_media_player_bridge.h b/media/base/ohos/ohos_media_player_bridge.h new file mode 100644 index 0000000000..2446a5dec1 --- /dev/null +++ b/media/base/ohos/ohos_media_player_bridge.h @@ -0,0 +1,95 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_BASE_OHOS_MEDIA_PLAYER_BRIDGE_H_ +#define MEDIA_BASE_OHOS_MEDIA_PLAYER_BRIDGE_H_ + +#include +#include + +#include "base/memory/weak_ptr.h" +#include "media/base/media_export.h" +#include "media/base/ohos/ohos_media_player_callback.h" +#include "media/base/ohos/ohos_media_player_listener.h" +#include "url/gurl.h" +#include "url/origin.h" + +namespace media { +class MEDIA_EXPORT OHOSMediaPlayerBridge { + public: + class Client { + public: + virtual void OnFrameAvailable(int fd, + uint32_t size, + int32_t width, + int32_t height) = 0; + + // Called when media duration is first detected or changes. + virtual void OnMediaDurationChanged(base::TimeDelta duration) = 0; + + // Called when playback completed. + virtual void OnPlaybackComplete() = 0; + + // Called when error happens. + virtual void OnError(int error) = 0; + + // Called when video size has changed. + virtual void OnVideoSizeChanged(int width, int height) = 0; + }; + + enum MediaErrorType { + MEDIA_ERROR_FORMAT, + MEDIA_ERROR_DECODE, + MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK, + MEDIA_ERROR_INVALID_CODE, + MEDIA_ERROR_SERVER_DIED, + }; + + OHOSMediaPlayerBridge(const GURL& url, + const GURL& site_for_cookies, + const url::Origin& top_frame_origin, + const std::string& user_agent, + bool hide_url_log, + Client* client, + bool allow_credentials, + bool is_hls); + virtual ~OHOSMediaPlayerBridge(); + + int32_t Initialize(); + void Start(); + void Pause(); + void SeekTo(base::TimeDelta time); + base::TimeDelta GetDuration(); + void SetVolume(float volume); + base::TimeDelta GetMediaTime(); + void FinishPaint(int fd); + void SetPlaybackSpeed(OHOS::Media::PlaybackRateMode mode); + + void OnEnd(); + void OnError(int32_t errorCode); + void OnBufferAvailable(OHOS::sptr buffer); + void OnSeekDone(); + void OnPlayerStateUpdate(OHOS::Media::PlayerStates player_state); + + private: + + int32_t SetFdSource(const std::string& path); + + const std::string surfaceFormat = "SURFACE_FORMAT"; + std::shared_ptr player_ = nullptr; + std::deque> cached_buffers_; + OHOS::sptr consumer_surface_ = nullptr; + OHOS::sptr listener_; + scoped_refptr task_runner_; + Client* client_; + GURL url_; + bool seeking_ = false; + base::TimeDelta pending_seek_; + OHOS::Media::PlayerStates player_state_; + base::WeakPtrFactory weak_factory_{this}; + DISALLOW_COPY_AND_ASSIGN(OHOSMediaPlayerBridge); +}; +} // namespace media + +#endif // MEDIA_BASE_OHOS_MEDIA_PLAYER_BRIDGE_H_ diff --git a/media/base/ohos/ohos_media_player_callback.cc b/media/base/ohos/ohos_media_player_callback.cc new file mode 100644 index 0000000000..36c9ab8c1f --- /dev/null +++ b/media/base/ohos/ohos_media_player_callback.cc @@ -0,0 +1,100 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/base/ohos/ohos_media_player_callback.h" + +namespace media { + +OHOSMediaPlayerCallback::OHOSMediaPlayerCallback( + const scoped_refptr& task_runner, + base::WeakPtr media_player) + : task_runner_(task_runner), media_player_(media_player) { + DCHECK(task_runner_.get()); + DCHECK(media_player_); +} + +OHOSMediaPlayerCallback::~OHOSMediaPlayerCallback() {} + +void OHOSMediaPlayerCallback::OnError(OHOS::Media::PlayerErrorType errorType, + int32_t errorCode) { + LOG(ERROR) << "media player error code=" << errorCode; + int media_error_type = + OHOSMediaPlayerBridge::MediaErrorType::MEDIA_ERROR_INVALID_CODE; + if (IsUnsupportType(errorCode)) { + media_error_type = + OHOSMediaPlayerBridge::MediaErrorType::MEDIA_ERROR_FORMAT; + } else if (IsFatalError(errorCode)) { + media_error_type = + OHOSMediaPlayerBridge::MediaErrorType::MEDIA_ERROR_DECODE; + } + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&OHOSMediaPlayerBridge::OnError, media_player_, + media_error_type)); +} + +void OHOSMediaPlayerCallback::OnInfo(OHOS::Media::PlayerOnInfoType type, + int32_t extra, + const OHOS::Media::Format& infoBody) { + (void)infoBody; + switch (type) { + case OHOS::Media::INFO_TYPE_SEEKDONE: + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&OHOSMediaPlayerBridge::OnSeekDone, media_player_)); + break; + case OHOS::Media::INFO_TYPE_EOS: + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&OHOSMediaPlayerBridge::OnEnd, media_player_)); + break; + case OHOS::Media::INFO_TYPE_STATE_CHANGE: + task_runner_->PostTask( + FROM_HERE, + base::BindOnce(&OHOSMediaPlayerBridge::OnPlayerStateUpdate, + media_player_, + static_cast(extra))); + break; + case OHOS::Media::INFO_TYPE_POSITION_UPDATE: + break; + case OHOS::Media::INFO_TYPE_MESSAGE: + break; + default: + break; + } +} + +bool OHOSMediaPlayerCallback::IsUnsupportType(int32_t errorCode) { + switch (errorCode) { + case OHOS::Media::MSERR_UNSUPPORT: + case OHOS::Media::MSERR_UNSUPPORT_AUD_SRC_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_AUD_CHANNEL_NUM: + case OHOS::Media::MSERR_UNSUPPORT_AUD_ENC_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_AUD_PARAMS: + case OHOS::Media::MSERR_UNSUPPORT_VID_SRC_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_VID_ENC_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_VID_PARAMS: + case OHOS::Media::MSERR_UNSUPPORT_CONTAINER_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_PROTOCOL_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_VID_DEC_TYPE: + case OHOS::Media::MSERR_UNSUPPORT_AUD_DEC_TYPE: + return true; + } + return false; +} +bool OHOSMediaPlayerCallback::IsFatalError(int32_t errorCode) { + switch (errorCode) { + case OHOS::Media::MSERR_NO_MEMORY: + case OHOS::Media::MSERR_SERVICE_DIED: + case OHOS::Media::MSERR_CREATE_PLAYER_ENGINE_FAILED: + case OHOS::Media::MSERR_CREATE_AVMETADATAHELPER_ENGINE_FAILED: + case OHOS::Media::MSERR_AUD_DEC_FAILED: + case OHOS::Media::MSERR_VID_DEC_FAILED: + case OHOS::Media::MSERR_OPEN_FILE_FAILED: + case OHOS::Media::MSERR_FILE_ACCESS_FAILED: + return true; + } + return false; +} + +} // namespace media diff --git a/media/base/ohos/ohos_media_player_callback.h b/media/base/ohos/ohos_media_player_callback.h new file mode 100644 index 0000000000..b7837c39b0 --- /dev/null +++ b/media/base/ohos/ohos_media_player_callback.h @@ -0,0 +1,45 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_BASE_OHOS_MEDIA_PLAYER_CALLBACK_H_ +#define MEDIA_BASE_OHOS_MEDIA_PLAYER_CALLBACK_H_ + +#include +#include "base/logging.h" +#include "base/single_thread_task_runner.h" +#include "media/base/ohos/ohos_media_player_bridge.h" + +namespace base { +class SingleThreadTaskRunner; +} + +namespace media { + +class OHOSMediaPlayerBridge; + +class OHOSMediaPlayerCallback : public OHOS::Media::PlayerCallback { + public: + OHOSMediaPlayerCallback( + const scoped_refptr& task_runner, + base::WeakPtr media_player); + + virtual ~OHOSMediaPlayerCallback(); + + void OnError(OHOS::Media::PlayerErrorType errorType, + int32_t errorCode) override; + void OnInfo(OHOS::Media::PlayerOnInfoType type, + int32_t extra, + const OHOS::Media::Format& infoBody = {}) override; + bool IsUnsupportType(int32_t errorCode); + bool IsFatalError(int32_t errorCode); + + private: + scoped_refptr task_runner_; + base::WeakPtr media_player_; + DISALLOW_COPY_AND_ASSIGN(OHOSMediaPlayerCallback); +}; + +} // namespace media + +#endif // MEDIA_BASE_OHOS_MEDIA_PLAYER_CALLBACK_H_ diff --git a/media/base/ohos/ohos_media_player_listener.cc b/media/base/ohos/ohos_media_player_listener.cc new file mode 100644 index 0000000000..bb08070c17 --- /dev/null +++ b/media/base/ohos/ohos_media_player_listener.cc @@ -0,0 +1,40 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "media/base/ohos/ohos_media_player_listener.h" + +namespace media { + +OHOSMediaPlayerListener::OHOSMediaPlayerListener( + const scoped_refptr& task_runner, + base::WeakPtr media_player, + OHOS::sptr impl) + : task_runner_(task_runner), media_player_(media_player), surface_(impl) { + DCHECK(task_runner_.get()); + DCHECK(media_player_); +} + +OHOSMediaPlayerListener::~OHOSMediaPlayerListener() {} + +void OHOSMediaPlayerListener::OnBufferAvailable() { + OHOS::sptr buffer; + int32_t fence; + OHOS::SurfaceError ret; + auto surface_temp = surface_.promote(); + if (surface_temp == nullptr) { + LOG(ERROR) << "surface is null"; + return; + } + + ret = surface_temp->AcquireBuffer(buffer, fence, timestamp, damage); + if (ret != OHOS::SURFACE_ERROR_OK) { + LOG(ERROR) << "acquire buffer fail, ret=" << ret; + return; + } + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&OHOSMediaPlayerBridge::OnBufferAvailable, + media_player_, buffer)); +} + +} // namespace media diff --git a/media/base/ohos/ohos_media_player_listener.h b/media/base/ohos/ohos_media_player_listener.h new file mode 100644 index 0000000000..f2c3b70a27 --- /dev/null +++ b/media/base/ohos/ohos_media_player_listener.h @@ -0,0 +1,42 @@ +// Copyright 2022 The Huawei Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef MEDIA_BASE_OHOS_MEDIA_PLAYER_LISTENER_H_ +#define MEDIA_BASE_OHOS_MEDIA_PLAYER_LISTENER_H_ + +#include +#include "base/logging.h" +#include "base/single_thread_task_runner.h" +#include "media/base/ohos/ohos_media_player_bridge.h" + +namespace base { +class SingleThreadTaskRunner; +} + +namespace media { + +class OHOSMediaPlayerBridge; + +class OHOSMediaPlayerListener : public OHOS::IBufferConsumerListener { + public: + OHOSMediaPlayerListener( + const scoped_refptr& task_runner, + base::WeakPtr media_player, + OHOS::sptr impl); + + virtual ~OHOSMediaPlayerListener(); + void OnBufferAvailable() override; + + private: + scoped_refptr task_runner_; + base::WeakPtr media_player_; + OHOS::wptr surface_; + int64_t timestamp; + OHOS::Rect damage; + DISALLOW_COPY_AND_ASSIGN(OHOSMediaPlayerListener); +}; + +} // namespace media + +#endif // MEDIA_BASE_OHOS_MEDIA_PLAYER_LISTENER_H_ diff --git a/media/base/renderer_factory_selector.h b/media/base/renderer_factory_selector.h index c291fb35d2..8a19d8ca35 100644 --- a/media/base/renderer_factory_selector.h +++ b/media/base/renderer_factory_selector.h @@ -47,7 +47,12 @@ enum class RendererFactoryType { kMediaFoundation = 6, // MediaFoundationRendererClientFactory kFuchsia = 7, // FuchsiaRendererFactory kRemoting = 8, // RemotingRendererFactory +#if defined(OS_OHOS) + kOHOSMediaPlayer = 9, // OHOSMediaPlayerRendererFactory + kMaxValue = kOHOSMediaPlayer, +#else kMaxValue = kRemoting, +#endif }; class MEDIA_EXPORT RendererFactorySelector { diff --git a/media/base/video_renderer_sink.h b/media/base/video_renderer_sink.h index b7b034cdd0..82b45f062b 100644 --- a/media/base/video_renderer_sink.h +++ b/media/base/video_renderer_sink.h @@ -70,6 +70,10 @@ class MEDIA_EXPORT VideoRendererSink { virtual void PaintSingleFrame(scoped_refptr frame, bool repaint_duplicate_frame = false) = 0; +#if defined(OS_OHOS) + virtual void SetFinishPaintCallback(base::RepeatingClosure callback) = 0; +#endif + virtual ~VideoRendererSink() {} }; diff --git a/media/blink/video_frame_compositor.cc b/media/blink/video_frame_compositor.cc index 216883fe46..e0f171bf2b 100644 --- a/media/blink/video_frame_compositor.cc +++ b/media/blink/video_frame_compositor.cc @@ -242,9 +242,20 @@ void VideoFrameCompositor::PaintSingleFrame(scoped_refptr frame, repaint_duplicate_frame) && IsClientSinkAvailable()) { client_->DidReceiveFrame(); +#if defined(OS_OHOS) + if (finish_paint_cb_) { + finish_paint_cb_.Run(); + } +#endif } } +#if defined(OS_OHOS) +void VideoFrameCompositor::SetFinishPaintCallback(FinishPaintCallback callback) { + finish_paint_cb_ = std::move(callback); +} +#endif + void VideoFrameCompositor::UpdateCurrentFrameIfStale(UpdateType type) { TRACE_EVENT0("media", "VideoFrameCompositor::UpdateCurrentFrameIfStale"); DCHECK(task_runner_->BelongsToCurrentThread()); diff --git a/media/blink/video_frame_compositor.h b/media/blink/video_frame_compositor.h index 8ee417924f..11cb4e90a9 100644 --- a/media/blink/video_frame_compositor.h +++ b/media/blink/video_frame_compositor.h @@ -69,6 +69,10 @@ class MEDIA_BLINK_EXPORT VideoFrameCompositor : public VideoRendererSink, using OnNewFramePresentedCB = base::OnceClosure; +#if defined(OS_OHOS) + using FinishPaintCallback = base::RepeatingClosure; +#endif + enum UpdateType { kNormal, kBypassClient, // Disregards whether |client| is driving frame updates, and @@ -119,6 +123,10 @@ class MEDIA_BLINK_EXPORT VideoFrameCompositor : public VideoRendererSink, void PaintSingleFrame(scoped_refptr frame, bool repaint_duplicate_frame = false) override; +#if defined(OS_OHOS) + void SetFinishPaintCallback(FinishPaintCallback callback) override; +#endif + // If |client_| is not set, |callback_| is set, and |is_background_rendering_| // is true, it requests a new frame from |callback_|. Uses the elapsed time // between calls to this function as the render interval, defaulting to 16.6ms @@ -255,6 +263,9 @@ class MEDIA_BLINK_EXPORT VideoFrameCompositor : public VideoRendererSink, base::TimeTicks last_background_render_; OnNewProcessedFrameCB new_processed_frame_cb_; +#if defined(OS_OHOS) + FinishPaintCallback finish_paint_cb_; +#endif cc::UpdateSubmissionStateCB update_submission_state_callback_; // Callback used to satisfy video.rVFC requests. diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index 7e0e4ef53c..fe0a375373 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc @@ -732,7 +732,7 @@ void WebMediaPlayerImpl::DoLoad(LoadType load_type, learning::FeatureDictionary dict; will_play_helper_.BeginObservation(dict); -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) // Only allow credentials if the crossorigin attribute is unspecified // (kCorsModeUnspecified) or "use-credentials" (kCorsModeUseCredentials). // This value is only used by the MediaPlayerRenderer. @@ -2748,6 +2748,12 @@ std::unique_ptr WebMediaPlayerImpl::CreateRenderer( } void WebMediaPlayerImpl::StartPipeline() { +#if defined(OS_OHOS) + if (load_type_ == kLoadTypeURL) { + renderer_factory_selector_->SetBaseFactoryType( + RendererFactoryType::kOHOSMediaPlayer); + } +#endif DCHECK(main_task_runner_->BelongsToCurrentThread()); Demuxer::EncryptedMediaInitDataCB encrypted_media_init_data_cb = @@ -2760,9 +2766,12 @@ void WebMediaPlayerImpl::StartPipeline() { base::Unretained(compositor_.get()), BindToCurrentLoop(base::BindOnce( &WebMediaPlayerImpl::OnFirstFrame, weak_this_)))); - +#if defined(OS_ANDROID) || defined(OS_OHOS) #if defined(OS_ANDROID) if (demuxer_found_hls_ || +#else + if ( +#endif renderer_factory_selector_->GetCurrentFactory() ->GetRequiredMediaResourceType() == MediaResource::Type::URL) { // MediaPlayerRendererClientFactory is the only factory that a uses @@ -2782,7 +2791,7 @@ void WebMediaPlayerImpl::StartPipeline() { this, false, false); return; } -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) // Figure out which demuxer to use. if (demuxer_override_) { diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h index 541a7dd70d..cdcde027a0 100644 --- a/media/blink/webmediaplayer_impl.h +++ b/media/blink/webmediaplayer_impl.h @@ -844,7 +844,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl // MediaResource::Type::URL for now. bool using_media_player_renderer_ = false; -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) // Set during the initial DoLoad() call. Used to determine whether to allow // credentials or not for MediaPlayerRenderer. bool allow_media_player_renderer_credentials_ = false; diff --git a/media/media_options.gni b/media/media_options.gni index b3e22d553b..40c6e09c5a 100644 --- a/media/media_options.gni +++ b/media/media_options.gni @@ -30,6 +30,12 @@ media_subcomponent_deps = [ "//media/video", ] +if (is_ohos) { + media_subcomponent_deps += [ + "//media/base/ohos", + ] +} + if (is_fuchsia) { media_subcomponent_deps += [ "//media/fuchsia/cdm", diff --git a/media/mojo/clients/mojo_renderer_factory.cc b/media/mojo/clients/mojo_renderer_factory.cc index 3b317f7978..da7ef88cfa 100644 --- a/media/mojo/clients/mojo_renderer_factory.cc +++ b/media/mojo/clients/mojo_renderer_factory.cc @@ -100,7 +100,9 @@ std::unique_ptr MojoRendererFactory::CreateFlingingRenderer( video_renderer_sink, std::move(renderer_remote)); } +#endif // defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) std::unique_ptr MojoRendererFactory::CreateMediaPlayerRenderer( mojo::PendingReceiver renderer_extension_receiver, @@ -120,6 +122,6 @@ std::unique_ptr MojoRendererFactory::CreateMediaPlayerRenderer( video_renderer_sink, std::move(renderer_remote)); } -#endif // defined(OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) } // namespace media diff --git a/media/mojo/clients/mojo_renderer_factory.h b/media/mojo/clients/mojo_renderer_factory.h index bab4060fa2..51d585b05d 100644 --- a/media/mojo/clients/mojo_renderer_factory.h +++ b/media/mojo/clients/mojo_renderer_factory.h @@ -65,7 +65,9 @@ class MojoRendererFactory final : public RendererFactory { client_extenion_ptr, const scoped_refptr& media_task_runner, VideoRendererSink* video_renderer_sink); +#endif // defined (OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) std::unique_ptr CreateMediaPlayerRenderer( mojo::PendingReceiver renderer_extension_receiver, @@ -73,7 +75,7 @@ class MojoRendererFactory final : public RendererFactory { client_extension_remote, const scoped_refptr& media_task_runner, VideoRendererSink* video_renderer_sink); -#endif // defined (OS_ANDROID) +#endif // defined(OS_ANDROID) || defined(OS_OHOS) private: // InterfaceFactory or InterfaceProvider used to create or connect to remote diff --git a/media/mojo/mojom/BUILD.gn b/media/mojo/mojom/BUILD.gn index def4002603..436a73a2a3 100644 --- a/media/mojo/mojom/BUILD.gn +++ b/media/mojo/mojom/BUILD.gn @@ -8,6 +8,10 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("mojom") { generate_java = true + if (is_android || is_ohos) { + enabled_features = [ "is_android_or_ohos" ] + } + # TODO(crbug.com/676224): Conditionally add source files in this list when we # support EnabledIf attribute in mojom files. sources = [ diff --git a/media/mojo/mojom/interface_factory.mojom b/media/mojo/mojom/interface_factory.mojom index cf43b8cd01..8222459bb7 100644 --- a/media/mojo/mojom/interface_factory.mojom +++ b/media/mojo/mojom/interface_factory.mojom @@ -35,7 +35,7 @@ interface InterfaceFactory { CreateCastRenderer(mojo_base.mojom.UnguessableToken overlay_plane_id, pending_receiver renderer); - [EnableIf=is_android] + [EnableIf=is_android_or_ohos] // Creates a MediaPlayerRenderer (MediaPlayerRendererClientFactory). // - |renderer_extension| is bound in MediaPlayerRenderer, and receives calls // from MediaPlayerRendererClient. diff --git a/media/mojo/mojom/renderer_extensions.mojom b/media/mojo/mojom/renderer_extensions.mojom index bd245a4113..8d8e58cda5 100644 --- a/media/mojo/mojom/renderer_extensions.mojom +++ b/media/mojo/mojom/renderer_extensions.mojom @@ -9,6 +9,15 @@ import "mojo/public/mojom/base/time.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; +[EnableIf=is_ohos] +struct OhosSurfaceBufferHandle { + uint32 buffer_size; + int32 fd_browser; + int32 width; + int32 height; + handle buffer_fd; +}; + // Extension of the mojo::RendererClient communication layer for HLS and Android // software rendering fallback paths. // This allows the Browser side to call @@ -20,6 +29,8 @@ interface MediaPlayerRendererClientExtension { // metadata changes. OnVideoSizeChange(gfx.mojom.Size size); OnDurationChange(mojo_base.mojom.TimeDelta duration); + [EnableIf=is_ohos] + OnFrameUpdate(OhosSurfaceBufferHandle ohosSurfaceBufferHandle); }; // Extension of the mojo::RendererClient communication layer for HLS and Android @@ -34,6 +45,9 @@ interface MediaPlayerRendererExtension { // StreamTexture's set-up. InitiateScopedSurfaceRequest() => (mojo_base.mojom.UnguessableToken request_token); + + [EnableIf=is_ohos] + FinishPaint(int32 fd); }; // Extension of the mojo::RendererClient communication layer for media flinging, diff --git a/media/mojo/services/interface_factory_impl.cc b/media/mojo/services/interface_factory_impl.cc index 7fa9868bef..c4f401a140 100644 --- a/media/mojo/services/interface_factory_impl.cc +++ b/media/mojo/services/interface_factory_impl.cc @@ -119,7 +119,7 @@ void InterfaceFactoryImpl::CreateCastRenderer( } #endif -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void InterfaceFactoryImpl::CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_ptr, @@ -128,7 +128,9 @@ void InterfaceFactoryImpl::CreateMediaPlayerRenderer( renderer_extension_receiver) { NOTREACHED(); } +#endif //defined(OS_ANDROID) || defined(OS_OHOS) +#if defined(OS_ANDROID) void InterfaceFactoryImpl::CreateFlingingRenderer( const std::string& audio_device_id, mojo::PendingRemote diff --git a/media/mojo/services/interface_factory_impl.h b/media/mojo/services/interface_factory_impl.h index 8c98cc1e98..6fe4015aa9 100644 --- a/media/mojo/services/interface_factory_impl.h +++ b/media/mojo/services/interface_factory_impl.h @@ -56,13 +56,15 @@ class InterfaceFactoryImpl final const base::UnguessableToken& overlay_plane_id, mojo::PendingReceiver receiver) final; #endif -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(OS_OHOS) void CreateMediaPlayerRenderer( mojo::PendingRemote client_extension_remote, mojo::PendingReceiver receiver, mojo::PendingReceiver renderer_extension_receiver) final; +#endif // defined(OS_ANDROID) || defined(OS_OHOS) +#if defined(OS_ANDROID) void CreateFlingingRenderer( const std::string& presentation_id, mojo::PendingRemote diff --git a/net/cert/cert_verify_proc_ohos.cc b/net/cert/cert_verify_proc_ohos.cc index 08010f9f4d..b36b8d9022 100644 --- a/net/cert/cert_verify_proc_ohos.cc +++ b/net/cert/cert_verify_proc_ohos.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/net/cert/cert_verify_proc_ohos.h b/net/cert/cert_verify_proc_ohos.h index 05fb1b6dfe..4680f9d2a3 100644 --- a/net/cert/cert_verify_proc_ohos.h +++ b/net/cert/cert_verify_proc_ohos.h @@ -1,4 +1,4 @@ -// Copyright (c) 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/ohos_nweb/BUILD.gn b/ohos_nweb/BUILD.gn new file mode 100644 index 0000000000..c87c2a462f --- /dev/null +++ b/ohos_nweb/BUILD.gn @@ -0,0 +1,190 @@ +# Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/buildflag_header.gni") +import("//build/config/features.gni") +import("//tools/grit/grit_rule.gni") +import("//tools/grit/repack.gni") +import("//build/config/ohos/config.gni") + +component("nweb_hilog") { + sources = [ + "src/nweb_hilog.h", + ] + + libs = [ + "hilog", + ] + + include_dirs = ohos_src_includes + lib_dirs = ohos_libs_dir +} + +################################################# + +config("cef_nweb_config") { + include_dirs = [ + "include", + "src", + "src/cef_delegate", + "//cef", + "//cef/include", + "//cef/libcef/browser/net_service", + ] + include_dirs += ohos_src_includes + + lib_dirs = ohos_libs_dir + libs = [ + "inputmethod_client.z", + "ipc_core.z", + "inputmethod_ability.z", + ] + + defines = [ + "USING_CHROMIUM_INCLUDES", + ] +} + +component("cef_nweb") { + configs += [ + ":cef_nweb_config", + ] + + sources = [ + "src/cef_delegate/nweb_application.h", + "src/cef_delegate/nweb_application.cc", + "src/cef_delegate/nweb_handler_delegate.h", + "src/cef_delegate/nweb_handler_delegate.cc", + "src/cef_delegate/nweb_delegate.cc", + "src/cef_delegate/nweb_delegate.h", + "src/cef_delegate/nweb_render_handler.h", + "src/cef_delegate/nweb_render_handler.cc", + "src/cef_delegate/nweb_event_handler.h", + "src/cef_delegate/nweb_event_handler.cc", + "src/cef_delegate/nweb_js_dialog_result_impl.cc", + "src/cef_delegate/nweb_js_dialog_result_impl.h", + "src/cef_delegate/nweb_geolocation_callback.h", + "src/cef_delegate/nweb_geolocation_callback.cc", + "src/cef_delegate/nweb_preference_delegate.h", + "src/cef_delegate/nweb_preference_delegate.cc", + "src/cef_delegate/nweb_cookie_manager_delegate.cc", + "src/cef_delegate/nweb_cookie_manager_delegate.h", + "src/cef_delegate/nweb_resource_handler.cc", + "src/cef_delegate/nweb_resource_handler.h", + "src/cef_delegate/nweb_inputmethod_client.h", + "src/cef_delegate/nweb_access_request_delegate.cc", + "src/cef_delegate/nweb_access_request_delegate.h", + ] + + deps = [ + "//base:base", + "//cef:libweb_engine", + "//cef:libcef_dll_wrapper", + ] +} + +################################################# + +config("nweb_config") { + defines = [ + "OHOS_NWEB", + "OS_OHOS", + "USE_CEF", + ] + + include_dirs = [ + "include", + "src", + ] + + include_dirs += ohos_src_includes +} + +component("nweb_sources") { + configs += [ + ":nweb_config", + ":cef_nweb_config", + ] + + sources = [ + "include/nweb_access_request.h", + "include/nweb_console_log.h", + "include/nweb_cookie_manager.h", + "include/nweb_geolocation_callback_interface.h", + "include/nweb_js_dialog_result.h", + "include/nweb_value_callback.h", + "include/nweb_preference_delegate.h", + "include/nweb_handler.h", + "include/nweb.h", + "include/nweb_javascript_result_callback.h", + "include/nweb_value.h", + "src/nweb_cookie_manager_delegate_interface.h", + "src/nweb_cookie_manager_impl.cc", + "src/nweb_cookie_manager_impl.h", + "src/nweb_delegate_interface.h", + "src/nweb_delegate_adapter.h", + "src/nweb_delegate_adapter.cc", + "src/nweb_hilog.h", + "src/nweb_impl.cc", + "src/nweb_impl.h", + "src/nweb_input_handler.cc", + "src/nweb_input_handler.h", + "src/nweb_output_handler.cc", + "src/nweb_output_handler.h", + "src/nweb_url_resource_request_impl.h", + "src/nweb_url_resource_request_impl.cc", + "src/nweb_url_resource_error_impl.hh", + "src/nweb_inputmethod_handler.cc", + "src/nweb_inputmethod_handler.h", + ] + + deps = [ + ":nweb_hilog", + ":cef_nweb", + ] +} + +shared_library("libnweb_adapter") { + deps = [ + ":nweb_sources", + ] +} + +static_library("libohosnweb_static") { + deps = [ + ":nweb_sources", + ] +} + +################################################# + +config("ohosnweb_core_config") { + defines = [ + "OHOS_NWEB", + "OS_OHOS", + ] + + include_dirs = [ + "//cef", + "//cef/include", + ] + + include_dirs += ohos_src_includes +} + +executable("web_render") { + configs += [ + ":ohosnweb_core_config", + ] + + sources = [ + "src/ohos_nweb_main.cc", + ] + + deps = [ + ":nweb_hilog", + "//cef:libweb_engine", + "//cef:libcef_dll_wrapper", + ] +} \ No newline at end of file diff --git a/ohos_nweb/README.md b/ohos_nweb/README.md new file mode 100644 index 0000000000..2b17ab6e29 --- /dev/null +++ b/ohos_nweb/README.md @@ -0,0 +1,30 @@ +# 目录内容 + +该目录为OHOS系统提供对底层web内核的一层封装。各子目录内容为: + +- `include`:提供暴露给OHOS的接口和相关定义。OHOS侧可通过这些方法加载和使用web内核 +- `src`:对web内核的封装实现,其中各子目录中的内容表示对不同web内核的封装,其它部分为一些通用逻辑的实现 + - `cef_delegate`: 对cef接口的封装 + +# 编译 + +使用nweb根目录下build.sh脚本即可使用默认参数进行编译,并输出到默认的`out/Default`路径下。也可以自定义编译: + +```bash +gn args # 自定义编译参数和输出路径 +autoninja -C libweb_engine libnweb_adapter web_renderer +``` + +nweb侧将编译得到: + + - `libweb_engine.so`,包含整个chromium内核和cef框架实现 + - `libnweb_adapter.so`,包含OHOS与web内核的对接框架在内核侧的实现 + - `web_renderer`二进制,用于起render子进程和网络子进程 + +上述三个文件均位于``路径下 + +此外,如果通过web_all_build.xml拉取代码,可使用nweb根目录上一级的build.sh脚本进行完整构建,其中会先将nweb侧的库编译出来,并自动将OHOS侧编译所需要的库拷贝到指定位置。 + +# 单板运行 + +参考OHOS侧README说明 \ No newline at end of file diff --git a/ohos_nweb/include/nweb.h b/ohos_nweb/include/nweb.h new file mode 100755 index 0000000000..707d3a6fd8 --- /dev/null +++ b/ohos_nweb/include/nweb.h @@ -0,0 +1,295 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_H +#define NWEB_H + +#include +#include +#include +#include +#include "nweb_export.h" + +#include "nweb_download_callback.h" +#include "nweb_javascript_result_callback.h" +#include "nweb_preference.h" +#include "nweb_value_callback.h" +#include "nweb_hit_testresult.h" + +namespace OHOS::NWeb { +class NWebHandler; + +struct OHOS_NWEB_EXPORT NWebInitArgs { + std::string dump_path = ""; + bool frame_info_dump = false; + std::list web_engine_args_to_add; + std::list web_engine_args_to_delete; + bool multi_renderer_process = false; +}; + +struct OHOS_NWEB_EXPORT NWebCreateInfo { + /* size info */ + uint32_t width = 0; + uint32_t height = 0; + + /* output frame cb */ + std::function output_render_frame = + nullptr; + + /* init args */ + NWebInitArgs init_args; +}; + +class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this { + public: + NWeb() = default; + virtual ~NWeb() = default; + + virtual void Resize(uint32_t width, uint32_t height) = 0; + + /* lifecycle interface */ + virtual void OnPause() const = 0; + virtual void OnContinue() const = 0; + virtual void OnDestroy() = 0; + + /* event interface */ + virtual void OnTouchPress(int32_t id, double x, double y) = 0; + virtual void OnTouchRelease(int32_t id, double x = 0, double y = 0) = 0; + virtual void OnTouchMove(int32_t id, double x, double y) = 0; + virtual void OnTouchCancel() = 0; + virtual void OnNavigateBack() = 0; + + /** + * Loads the given URL. + * + * @param url String: the URL of the resource to load This value cannot be + * null. + * + * @return title string for the current page. + */ + virtual void Load(const std::string& url) const = 0; + /** + * Gets whether this NWeb has a back history item. + * + * @return true if this NWeb has a back history item + */ + virtual bool IsNavigatebackwardAllowed() const = 0; + /** + * Gets whether this NWeb has a forward history item. + * + * @return true if this NWeb has a forward history item + */ + virtual bool IsNavigateForwardAllowed() const = 0; + /** + * Gets whether this NWeb has a back or forward history item for number of + * steps. + * + * @param numSteps int: the negative or positive number of steps to move the + * history + * @return true if this NWeb has a forward history item + */ + virtual bool CanNavigateBackOrForward(int numSteps) const = 0; + /** + * Goes back in the history of this NWeb. + * + */ + virtual void NavigateBack() const = 0; + /** + * Goes forward in the history of this NWeb. + * + */ + virtual void NavigateForward() const = 0; + /** + * Reloads the current URL. + * + */ + virtual void Reload() const = 0; + /** + * Performs a zoom operation in this NWeb. + * + * @param zoomFactor float: the zoom factor to apply. The zoom factor will be + * clamped to the NWeb's zoom limits. This value must be in the range 0.01 + * to 100.0 inclusive. + * + */ + virtual void Zoom(float zoomFactor) const = 0; + + /** + * Stops the current load. + * + * @param code string: javascript code + */ + virtual void Stop() const = 0; + /** + * ExecuteJavaScript + * + */ + virtual void ExecuteJavaScript(const std::string& code) const = 0; + /** + * ExecuteJavaScript plus + * + * @param code string: javascript code + * + * @param callback NWebValueCallback: javascript running result + * + */ + virtual void ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const = 0; + /** + * Gets the NWebPreference object used to control the settings for this + * NWeb. + * + * @return a NWebPreference object that can be used to control this NWeb's + * settings This value cannot be null. + */ + virtual const std::shared_ptr GetPreference() const = 0; + /** + * Gets the last hit test result. + * + * @return the last HitTestResult + */ + virtual const HitTestResult GetHitTestResult() const = 0; + + /** + * Sets the background color for this view. + * + * @param color int: the color of the background + * + */ + virtual void PutBackgroundColor(int color) const = 0; + /** + * Sets the NWebDownloadCallback that will receive download event. + * This will replace the current handler. + * + * @param downloadListener NWebDownloadCallback: + * + */ + virtual void PutDownloadCallback( + std::shared_ptr downloadListener) = 0; + /** + * Sets the NWebHandler that will receive various notifications and + * requests. This will replace the current handler. + * + * @param client NWebHandler: an implementation of NWebHandler This value + * cannot be null. + * + */ + virtual void SetNWebHandler(std::shared_ptr handler) = 0; + /** + * Gets the NWebHandler. + * + * @return Gets the NWebHandler. + */ + virtual const std::shared_ptr GetNWebHandler() const = 0; + /** + * Gets the title for the current page. + * + * @return title string for the current page. + */ + virtual std::string Title() = 0; + /** + * Gets the progress for the current page. + * + * @return progress for the current page. + */ + virtual int PageLoadProgress() = 0; + + /** + * Gets the height of the HTML content. + * + * @return the height of the HTML content. + */ + virtual int ContentHeight() = 0; + + /** + * Gets the current scale of this NWeb. + * + * @return the current scale + */ + virtual float Scale() = 0; + + /** + * Loads the given URL with additional HTTP headers, specified as a map + * from name to value. Note that if this map contains any of the headers that + * are set by default by this NWeb, such as those controlling caching, + * accept types or the User-Agent, their values may be overridden by this + * NWeb's defaults. + * + * @param url String: the URL of the resource to load This value cannot be + * null. + * + * @param additionalHttpHeaders additionalHttpHeaders + */ + virtual void Load( + std::string& url, + std::map additionalHttpHeaders) = 0; + + /** + * Loads the given data into this NWeb, using baseUrl as the base URL for + * the content. The base URL is used both to resolve relative URLs and when + * applying JavaScript's same origin policy. The historyUrl is used for the + * history entry. + * + * @param baseUrl String: the URL to use as the page's base URL. If null + * defaults to 'about:blank'. This value may be null. + * @param data String: the URL to use as the page's base URL. If null defaults + * to 'about:blank'. This value may be null. + * @param mimeType String: the MIME type of the data, e.g. 'text/html'. This + * value may be null. + * @param encoding String: the encoding of the data This value may be null. + * @param historyUrl String: the URL to use as the history entry. If null + * defaults to 'about:blank'. If non-null, this must be a valid URL. This + * value may be null. + */ + virtual void LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) = 0; + + /** + * Loads the given data into this NWeb. + * + * @param data String: the URL to use as the page's base URL. If null defaults + * to 'about:blank'. This value may be null. + * @param mimeType String: the MIME type of the data, e.g. 'text/html'. This + * value may be null. + * @param encoding String: the encoding of the data This value may be null. + */ + virtual void LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) = 0; + + /** + * RegisterArkJSfunction + * + * @param object_name String: objector name + * @param method_list vector: vector list ,method list + */ + virtual void RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) = 0; + + /** + * UnregisterArkJSfunction + * + * @param object_name String: objector name + * @param method_list vector: vector list ,method list + */ + virtual void UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) = 0; + + /** + * SetNWebJavaScriptResultCallBack + * + * @param callback NWebJavaScriptResultCallBack: callback client + */ + virtual void SetNWebJavaScriptResultCallBack( + std::shared_ptr callback) = 0; +}; +} // namespace OHOS::NWeb + +#endif diff --git a/ohos_nweb/include/nweb_access_request.h b/ohos_nweb/include/nweb_access_request.h new file mode 100644 index 0000000000..853c91ec86 --- /dev/null +++ b/ohos_nweb/include/nweb_access_request.h @@ -0,0 +1,58 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_ACCESS_REQUEST_H +#define NWEB_ACCESS_REQUEST_H + +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebAccessRequest { + public: + NWebAccessRequest() = default; + + virtual ~NWebAccessRequest() = default; + + enum Resources { + GEOLOCATION = 1 << 0, + VIDEO_CAPTURE = 1 << 1, + AUDIO_CAPTURE = 1 << 2, + PROTECTED_MEDIA_ID = 1 << 3, + MIDI_SYSEX = 1 << 4, + }; + + /** + * Get the origin of the web page which is trying to access the resource. + * + * @return the origin of the web page which is trying to access the resource. + */ + virtual std::string Origin() = 0; + + /** + * Get the resource id the web page is trying to access. + * + * @return the resource id the web page is trying to access. + */ + virtual int ResourceAcessId() = 0; + + /** + * Agree the origin to access the given resources. + * The granted access is only valid for this WebView. + * + * @param resourceId id of the resource agreed to be accessed by origin. It + * must be equal to requested resource id returned by {@link + * #GetResourceAcessId()}. + */ + virtual void Agree(int resourceId) = 0; + + /** + * Refuse the request. + */ + virtual void Refuse() = 0; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_ACCESS_REQUEST_H \ No newline at end of file diff --git a/ohos_nweb/include/nweb_console_log.h b/ohos_nweb/include/nweb_console_log.h new file mode 100644 index 0000000000..2089061420 --- /dev/null +++ b/ohos_nweb/include/nweb_console_log.h @@ -0,0 +1,79 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_CONSOLE_LOG_H +#define NWEB_CONSOLE_LOG_H + +#include +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebConsoleLog { +public: + enum NWebConsoleLogLevel { + DEBUG = 1, + INFO, + WARNING, + ERROR, + UNKNOWN + }; + + NWebConsoleLog(int line_number, + std::string message, + NWebConsoleLogLevel log_level, + std::string sourceId) + : line_number_(line_number), + log_(message), + log_level_(log_level), + sourceId_(sourceId) {} + + ~NWebConsoleLog() = default; + + /** + * @brief Get console log line number + * + * @retval line number + */ + int LineNumer() const { + return line_number_; + } + + /** + * @brief Get console log message + * + * @retval message + */ + const std::string& Log() const { + return log_; + } + + /** + * @brief Get console log message level + * + * @retval message level + */ + NWebConsoleLogLevel LogLevel() const { + return log_level_; + } + + /** + * @brief Get console log source id + * + * @retval source id + */ + const std::string& SourceId() const { + return sourceId_; + } + +private: + int line_number_; + std::string log_; + NWebConsoleLogLevel log_level_; + std::string sourceId_; +}; +} + +#endif \ No newline at end of file diff --git a/ohos_nweb/include/nweb_cookie_manager.h b/ohos_nweb/include/nweb_cookie_manager.h new file mode 100644 index 0000000000..11800d8579 --- /dev/null +++ b/ohos_nweb/include/nweb_cookie_manager.h @@ -0,0 +1,108 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_COOKIE_MANAGER_H +#define NWEB_COOKIE_MANAGER_H + +#include +#include + +#include "nweb_export.h" +#include "nweb_value_callback.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebCookieManager { +public: + NWebCookieManager() = default; + + virtual ~NWebCookieManager() = default; + + /** + * @brief Gets the singleton NWebCookieManager instance. + * + * @return the singleton NWebCookieManager instance. + */ + static NWebCookieManager* GetInstance(); + + /** + * @brief Get whether the instance can send and accept cookies. + * + * @return true if the instance send and accept cookies. + */ + virtual bool IsAcceptCookieAllowed() const = 0; + + /** + * @brief Sets whether the instance should send and accept cookies. + * By default this is set to true and the nweb accepts cookies. + * + * @param accept whether the instance should send and accept cookies. + */ + virtual void PutAcceptCookieEnabled(bool accept) = 0; + + /** + * @brief Get whether instances can send and accept cookies for file scheme URLs. + * + * @return true if instances send and accept cookies for file scheme URLs. + */ + virtual bool IsFileURLSchemeCookiesAllowed() const = 0; + + /** + * @brief Sets whether the instance should send and accept cookies for file scheme URLs. + * + * @param allow whether the instance should send and accept cookies for file scheme URLs. + */ + virtual void PutAcceptFileURLSchemeCookiesEnabled(bool allow) = 0; + + /** + * @brief Gets all the cookies for the given URL. + * + * @param url the URL for which the cookies are requested. + * @param callback a callback which is executed when the cookies have been gotten. + */ + virtual void ReturnCookie(const std::string &url, + std::shared_ptr> callback) = 0; + + /** + * @brief GSets a single cookie (key-value pair) for the given URL. + * + * @param url the URL for which the cookie is to be set. + * @param value the cookie as a string, using the format of the 'Set-Cookie' HTTP response header. + * @param callback a callback to be executed when the cookie has been set. + */ + virtual void SetCookie(const std::string &url, + const std::string &value, + std::shared_ptr> callback) = 0; + + /** + * @brief Gets whether there are stored cookies. + * + * @param callback a callback to be executed when the cookie has checked. + */ + virtual void ExistCookies(std::shared_ptr> callback) = 0; + + /** + * @brief Ensures all cookies currently accessible through the ReturnCookie API are written to + * persistent storage. + * + * @param callback a callback to be executed when cookies has Stored. + */ + virtual void Store(std::shared_ptr> callback) = 0; + + /** + * @brief Removes all session cookies, which are cookies without an expiration date. + * + * @param callback a callback to be executed when all session cookies has removed. + */ + virtual void DeleteSessionCookies(std::shared_ptr> callback) = 0; + + /** + * @brief Removes all cookies. + * + * @param callback a callback to be executed when all cookies has removed. + */ + virtual void DeleteCookieEntirely(std::shared_ptr> callback) = 0; +}; +} + +#endif // NWebCookieManager \ No newline at end of file diff --git a/ohos_nweb/include/nweb_download_callback.h b/ohos_nweb/include/nweb_download_callback.h new file mode 100644 index 0000000000..5ce16d93b4 --- /dev/null +++ b/ohos_nweb/include/nweb_download_callback.h @@ -0,0 +1,35 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_DOWNLOAD_CALLBACK_H +#define NWEB_DOWNLOAD_CALLBACK_H + +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebDownloadCallback { +public: + NWebDownloadCallback() = default; + + virtual ~NWebDownloadCallback() = default; + /** + * @brief Notify the host application that a file should be downloaded + * + * @param url The full url to the content that should be downloaded. + * @param userAgent The user agent to be used for the download. + * @param contentDisposition Content-disposition http header, if present. + * @param mimetype The mimetype of the content reported by the server. + * @param contentLength The file size reported by the server. + */ + virtual void OnDownloadStart(const std::string& url, + const std::string& userAgent, + const std::string& contentDisposition, + const std::string& mimetype, + long contentLength) = 0; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_DOWNLOAD_CALLBACK_H \ No newline at end of file diff --git a/ohos_nweb/include/nweb_export.h b/ohos_nweb/include/nweb_export.h new file mode 100644 index 0000000000..e4ebd385d7 --- /dev/null +++ b/ohos_nweb/include/nweb_export.h @@ -0,0 +1,18 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OHOS_NWEB_EXPORT_H +#define OHOS_NWEB_EXPORT_H + +#if defined(OHOS_NWEB) + +#define OHOS_NWEB_EXPORT __attribute__((visibility("default"))) + +#else + +#define OHOS_NWEB_EXPORT + +#endif + +#endif // OHOS_NWEB_EXPORT_H diff --git a/ohos_nweb/include/nweb_geolocation_callback_interface.h b/ohos_nweb/include/nweb_geolocation_callback_interface.h new file mode 100644 index 0000000000..4a95f8e8db --- /dev/null +++ b/ohos_nweb/include/nweb_geolocation_callback_interface.h @@ -0,0 +1,32 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_GEOLOCATION_CALLBACK_INTERFACE_H +#define NWEB_GEOLOCATION_CALLBACK_INTERFACE_H + +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebGeolocationCallbackInterface { + public: + NWebGeolocationCallbackInterface() = default; + + virtual ~NWebGeolocationCallbackInterface() = default; + /** + * @brief Report the geolocation permission status from usrs. + * + * @param origin The origin that ask for the geolocation permission. + * @param allow The geolocation permission status. + * @param retain Whether to allow the geolocation permission status to be + * saved to the system. + */ + virtual void GeolocationCallbackInvoke(const std::string& origin, + bool allow, + bool retain) = 0; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_GEOLOCATION_CALLBACK_INTERFACE_H diff --git a/ohos_nweb/include/nweb_handler.h b/ohos_nweb/include/nweb_handler.h new file mode 100644 index 0000000000..af68a9a3d1 --- /dev/null +++ b/ohos_nweb/include/nweb_handler.h @@ -0,0 +1,311 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_HANDLER_H +#define NWEB_HANDLER_H + +#include +#include +#include +#include + +#include "nweb_access_request.h" +#include "nweb.h" +#include "nweb_console_log.h" +#include "nweb_geolocation_callback_interface.h" +#include "nweb_js_dialog_result.h" +#include "nweb_url_resource_error.h" +#include "nweb_url_resource_request.h" +#include "nweb_url_resource_response.h" + +namespace OHOS::NWeb { +/** + * @brief Describes how pixel bits encoder color data. + */ +enum class ImageColorType { + // Unknown color type. + COLOR_TYPE_UNKNOWN = -1, + + // RGBA with 8 bits per pixel (32bits total). + COLOR_TYPE_RGBA_8888 = 0, + + // BGRA with 8 bits per pixel (32bits total). + COLOR_TYPE_BGRA_8888 = 1, +}; + +/** + * @brief Describes how to interpret the alpha value of a pixel. + */ +enum class ImageAlphaType { + // Unknown alpha type. + ALPHA_TYPE_UNKNOWN = -1, + + // No transparency. The alpha component is ignored. + ALPHA_TYPE_OPAQUE = 0, + + // Transparency with pre-multiplied alpha component. + ALPHA_TYPE_PREMULTIPLIED = 1, + + // Transparency with post-multiplied alpha component. + ALPHA_TYPE_POSTMULTIPLIED = 2, +}; + +class OHOS_NWEB_EXPORT NWebHandler { + public: + NWebHandler() = default; + + virtual ~NWebHandler() = default; + + virtual void SetNWeb(std::shared_ptr nweb) {} + + virtual void OnProxyDied() {} + + virtual void OnRouterPush(const std::string& param) {} + + virtual void OnMessage(const std::string& param) {} + + /** + * @brief Notify the SDK that a web site has finished loading. This method is + * called only for main frame. + * + * @param httpStatusCode The status code for the http request. + * @param url The url of the web site. + */ + virtual void OnPageLoadEnd(int httpStatusCode, const std::string& url) {} + + /** + * @brief Notify the SDK that a web site has started loading. This method is + * called once for each main frame load. + * + * @param url The url to be loaded. + */ + virtual void OnPageLoadBegin(const std::string& url) {} + + /** + * @brief Report a load error to the SDK. + * + * @param errorCode The error code. + * @param description The error description. + * @param failingUrl The failed url. + */ + virtual void OnPageLoadError(int errorCode, + const std::string& description, + const std::string& failingUrl) {} + + /** + * @brief Give the SDK a chance to decide wheather to continue loading the + * url. + * + * @param url The url to be loaded. + * @return true to cancel the loading, false to continue the loading. + */ + virtual bool OnHandleInterceptUrlLoading(const std::string& url) { + return false; + } + + /** + * @brief Notify the SDK that the nweb will load the resource specified by + * the given url. + * + * @param url The url of the resource. + */ + virtual void OnResource(const std::string& url) {} + + /** + * @brief Notify the SDK of the changed document title. + * + * @param title The document title. + */ + virtual void OnPageTitle(const std::string& title) {} + + /** + * @brief Notify the SDK the current progress of loading a web site. + * + * @param newProgress Loading progress, an integer between 0 and 100. + */ + virtual void OnLoadingProgress(int newProgress) {} + + /** + * @brief Request display and focus for a new nweb. + * + */ + virtual void OnFocus() {} + + /** + * @brief Obtains a list of all visited history items, used for link coloring + * + * @retval visited history + */ + virtual const std::vector VisitedUrlHistory() { + return std::vector(); + } + + /** + * @brief Notify the host application of a resource request and allow the + * application to return the data. + * + * @param request the resource response's MIME type, for example { + * "text/html"}. + * + * @retval if NWebUrlResourceResponse is null ,No interception. + */ + virtual std::shared_ptr OnHandleInterceptRequest( + std::shared_ptr request) { + return nullptr; + } + + /** + * @brief Report web resource loading error to the SDK. These errors usually + * indicate inability to connect to the server. + * + * @param request The request information. + * @param error The error information. + */ + virtual void OnResourceLoadError( + std::shared_ptr request, + std::shared_ptr error) {} + + /** + * @brief Notify the SDK that an HTTP error has been received from the server + * while loading a resource. + * + * @param request The request information. + * @param errorResponse The error occurred. + */ + virtual void OnHttpError( + std::shared_ptr request, + std::shared_ptr errorResponse) {} + + /** + * @brief Notify the SDK of a new favicon for the current web site. + * + * @param data The raw image data for the icon. + * @param width The width of the icon in pixel. + * @param height The height of the icon in pixel. + * @param color_type The color data encoding type. + * @param alpha_type The alpha value of any pixel. + */ + virtual void OnPageIcon(const void* data, + size_t width, + size_t height, + ImageColorType color_type, + ImageAlphaType alpha_type) {} + + /** + * @brief Notify the SDK of the url for an touch icon. + * + * @param icon_url The icon url. + * @param precomposed The touch icon type. + */ + virtual void OnDesktopIconUrl(const std::string& icon_url, bool precomposed) { + } + + /** + * @brief Report a JavaScript console message to the host application. + * + * @param message Details of the console message. + * @return Return true to stop the message from being output to the console. + */ + virtual bool OnConsoleLog(const NWebConsoleLog& message) { return false; } + + /** + * @brief Show prompt to ask for the geolocation permission. + * + * @param origin String: the origin of the resource to get geolocation + * @param callback GeolocationCallbackInterface: callback to report + * geolocation + */ + virtual void OnGeolocationShow(const std::string& origin, + NWebGeolocationCallbackInterface* callback) {} + + /** + * @brief Notify the host application that the web page wants to display a + * JavaScript alert() dialog. + * + * @param url String: The url of the page requesting the dialog. + * @param message String: The message of the dialog. + * @param result std::shared_ptr: A NWebJSDialogResult to + * confirm that the user closed the window. + * @return To show a custom dialog, the app should return true. + */ + virtual bool OnAlertDialogByJS(const std::string& url, + const std::string& message, + std::shared_ptr result) { + return false; + } + + /** + * @brief Notify the host application that the web page wants to handle + * JavaScript onbeforeunload. + * + * @param url String: The url of the page requesting. + * @param message String: The message of the dialog. + * @param result std::shared_ptr: A NWebJSDialogResult to + * confirm that the user closed the window. + * @return To show a custom dialog, the app should return true. + */ + virtual bool OnBeforeUnloadByJS(const std::string& url, + const std::string& message, + std::shared_ptr result) { + return false; + } + + /** + * @brief Notify the host application that the web page wants to display a + * JavaScript prompt() dialog. + * + * @param url String: The url of the page requesting the dialog. + * @param message String: The message of the dialog. + * @param defaultValue String: The default value of the input message. + * @param result std::shared_ptr: A NWebJSDialogResult to + * confirm that the user closed the window. + * @return To show a custom dialog, the app should return true. + */ + virtual bool OnPromptDialogByJs(const std::string& url, + const std::string& message, + const std::string& defaultValue, + std::shared_ptr result) { + return false; + } + + /** + * @brief Notify the host application that the web page wants to display a + * JavaScript Confirm() dialog. + * + * @param url String: The url of the page requesting the dialog. + * @param message String: The message of the dialog. + * @param result std::shared_ptr: A NWebJSDialogResult to + * confirm that the user closed the window. + * @return To show a custom dialog, the app should return true. + */ + virtual bool OnConfirmDialogByJS(const std::string& url, + const std::string& message, + std::shared_ptr result) { + return false; + } + + /** + * @brief Hide prompt to ask for the geolocation permission. + */ + virtual void OnGeolocationHide() {} + + /** + * @brief + * + * @param request String: + */ + virtual void OnPermissionRequest( + std::shared_ptr request) {} + + /** + * @brief + * + * @param request String: + */ + virtual void OnPermissionRequestCanceled( + std::shared_ptr request) {} +}; +} // namespace OHOS::NWeb + +#endif // NWEB_HANDLER_H diff --git a/ohos_nweb/include/nweb_hit_testresult.h b/ohos_nweb/include/nweb_hit_testresult.h new file mode 100755 index 0000000000..4eb0d0915b --- /dev/null +++ b/ohos_nweb/include/nweb_hit_testresult.h @@ -0,0 +1,82 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEB_HIT_TESTRESULT_H +#define WEB_HIT_TESTRESULT_H + +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT HitTestResult { +public: + HitTestResult() { + type_ = UNKNOWN_TYPE; + } + virtual ~HitTestResult() = default; + /** + * Default HitTestResult, where the target is unknown. + */ + static const int UNKNOWN_TYPE = 0; + /** + * This type is no longer used. + */ + static const int ANCHOR_TYPE = 1; + /** + * HitTestResult for hitting a phone number. + */ + static const int PHONE_TYPE = 2; + /** + * HitTestResult for hitting a map address. + */ + static const int GEO_TYPE = 3; + /** + * HitTestResult for hitting an email address. + */ + static const int EMAIL_TYPE = 4; + /** + * HitTestResult for hitting an HTML::img tag. + */ + static const int IMAGE_TYPE = 5; + /** + * This type is no longer used. + */ + static const int IMAGE_ANCHOR_TYPE = 6; + /** + * HitTestResult for hitting a HTML::a tag with src=http. + */ + static const int SRC_ANCHOR_TYPE = 7; + /** + * HitTestResult for hitting a HTML::a tag with src=http + HTML::img. + */ + static const int SRC_IMAGE_ANCHOR_TYPE = 8; + /** + * HitTestResult for hitting an edit text area. + */ + static const int EDIT_TEXT_TYPE = 9; + + void SetType(int type) { + type_ = type; + } + + void SetExtra(std::string extra) { + extra_ = extra; + } + + int GetType() { + return type_; + } + + std::string GetExtra() { + return extra_; + } +private: + int type_; + std::string extra_; + +}; +} + +#endif // WEB_HIT_TESTRESULT_H diff --git a/ohos_nweb/include/nweb_javascript_result_callback.h b/ohos_nweb/include/nweb_javascript_result_callback.h new file mode 100644 index 0000000000..2faeb6495d --- /dev/null +++ b/ohos_nweb/include/nweb_javascript_result_callback.h @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_JAVASCRIPT_RESULT_CALLBACK_H +#define NWEB_JAVASCRIPT_RESULT_CALLBACK_H + +#include +#include +#include "nweb_export.h" +#include "nweb_value.h" + +namespace OHOS::NWeb { + class OHOS_NWEB_EXPORT NWebJavaScriptResultCallBack { + public: + NWebJavaScriptResultCallBack() = default; + + virtual ~NWebJavaScriptResultCallBack() = default; + + virtual std::shared_ptr GetJavaScriptResult( + std::vector> args, + const std::string &method, + const std::string &object_name) = 0; + }; +} +#endif \ No newline at end of file diff --git a/ohos_nweb/include/nweb_js_dialog_result.h b/ohos_nweb/include/nweb_js_dialog_result.h new file mode 100644 index 0000000000..13b0fe51f0 --- /dev/null +++ b/ohos_nweb/include/nweb_js_dialog_result.h @@ -0,0 +1,35 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_JS_DISLOG_RESULT_H +#define NWEB_JS_DISLOG_RESULT_H + +#include +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebJSDialogResult { +public: + virtual ~NWebJSDialogResult() = default; + + /** + * @brief Handle a confirmation response from the user. + */ + virtual void Confirm() = 0; + + /** + * @brief Handle a confirmation response from the user with input message. + * + * @param message confirm message. + */ + virtual void Confirm(const std::string &message) = 0; + + /** + * @brief Handle the result if the user cancelled the dialog. + */ + virtual void Cancel() = 0; +}; +} + +#endif \ No newline at end of file diff --git a/ohos_nweb/include/nweb_preference.h b/ohos_nweb/include/nweb_preference.h new file mode 100644 index 0000000000..ca85253000 --- /dev/null +++ b/ohos_nweb/include/nweb_preference.h @@ -0,0 +1,80 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_PREFERENCE_H +#define NWEB_PREFERENCE_H + +#include +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebPreference { + public: + NWebPreference() = default; + virtual ~NWebPreference() = default; + + enum AccessMode { ALWAYS_ALLOW = 0, NEVER_ALLOW = 1, COMPATIBILITY_MODE = 2 }; + + /* synchronous set web settings and web preferences */ + virtual void PutEnableContentAccess(bool flag) = 0; + virtual void PutEnableRawFileAccess(bool flag) = 0; + virtual void PutEnableRawFileAccessFromFileURLs(bool flag) = 0; + virtual void PutEnableUniversalAccessFromFileURLs(bool flag) = 0; + virtual void PutLoadImageFromNetworkDisabled(bool flag) = 0; + virtual void PutCursiveFontFamilyName(std::string font) = 0; + virtual void PutDatabaseAllowed(bool flag) = 0; + virtual void PutDefaultFixedFontSize(int size) = 0; + virtual void PutDefaultFontSize(int size) = 0; + virtual void PutDefaultTextEncodingFormat(std::string encoding) = 0; + virtual void PutDomStorageEnabled(bool flag) = 0; + virtual void PutFantasyFontFamilyName(std::string font) = 0; + virtual void PutFixedFontFamilyName(std::string font) = 0; + virtual void PutDarkModeEnabled(int forceDark) = 0; + virtual void PutIsCreateWindowsByJavaScriptAllowed(bool flag) = 0; + virtual void PutJavaScriptEnabled(bool flag) = 0; + virtual void PutImageLoadingAllowed(bool flag) = 0; + virtual void PutFontSizeLowerLimit(int size) = 0; + virtual void PutLogicalFontSizeLowerLimit(int size) = 0; + virtual void PutSansSerifFontFamilyName(std::string font) = 0; + virtual void PutSerifFontFamilyName(std::string font) = 0; + virtual void PutStandardFontFamilyName(std::string font) = 0; + virtual void PutUserAgent(std::string ua) = 0; + virtual void PutZoomingForTextFactor(int textZoom) = 0; + virtual void PutGeolocationAllowed(bool flag) = 0; + virtual void PutAccessModeForSecureOriginLoadFromInsecure( + AccessMode mode) = 0; + virtual void PutZoomingFunctionEnabled(bool flag) = 0; + + /* get methods*/ + virtual bool EnableContentAccess() = 0; + virtual bool EnableRawFileAccess() = 0; + virtual bool EnableRawFileAccessFromFileURLs() = 0; + virtual bool EnableUniversalAccessFromFileURLs() = 0; + virtual bool IsLoadImageFromNetworkDisabled() = 0; + virtual std::string CursiveFontFamilyName() = 0; + virtual bool IsDataBaseEnabled() = 0; + virtual int DefaultFixedFontSize() = 0; + virtual int DefaultFontSize() = 0; + virtual std::string DefaultTextEncodingFormat() = 0; + virtual std::string DefaultUserAgent() = 0; + virtual bool IsDomStorageEnabled() = 0; + virtual std::string FantasyFontFamilyName() = 0; + virtual std::string FixedFontFamilyName() = 0; + virtual int DarkModeEnabled() = 0; + virtual bool IsCreateWindowsByJavaScriptAllowed() = 0; + virtual bool IsJavaScriptAllowed() = 0; + virtual bool IsImageLoadingAllowed() = 0; + virtual int FontSizeLowerLimit() = 0; + virtual int LogicalFontSizeLowerLimit() = 0; + virtual std::string SansSerifFontFamilyName() = 0; + virtual std::string SerifFontFamilyName() = 0; + virtual std::string StandardFontFamilyName() = 0; + virtual std::string UserAgent() = 0; + virtual int ZoomingForTextFactor() = 0; + virtual bool GeolocationAllowed() = 0; + virtual int AccessModeForSecureOriginLoadFromInsecure() = 0; + virtual bool ZoomingfunctionEnabled() = 0; +}; +} // namespace OHOS::NWeb +#endif // NWEB_PREFERENCE_H diff --git a/ohos_nweb/include/nweb_url_resource_error.h b/ohos_nweb/include/nweb_url_resource_error.h new file mode 100644 index 0000000000..b24b7fbd90 --- /dev/null +++ b/ohos_nweb/include/nweb_url_resource_error.h @@ -0,0 +1,36 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_URL_RESOURCE_ERROR_H +#define NWEB_URL_RESOURCE_ERROR_H + +#include + +#include "nweb_export.h" +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebUrlResourceError { +public: + NWebUrlResourceError() = default; + + virtual ~NWebUrlResourceError() = default; + + /** + * @brief Gets the error description. + * + * @brief Gets the ErrorInfo. + * + * @return The description of the error. + */ + virtual const std::string &ErrorInfo() const = 0; + + /** + * @brief Get the Error Code. + * + * @return The error code. + */ + virtual int ErrorCode() const = 0; +}; +} + +#endif // NWEB_URL_RESOURCE_ERROR_H \ No newline at end of file diff --git a/ohos_nweb/include/nweb_url_resource_request.h b/ohos_nweb/include/nweb_url_resource_request.h new file mode 100644 index 0000000000..48e91d03ec --- /dev/null +++ b/ohos_nweb/include/nweb_url_resource_request.h @@ -0,0 +1,64 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +#ifndef NWEB_URL_RESOURCE_REQUEST_H +#define NWEB_URL_RESOURCE_REQUEST_H +#include +#include + +#include "nweb_export.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebUrlResourceRequest { +public: + NWebUrlResourceRequest() = default; + + virtual ~NWebUrlResourceRequest() = default; + + /** + * @brief Gets the method associated with the request, for example "GET". + * + * @retval method the method associated with the request. + */ + virtual const std::string &Method() = 0; + + /** + * @brief Gets the headers associated with the request. + * + * @retval the headers associated with the request. + */ + virtual const std::map &RequestHeaders() = 0; + + /** + * @brief Gets the URL for which the resource request was made. + * + * @retval URL url string + */ + virtual const std::string &Url() = 0; + + /** + * @brief Gets whether a gesture (such as a click) was associated with the + * request. + * + * @retval gesture + */ + virtual bool FromGesture() = 0; + + /** + * @brief Gets whether the request was made in order to fetch the main frame's + * document. + * + * @retval Is main frame + */ + virtual bool IsAboutMainFrame() = 0; + + /** + * @brief Gets whether the request was a result of a server-side redirect. + * + * @retval is redirect + */ + virtual bool IsRequestRedirect() = 0; +}; +} + +#endif \ No newline at end of file diff --git a/ohos_nweb/include/nweb_url_resource_response.h b/ohos_nweb/include/nweb_url_resource_response.h new file mode 100644 index 0000000000..0efc5cd930 --- /dev/null +++ b/ohos_nweb/include/nweb_url_resource_response.h @@ -0,0 +1,174 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_URL_RESOURCE_RESPONSE_H +#define NWEB_URL_RESOURCE_RESPONSE_H + +#include +#include + +namespace OHOS::NWeb { +class NWebUrlResourceResponse { +public: + /** + * @brief Constructs a resource response with the given parameters. + * + * @param mime_type the resource response's MIME type, for example { + * "text/html"}. + * @param encoding the resource response's character encoding, for example + * {"utf-8"}. + * @param status_code the status code needs to be in the ranges [100, 299], + * [400, 599]. Causing a redirect by specifying a 3xx code is not supported. + * @param reason_phrase the phrase describing the status code, for example + * "OK". Must be non-empty. + * @param request_headers the resource response's headers represented as a + * mapping of header name -> header value. + * @param input_stream the input stream that provides the resource response's + * data. + */ + NWebUrlResourceResponse(const std::string& mime_type, + const std::string& encoding, + const int status_code, + const std::string& reason_phrase, + const std::map& request_headers, + std::string& input_stream) + : mime_type_(mime_type), + encoding_(encoding), + status_code_(status_code), + reason_phrase_(reason_phrase), + request_headers_(request_headers), + input_stream_(input_stream) {} + + NWebUrlResourceResponse(const std::string& mime_type, + const std::string& encoding, + std::string& input_stream) + : mime_type_(mime_type), + encoding_(encoding), + input_stream_(input_stream) {} + + ~NWebUrlResourceResponse() = default; + + /** + * @brief get input stream + * + * @retval inputstream string + */ + const std::string& ResponseData() + { + return input_stream_; + } + + /** + * @brief set input stream + * + * @param input_stream set inputstream for example: fread(buf, 1, sizeof(buf), + * file) + */ + void PutResponseData(std::string& input_stream) + { + input_stream_ = input_stream; + } + + /** + * @brief Constructs a resource response with the given parameters. + * + * @param encoding encoding { "utf-8" } + */ + void PutResponseEncoding(const std::string& encoding) + { + encoding_ = encoding; + } + + /** + * @brief get encoding + * + * @retval encoding the resource response's encoding + */ + std::string ResponseEncoding() + { + return encoding_; + } + + /** + * @brief Constructs a resource response with the given parameters. + * + * @param mime_type mime_type{ "text/html" } + */ + void PutResponseMimeType(const std::string& mime_type) + { + mime_type_ = mime_type; + } + + /** + * @brief get mimetype + * + * @retval mimetype The resource response's MIME type + */ + std::string ResponseMimeType() + { + return mime_type_; + } + + /** + * @brief Set ResponseHeaders + * + * @param request_headers request header + */ + void PutResponseHeaders(const std::map& request_headers) + { + request_headers_ = request_headers; + } + + /** + * @brief Get ResponseHeaders + * + * @retval request headers + */ + const std::map& ResponseHeaders() + { + return request_headers_; + } + + /** + * @brief Set StatusCode And ReasonPhrase + * + * @param status_code status code + * @param reasonphrase reason phrase + */ + void PutResponseStateAndStatuscode(int status_code, + std::string reason_phrase) + { + status_code_ = status_code; + reason_phrase_ = reason_phrase; + } + + /** + * @brief get status code + * + * @retval status code + */ + int ResponseStatusCode() + { + return status_code_; + } + + /** + * @brief Get ReasonPhrase + * + * @retval errorcode reason + */ + std::string ResponseStatus() + { + return reason_phrase_; + } +private: + std::string mime_type_; + std::string encoding_; + int status_code_ = 200; + std::string reason_phrase_; + std::map request_headers_; + std::string& input_stream_; +}; +} +#endif \ No newline at end of file diff --git a/ohos_nweb/include/nweb_value.h b/ohos_nweb/include/nweb_value.h new file mode 100644 index 0000000000..ee4c745e3c --- /dev/null +++ b/ohos_nweb/include/nweb_value.h @@ -0,0 +1,70 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_VALUE_H_ +#define NWEB_VALUE_H_ + +#include +#include +#include "nweb_export.h" + +namespace OHOS::NWeb { + union data_union { + int n; + double f; + bool b; + }; + + class OHOS_NWEB_EXPORT NWebValue { + public: + enum class Type : unsigned char { + NONE = 0, + BOOLEAN, + INTEGER, + DOUBLE, + STRING, + BINARY, + DICTIONARY, + LIST + }; + + NWebValue(Type type) : type_(type) {} + + ~NWebValue() = default; + + bool GetBoolean() { return data_.b; } + + void SetBoolean(bool b) { data_.b = b; } + + void SetString(std::string str) { str_ = str; } + + std::string GetString() { return str_; } + + void SetDouble(double dou) { data_.f = dou; } + + double GetDouble() { return data_.f; } + + void SetInt(int num) { data_.n = num; } + + int GetInt() { return data_.n; } + + void SetJsonString(std::string json_string) { str_json_ = json_string; } + + std::string GetJsonString() { return str_json_; } + + Type GetType() { return type_; } + + void SetType(Type type) { type_ = type; } + + int error_ = 0; + + private: + Type type_ = Type::NONE; + data_union data_; + std::string str_; + std::string str_json_; + }; +} + +#endif // NWEB_VALUE_H_ diff --git a/ohos_nweb/include/nweb_value_callback.h b/ohos_nweb/include/nweb_value_callback.h new file mode 100644 index 0000000000..aeba1f792a --- /dev/null +++ b/ohos_nweb/include/nweb_value_callback.h @@ -0,0 +1,22 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef VALUE_CALLBACK_H +#define VALUE_CALLBACK_H + +#include "nweb_export.h" + +namespace OHOS::NWeb { +template +class OHOS_NWEB_EXPORT NWebValueCallback { +public: + NWebValueCallback() = default; + + virtual ~NWebValueCallback() = default; + + virtual void OnReceiveValue(T value) = 0; +}; +} + +#endif // NWebValueCallback \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.cc b/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.cc new file mode 100644 index 0000000000..304addd1ad --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.cc @@ -0,0 +1,42 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h" +#include "base/logging.h" +#include "cef/include/cef_permission_request.h" + +namespace OHOS::NWeb { +NWebAccessRequestDelegate::NWebAccessRequestDelegate(CefRefPtr request) + : request_(request) {} + +std::string NWebAccessRequestDelegate::Origin() { + if (request_ != nullptr) { + return request_->Origin(); + } + return nullptr; +} + +int NWebAccessRequestDelegate::ResourceAcessId() { + if (request_ != nullptr) { + return request_->ResourceAcessId(); + } + return -1; +} + +void NWebAccessRequestDelegate::Agree(int resourceId) { + if (request_ != nullptr) { + if (resourceId == ResourceAcessId()) { + request_->ReportRequestResult(true); + } else { + request_->ReportRequestResult(false); + } + } +} + +void NWebAccessRequestDelegate::Refuse() { + if (request_ != nullptr) { + request_->ReportRequestResult(false); + } +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h b/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h new file mode 100644 index 0000000000..24cc0ff87c --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_access_request_delegate.h @@ -0,0 +1,30 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_ACCESS_REQUEST_DELEGATE_H +#define NWEB_ACCESS_REQUEST_DELEGATE_H + +#include "cef/include/cef_browser.h" +#include "ohos_nweb/include/nweb_access_request.h" + +namespace OHOS::NWeb { +class NWebAccessRequestDelegate : public NWebAccessRequest { + public: + explicit NWebAccessRequestDelegate(CefRefPtr request); + ~NWebAccessRequestDelegate() = default; + + std::string Origin() override; + + int ResourceAcessId() override; + + void Agree(int resourceId) override; + + void Refuse() override; + + private: + CefRefPtr request_ = nullptr; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_ACCESS_REQUEST_DELEGATE_H diff --git a/ohos_nweb/src/cef_delegate/nweb_application.cc b/ohos_nweb/src/cef_delegate/nweb_application.cc new file mode 100644 index 0000000000..7bbfd31f93 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_application.cc @@ -0,0 +1,93 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_application.h" + +#include +#include +#include "cef/include/wrapper/cef_helpers.h" +#include "nweb_handler_delegate.h" + +namespace OHOS::NWeb { +NWebApplication::NWebApplication( + std::shared_ptr preference_delegate, + std::string url, + CefRefPtr handler_delegate) + : preference_delegate_(preference_delegate), + url_(url), + handler_delegate_(handler_delegate) {} + +NWebApplication::~NWebApplication() {} + +std::string NWebApplication::GetURL() { + return url_; +} + +/* CefApp methods begin */ +CefRefPtr +NWebApplication::GetBrowserProcessHandler() { + return this; +} + +CefRefPtr NWebApplication::GetRenderProcessHandler() { + return this; +} +/* CefApp methods end */ + +/* CefBrowserProcessHandler methods begin */ +void NWebApplication::OnContextInitialized() { + LOG(INFO) << "NWebApplication::OnContextInitialized"; + CEF_REQUIRE_UI_THREAD(); + CreateBrowser(); +} +/* CefBrowserProcessHandler methods end */ + +/* CefRenderProcessHandler methods begin */ +void NWebApplication::OnWebKitInitialized() { + LOG(INFO) << "OnWebKitInitialized"; +} +/* CefRenderProcessHandler methods begin */ + +CefRefPtr NWebApplication::GetDefaultClient() { + // Called when a new browser window is created via the Chrome runtime UI + return handler_delegate_; +} + +void NWebApplication::PopulateCreateSettings( + CefRefPtr command_line, + CefBrowserSettings& browser_settings) { + if (command_line->HasSwitch(switches::kOffScreenFrameRate)) { + browser_settings.windowless_frame_rate = + atoi(command_line->GetSwitchValue(switches::kOffScreenFrameRate) + .ToString() + .c_str()); + } +} + +void NWebApplication::CreateBrowser() { + CefRefPtr command_line = + CefCommandLine::GetGlobalCommandLine(); + + // Specify CEF browser settings here. + CefBrowserSettings browser_settings; + PopulateCreateSettings(command_line, browser_settings); + browser_settings.background_color = 0xffffffff; + preference_delegate_->ComputeBrowserSettings(browser_settings); + + std::string url; + url = command_line->GetSwitchValue(switches::kUrl); + if (url.empty()) { + url = GetURL(); + } + + // Information used when creating the native window. + CefWindowInfo window_info; + CefWindowHandle handle = kNullWindowHandle; + window_info.SetAsWindowless(handle); + + // Create the first browser window. + CefBrowserHost::CreateBrowser(window_info, handler_delegate_, url, + browser_settings, nullptr, nullptr); +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_application.h b/ohos_nweb/src/cef_delegate/nweb_application.h new file mode 100644 index 0000000000..247e813cd4 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_application.h @@ -0,0 +1,56 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_APPLICATION_H +#define NWEB_APPLICATION_H + +#include +#include "cef/include/cef_app.h" +#include "nweb_handler_delegate.h" +#include "nweb_preference_delegate.h" + +namespace OHOS::NWeb { +namespace switches { +const char kUrl[] = "url"; +const char kOffScreenFrameRate[] = "off-screen-frame-rate"; +} // namespace switches + +class NWebApplication : public CefApp, + public CefBrowserProcessHandler, + public CefRenderProcessHandler { + public: + NWebApplication(std::shared_ptr preference_delegate, + std::string url, + CefRefPtr handler_delegate); + ~NWebApplication(); + + /* CefApp methods begine */ + CefRefPtr GetBrowserProcessHandler() override; + CefRefPtr GetRenderProcessHandler() override; + /* CefApp methods end */ + + /* CefBrowserProcessHandler methods begin */ + void OnContextInitialized() override; + CefRefPtr GetDefaultClient() override; + std::string GetURL(); + /* CefBrowserProcessHandler methods end */ + + /* CefRenderProcessHandler methods begin */ + void OnWebKitInitialized() override; + /* CefRenderProcessHandler methods begin */ + + void CreateBrowser(); + + private: + void PopulateCreateSettings(CefRefPtr command_line, + CefBrowserSettings& browser_settings); + + std::shared_ptr preference_delegate_ = nullptr; + std::string url_; + CefRefPtr handler_delegate_{nullptr}; + // Include the default reference counting implementation. + IMPLEMENT_REFCOUNTING(NWebApplication); +}; // NWebApplication +} // namespace OHOS::NWeb +#endif // NWebApplication diff --git a/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.cc b/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.cc new file mode 100644 index 0000000000..0b0bb59284 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.cc @@ -0,0 +1,320 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_cookie_manager_delegate.h" +#include +#include +#include +#include "base/logging.h" +#include "base/synchronization/waitable_event.h" +#include "base/time/time.h" +#include "cef/include/cef_waitable_event.h" +#include "cef/libcef/common/net_service/net_service_util.h" +#include "cef/libcef/common/time_util.h" +#include "net/cookies/canonical_cookie.h" +#include "url/gurl.h" + +using namespace OHOS::NWeb; +using base::WaitableEvent; + +namespace { +class CookieCompletionCallback : public CefCompletionCallback { + public: + explicit CookieCompletionCallback( + std::shared_ptr event, + std::shared_ptr> callback) + : event_(event), callback_(callback) {} + void OnComplete() override { + if (event_ != nullptr) { + event_->Signal(); + } + if (callback_ != nullptr) { + callback_->OnReceiveValue(true); + } + } + + private: + std::shared_ptr event_; + std::shared_ptr> callback_; + IMPLEMENT_REFCOUNTING(CookieCompletionCallback); + DISALLOW_COPY_AND_ASSIGN(CookieCompletionCallback); +}; + +class CookieSetCallback : public CefSetCookieCallback { + public: + explicit CookieSetCallback(std::shared_ptr event, + std::shared_ptr> callback) + : event_(event), callback_(callback), set_success_(false) {} + void OnComplete(bool success) override { + set_success_ = success; + if (event_ != nullptr) { + event_->Signal(); + } + if (callback_ != nullptr) { + callback_->OnReceiveValue(set_success_); + } + } + + bool IsSetSuccess() const { return set_success_; } + + private: + std::shared_ptr event_; + std::shared_ptr> callback_; + bool set_success_; + + IMPLEMENT_REFCOUNTING(CookieSetCallback); + DISALLOW_COPY_AND_ASSIGN(CookieSetCallback); +}; + +class HasCookieVisitor : public CefCookieVisitor { + public: + HasCookieVisitor() = delete; + explicit HasCookieVisitor(std::shared_ptr> callback) + : callback_(callback) {} + ~HasCookieVisitor() = default; + + bool Visit(const CefCookie& cookie, + int count, + int total, + bool& deleteCookie) override { + if (total == 0) { + if (callback_ != nullptr) { + callback_->OnReceiveValue(false); + } + } + return true; + } + + void SetCookieLine(const CefString& cookieLine) override { + if (callback_ != nullptr) { + callback_->OnReceiveValue(true); + } + } + + private: + std::shared_ptr> callback_; + IMPLEMENT_REFCOUNTING(HasCookieVisitor); +}; + +class ReturnCookieVisitor : public CefCookieVisitor { + public: + ReturnCookieVisitor() = delete; + explicit ReturnCookieVisitor( + std::shared_ptr> callback) + : cookie_line_(std::string()), + cookies_(std::vector()), + callback_(callback) {} + ~ReturnCookieVisitor() = default; + + bool Visit(const CefCookie& cookie, + int count, + int total, + bool& deleteCookie) override { + if (total == 0) { + if (callback_ != nullptr) { + callback_->OnReceiveValue(cookie_line_); + } + return true; + } + deleteCookie = !cookie.has_expires ? delete_session_ : false; + cookies_.push_back(cookie); + return true; + } + + void SetCookieLine(const CefString& cookieLine) override { + cookie_line_ = cookieLine.ToString(); + + if (callback_ != nullptr) { + callback_->OnReceiveValue(cookie_line_); + } + } + + std::vector& GetVisitorCookies() { return cookies_; } + + std::string ReturnCookieLine() const { return cookie_line_; } + + private: + bool delete_session_; + std::string cookie_line_; + std::vector cookies_; + std::shared_ptr> callback_; + IMPLEMENT_REFCOUNTING(ReturnCookieVisitor); +}; + +class CookieDeleteCallback : public CefDeleteCookiesCallback { + public: + CookieDeleteCallback() = delete; + CookieDeleteCallback(std::shared_ptr event, + std::shared_ptr> callback) + : event_(event), callback_(callback), num_deleted_(0) {} + explicit CookieDeleteCallback( + std::shared_ptr> callback) + : event_(nullptr), callback_(callback), num_deleted_(0) {} + explicit CookieDeleteCallback(std::shared_ptr event) + : event_(event), callback_(nullptr), num_deleted_(0) {} + + void OnComplete(int num_deleted) override { + num_deleted_ = num_deleted; + if (callback_ != nullptr) { + if (num_deleted_ > 0) { + callback_->OnReceiveValue(true); + } else { + callback_->OnReceiveValue(false); + } + } + if (event_ != nullptr) { + event_->Signal(); + } + } + + int GetNumDeleted() const { return num_deleted_; } + + private: + std::shared_ptr event_; + std::shared_ptr> callback_; + int num_deleted_; + + IMPLEMENT_REFCOUNTING(CookieDeleteCallback); + DISALLOW_COPY_AND_ASSIGN(CookieDeleteCallback); +}; +} // namespace + +namespace OHOS::NWeb { +NWebCookieManagerDelegate::NWebCookieManagerDelegate() {} + +CefRefPtr +NWebCookieManagerDelegate::GetGlobalCookieManager() { + if (!cookie_manager_) { + cookie_manager_ = CefCookieManager::GetGlobalManager(nullptr); + } + return cookie_manager_; +} + +bool NWebCookieManagerDelegate::IsAcceptCookieAllowed() { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return false; + } + return cookie_manager->IsAcceptCookieAllowed(); +} + +void NWebCookieManagerDelegate::PutAcceptCookieEnabled(bool accept) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + cookie_manager->PutAcceptCookieEnabled(accept); +} + +bool NWebCookieManagerDelegate::IsFileURLSchemeCookiesAllowed() { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return false; + } + return cookie_manager->IsFileURLSchemeCookiesAllowed(); +} + +void NWebCookieManagerDelegate::PutAcceptFileURLSchemeCookiesEnabled( + bool allow) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + cookie_manager->PutAcceptFileURLSchemeCookiesEnabled(allow); +} + +void NWebCookieManagerDelegate::ReturnCookie( + const std::string& url, + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + LOG(ERROR) << "GetGlobalCookieManager failed"; + return; + } + CefRefPtr visitor = new ReturnCookieVisitor(callback); + if (!cookie_manager->VisitUrlCookies(CefString(url), false, visitor)) { + LOG(ERROR) << "VisitUrlCookies failed"; + return; + } +} + +void NWebCookieManagerDelegate::SetCookie( + const std::string& url, + const std::string& value, + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + LOG(ERROR) << "GetGlobalCookieManager failed"; + return; + } + CefCookie cef_cookie; + if (!CefCookieManager::CreateCefCookie(CefString(url), CefString(value), + cef_cookie)) { + LOG(ERROR) << "CreateCefCookie failed"; + return; + } + if (!cookie_manager->SetCookie(CefString(url), cef_cookie, + new CookieSetCallback(nullptr, callback))) { + LOG(ERROR) << "SetCookie error"; + return; + } +} + +void NWebCookieManagerDelegate::ExistCookies( + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + CefRefPtr visitor = new HasCookieVisitor(callback); + if (!cookie_manager->VisitAllCookies(visitor)) { + LOG(INFO) << "VisitAllCookies failed"; + return; + } +} + +void NWebCookieManagerDelegate::Store( + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + CefRefPtr complete = + new CookieCompletionCallback(nullptr, callback); + if (!cookie_manager->FlushStore(complete)) { + LOG(ERROR) << "Store Failed"; + callback->OnReceiveValue(false); + } +} + +void NWebCookieManagerDelegate::DeleteSessionCookies( + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + CefRefPtr delete_callback = + new CookieDeleteCallback(callback); + if (!cookie_manager->DeleteCookies(CefString(std::string()), + CefString(std::string()), true, + delete_callback)) { + LOG(ERROR) << "DeleteCookieEntirely Failed"; + } +} + +void NWebCookieManagerDelegate::DeleteCookieEntirely( + std::shared_ptr> callback) { + CefRefPtr cookie_manager = GetGlobalCookieManager(); + if (cookie_manager == nullptr) { + return; + } + CefRefPtr delete_callback = + new CookieDeleteCallback(callback); + if (!cookie_manager->DeleteCookies(CefString(std::string()), + CefString(std::string()), false, + delete_callback)) { + LOG(ERROR) << "DeleteCookieEntirely Failed"; + } +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.h b/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.h new file mode 100644 index 0000000000..cb4c60b625 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_cookie_manager_delegate.h @@ -0,0 +1,41 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_COOKIE_MANAGER_DELEGATE_H +#define NWEB_COOKIE_MANAGER_DELEGATE_H + +#include "cef/include/cef_base.h" +#include "cef/include/cef_cookie.h" +#include "nweb_cookie_manager_delegate_interface.h" +#include "nweb_value_callback.h" + +namespace OHOS::NWeb { +class NWebCookieManagerDelegate : public NWebCookieManagerDelegateInterface { + public: + NWebCookieManagerDelegate(); + ~NWebCookieManagerDelegate() = default; + + bool IsAcceptCookieAllowed() override; + void PutAcceptCookieEnabled(bool accept) override; + bool IsFileURLSchemeCookiesAllowed() override; + void PutAcceptFileURLSchemeCookiesEnabled(bool allow) override; + void ReturnCookie( + const std::string& url, + std::shared_ptr> callback) override; + void SetCookie(const std::string& url, + const std::string& value, + std::shared_ptr> callback) override; + void ExistCookies(std::shared_ptr> callback) override; + void Store(std::shared_ptr> callback) override; + void DeleteSessionCookies( + std::shared_ptr> callback) override; + void DeleteCookieEntirely( + std::shared_ptr> callback) override; + + private: + CefRefPtr GetGlobalCookieManager(); + CefRefPtr cookie_manager_ = nullptr; +}; +} // namespace OHOS::NWeb +#endif \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_delegate.cc b/ohos_nweb/src/cef_delegate/nweb_delegate.cc new file mode 100755 index 0000000000..16a7c15f74 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_delegate.cc @@ -0,0 +1,459 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_delegate.h" + +#include +#include "nweb_application.h" +#include "nweb_handler_delegate.h" +#include "nweb_render_handler.h" + +#include "cef/include/base/cef_logging.h" +#include "cef/include/cef_app.h" +#include "nweb_preference_delegate.h" + +namespace OHOS::NWeb { +class JavaScriptResultCallbackImpl : public CefJavaScriptResultCallback { + public: + JavaScriptResultCallbackImpl( + std::shared_ptr> callback) + : callback_(callback){}; + void OnJavaScriptExeResult(const CefString& result) override { + if (callback_ != nullptr) { + callback_->OnReceiveValue(result.ToString()); + } + } + + private: + std::shared_ptr> callback_; + + IMPLEMENT_REFCOUNTING(JavaScriptResultCallbackImpl); + DISALLOW_COPY_AND_ASSIGN(JavaScriptResultCallbackImpl); +}; + +NWebDelegate::NWebDelegate(int argc, const char* argv[]) + : argc_(argc), argv_(argv) {} + +bool NWebDelegate::Init() { + preference_delegate_ = std::make_shared(); + + render_handler_ = NWebRenderHandler::Create(); + if (render_handler_ == nullptr) { + return false; + } + + event_handler_ = NWebEventHandler::Create(); + if (event_handler_ == nullptr) { + return false; + } + + std::string url_for_init = ""; + InitializeCef(url_for_init); + + return true; +} + +void NWebDelegate::OnDestroy(bool is_close_all) { + if (handler_delegate_ != nullptr) { + handler_delegate_->OnDestroy(); + } + if (preference_delegate_ != nullptr) { + preference_delegate_->OnDestroy(); + } + if (is_close_all) { + LOG(INFO) << "ready to shutdown"; + CefShutdown(); + } +} + +void NWebDelegate::RegisterDownLoadListener( + std::shared_ptr download_listener) { + if (handler_delegate_ == nullptr) { + LOG(ERROR) + << "fail to register download listener, NWEB handler is nullptr"; + return; + } + handler_delegate_->RegisterDownLoadListener(download_listener); +} + +void NWebDelegate::RegisterNWebHandler(std::shared_ptr handler) { + if (handler_delegate_ == nullptr) { + LOG(ERROR) + << "fail to register nweb handler, nweb handler delegate is nullptr"; + return; + } + handler_delegate_->RegisterNWebHandler(handler); +} + +void NWebDelegate::SetInputMethodClient( + CefRefPtr client) { + if (render_handler_ == nullptr) { + LOG(ERROR) + << "fail to register inputmethod client, render handler is nullptr"; + return; + } + render_handler_->SetInputMethodClient(client); +} + +void NWebDelegate::RegisterRenderCb( + std::function render_update_cb) { + if (render_handler_ != nullptr) { + render_handler_->RegisterRenderCb(render_update_cb); + } +} + +void NWebDelegate::Resize(uint32_t width, uint32_t height) { + if (render_handler_ != nullptr) { + render_handler_->Resize(width, height); + } +} + +void NWebDelegate::OnTouchPress(int32_t id, double x, double y) { + if (event_handler_ != nullptr) { + event_handler_->OnTouchPress(id, x, y); + } +} + +void NWebDelegate::OnTouchRelease(int32_t id, double x, double y) { + if (event_handler_ != nullptr) { + event_handler_->OnTouchRelease(id, x, y); + } +} + +void NWebDelegate::OnTouchMove(int32_t id, double x, double y) { + if (event_handler_ != nullptr) { + event_handler_->OnTouchMove(id, x, y); + } +} + +void NWebDelegate::OnTouchCancel() { + if (event_handler_ != nullptr) { + event_handler_->OnTouchCancel(); + } +} + +std::shared_ptr NWebDelegate::GetPreference() const { + return preference_delegate_; +} + +void NWebDelegate::Load(const std::string& url) { + LOG(INFO) << "NWebDelegate::Load url=" << url; + auto browser = GetBrowser(); + if (browser != nullptr) { + browser->GetMainFrame()->LoadURL(CefString(url)); + } + RequestVisitedHistory(); +} + +bool NWebDelegate::IsNavigatebackwardAllowed() const { + LOG(INFO) << "NWebDelegate::IsNavigatebackwardAllowed"; + if (GetBrowser().get()) { + return GetBrowser()->CanGoBack(); + } + return false; +} + +bool NWebDelegate::IsNavigateForwardAllowed() const { + LOG(INFO) << "NWebDelegate::IsNavigateForwardAllowed"; + if (GetBrowser().get()) { + return GetBrowser()->CanGoForward(); + } + return false; +} + +bool NWebDelegate::CanNavigateBackOrForward(int num_steps) const { + LOG(INFO) << "NWebDelegate::CanNavigateBackOrForward"; + if (GetBrowser().get()) { + return GetBrowser()->CanGoBackOrForward(num_steps); + } + return false; +} + +void NWebDelegate::NavigateBack() const { + LOG(INFO) << "NWebDelegate::NavigateBack"; + if (GetBrowser().get()) { + GetBrowser()->GoBack(); + } +} + +void NWebDelegate::NavigateForward() const { + LOG(INFO) << "NWebDelegate::NavigateForward"; + if (GetBrowser().get()) { + GetBrowser()->GoForward(); + } +} + +void NWebDelegate::Reload() const { + LOG(INFO) << "NWebDelegate::Reload"; + if (GetBrowser().get()) { + GetBrowser()->Reload(); + } +} + +void NWebDelegate::Zoom(float zoomFactor) const { + LOG(INFO) << "NWebDelegate::Zoom"; + if (GetBrowser().get()) { + double curFactor = GetBrowser()->GetHost()->GetZoomLevel(); + GetBrowser()->GetHost()->SetZoomLevel(zoomFactor + curFactor); + } +} + +void NWebDelegate::Stop() const { + LOG(INFO) << "NWebDelegate::Stop"; + if (GetBrowser().get()) { + GetBrowser()->StopLoad(); + } +} + +void NWebDelegate::ExecuteJavaScript(const std::string& code) const { + LOG(INFO) << "NWebDelegate::ExecuteJavaScript"; + if (GetBrowser().get()) { + GetBrowser()->GetMainFrame()->ExecuteJavaScript( + code, GetBrowser()->GetMainFrame()->GetURL(), 0); + } +} + +void NWebDelegate::ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const { + LOG(INFO) << "NWebDelegate::ExecuteJavaScript with callback"; + + if (GetBrowser().get()) { + CefRefPtr JsResultCb = + new JavaScriptResultCallbackImpl(callback); + GetBrowser()->GetHost()->ExecuteJavaScript(code, JsResultCb); + } +} + +void NWebDelegate::PutBackgroundColor(int color) const { + LOG(INFO) << "NWebDelegate::PutBackgroundColor"; + if (GetBrowser().get()) { + GetBrowser()->GetHost()->SetBackgroundColor(color); + } +} + +void NWebDelegate::OnPause() { + LOG(INFO) << "NWebDelegate::OnPause"; + if (!GetBrowser().get()) { + return; + } + + // Remove focus from the browser. + GetBrowser()->GetHost()->SendFocusEvent(false); + + if (!hidden_) { + // Set the browser as hidden. + GetBrowser()->GetHost()->WasHidden(true); + hidden_ = true; + } +} + +void NWebDelegate::OnContinue() { + LOG(INFO) << "NWebDelegate::OnContinue"; + if (!GetBrowser().get()) { + return; + } + + if (hidden_) { + // Set the browser as visible. + GetBrowser()->GetHost()->WasHidden(false); + hidden_ = false; + } + + // Give focus to the browser. + GetBrowser()->GetHost()->SendFocusEvent(true); +} + +void NWebDelegate::InitializeCef(std::string url) { + handler_delegate_ = NWebHandlerDelegate::Create( + preference_delegate_, render_handler_, event_handler_); + nweb_app_ = + new NWebApplication(preference_delegate_, url, handler_delegate_); + + CefMainArgs mainargs(argc_, const_cast(argv_)); + int exitcode = CefExecuteProcess(mainargs, nweb_app_, NULL); + if (exitcode >= 0) { + LOG(INFO) << "CefExecuteProcess returned : " << exitcode; + return; + } + + CefSettings settings; + settings.windowless_rendering_enabled = true; + settings.log_severity = LOGSEVERITY_INFO; + settings.multi_threaded_message_loop = false; + + settings.persist_session_cookies = true; + +#if !defined(CEF_USE_SANDBOX) + settings.no_sandbox = true; +#endif + + static bool is_initialized = false; + static std::mutex init_mtx; + std::unique_lock lk(init_mtx); + if (is_initialized) { + return nweb_app_->CreateBrowser(); + } + + if (!CefInitialize(mainargs, settings, nweb_app_, NULL)) { + LOG(ERROR) << "CefInitialize failed"; + } else { + is_initialized = true; + } +} + +void NWebDelegate::RunMessageLoop() { + // Run the CEF message loop. + // This will block until CefQuitMessageLoop() is called. + CefRunMessageLoop(); +} + +std::string NWebDelegate::Title() { + if (!GetBrowser().get()) { + return ""; + } + return GetBrowser()->GetHost()->Title(); +} + +HitTestResult NWebDelegate::GetHitTestResult() const { + HitTestResult data; + if (!GetBrowser().get()) { + return data; + } + int type; + CefString extra_data; + GetBrowser()->GetHost()->GetHitData(type, extra_data); + data.SetType(type); + data.SetExtra(extra_data.ToString()); + return data; +} + +int NWebDelegate::PageLoadProgress() { + if (!GetBrowser().get()) { + return 0; + } + return GetBrowser()->GetHost()->PageLoadProgress(); +} + +float NWebDelegate::Scale() { + if (!GetBrowser().get()) { + return 0; + } + return GetBrowser()->GetHost()->Scale(); +} + +void NWebDelegate::Load( + std::string& url, + std::map additionalHttpHeaders) { + std::map::iterator iter; + std::string extra = ""; + for (iter = additionalHttpHeaders.begin(); + iter != additionalHttpHeaders.end(); iter++) { + const std::string& key = iter->first; + const std::string& value = iter->second; + if (!key.empty()) { + // Delimit with "\r\n". + if (!value.empty()) + extra += "\r\n"; + extra += std::string(key) + ": " + std::string(value); + } + } + auto browser = GetBrowser(); + if (browser != nullptr) { + browser->GetMainFrame()->LoadHeaderUrl(CefString(url), CefString(extra)); + } + RequestVisitedHistory(); +} + +void NWebDelegate::LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) { + LOG(INFO) << "NWebDelegate::LoadWithDataAndBaseUrl"; + if (!GetBrowser().get()) { + return; + } + GetBrowser()->GetHost()->LoadWithDataAndBaseUrl(baseUrl, data, mimeType, + encoding, historyUrl); + RequestVisitedHistory(); +} + +void NWebDelegate::LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) { + LOG(INFO) << "NWebDelegate::LoadWithData"; + if (!GetBrowser().get()) { + return; + } + GetBrowser()->GetHost()->LoadWithData(data, mimeType, encoding); + RequestVisitedHistory(); +} + +const CefRefPtr NWebDelegate::GetBrowser() const { + if (handler_delegate_) { + return handler_delegate_->GetBrowser(); + } + return nullptr; +} + +bool NWebDelegate::IsReady() { + return GetBrowser() != nullptr; +} + +void NWebDelegate::RequestVisitedHistory() { + if (!GetBrowser().get()) { + return; + } + if (!has_requested_visited_history) { + has_requested_visited_history = true; + if (handler_delegate_) { + std::vector outUrls = handler_delegate_->GetVisitedHistory(); + std::vector urls = std::vector(); + for (auto url : outUrls) { + urls.push_back(url); + } + GetBrowser()->GetHost()->AddVisitedLinks(urls); + } + } +} + +int NWebDelegate::ContentHeight() { + if (render_handler_ != nullptr) { + return render_handler_->ContentHeight(); + } + return 0; +} + +void NWebDelegate::RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const { + LOG(INFO) << "RegisterArkJSfunction name : " << object_name.c_str(); + std::vector method_vector; + for (std::string method : method_list) { + method_vector.push_back(method); + } + GetBrowser()->GetHost()->RegisterArkJSfunction(object_name, method_vector); +} + +void NWebDelegate::UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const { + LOG(INFO) << "UnregisterArkJSfunction name : " << object_name.c_str(); + std::vector method_vector; + for (std::string method : method_list) { + method_vector.push_back(method); + } + GetBrowser()->GetHost()->UnregisterArkJSfunction(object_name, method_vector); +} + +void NWebDelegate::RegisterNWebJavaScriptCallBack( + std::shared_ptr callback) { + if (handler_delegate_ == nullptr) { + LOG(ERROR) << "fail to register NWEB client, NWEB handler is nullptr"; + return; + } + handler_delegate_->RegisterNWebJavaScriptCallBack(callback); +} +} // namespace OHOS::NWEB \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_delegate.h b/ohos_nweb/src/cef_delegate/nweb_delegate.h new file mode 100755 index 0000000000..935ca4ef7f --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_delegate.h @@ -0,0 +1,109 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_DELEGATE_H +#define NWEB_DELEGATE_H + +#include +#include +#include "cef/include/cef_command_line.h" +#include "nweb_application.h" +#include "nweb_delegate_interface.h" +#include "nweb_event_handler.h" +#include "nweb_handler_delegate.h" +#include "nweb_inputmethod_client.h" +#include "nweb_render_handler.h" + +namespace OHOS::NWeb { +class NWebDelegate : public NWebDelegateInterface, + public virtual CefRefCount { + public: + NWebDelegate(int argc, const char* argv[]); + ~NWebDelegate() = default; + bool Init(); + + bool IsReady() override; + void OnDestroy(bool is_close_all) override; + + void RegisterDownLoadListener( + std::shared_ptr downloadListener) override; + void RegisterNWebHandler(std::shared_ptr handler) override; + void RegisterRenderCb( + std::function render_update_cb) override; + + void SetInputMethodClient( + CefRefPtr client) override; + + void Resize(uint32_t width, uint32_t height) override; + void OnTouchPress(int32_t id, double x, double y) override; + void OnTouchRelease(int32_t id, double x, double y) override; + void OnTouchMove(int32_t id, double x, double y) override; + void OnTouchCancel() override; + + void Load(const std::string& url) override; + bool IsNavigatebackwardAllowed() const override; + bool IsNavigateForwardAllowed() const override; + bool CanNavigateBackOrForward(int num_steps) const override; + void NavigateBack() const override; + void NavigateForward() const override; + void Reload() const override; + void Zoom(float zoomFactor) const override; + void Stop() const override; + void ExecuteJavaScript(const std::string& code) const override; + void ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const override; + void PutBackgroundColor(int color) const override; + void OnPause() override; + void OnContinue() override; + std::shared_ptr GetPreference() const override; + std::string Title() override; + HitTestResult GetHitTestResult() const override; + int PageLoadProgress() override; + float Scale() override; + void Load(std::string& url, + std::map additionalHttpHeaders) override; + void LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) override; + void LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) override; + int ContentHeight() override; + void RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const override; + + void UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const override; + + void RegisterNWebJavaScriptCallBack( + std::shared_ptr callback) override; + + public: + int argc_; + const char** argv_; + + private: + void RunMessageLoop(); + void InitializeCef(std::string url); + const CefRefPtr GetBrowser() const; + void RequestVisitedHistory(); + + private: + bool has_requested_visited_history = false; + CefRefPtr nweb_app_ = nullptr; + CefRefPtr handler_delegate_ = nullptr; + CefRefPtr render_handler_ = nullptr; + std::shared_ptr event_handler_ = nullptr; + std::shared_ptr preference_delegate_ = nullptr; + + // Members only accessed on the main thread. + bool hidden_ = false; +}; +} // namespace OHOS::NWeb +#endif diff --git a/ohos_nweb/src/cef_delegate/nweb_event_handler.cc b/ohos_nweb/src/cef_delegate/nweb_event_handler.cc new file mode 100644 index 0000000000..e737f46e20 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_event_handler.cc @@ -0,0 +1,74 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_event_handler.h" + +#include "cef/include/base/cef_logging.h" +#include "cef/include/base/cef_macros.h" +#include "cef/include/internal/cef_types.h" +#include "cef/include/internal/cef_types_wrappers.h" + +namespace OHOS::NWeb { +// static +std::shared_ptr NWebEventHandler::Create() { + auto event_handler = std::make_shared(); + if (event_handler == nullptr) { + LOG(ERROR) << "fail to create NWebEventHandler instance"; + return nullptr; + } + return event_handler; +} + +void NWebEventHandler::OnDestroy() { + browser_ = nullptr; +} + +void NWebEventHandler::SetBrowser(CefRefPtr browser) { + browser_ = browser; +} + +void NWebEventHandler::OnTouchPress(int32_t id, double x, double y) { + CefTouchEvent touch_pressed; + touch_pressed.type = CEF_TET_PRESSED; + touch_pressed.id = id; + touch_pressed.x = x; + touch_pressed.y = y; + touch_pressed.modifiers = EVENTFLAG_LEFT_MOUSE_BUTTON; + if (browser_ && browser_->GetHost()) { + browser_->GetHost()->SendTouchEvent(touch_pressed); + } +} + +void NWebEventHandler::OnTouchMove(int32_t id, double x, double y) { + CefTouchEvent touch_move; + touch_move.type = CEF_TET_MOVED; + touch_move.id = id; + touch_move.x = x; + touch_move.y = y; + touch_move.modifiers = EVENTFLAG_LEFT_MOUSE_BUTTON; + if (browser_ && browser_->GetHost()) { + browser_->GetHost()->SendTouchEvent(touch_move); + } +} + +void NWebEventHandler::OnTouchRelease(int32_t id, double x, double y) { + CefTouchEvent touch_end; + touch_end.type = CEF_TET_RELEASED; + touch_end.id = id; + touch_end.x = x; + touch_end.y = y; + touch_end.modifiers = EVENTFLAG_LEFT_MOUSE_BUTTON; + if (browser_ && browser_->GetHost()) { + browser_->GetHost()->SendTouchEvent(touch_end); + } +} + +void NWebEventHandler::OnTouchCancel() { + CefTouchEvent touch_cancelled; + touch_cancelled.type = CEF_TET_CANCELLED; + if (browser_ && browser_->GetHost()) { + browser_->GetHost()->SendTouchEvent(touch_cancelled); + } +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/cef_delegate/nweb_event_handler.h b/ohos_nweb/src/cef_delegate/nweb_event_handler.h new file mode 100644 index 0000000000..4cc8b0c0d9 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_event_handler.h @@ -0,0 +1,32 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_EVENT_HANDLER_H +#define NWEB_EVENT_HANDLER_H + +#include "cef/include/cef_client.h" + +namespace OHOS::NWeb { +class NWebEventHandler { + public: + static std::shared_ptr Create(); + + NWebEventHandler() = default; + ~NWebEventHandler() = default; + void OnDestroy(); + + void SetBrowser(CefRefPtr browser); + + void OnTouchPress(int32_t id, double x, double y); + void OnTouchMove(int32_t id, double x, double y); + void OnTouchRelease(int32_t id, double x, double y); + void OnTouchCancel(); + void OnKeyBack(); + + private: + CefRefPtr browser_ = nullptr; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_EVENT_HANDLER_H diff --git a/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.cc b/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.cc new file mode 100644 index 0000000000..893b92a9bb --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.cc @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h" +#include "base/logging.h" + +namespace OHOS::NWeb { +NWebGeolocationCallback::NWebGeolocationCallback(CefRefPtr browser) + : browser_(browser) {} + +void NWebGeolocationCallback::GeolocationCallbackInvoke( + const std::string& origin, + bool allow, + bool retain) { + if (retain) { + if (allow) { + browser_->GetGeolocationPermissions()->Enabled(origin); + } else { + browser_->GetGeolocationPermissions()->Disabled(origin); + } + } + browser_->GetPermissionRequestDelegate()->NotifyGeolocationPermission(allow, + origin); +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h b/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h new file mode 100644 index 0000000000..7240ebdf2e --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_geolocation_callback.h @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_GEOLOCATION_CALLBACK_H +#define NWEB_GEOLOCATION_CALLBACK_H + +#include "cef/include/cef_browser.h" +#include "ohos_nweb/include/nweb_geolocation_callback_interface.h" + +namespace OHOS::NWeb { +class NWebGeolocationCallback : public NWebGeolocationCallbackInterface { + public: + explicit NWebGeolocationCallback(CefRefPtr browser); + ~NWebGeolocationCallback() = default; + + void GeolocationCallbackInvoke(const std::string& origin, + bool allow, + bool retain) override; + + private: + CefRefPtr browser_ = nullptr; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_GEOLOCATION_CALLBACK_H diff --git a/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc b/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc new file mode 100755 index 0000000000..6c3bef39d1 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_handler_delegate.cc @@ -0,0 +1,809 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_handler_delegate.h" + +#include + +#include "base/bind.h" +#include "base/callback.h" +#include "cef/include/cef_app.h" +#include "cef/include/cef_parser.h" +#include "cef/include/wrapper/cef_closure_task.h" +#include "cef/include/wrapper/cef_helpers.h" +#include "nweb_access_request_delegate.h" +#include "nweb_geolocation_callback.h" +#include "nweb_js_dialog_result_impl.h" +#include "nweb_resource_handler.h" +#include "nweb_url_resource_error_impl.h" +#include "nweb_url_resource_request_impl.h" +#include "nweb_url_resource_response.h" + +namespace OHOS::NWeb { +namespace { +ImageColorType TransformColorType(cef_color_type_t color_type) { + switch (color_type) { + case CEF_COLOR_TYPE_RGBA_8888: + return ImageColorType::COLOR_TYPE_RGBA_8888; + case CEF_COLOR_TYPE_BGRA_8888: + return ImageColorType::COLOR_TYPE_BGRA_8888; + default: + return ImageColorType::COLOR_TYPE_UNKNOWN; + } +} + +ImageAlphaType TransformAlphaType(cef_alpha_type_t alpha_type) { + switch (alpha_type) { + case CEF_ALPHA_TYPE_OPAQUE: + return ImageAlphaType::ALPHA_TYPE_OPAQUE; + case CEF_ALPHA_TYPE_PREMULTIPLIED: + return ImageAlphaType::ALPHA_TYPE_PREMULTIPLIED; + case CEF_ALPHA_TYPE_POSTMULTIPLIED: + return ImageAlphaType::ALPHA_TYPE_POSTMULTIPLIED; + default: + return ImageAlphaType::ALPHA_TYPE_UNKNOWN; + } +} + +void ConvertMapToHeaderMap(const CefRequest::HeaderMap& headers, + std::map& map) { + for (auto iter = headers.begin(); iter != headers.end(); ++iter) { + map.emplace(iter->first.ToString(), iter->second.ToString()); + } +} + +NWebConsoleLog::NWebConsoleLogLevel ConvertConsoleMessageLevel( + cef_log_severity_t message_level) { + switch (message_level) { + case LOGSEVERITY_DEBUG: + return NWebConsoleLog::NWebConsoleLogLevel::DEBUG; + case LOGSEVERITY_INFO: + return NWebConsoleLog::NWebConsoleLogLevel::INFO; + case LOGSEVERITY_WARNING: + return NWebConsoleLog::NWebConsoleLogLevel::WARNING; + case LOGSEVERITY_ERROR: + return NWebConsoleLog::NWebConsoleLogLevel::ERROR; + default: + return NWebConsoleLog::NWebConsoleLogLevel::UNKNOWN; + } +} +} // namespace + +// static +CefRefPtr NWebHandlerDelegate::Create( + std::shared_ptr preference_delegate, + CefRefPtr render_handler, + std::shared_ptr event_handler) { + CefRefPtr handler_delegate = new NWebHandlerDelegate( + preference_delegate, render_handler, event_handler); + if (handler_delegate == nullptr) { + LOG(ERROR) << "fail to create NWebHandlerDelegate instance"; + return nullptr; + } + return handler_delegate; +} + +NWebHandlerDelegate::NWebHandlerDelegate( + std::shared_ptr preference_delegate, + CefRefPtr render_handler, + std::shared_ptr event_handler) + : preference_delegate_(preference_delegate), + render_handler_(render_handler), + event_handler_(event_handler) {} + +void NWebHandlerDelegate::OnDestroy() { + if (main_browser_) { + main_browser_->GetHost()->CloseBrowser(true); + main_browser_ = nullptr; + } + if (event_handler_) { + event_handler_->OnDestroy(); + } +} + +void NWebHandlerDelegate::RegisterDownLoadListener( + std::shared_ptr download_listener) { + download_listener_ = download_listener; +} + +void NWebHandlerDelegate::RegisterNWebHandler( + std::shared_ptr handler) { + LOG(INFO) << "RegisterNWebHandler"; + nweb_handler_ = handler; +} + +void NWebHandlerDelegate::RegisterNWebJavaScriptCallBack( + std::shared_ptr callback) { + nweb_javascript_callback_ = callback; +} + +const CefRefPtr NWebHandlerDelegate::GetBrowser() { + return main_browser_; +} + +bool NWebHandlerDelegate::IsClosing() const { + return is_closing_; +} + +void NWebHandlerDelegate::CloseAllBrowsers(bool force_close) { + LOG(INFO) << "NWebHandlerDelegate::CloseAllBrowsers"; + if (!CefCurrentlyOn(TID_UI)) { + // Execute on the UI thread. + CefPostTask(TID_UI, base::Bind(&NWebHandlerDelegate::CloseAllBrowsers, this, + force_close)); + return; + } + + if (browser_list_.empty()) { + return; + } + + BrowserList::const_iterator it = browser_list_.begin(); + for (; it != browser_list_.end(); ++it) { + (*it)->GetHost()->CloseBrowser(force_close); + } +} + +/* CefClient methods begin */ +CefRefPtr NWebHandlerDelegate::GetDownloadHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetLifeSpanHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetLoadHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetRenderHandler() { + return render_handler_; +} + +CefRefPtr NWebHandlerDelegate::GetRequestHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetDisplayHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetFocusHandler() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetPermissionRequest() { + return this; +} + +CefRefPtr NWebHandlerDelegate::GetJSDialogHandler() { + return this; +} + +bool NWebHandlerDelegate::OnProcessMessageReceived( + CefRefPtr browser, + CefRefPtr frame, + CefProcessId source_process, + CefRefPtr message) { + const std::string& messageName = message->GetName(); + + if (messageName == "router.push") { + CefRefPtr pushMsgArgs = message->GetArgumentList(); + CefString url = pushMsgArgs->GetString(0); + nweb_handler_->OnRouterPush(url.ToString()); + return true; + } + + if (messageName == "web.postmessage") { + CefRefPtr postMsgArgs = message->GetArgumentList(); + CefString postMsg = postMsgArgs->GetString(0); + nweb_handler_->OnMessage(postMsg.ToString()); + return true; + } + + return false; +} +/* CefClient methods end */ + +/* CefLifeSpanHandler methods begin */ +void NWebHandlerDelegate::OnAfterCreated(CefRefPtr browser) { + LOG(INFO) << "NWebHandlerDelegate::OnAfterCreated"; + CEF_REQUIRE_UI_THREAD(); + + if (!main_browser_) { + main_browser_ = browser; + event_handler_->SetBrowser(browser); + } else if (browser->IsPopup()) { + // Add to the list of existing browsers. + browser_list_.push_back(browser); + } + + if (preference_delegate_.get()) { + preference_delegate_->SetBrowser(main_browser_); + } else { + LOG(ERROR) << "Failed to set browser to settings delegate"; + } +} + +bool NWebHandlerDelegate::DoClose(CefRefPtr browser) { + LOG(INFO) << "NWebHandlerDelegate::DoClose"; + CEF_REQUIRE_UI_THREAD(); + + // Closing the main window requires special handling. See the DoClose() + // documentation in the CEF header for a detailed destription of this + // process. + if (browser_list_.size() == 1) { + // Set a flag to indicate that the window close should be allowed. + is_closing_ = true; + } + + // Allow the close. For windowed browsers this will result in the OS close + // event being sent. + return false; +} + +void NWebHandlerDelegate::OnBeforeClose(CefRefPtr browser) { + LOG(INFO) << "NWebHandlerDelegate::OnBeforeClose"; + CEF_REQUIRE_UI_THREAD(); + + // Remove from the list of existing browsers. + BrowserList::iterator bit = browser_list_.begin(); + for (; bit != browser_list_.end(); ++bit) { + if ((*bit)->IsSame(browser)) { + browser_list_.erase(bit); + break; + } + } +} + +bool NWebHandlerDelegate::OnBeforePopup( + CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + CefLifeSpanHandler::WindowOpenDisposition target_disposition, + bool user_gesture, + const CefPopupFeatures& popup_features, + CefWindowInfo& window_info, + CefRefPtr& client, + CefBrowserSettings& settings, + CefRefPtr& extra_info, + bool* no_javascript_access) { + LOG(INFO) << "NWebHandlerDelegate::OnBeforePopup"; + CEF_REQUIRE_UI_THREAD(); + + if (main_browser_) { + preference_delegate_->WebPreferencesChanged(); + main_browser_->GetMainFrame()->LoadURL(target_url); + } + + return true; +} + +/* CefLifeSpanHandler methods end */ + +/* CefLoadHandler methods begin */ +void NWebHandlerDelegate::OnLoadingStateChange(CefRefPtr browser, + bool is_loading, + bool can_go_back, + bool can_go_forward) {} + +void NWebHandlerDelegate::OnLoadStart(CefRefPtr browser, + CefRefPtr frame, + TransitionType transition_type) { + LOG(INFO) << "NWebHandlerDelegate::OnLoadStart"; + + if (nweb_handler_ != nullptr) { + nweb_handler_->OnPageLoadBegin(frame->GetURL().ToString()); + } +} + +void NWebHandlerDelegate::OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int http_status_code) { + LOG(INFO) << "NWebHandlerDelegate::OnLoadEnd"; + if (frame == nullptr || !frame->IsMain()) { + return; + } + LOG(INFO) << "NWebHandlerDelegate:: Mainframe OnLoadEnd"; + if (nweb_handler_ != nullptr) { + nweb_handler_->OnPageLoadEnd(http_status_code, frame->GetURL().ToString()); + } +} + +// Returns a data: URI with the specified contents. +std::string GetDataURI(const std::string& data, const std::string& mime_type) { + return "data:" + mime_type + ";base64," + + CefURIEncode(CefBase64Encode(data.data(), data.size()), false) + .ToString(); +} + +void NWebHandlerDelegate::OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode error_code, + const CefString& error_text, + const CefString& failed_url) { + LOG(INFO) << "NWebHandlerDelegate::OnLoadError"; + CEF_REQUIRE_UI_THREAD(); + + // Don't display an error for downloaded files. + if (error_code == ERR_ABORTED) + return; + + if (nweb_handler_ != nullptr) { + nweb_handler_->OnPageLoadError(error_code, error_text.ToString(), + failed_url.ToString()); + } else { + // Display a load error message using a data: URI. + std::stringstream ss; + ss << "" + "

Failed to load URL " + << std::string(failed_url) << " with error " << std::string(error_text) + << " (" << error_code << ").

"; + + frame->LoadURL(GetDataURI(ss.str(), "text/html")); + } +} + +void NWebHandlerDelegate::OnLoadErrorWithRequest(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + int error_code, + const CefString& error_text) { + CefRequest::HeaderMap cef_request_headers; + request->GetHeaderMap(cef_request_headers); + std::map request_headers; + ConvertMapToHeaderMap(cef_request_headers, request_headers); + std::shared_ptr web_request = + std::make_shared( + request->GetMethod().ToString(), request_headers, + request->GetURL().ToString(), has_user_gesture, is_main_frame); + std::shared_ptr error = + std::make_shared(error_code, error_text.ToString()); + if (nweb_handler_ != nullptr) { + nweb_handler_->OnResourceLoadError(web_request, error); + } +} + +void NWebHandlerDelegate::OnHttpError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr response) { + if (nweb_handler_ != nullptr) { + CefRequest::HeaderMap cef_request_headers; + request->GetHeaderMap(cef_request_headers); + std::map request_headers; + ConvertMapToHeaderMap(cef_request_headers, request_headers); + std::shared_ptr web_request = + std::make_shared( + request->GetMethod().ToString(), request_headers, + request->GetURL().ToString(), has_user_gesture, is_main_frame); + std::string data; + std::shared_ptr web_response = + std::make_shared( + response->GetMimeType(), response->GetCharset(), + response->GetStatus(), response->GetStatusText(), request_headers, + data); + nweb_handler_->OnHttpError(web_request, web_response); + } +} + +/* CefLoadHandler methods end */ + +/* CefRequestHandler methods begin */ +bool NWebHandlerDelegate::OnBeforeBrowse(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + bool user_gesture, + bool is_redirect) { + LOG(INFO) << "NWebHandlerDelegate::OnBeforeBrowse"; + (void)(browser); + (void)(request); + (void)(user_gesture); + (void)(is_redirect); + + if (nweb_handler_ != nullptr) { + return nweb_handler_->OnHandleInterceptUrlLoading( + frame->GetURL().ToString()); + } + return false; +} + +bool NWebHandlerDelegate::OnCertificateError( + CefRefPtr browser, + cef_errorcode_t cert_error, + const CefString& request_url, + CefRefPtr ssl_info, + CefRefPtr callback) { + LOG(INFO) << "NWebHandlerDelegate::OnCertificateError"; + return false; +} + +CefRefPtr +NWebHandlerDelegate::GetResourceRequestHandler( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + bool is_navigation, + bool is_download, + const CefString& request_initiator, + bool& disable_default_handling) { + return this; +} + +/* CefRequestHandler methods end */ + +/* CefDownloadHandler methods begin */ +void NWebHandlerDelegate::OnBeforeDownload( + CefRefPtr browser, + CefRefPtr download_item, + const CefString& suggested_name, + CefRefPtr callback) { + (void)suggested_name; + LOG(INFO) << "NWebHandlerDelegate::OnBeforeDownload"; + if (download_item->IsValid() == false) { + LOG(ERROR) << "NWebHandlerDelegate::OnBeforeDownload error, not invalid"; + return; + } + if (download_item->IsCanceled() == true) { + LOG(ERROR) + << "NWebHandlerDelegate::OnBeforeDownload error, download cancel"; + return; + } + callback->Continue("", false); + LOG(INFO) << "NWebHandlerDelegate::OnBeforeDownload continue..."; + if (download_listener_ != nullptr) { + download_listener_->OnDownloadStart( + download_item->GetURL().ToString(), + browser->GetHost()->DefaultUserAgent(), + download_item->GetContentDisposition().ToString(), + download_item->GetMimeType().ToString(), + download_item->GetTotalBytes()); + } +} +/* CefDownloadHandler methods end */ + +/* CefResourceRequestHandler method begin */ +CefResourceRequestHandler::ReturnValue +NWebHandlerDelegate::OnBeforeResourceLoad( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + CefRefPtr callback) { + if (nweb_handler_ != nullptr) { + nweb_handler_->OnResource(request->GetURL().ToString()); + } + return RV_CONTINUE; +} + +CefRefPtr NWebHandlerDelegate::GetResourceHandler( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request) { + LOG(INFO) << "NWebHandlerDelegate::GetResourceHandler"; + if (!request) { + LOG(ERROR) << "NWebHandlerDelegate::GetResourceHandler request is null"; + return nullptr; + } + + CefRequest::HeaderMap cef_request_headers; + request->GetHeaderMap(cef_request_headers); + std::map request_headers; + ConvertMapToHeaderMap(cef_request_headers, request_headers); + std::shared_ptr NWeb_request = + std::make_shared( + request->GetMethod().ToString(), request_headers, + request->GetURL().ToString(), false, frame->IsMain()); + std::shared_ptr response; + if (nweb_handler_ != nullptr) { + response = nweb_handler_->OnHandleInterceptRequest(NWeb_request); + } + if (response) { + std::string str = ""; + return new NWebResourceHandler(response, str); + } else { + return nullptr; + } +} +/* CefResourceRequestHandler method end */ + +/* CefDisplayHandler method begin */ +void NWebHandlerDelegate::OnTitleChange(CefRefPtr browser, + const CefString& title) { + if (nweb_handler_ != nullptr) { + nweb_handler_->OnPageTitle(title.ToString()); + } + return; +} + +void NWebHandlerDelegate::OnLoadingProgressChange(CefRefPtr browser, + double progress) { + if (nweb_handler_ != nullptr) { + constexpr int MAX_LOADING_PROGRESS = 100; + int new_progress = static_cast(progress * MAX_LOADING_PROGRESS); + nweb_handler_->OnLoadingProgress(new_progress); + } + return; +} + +void NWebHandlerDelegate::OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) { + if (!data) { + LOG(ERROR) << "onReceivedIcon get error"; + return; + } + if (nweb_handler_ != nullptr) { + nweb_handler_->OnPageIcon(data, width, height, + TransformColorType(color_type), + TransformAlphaType(alpha_type)); + } +} + +void NWebHandlerDelegate::OnReceivedTouchIconUrl(CefRefPtr browser, + const CefString& icon_url, + bool precomposed) { + if (nweb_handler_ != nullptr) { + nweb_handler_->OnDesktopIconUrl(icon_url.ToString(), precomposed); + } + return; +} + +bool NWebHandlerDelegate::OnConsoleMessage(CefRefPtr browser, + cef_log_severity_t level, + const CefString& message, + const CefString& source, + int line) { + if (nweb_handler_ != nullptr) { + NWebConsoleLog::NWebConsoleLogLevel message_level = + ConvertConsoleMessageLevel(level); + NWebConsoleLog console_message(line, message.ToString(), message_level, + source.ToString()); + return nweb_handler_->OnConsoleLog(console_message); + } + return false; +} +/* CefDisplayHandler method end */ + +/* CefFocusHandler method begin */ +bool NWebHandlerDelegate::OnSetFocus(CefRefPtr browser, + FocusSource source) { + if (nweb_handler_ != nullptr) { + nweb_handler_->OnFocus(); + } + return false; +} +/* CefFocusHandler method end */ + +/* CefPermissionRequest method begin */ +void NWebHandlerDelegate::OnGeolocationShow(const CefString& origin) { + if (nweb_handler_ != nullptr) { + NWebGeolocationCallback* callback = + new NWebGeolocationCallback(main_browser_); + nweb_handler_->OnGeolocationShow(origin, callback); + delete callback; + } + return; +} + +void NWebHandlerDelegate::OnGeolocationHide() { + if (nweb_handler_ != nullptr) { + nweb_handler_->OnGeolocationHide(); + } + return; +} + +void NWebHandlerDelegate::OnPermissionRequest( + CefRefPtr request) { + if (nweb_handler_ != nullptr) { + std::shared_ptr access_request = + std::make_shared(request); + nweb_handler_->OnPermissionRequest(access_request); + } + return; +} + +void NWebHandlerDelegate::OnPermissionRequestCanceled( + CefRefPtr request) { + if (nweb_handler_ != nullptr) { + std::shared_ptr access_request = + std::make_shared(request); + nweb_handler_->OnPermissionRequestCanceled(access_request); + } + return; +} +/* CefPermissionRequest method begin */ + +/* CefJSDialogHandler method begin */ +bool NWebHandlerDelegate::OnJSDialog(CefRefPtr browser, + const CefString& origin_url, + JSDialogType dialog_type, + const CefString& message_text, + const CefString& default_prompt_text, + CefRefPtr callback, + bool& suppress_message) { + if (nweb_handler_ == nullptr) { + return false; + } + suppress_message = false; + std::shared_ptr js_result = + std::make_shared(callback); + switch (dialog_type) { + case JSDIALOGTYPE_ALERT: + return nweb_handler_->OnAlertDialogByJS(origin_url, message_text, + js_result); + case JSDIALOGTYPE_CONFIRM: + return nweb_handler_->OnConfirmDialogByJS(origin_url, message_text, + js_result); + case JSDIALOGTYPE_PROMPT: + return nweb_handler_->OnPromptDialogByJs(origin_url, message_text, + default_prompt_text, js_result); + default: + break; + } + return false; +}; + +bool NWebHandlerDelegate::OnBeforeUnloadDialog( + CefRefPtr browser, + const CefString& message_text, + bool is_reload, + CefRefPtr callback) { + if (nweb_handler_ == nullptr) { + return false; + } + std::shared_ptr js_result = + std::make_shared(callback); + return nweb_handler_->OnBeforeUnloadByJS(std::string(), message_text, + js_result); +} + +/* CefJSDialogHandler method end */ + +const std::vector NWebHandlerDelegate::GetVisitedHistory() { + if (nweb_handler_ != nullptr) { + return nweb_handler_->VisitedUrlHistory(); + } + return std::vector(); +} + +void AddNWebValueCef(std::vector>& vector, + NWebValue::Type type, + CefRefPtr argument) { + std::shared_ptr value = std::make_shared(type); + switch (type) { + case NWebValue::Type::INTEGER: + value->SetInt(argument->GetInt()); + vector.push_back(value); + break; + case NWebValue::Type::DOUBLE: { + value->SetDouble(argument->GetDouble()); + vector.push_back(value); + break; + } + case NWebValue::Type::BOOLEAN: + value->SetBoolean(argument->GetBool()); + vector.push_back(value); + break; + case NWebValue::Type::STRING: + value->SetString(argument->GetString().ToString()); + vector.push_back(value); + break; + default: + LOG(INFO) << "AddNWebValueCef: not support value"; + break; + } +} + +std::vector> ParseCefValueTONWebValue( + CefRefPtr args, + int size) { + std::vector> value_vector; + for (int i = 0; i < size; i++) { + CefRefPtr argument = args->GetValue(i); + switch (argument->GetType()) { + case CefValueType::VTYPE_INT: + AddNWebValueCef(value_vector, NWebValue::Type::INTEGER, argument); + break; + case CefValueType::VTYPE_DOUBLE: { + AddNWebValueCef(value_vector, NWebValue::Type::DOUBLE, argument); + break; + } + case CefValueType::VTYPE_BOOL: + AddNWebValueCef(value_vector, NWebValue::Type::BOOLEAN, argument); + break; + case CefValueType::VTYPE_STRING: + AddNWebValueCef(value_vector, NWebValue::Type::STRING, argument); + break; + case CefValueType::VTYPE_INVALID: + break; + default: + LOG(INFO) << "ParseCefValueTONWebValue: not support value"; + break; + } + } + return value_vector; +} + +CefValueType TranslateCefType(NWebValue::Type type) { + switch (type) { + case NWebValue::Type::INTEGER: + return CefValueType::VTYPE_INT; + break; + case NWebValue::Type::DOUBLE: { + return CefValueType::VTYPE_DOUBLE; + break; + } + case NWebValue::Type::BOOLEAN: + return CefValueType::VTYPE_BOOL; + break; + case NWebValue::Type::STRING: + return CefValueType::VTYPE_STRING; + break; + case NWebValue::Type::DICTIONARY: + return CefValueType::VTYPE_DICTIONARY; + break; + case NWebValue::Type::LIST: + return CefValueType::VTYPE_LIST; + break; + case NWebValue::Type::NONE: + return CefValueType::VTYPE_INVALID; + break; + case NWebValue::Type::BINARY: + return CefValueType::VTYPE_BINARY; + break; + } +} + +CefRefPtr ParseNWebValueToValue(std::shared_ptr value, + CefRefPtr result) { + NWebValue::Type type = value->GetType(); + switch (type) { + case NWebValue::Type::INTEGER: + result->SetInt(0, value->GetInt()); + break; + case NWebValue::Type::DOUBLE: { + result->SetDouble(0, value->GetDouble()); + break; + } + case NWebValue::Type::BOOLEAN: + result->SetBool(0, value->GetBoolean()); + break; + case NWebValue::Type::STRING: + result->SetString(0, value->GetString()); + break; + case NWebValue::Type::NONE: + break; + default: + LOG(INFO) << "ParseNWebValueToValue: not support value type"; + break; + } + return result; +} + +int NWebHandlerDelegate::NotifyJavaScriptResult( + CefRefPtr args, + const CefString& method, + const CefString& object_name, + CefRefPtr result) { + if (args.get() == nullptr || result.get() == nullptr) { + return 0; + } + std::vector> value_vector = + ParseCefValueTONWebValue(args, args->GetSize()); + if (!nweb_javascript_callback_) { + return 1; + } + + std::shared_ptr ark_result = + nweb_javascript_callback_->GetJavaScriptResult(value_vector, method, + object_name); + + ParseNWebValueToValue(ark_result, result); + return ark_result->error_; +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h b/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h new file mode 100755 index 0000000000..2d92d17575 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_handler_delegate.h @@ -0,0 +1,251 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_HANDLER_DELEGATE_H +#define NWEB_HANDLER_DELEGATE_H + +#include "cef/include/base/cef_lock.h" +#include "cef/include/cef_client.h" +#include "cef/include/cef_jsdialog_handler.h" +#include "cef/include/cef_permission_request.h" +#include "nweb_event_handler.h" +#include "nweb_handler.h" +#include "nweb_preference_delegate.h" +#include "nweb_render_handler.h" + +#include +#include +#include +#include +#include +#include "nweb_download_callback.h" +#include "nweb_javascript_result_callback.h" +#include "nweb_value.h" + +namespace OHOS::NWeb { +class NWebHandler; + +class NWebHandlerDelegate : public CefClient, + public CefLifeSpanHandler, + public CefLoadHandler, + public CefRequestHandler, + public CefResourceRequestHandler, + public CefDisplayHandler, + public CefDownloadHandler, + public CefFocusHandler, + public CefPermissionRequest, + public CefJSDialogHandler { + public: + static CefRefPtr Create( + std::shared_ptr preference_delegate, + CefRefPtr render_handler, + std::shared_ptr event_handler); + + NWebHandlerDelegate( + std::shared_ptr preference_delegate, + CefRefPtr render_handler, + std::shared_ptr event_handler); + ~NWebHandlerDelegate() = default; + + void OnDestroy(); + + void RegisterDownLoadListener( + std::shared_ptr download_listener); + void RegisterNWebHandler(std::shared_ptr handler); + void RegisterNWebJavaScriptCallBack( + std::shared_ptr callback); + + // Request that all existing browser windows close. + void CloseAllBrowsers(bool force_close); + bool IsClosing() const; + const CefRefPtr GetBrowser(); + + /* CefClient methods begin */ + CefRefPtr GetDownloadHandler() override; + CefRefPtr GetLifeSpanHandler() override; + CefRefPtr GetLoadHandler() override; + CefRefPtr GetRenderHandler() override; + CefRefPtr GetRequestHandler() override; + CefRefPtr GetDisplayHandler() override; + CefRefPtr GetFocusHandler() override; + CefRefPtr GetPermissionRequest() override; + CefRefPtr GetJSDialogHandler() override; + virtual bool OnProcessMessageReceived( + CefRefPtr browser, + CefRefPtr frame, + CefProcessId source_process, + CefRefPtr message) override; + int NotifyJavaScriptResult(CefRefPtr args, + const CefString& method, + const CefString& object_name, + CefRefPtr result) override; + /* CefClient methods end */ + + /* CefLifeSpanHandler methods begin */ + void OnAfterCreated(CefRefPtr browser) override; + bool DoClose(CefRefPtr browser) override; + void OnBeforeClose(CefRefPtr browser) override; + bool OnBeforePopup( + CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + CefLifeSpanHandler::WindowOpenDisposition target_disposition, + bool user_gesture, + const CefPopupFeatures& popup_features, + CefWindowInfo& window_info, + CefRefPtr& client, + CefBrowserSettings& settings, + CefRefPtr& extra_info, + bool* no_javascript_access) override; + /* CefLifeSpanHandler methods end */ + + /* CefLoadHandler methods begin */ + void OnLoadingStateChange(CefRefPtr browser, + bool is_loading, + bool can_go_back, + bool can_go_forward) override; + + void OnLoadStart(CefRefPtr browser, + CefRefPtr frame, + TransitionType transition_type) override; + + void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int http_status_code) override; + + void OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode error_code, + const CefString& error_text, + const CefString& failed_url) override; + + void OnLoadErrorWithRequest(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + int error_code, + const CefString& error_text) override; + + void OnHttpError(CefRefPtr request, + bool is_main_frame, + bool has_user_gesture, + CefRefPtr response) override; + /* CefLoadHandler methods end */ + + /* CefRequestHandler methods begin */ + bool OnBeforeBrowse(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + bool user_gesture, + bool is_redirect) override; + bool OnCertificateError(CefRefPtr browser, + cef_errorcode_t cert_error, + const CefString& request_url, + CefRefPtr ssl_info, + CefRefPtr callback) override; + CefRefPtr GetResourceRequestHandler( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + bool is_navigation, + bool is_download, + const CefString& request_initiator, + bool& disable_default_handling) override; + /* CefRequestHandler methods end */ + + /* CefDownloadHandler methods begin */ + void OnBeforeDownload(CefRefPtr browser, + CefRefPtr download_item, + const CefString& suggested_name, + CefRefPtr callback) override; + /* CefDownloadHandler methods end */ + + /* CefResourceRequestHandler method begin */ + ReturnValue OnBeforeResourceLoad( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + CefRefPtr callback) override; + + CefRefPtr GetResourceHandler( + CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request) override; + /* CefResourceRequestHandler method end */ + + /* CefDisplayHandler method begin */ + void OnTitleChange(CefRefPtr browser, + const CefString& title) override; + void OnLoadingProgressChange(CefRefPtr browser, + double progress) override; + void OnReceivedIcon(const void* data, + size_t width, + size_t height, + cef_color_type_t color_type, + cef_alpha_type_t alpha_type) override; + void OnReceivedTouchIconUrl(CefRefPtr browser, + const CefString& icon_url, + bool precomposed) override; + bool OnConsoleMessage(CefRefPtr browser, + cef_log_severity_t level, + const CefString& message, + const CefString& source, + int line) override; + /* CefDisplayHandler method end */ + + /* CefFocusHandler method begin */ + bool OnSetFocus(CefRefPtr browser, FocusSource source) override; + /* CefFocusHandler method end */ + + /* CefPermissionRequest method begin */ + void OnGeolocationShow(const CefString& origin) override; + + void OnGeolocationHide() override; + + void OnPermissionRequest(CefRefPtr request) override; + void OnPermissionRequestCanceled( + CefRefPtr request) override; + /* CefPermissionRequest method end */ + + /* CefJSDialogHandler method begin */ + bool OnJSDialog(CefRefPtr browser, + const CefString& origin_url, + JSDialogType dialog_type, + const CefString& message_text, + const CefString& default_prompt_text, + CefRefPtr callback, + bool& suppress_message) override; + + bool OnBeforeUnloadDialog(CefRefPtr browser, + const CefString& message_text, + bool is_reload, + CefRefPtr callback) override; + /* CefJSDialogHandler method end */ + + const std::vector GetVisitedHistory(); + + private: + // List of existing browser windows. Only accessed on the CEF UI thread. + typedef std::list> BrowserList; + BrowserList browser_list_; + + CefRefPtr main_browser_ = nullptr; + bool is_closing_ = false; + + std::shared_ptr preference_delegate_ = nullptr; + CefRefPtr render_handler_ = nullptr; + + std::shared_ptr event_handler_ = nullptr; + + // Include the default reference counting implementation. + IMPLEMENT_REFCOUNTING(NWebHandlerDelegate); + + std::shared_ptr download_listener_ = nullptr; + std::shared_ptr nweb_handler_ = nullptr; + std::shared_ptr nweb_javascript_callback_ = + nullptr; +}; +} // namespace OHOS::NWeb + +#endif diff --git a/ohos_nweb/src/cef_delegate/nweb_inputmethod_client.h b/ohos_nweb/src/cef_delegate/nweb_inputmethod_client.h new file mode 100644 index 0000000000..73cebd5e2b --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_inputmethod_client.h @@ -0,0 +1,24 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OHOS_NWEB_SRC_CEF_DELEGATE_NWEB_INPUTMETHOD_CLIENT_H_ +#define OHOS_NWEB_SRC_CEF_DELEGATE_NWEB_INPUTMETHOD_CLIENT_H_ + +#include "include/cef_base.h" +#include "include/cef_browser.h" + +namespace OHOS::NWeb { +class NWebInputMethodClient: public virtual CefBaseRefCounted { + public: + virtual ~NWebInputMethodClient() = default; + virtual void Attach(CefRefPtr browser) = 0; + virtual void ShowTextInput() = 0; + virtual void HideTextInput() = 0; + virtual void OnTextSelectionChanged(CefRefPtr browser, + const CefString& selected_text, + const CefRange& selected_range) = 0; +}; +} + +#endif // OHOS_NWEB_SRC_CEF_DELEGATE_NWEB_INPUTMETHOD_CLIENT_H_ \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.cc b/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.cc new file mode 100644 index 0000000000..23287ae9ac --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.cc @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_js_dialog_result_impl.h" + +using namespace OHOS::NWeb; + +NWebJSDialogResultImpl::NWebJSDialogResultImpl(CefRefPtr callback) + : callback_(callback), has_put_(false) {} + +void NWebJSDialogResultImpl::Confirm() { + if (callback_ != nullptr && !has_put_) { + callback_->Continue(true, CefString(std::string())); + has_put_ = true; + } +} + +void NWebJSDialogResultImpl::Confirm(const std::string &message) { + if (callback_ != nullptr && !has_put_) { + callback_->Continue(true, CefString(message)); + has_put_ = true; + } +} + +void NWebJSDialogResultImpl::Cancel() { + if (callback_ != nullptr && !has_put_) { + callback_->Continue(false, CefString(std::string())); + has_put_ = true; + } +} \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.h b/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.h new file mode 100644 index 0000000000..0ad0d03214 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_js_dialog_result_impl.h @@ -0,0 +1,26 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_JS_DIALOG_RESULT_IMPL_H +#define NWEB_JS_DIALOG_RESULT_IMPL_H + +#include "nweb_js_dialog_result.h" +#include "cef/include/cef_jsdialog_handler.h" + +namespace OHOS::NWeb { +class NWebJSDialogResultImpl : public NWebJSDialogResult { + public: + NWebJSDialogResultImpl() = default; + explicit NWebJSDialogResultImpl(CefRefPtr callback); + ~NWebJSDialogResultImpl() = default; + void Confirm() override; + void Confirm(const std::string &message) override; + void Cancel() override; + private: + CefRefPtr callback_; + bool has_put_ = false; +}; +} + +#endif \ No newline at end of file diff --git a/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc b/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc new file mode 100644 index 0000000000..a97e0c4952 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_preference_delegate.cc @@ -0,0 +1,392 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ohos_nweb/src/cef_delegate/nweb_preference_delegate.h" +#include "base/logging.h" +#include "cef/include/internal/cef_string.h" +#include "cef/include/internal/cef_string_types.h" +#include "cef/include/internal/cef_string_wrappers.h" +#include "cef/include/internal/cef_types.h" +#include "cef/include/internal/cef_types_wrappers.h" +#include "cef/libcef/browser/net_service/net_helpers.h" + +#include "base/feature_list.h" + +namespace OHOS::NWeb { +NWebPreferenceDelegate::NWebPreferenceDelegate() {} + +NWebPreferenceDelegate::~NWebPreferenceDelegate() {} + +void NWebPreferenceDelegate::OnDestroy() { + browser_ = nullptr; +} + +void NWebPreferenceDelegate::SetBrowser(CefRefPtr browser) { + this->browser_ = browser; +} + +void NWebPreferenceDelegate::WebPreferencesChanged() { + if (!browser_) { + LOG(ERROR) << "update web preferences failed, browser is null"; + return; + } + + CefBrowserSettings browser_settings; + ComputeBrowserSettings(browser_settings); + browser_->GetHost()->SetWebPreferences(browser_settings); +} + +void NWebPreferenceDelegate::ComputeBrowserSettings( + CefBrowserSettings& browser_settings) { + CefString str = CefString(StandardFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.standard_font_family), true); + + str = CefString(FixedFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.fixed_font_family), true); + + str = CefString(SerifFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.serif_font_family), true); + + str = CefString(SansSerifFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.sans_serif_font_family), true); + + str = CefString(CursiveFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.cursive_font_family), true); + + str = CefString(FantasyFontFamilyName()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.fantasy_font_family), true); + + browser_settings.default_font_size = DefaultFontSize(); + browser_settings.default_fixed_font_size = DefaultFixedFontSize(); + browser_settings.minimum_font_size = FontSizeLowerLimit(); + browser_settings.minimum_logical_font_size = LogicalFontSizeLowerLimit(); + + str = CefString(DefaultTextEncodingFormat()); + cef_string_set(str.c_str(), str.length(), + &(browser_settings.default_encoding), true); + + browser_settings.javascript = + IsJavaScriptAllowed() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.loads_images_automatically = + IsImageLoadingAllowed() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.image_loading = + !IsLoadImageFromNetworkDisabled() ? STATE_ENABLED : STATE_DISABLED; + + browser_settings.local_storage = + IsDomStorageEnabled() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.databases = + IsDataBaseEnabled() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.universal_access_from_file_urls = + EnableUniversalAccessFromFileURLs() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.file_access_from_file_urls = + EnableRawFileAccessFromFileURLs() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.force_dark_mode_enabled = + DarkModeEnabled() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.javascript_can_open_windows_automatically = + IsCreateWindowsByJavaScriptAllowed(); + browser_settings.text_size_percent = ZoomingForTextFactor(); + browser_settings.mixed_content_mode = AccessModeForSecureOriginLoadFromInsecure(); + browser_settings.allow_running_insecure_content = + RunningInsecureContentAllowed() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.strict_mixed_content_checking = + UseStricMixedContentCheckingAllowed() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.allow_mixed_content_upgrades = + MixedContentAutoupgradesAllowed() ? STATE_ENABLED : STATE_DISABLED; + browser_settings.geolocation_enabled = GeolocationAllowed(); + browser_settings.supports_double_tap_zoom = ZoomingfunctionEnabled(); + browser_settings.supports_multi_touch_zoom = ZoomingfunctionEnabled(); +} + +void NWebPreferenceDelegate::SetBrowserSettingsToNetHelpers() { + net_service::NetHelpers::allow_file_access = EnableRawFileAccess(); + net_service::NetHelpers::allow_content_access = EnableContentAccess(); + return; +} + +void NWebPreferenceDelegate::PutEnableContentAccess(bool flag) { + content_access_ = flag; + SetBrowserSettingsToNetHelpers(); +} + +void NWebPreferenceDelegate::PutEnableRawFileAccess(bool flag) { + raw_file_access_ = flag; + SetBrowserSettingsToNetHelpers(); +} + +void NWebPreferenceDelegate::PutEnableRawFileAccessFromFileURLs(bool flag) { + raw_file_access_from_file_urls_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutEnableUniversalAccessFromFileURLs(bool flag) { + universal_access_from_file_urls_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutLoadImageFromNetworkDisabled(bool flag) { + images_enabled_ = !flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutCursiveFontFamilyName(std::string font) { + cursive_font_family_name_ = font; + WebPreferencesChanged(); +} +void NWebPreferenceDelegate::PutDatabaseAllowed(bool flag) { + databases_enabled_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutDefaultFixedFontSize(int size) { + default_fixed_font_size_ = size; + WebPreferencesChanged(); +} +void NWebPreferenceDelegate::PutDefaultFontSize(int size) { + default_font_size_ = size; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutDefaultTextEncodingFormat(std::string encoding) { + default_encoding_ = encoding; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutDomStorageEnabled(bool flag) { + dom_storage_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutFantasyFontFamilyName(std::string font) { + fantasy_font_family_name_ = font; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutFixedFontFamilyName(std::string font) { + fixed_font_family_name_ = font; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutDarkModeEnabled(int forceDark) { + dark_mode_enabled_ = forceDark; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutIsCreateWindowsByJavaScriptAllowed( + bool flag) { + create_windows_by_javascript_allowed_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutJavaScriptEnabled(bool flag) { + javascript_allowed_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutImageLoadingAllowed(bool flag) { + image_loading_allowed_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutFontSizeLowerLimit(int size) { + font_size_lower_limit_ = size; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutLogicalFontSizeLowerLimit(int size) { + logical_font_size_lower_limit_ = size; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutSansSerifFontFamilyName(std::string font) { + sans_serif_font_family_name_ = font; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutSerifFontFamilyName(std::string font) { + serif_font_family_name_ = font; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutStandardFontFamilyName(std::string font) { + standard_font_family_name_ = font; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutUserAgent(std::string ua) { + std::string old_user_agent = user_agent_; + if (ua.empty() || ua.length() == 0) { + user_agent_ = DefaultUserAgent(); + } else { + user_agent_ = ua; + } + if (old_user_agent != user_agent_) { + browser_->GetHost()->PutUserAgent(ua); + } +} + +void NWebPreferenceDelegate::PutZoomingForTextFactor(int textZoom) { + if (zooming_for_text_factor_ != textZoom) { + zooming_for_text_factor_ = textZoom; + WebPreferencesChanged(); + } +} + +void NWebPreferenceDelegate::PutGeolocationAllowed(bool flag) { + geolocation_allowed_ = flag; + WebPreferencesChanged(); +} + +void NWebPreferenceDelegate::PutAccessModeForSecureOriginLoadFromInsecure(AccessMode mode) { + if (access_mode_ != mode) { + access_mode_ = mode; + WebPreferencesChanged(); + } +} + +void NWebPreferenceDelegate::PutZoomingFunctionEnabled(bool flag) { + if (zooming_function_enabled_ != flag) { + zooming_function_enabled_ = flag; + WebPreferencesChanged(); + } +} + +bool NWebPreferenceDelegate::EnableContentAccess() { + return content_access_; +} +bool NWebPreferenceDelegate::EnableRawFileAccess() { + return raw_file_access_; +} + +bool NWebPreferenceDelegate::EnableRawFileAccessFromFileURLs() { + return raw_file_access_from_file_urls_; +} + +bool NWebPreferenceDelegate::EnableUniversalAccessFromFileURLs() { + return universal_access_from_file_urls_; +} + +bool NWebPreferenceDelegate::IsLoadImageFromNetworkDisabled() { + return !images_enabled_; +} + +std::string NWebPreferenceDelegate::CursiveFontFamilyName() { + return cursive_font_family_name_; +} + +bool NWebPreferenceDelegate::IsDataBaseEnabled() { + return databases_enabled_; +} + +int NWebPreferenceDelegate::DefaultFixedFontSize() { + return default_fixed_font_size_; +} + +int NWebPreferenceDelegate::DefaultFontSize() { + return default_font_size_; +} + +std::string NWebPreferenceDelegate::DefaultTextEncodingFormat() { + return default_encoding_; +} + +std::string NWebPreferenceDelegate::DefaultUserAgent() { + std::string ua = browser_->GetHost()->DefaultUserAgent(); + return ua; +} + +bool NWebPreferenceDelegate::IsDomStorageEnabled() { + return dom_storage_; +} + +std::string NWebPreferenceDelegate::FantasyFontFamilyName() { + return fantasy_font_family_name_; +} + +std::string NWebPreferenceDelegate::FixedFontFamilyName() { + return fixed_font_family_name_; +} + +int NWebPreferenceDelegate::DarkModeEnabled() { + return dark_mode_enabled_; +} + +bool NWebPreferenceDelegate::IsCreateWindowsByJavaScriptAllowed() { + return create_windows_by_javascript_allowed_; +} + +bool NWebPreferenceDelegate::IsJavaScriptAllowed() { + return javascript_allowed_; +} + +bool NWebPreferenceDelegate::IsImageLoadingAllowed() { + return image_loading_allowed_; +} + +int NWebPreferenceDelegate::FontSizeLowerLimit() { + return font_size_lower_limit_; +} + +int NWebPreferenceDelegate::LogicalFontSizeLowerLimit() { + return logical_font_size_lower_limit_; +} + +std::string NWebPreferenceDelegate::SansSerifFontFamilyName() { + return sans_serif_font_family_name_; +} + +std::string NWebPreferenceDelegate::SerifFontFamilyName() { + return serif_font_family_name_; +} + +std::string NWebPreferenceDelegate::StandardFontFamilyName() { + return standard_font_family_name_; +} + +std::string NWebPreferenceDelegate::UserAgent() { + if (user_agent_.empty()) { + user_agent_ = DefaultUserAgent(); + } + return user_agent_; +} + +int NWebPreferenceDelegate::ZoomingForTextFactor() { + return zooming_for_text_factor_; +} + +bool NWebPreferenceDelegate::GeolocationAllowed() { + return geolocation_allowed_; +} + +int NWebPreferenceDelegate::AccessModeForSecureOriginLoadFromInsecure() { + return access_mode_; +} + +bool NWebPreferenceDelegate::RunningInsecureContentAllowed() { + return access_mode_ == ALWAYS_ALLOW; +} + +bool NWebPreferenceDelegate::UseStricMixedContentCheckingAllowed() { + return access_mode_ == NEVER_ALLOW; +} + +const base::Feature webview_mixed_content_autoupgrades{ + "WebViewMixedContentAutoupgrades", base::FEATURE_DISABLED_BY_DEFAULT}; + +bool NWebPreferenceDelegate::MixedContentAutoupgradesAllowed() { + if (base::FeatureList::IsEnabled(webview_mixed_content_autoupgrades)) { + return access_mode_ == COMPATIBILITY_MODE; + } + return false; +} + +bool NWebPreferenceDelegate::ZoomingfunctionEnabled() { + return zooming_function_enabled_; +} +} diff --git a/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h b/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h new file mode 100644 index 0000000000..2d439ffc74 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_preference_delegate.h @@ -0,0 +1,121 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_PREFERENCE_DELEGATE_H +#define NWEB_PREFERENCE_DELEGATE_H + +#include "cef/include/cef_browser.h" +#include "ohos_nweb/include/nweb_preference.h" + +namespace OHOS::NWeb { +class NWebPreferenceDelegate : public NWebPreference { + public: + NWebPreferenceDelegate(); + ~NWebPreferenceDelegate(); + void OnDestroy(); + void SetBrowser(CefRefPtr browser); + void WebPreferencesChanged(); + void ComputeBrowserSettings(CefBrowserSettings& browser_settings); + + void SetBrowserSettingsToNetHelpers(); + + /* set methods */ + void PutEnableContentAccess(bool flag) override; + void PutEnableRawFileAccess(bool flag) override; + void PutEnableRawFileAccessFromFileURLs(bool flag) override; + void PutEnableUniversalAccessFromFileURLs(bool flag) override; + void PutLoadImageFromNetworkDisabled(bool flag) override; + void PutCursiveFontFamilyName(std::string font) override; + void PutDatabaseAllowed(bool flag) override; + void PutDefaultFixedFontSize(int size) override; + void PutDefaultFontSize(int size) override; + void PutDefaultTextEncodingFormat(std::string encoding) override; + void PutDomStorageEnabled(bool flag) override; + void PutFantasyFontFamilyName(std::string font) override; + void PutFixedFontFamilyName(std::string font) override; + void PutDarkModeEnabled(int forceDark) override; + void PutIsCreateWindowsByJavaScriptAllowed(bool flag) override; + void PutJavaScriptEnabled(bool flag) override; + void PutImageLoadingAllowed(bool flag) override; + void PutFontSizeLowerLimit(int size) override; + void PutLogicalFontSizeLowerLimit(int size) override; + void PutSansSerifFontFamilyName(std::string font) override; + void PutSerifFontFamilyName(std::string font) override; + void PutStandardFontFamilyName(std::string font) override; + void PutUserAgent(std::string ua) override; + void PutZoomingForTextFactor(int textZoom) override; + void PutGeolocationAllowed(bool flag) override; + void PutAccessModeForSecureOriginLoadFromInsecure(AccessMode mode) override; + void PutZoomingFunctionEnabled(bool flag) override; + + /* get methods*/ + bool EnableContentAccess() override; + bool EnableRawFileAccess() override; + bool EnableRawFileAccessFromFileURLs() override; + bool EnableUniversalAccessFromFileURLs() override; + bool IsLoadImageFromNetworkDisabled() override; + std::string CursiveFontFamilyName() override; + bool IsDataBaseEnabled() override; + int DefaultFixedFontSize() override; + int DefaultFontSize() override; + std::string DefaultTextEncodingFormat() override; + std::string DefaultUserAgent() override; + bool IsDomStorageEnabled() override; + std::string FantasyFontFamilyName() override; + std::string FixedFontFamilyName() override; + int DarkModeEnabled() override; + bool IsCreateWindowsByJavaScriptAllowed() override; + bool IsJavaScriptAllowed() override; + bool IsImageLoadingAllowed() override; + int FontSizeLowerLimit() override; + int LogicalFontSizeLowerLimit() override; + std::string SansSerifFontFamilyName() override; + std::string SerifFontFamilyName() override; + std::string StandardFontFamilyName() override; + std::string UserAgent() override; + int ZoomingForTextFactor() override; + bool GeolocationAllowed() override; + int AccessModeForSecureOriginLoadFromInsecure() override; + bool ZoomingfunctionEnabled() override; + + bool RunningInsecureContentAllowed(); + bool UseStricMixedContentCheckingAllowed(); + bool MixedContentAutoupgradesAllowed(); + + private: + CefRefPtr browser_ = nullptr; + + /* Web preferences begin*/ + std::string standard_font_family_name_{"sans-serif"}; + std::string fixed_font_family_name_{"monospace"}; + std::string serif_font_family_name_{"serif"}; + std::string sans_serif_font_family_name_{"sans-serif"}; + std::string cursive_font_family_name_{"cursive"}; + std::string fantasy_font_family_name_{"fantasy"}; + int default_font_size_{16}; + int default_fixed_font_size_{13}; + int font_size_lower_limit_{8}; + int logical_font_size_lower_limit_{8}; + std::string default_encoding_{"UTF-8"}; + bool images_enabled_{true}; + bool javascript_allowed_{false}; + bool image_loading_allowed_{true}; + bool dom_storage_{false}; + bool databases_enabled_{false}; + bool content_access_{true}; + bool raw_file_access_{false}; + bool universal_access_from_file_urls_{false}; + bool raw_file_access_from_file_urls_{false}; + bool dark_mode_enabled_{false}; + /* Web preferences end*/ + bool create_windows_by_javascript_allowed_{false}; + std::string user_agent_{""}; + int zooming_for_text_factor_{100}; + bool geolocation_allowed_{true}; + int access_mode_{NEVER_ALLOW}; + bool zooming_function_enabled_{true}; +}; +} // namespace OHOS::NWeb + +#endif diff --git a/ohos_nweb/src/cef_delegate/nweb_render_handler.cc b/ohos_nweb/src/cef_delegate/nweb_render_handler.cc new file mode 100644 index 0000000000..4b85ca9122 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_render_handler.cc @@ -0,0 +1,100 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_render_handler.h" + +#include +#include +#include + +#include "base/logging.h" + +namespace OHOS::NWeb { +// static +CefRefPtr NWebRenderHandler::Create() { + CefRefPtr renderHandler(new NWebRenderHandler()); + if (renderHandler == nullptr) { + LOG(ERROR) << "fail to create NWebRenderHandler instance"; + return nullptr; + } + return renderHandler; +} + +void NWebRenderHandler::RegisterRenderCb( + std::function render_update_cb) { + render_update_cb_ = render_update_cb; +} + +void NWebRenderHandler::SetInputMethodClient( + CefRefPtr client) { + inputmethod_client_ = client; +} + +void NWebRenderHandler::Resize(uint32_t width, uint32_t height) { + width_ = width; + height_ = height; +} + +void NWebRenderHandler::GetViewRect(CefRefPtr browser, + CefRect& rect) { + rect.x = 0; + rect.y = 0; + rect.width = width_; + rect.height = height_; + return; +} + +void NWebRenderHandler::OnPaint(CefRefPtr browser, + PaintElementType type, + const RectList& dirty_rects, + const void* buffer, + int width, + int height) { + // run render callback to take buffer. + // note: buffer must be consumed asap with no lock protected + if (render_update_cb_ != nullptr) { + render_update_cb_(reinterpret_cast(buffer)); + } +} + +void NWebRenderHandler::OnRootLayerChanged(CefRefPtr browser, + int height, + int width) { + content_height_ = height; + content_width_ = width; +} + +int NWebRenderHandler::ContentHeight() { + return content_height_; +} + +void NWebRenderHandler::OnImeCompositionRangeChanged( + CefRefPtr browser, + const CefRange& selected_range, + const RectList& character_bounds) { + LOG(INFO) << "NWebRenderHandler::OnImeCompositionRangeChanged"; +} + +void NWebRenderHandler::OnTextSelectionChanged(CefRefPtr browser, + const CefString& selected_text, + const CefRange& selected_range) { + if (inputmethod_client_) { + inputmethod_client_->OnTextSelectionChanged(browser, selected_text, + selected_range); + } +} + +void NWebRenderHandler::OnVirtualKeyboardRequested( + CefRefPtr browser, + TextInputMode input_mode) { + if (inputmethod_client_) { + if (input_mode != CEF_TEXT_INPUT_MODE_NONE) { + inputmethod_client_->Attach(browser); + inputmethod_client_->ShowTextInput(); + } else { + inputmethod_client_->HideTextInput(); + } + } +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/cef_delegate/nweb_render_handler.h b/ohos_nweb/src/cef_delegate/nweb_render_handler.h new file mode 100644 index 0000000000..5f4165d47f --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_render_handler.h @@ -0,0 +1,64 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_RENDER_HANDLER_H +#define NWEB_RENDER_HANDLER_H + +#include +#include +#include "cef/include/cef_render_handler.h" +#include "nweb_inputmethod_client.h" + +namespace OHOS::NWeb { +class NWebRenderHandler : public CefRenderHandler { + public: + static CefRefPtr Create(); + NWebRenderHandler() = default; + ~NWebRenderHandler() = default; + + void RegisterRenderCb(std::function render_update_cb); + void Resize(uint32_t width, uint32_t height); + int ContentHeight(); + void SetInputMethodClient(CefRefPtr client); + + /* CefRenderHandler method begin */ + virtual void GetViewRect(CefRefPtr browser, + CefRect& rect) override; + virtual void OnPaint(CefRefPtr browser, + PaintElementType type, + const RectList& dirty_rects, + const void* buffer, + int width, + int height) override; + void OnRootLayerChanged(CefRefPtr browser, + int height, + int width) override; + + virtual void OnImeCompositionRangeChanged( + CefRefPtr browser, + const CefRange& selected_range, + const RectList& character_bounds) override; + + virtual void OnTextSelectionChanged(CefRefPtr browser, + const CefString& selected_text, + const CefRange& selected_range) override; + + virtual void OnVirtualKeyboardRequested(CefRefPtr browser, + TextInputMode input_mode) override; + /* CefRenderHandler method end */ + + // Include the default reference counting implementation. + IMPLEMENT_REFCOUNTING(NWebRenderHandler); + + private: + std::function render_update_cb_ = nullptr; + CefRefPtr inputmethod_client_ = nullptr; + uint32_t width_ = 0; + uint32_t height_ = 0; + int content_height_ = 0; + int content_width_ = 0; +}; +} + +#endif // NWEB_RENDER_HANDLER_H diff --git a/ohos_nweb/src/cef_delegate/nweb_resource_handler.cc b/ohos_nweb/src/cef_delegate/nweb_resource_handler.cc new file mode 100644 index 0000000000..3b465b8f85 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_resource_handler.cc @@ -0,0 +1,83 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_resource_handler.h" +#include "base/logging.h" + +namespace OHOS::NWeb { +void ConvertMapToHeaderMap( + CefRequest::HeaderMap& headers, + const std::map response_map) { + for (auto iter = response_map.begin(); iter != response_map.end(); iter++) { + const std::string& key = iter->first; + const std::string& value = iter->second; + headers.emplace(key, value); + } +} + +NWebResourceHandler::NWebResourceHandler( + std::shared_ptr web_response, + std::string& str) + : data_(str) { + response_ = web_response; + offset_ = 0; +} + +/* CefResourceHandler method begin */ +bool NWebResourceHandler::Open(CefRefPtr request, + bool& handle_request, + CefRefPtr callback) { + LOG(INFO) << "NWebResourceHandler::Open"; + handle_request = true; + + if (response_) { + data_ = response_->ResponseData(); + } + return true; +} + +bool NWebResourceHandler::Read(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) { + LOG(INFO) << "NWebResourceHandler::Read"; + bool has_data = false; + bytes_read = 0; + + if (offset_ < data_.length()) { + // Copy the next block of data into the buffer. + int transfer_size = + std::min(bytes_to_read, static_cast(data_.length() - offset_)); + memcpy(data_out, data_.c_str() + offset_, transfer_size); + offset_ += transfer_size; + + bytes_read = transfer_size; + has_data = true; + } + + return has_data; +} + +void NWebResourceHandler::GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) { + LOG(INFO) << "NWebResourceHandler::GetResponseHeaders"; + if (response_ && response) { + response->SetMimeType(response_->ResponseMimeType()); + response->SetStatus(response_->ResponseStatusCode()); + response->SetStatusText(response_->ResponseStatus()); + response->SetCharset(response_->ResponseEncoding()); + CefRequest::HeaderMap cef_request_headers; + std::map request_headers = + response_->ResponseHeaders(); + ConvertMapToHeaderMap(cef_request_headers, request_headers); + response->SetHeaderMap(cef_request_headers); + } + + response_length = data_.length(); +} + +void NWebResourceHandler::Cancel() {} +/* CefResourceHandler method end */ +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/cef_delegate/nweb_resource_handler.h b/ohos_nweb/src/cef_delegate/nweb_resource_handler.h new file mode 100644 index 0000000000..fc23967df1 --- /dev/null +++ b/ohos_nweb/src/cef_delegate/nweb_resource_handler.h @@ -0,0 +1,48 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_REOURCE_HANDLER_H +#define NWEB_REOURCE_HANDLER_H + +#include +#include +#include +#include +#include "cef/include/cef_resource_handler.h" +#include "nweb_url_resource_response.h" + +namespace OHOS::NWeb { +class NWebResourceHandler : public CefResourceHandler { + public: + NWebResourceHandler(std::shared_ptr web_response, std::string& str); + ~NWebResourceHandler() = default; + + /* CefResourceHandler method begin */ + bool Open(CefRefPtr request, + bool& handle_request, + CefRefPtr callback) override; + + bool Read(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) override; + + void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) override; + + void Cancel() override; + /* CefResourceHandler method end */ + + // Include the default reference counting implementation. + IMPLEMENT_REFCOUNTING(NWebResourceHandler); + + private: + std::string data_; + size_t offset_ = 0; + std::shared_ptr response_; +}; +} + +#endif diff --git a/ohos_nweb/src/nweb_cookie_manager_delegate_interface.h b/ohos_nweb/src/nweb_cookie_manager_delegate_interface.h new file mode 100644 index 0000000000..564c57934e --- /dev/null +++ b/ohos_nweb/src/nweb_cookie_manager_delegate_interface.h @@ -0,0 +1,35 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_COOKIE_MANAGER_DELEGATE_INTERFACE_H +#define NWEB_COOKIE_MANAGER_DELEGATE_INTERFACE_H + +#include +#include +#include "nweb_value_callback.h" + +namespace OHOS::NWeb { +class NWebCookieManagerDelegateInterface { + public: + virtual ~NWebCookieManagerDelegateInterface() = default; + virtual bool IsAcceptCookieAllowed() = 0; + virtual void PutAcceptCookieEnabled(bool accept) = 0; + virtual bool IsFileURLSchemeCookiesAllowed() = 0; + virtual void PutAcceptFileURLSchemeCookiesEnabled(bool allow) = 0; + virtual void ReturnCookie( + const std::string& url, + std::shared_ptr> callback) = 0; + virtual void SetCookie(const std::string& url, + const std::string& value, + std::shared_ptr> callback) = 0; + virtual void ExistCookies( + std::shared_ptr> callback) = 0; + virtual void Store(std::shared_ptr> callback) = 0; + virtual void DeleteSessionCookies( + std::shared_ptr> callback) = 0; + virtual void DeleteCookieEntirely( + std::shared_ptr> callback) = 0; +}; +} // namespace OHOS::NWeb +#endif \ No newline at end of file diff --git a/ohos_nweb/src/nweb_cookie_manager_impl.cc b/ohos_nweb/src/nweb_cookie_manager_impl.cc new file mode 100644 index 0000000000..5d0659ed85 --- /dev/null +++ b/ohos_nweb/src/nweb_cookie_manager_impl.cc @@ -0,0 +1,93 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_cookie_manager_impl.h" +#include "nweb_cookie_manager_delegate.h" +#include "nweb_hilog.h" + +using namespace OHOS::NWeb; + +namespace OHOS::NWeb { +NWebCookieManagerImpl::NWebCookieManagerImpl() { +#if defined(USE_CEF) + delegate_ = std::make_shared(); +#endif +} + +bool NWebCookieManagerImpl::IsAcceptCookieAllowed() const { + if (delegate_ != nullptr) { + return delegate_->IsAcceptCookieAllowed(); + } + return false; +} + +void NWebCookieManagerImpl::PutAcceptCookieEnabled(bool accept) { + if (delegate_ != nullptr) { + delegate_->PutAcceptCookieEnabled(accept); + } +} + +bool NWebCookieManagerImpl::IsFileURLSchemeCookiesAllowed() const { + if (delegate_ != nullptr) { + return delegate_->IsFileURLSchemeCookiesAllowed(); + } + return false; +} + +void NWebCookieManagerImpl::PutAcceptFileURLSchemeCookiesEnabled(bool allow) { + if (delegate_ != nullptr) { + delegate_->PutAcceptFileURLSchemeCookiesEnabled(allow); + } +} + +void NWebCookieManagerImpl::SetCookie( + const std::string& url, + const std::string& value, + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->SetCookie(url, value, callback); + } +} + +void NWebCookieManagerImpl::ReturnCookie( + const std::string& url, + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->ReturnCookie(url, callback); + } +} + +void NWebCookieManagerImpl::ExistCookies( + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->ExistCookies(callback); + } +} + +void NWebCookieManagerImpl::Store( + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->Store(callback); + } +} + +void NWebCookieManagerImpl::DeleteSessionCookies( + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->DeleteSessionCookies(callback); + } +} + +void NWebCookieManagerImpl::DeleteCookieEntirely( + std::shared_ptr> callback) { + if (delegate_ != nullptr) { + delegate_->DeleteCookieEntirely(callback); + } +} + +NWebCookieManager* NWebCookieManager::GetInstance() { + static NWebCookieManagerImpl instance; + return &instance; +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/nweb_cookie_manager_impl.h b/ohos_nweb/src/nweb_cookie_manager_impl.h new file mode 100644 index 0000000000..128ab637b7 --- /dev/null +++ b/ohos_nweb/src/nweb_cookie_manager_impl.h @@ -0,0 +1,39 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_COOKIE_MANAGER_IMPL_H +#define NWEB_COOKIE_MANAGER_IMPL_H + +#include "nweb_cookie_manager.h" +#include "nweb_cookie_manager_delegate_interface.h" + +namespace OHOS::NWeb { +class NWebCookieManagerImpl : public NWebCookieManager { + public: + NWebCookieManagerImpl(); + ~NWebCookieManagerImpl() = default; + + bool IsAcceptCookieAllowed() const override; + void PutAcceptCookieEnabled(bool accept) override; + bool IsFileURLSchemeCookiesAllowed() const override; + void PutAcceptFileURLSchemeCookiesEnabled(bool allow) override; + void ReturnCookie( + const std::string& url, + std::shared_ptr> callback) override; + void SetCookie(const std::string& url, + const std::string& value, + std::shared_ptr> callback) override; + void ExistCookies(std::shared_ptr> callback) override; + void Store(std::shared_ptr> callback) override; + void DeleteSessionCookies( + std::shared_ptr> callback) override; + void DeleteCookieEntirely( + std::shared_ptr> callback) override; + + private: + std::shared_ptr delegate_ = nullptr; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_COOKIE_MANAGER_IMPL_H \ No newline at end of file diff --git a/ohos_nweb/src/nweb_delegate_adapter.cc b/ohos_nweb/src/nweb_delegate_adapter.cc new file mode 100644 index 0000000000..f0f17c61c0 --- /dev/null +++ b/ohos_nweb/src/nweb_delegate_adapter.cc @@ -0,0 +1,31 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_delegate_adapter.h" + +#include "nweb_hilog.h" + +#if defined(USE_CEF) +#include "cef_delegate/nweb_delegate.h" +#endif +namespace OHOS::NWeb { +// static +std::shared_ptr +NWebDelegateAdapter::CreateNWebDelegate(int argc, const char* argv[]) { +#if defined(USE_CEF) + std::shared_ptr delegate = + std::make_shared(argc, argv); + + if (delegate == nullptr || !delegate->Init()) { + WVLOG_I("FAIL to create nweb delegate instance"); + return nullptr; + } + + return delegate; +#else + WVLOG_E("NO IMPLEMENTATION"); + return nullptr; +#endif +} +} diff --git a/ohos_nweb/src/nweb_delegate_adapter.h b/ohos_nweb/src/nweb_delegate_adapter.h new file mode 100644 index 0000000000..1af15ad639 --- /dev/null +++ b/ohos_nweb/src/nweb_delegate_adapter.h @@ -0,0 +1,21 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_DELEGATE_HELPER_H +#define NWEB_DELEGATE_HELPER_H + +#include +#include "nweb_export.h" +#include "nweb_delegate_interface.h" + +namespace OHOS::NWeb { +class OHOS_NWEB_EXPORT NWebDelegateAdapter { + public: + static std::shared_ptr CreateNWebDelegate( + int argc, + const char* argv[]); +}; +} + +#endif // NWEB_DELEGATE_HELPER_H diff --git a/ohos_nweb/src/nweb_delegate_interface.h b/ohos_nweb/src/nweb_delegate_interface.h new file mode 100755 index 0000000000..179578beec --- /dev/null +++ b/ohos_nweb/src/nweb_delegate_interface.h @@ -0,0 +1,80 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_DELEGATE_INTERFACE_H +#define NWEB_DELEGATE_INTERFACE_H + +#include +#include +#include "cef_delegate/nweb_inputmethod_client.h" +#include "nweb_download_callback.h" +#include "nweb_preference.h" +#include "nweb_handler.h" +namespace OHOS::NWeb { +class NWebDelegateInterface { + public: + virtual ~NWebDelegateInterface() = default; + + virtual bool IsReady() = 0; + virtual void OnDestroy(bool is_close_all) = 0; + virtual void RegisterDownLoadListener( + std::shared_ptr downloadListener) = 0; + virtual void RegisterNWebHandler(std::shared_ptr handler) = 0; + virtual void RegisterRenderCb( + std::function render_update_cb) = 0; + virtual void SetInputMethodClient( + CefRefPtr client) = 0; + + /* event interface */ + virtual void Resize(uint32_t width, uint32_t height) = 0; + virtual void OnTouchPress(int32_t id, double x, double y) = 0; + virtual void OnTouchRelease(int32_t id, double x, double y) = 0; + virtual void OnTouchMove(int32_t id, double x, double y) = 0; + virtual void OnTouchCancel() = 0; + + virtual void Load(const std::string& url) = 0; + virtual bool IsNavigatebackwardAllowed() const = 0; + virtual bool IsNavigateForwardAllowed() const = 0; + virtual bool CanNavigateBackOrForward(int numSteps) const = 0; + virtual void NavigateBack() const = 0; + virtual void NavigateForward() const = 0; + virtual void Reload() const = 0; + virtual void Zoom(float zoomFactor) const = 0; + virtual void Stop() const = 0; + virtual void ExecuteJavaScript(const std::string& code) const = 0; + virtual void ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const = 0; + virtual void PutBackgroundColor(int color) const = 0; + virtual void OnPause() = 0; + virtual void OnContinue() = 0; + virtual std::shared_ptr GetPreference() const = 0; + virtual std::string Title() = 0; + virtual HitTestResult GetHitTestResult() const = 0; + virtual int PageLoadProgress() = 0; + virtual float Scale() = 0; + virtual void Load( + std::string& url, + std::map additionalHttpHeaders) = 0; + virtual void LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) = 0; + virtual void LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) = 0; + virtual int ContentHeight() = 0; + virtual void RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const = 0; + virtual void UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) const = 0; + virtual void RegisterNWebJavaScriptCallBack( + std::shared_ptr callback) = 0; +}; +} // namespace OHOS::NWeb + +#endif // nweb_delegate_INTERFACE_H diff --git a/ohos_nweb/src/nweb_hilog.h b/ohos_nweb/src/nweb_hilog.h new file mode 100644 index 0000000000..0e9518b413 --- /dev/null +++ b/ohos_nweb/src/nweb_hilog.h @@ -0,0 +1,42 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_HILOG_H +#define NWEB_HILOG_H + +#if defined(OHOS_NWEB) +#include "hilog/log.h" +constexpr OHOS::HiviewDFX::HiLogLabel kLogLabel = {LOG_APP, 0, "NWEB"}; + +#define FUNC_LINE_FMT " %{public}s<%{public}d>: " + +#define WVLOG_D(fmt, ...) \ + OHOS::HiviewDFX::HiLog::Debug(kLogLabel, FUNC_LINE_FMT fmt, __FUNCTION__, \ + __LINE__, ##__VA_ARGS__) +#define WVLOG_I(fmt, ...) \ + OHOS::HiviewDFX::HiLog::Info(kLogLabel, FUNC_LINE_FMT fmt, __FUNCTION__, \ + __LINE__, ##__VA_ARGS__) +#define WVLOG_W(fmt, ...) \ + OHOS::HiviewDFX::HiLog::Warn(kLogLabel, FUNC_LINE_FMT fmt, __FUNCTION__, \ + __LINE__, ##__VA_ARGS__) +#define WVLOG_E(fmt, ...) \ + OHOS::HiviewDFX::HiLog::Error(kLogLabel, FUNC_LINE_FMT fmt, __FUNCTION__, \ + __LINE__, ##__VA_ARGS__) +#define WVLOG_F(fmt, ...) \ + OHOS::HiviewDFX::HiLog::Fatal(kLogLabel, FUNC_LINE_FMT fmt, __FUNCTION__, \ + __LINE__, ##__VA_ARGS__) + +#else // not OHOS_NWEB + +#define WVLOG(fmt, ...) + +#define WVLOG_D(fmt, ...) WVLOG(fmt, ##__VA_ARGS__) +#define WVLOG_I(fmt, ...) WVLOG(fmt, ##__VA_ARGS__) +#define WVLOG_W(fmt, ...) WVLOG(fmt, ##__VA_ARGS__) +#define WVLOG_E(fmt, ...) WVLOG(fmt, ##__VA_ARGS__) +#define WVLOG_F(fmt, ...) WVLOG(fmt, ##__VA_ARGS__) + +#endif // OHOS_NWEB + +#endif // NWEB_HILOG_H diff --git a/ohos_nweb/src/nweb_impl.cc b/ohos_nweb/src/nweb_impl.cc new file mode 100755 index 0000000000..925a5561ef --- /dev/null +++ b/ohos_nweb/src/nweb_impl.cc @@ -0,0 +1,426 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_impl.h" + +#include +#include +#include +#include +#include +#include +#include "nweb_delegate_adapter.h" +#include "nweb_export.h" +#include "nweb_handler.h" +#include "nweb_hilog.h" + +namespace { +uint32_t g_nweb_count = 0; +const uint32_t kSurfaceMaxWidth = 7680; +const uint32_t kSurfaceMaxHeight = 7680; +} + +using namespace OHOS::NWeb; +extern "C" OHOS_NWEB_EXPORT NWeb* CreateNWeb( + const NWebCreateInfo& create_info) { + static uint32_t current_nweb_id = 0; + uint32_t nweb_id = ++current_nweb_id; + WVLOG_I("creating nweb %{public}u, size %{public}u*%{public}u", nweb_id, + create_info.width, create_info.height); + auto nweb = new NWebImpl(nweb_id); + if (nweb == nullptr) { + WVLOG_E("fail to create nweb instance"); + return nullptr; + } + + if (!nweb->Init(create_info)) { + WVLOG_E("fail to init nweb"); + return nullptr; + } + + ++g_nweb_count; + return nweb; +} + +namespace OHOS::NWeb { +NWebImpl::NWebImpl(uint32_t id) : nweb_id_(id) {} + +bool NWebImpl::Init(const NWebCreateInfo& create_info) { + output_handler_ = NWebOutputHandler::Create( + create_info.width, create_info.height, create_info.output_render_frame); + if (output_handler_ == nullptr) { + return false; + } + output_handler_->SetNWebId(nweb_id_); + + ProcessInitArgs(create_info.init_args); + + if (!InitWebEngine()) { + WVLOG_E("web engine init fail"); + return false; + } + + input_handler_ = NWebInputHandler::Create(nweb_delegate_); + if (input_handler_ == nullptr) { + return false; + } + + return true; +} + +void NWebImpl::OnDestroy() { + if (g_nweb_count == 0) { + return; + } + bool is_close_all = (--g_nweb_count) == 0 ? true : false; + if (nweb_delegate_ != nullptr) { + nweb_delegate_->OnDestroy(is_close_all); + nweb_delegate_ = nullptr; + } + if (input_handler_ != nullptr) { + input_handler_->OnDestroy(); + } +} + +void NWebImpl::ProcessInitArgs(const NWebInitArgs& init_args) { + if (!init_args.dump_path.empty() && output_handler_ != nullptr) { + output_handler_->SetDumpPath(init_args.dump_path); + } + if (init_args.frame_info_dump && output_handler_ != nullptr) { + output_handler_->SetFrameInfoDump(init_args.frame_info_dump); + } + + InitWebEngineArgs(init_args); +} + +bool NWebImpl::InitWebEngine() { + if (web_engine_args_.empty()) { + WVLOG_E("fail to init web engine args"); + return false; + } + + int argc = web_engine_args_.size(); + const char** argv = new const char*[argc]; + int i = 0; + for (auto it = web_engine_args_.begin(); i < argc; ++i, ++it) { + argv[i] = it->c_str(); + } + + nweb_delegate_ = NWebDelegateAdapter::CreateNWebDelegate(argc, argv); + if (nweb_delegate_ == nullptr) { + WVLOG_E("fail to create nweb delegate of web engine"); + return false; + } + + std::weak_ptr output_handler_weak(output_handler_); + auto render_update_cb = [output_handler_weak](const char* buffer) -> void { + if (!output_handler_weak.expired()) { + output_handler_weak.lock()->OnRenderUpdate(buffer); + } + }; + + uint32_t width, height; + output_handler_->GetWindowInfo(width, height); + nweb_delegate_->Resize(width, height); + nweb_delegate_->RegisterRenderCb(render_update_cb); + + inputmethod_handler_ = new NWebInputMethodHandler(); + nweb_delegate_->SetInputMethodClient(inputmethod_handler_); + + delete[] argv; + return nweb_delegate_->IsReady(); +} + +void NWebImpl::InitWebEngineArgs(const NWebInitArgs& init_args) { + web_engine_args_.clear(); + web_engine_args_.emplace_back("/system/bin/web_render"); + web_engine_args_.emplace_back("--in-process-gpu"); + web_engine_args_.emplace_back("--disable-dev-shm-usage"); + web_engine_args_.emplace_back("--no-unsandboxed-zygote"); + web_engine_args_.emplace_back("--off-screen-frame-rate=60"); + web_engine_args_.emplace_back("--enable-features=UseOzonePlatform"); + web_engine_args_.emplace_back("-ozone-platform=headless"); + web_engine_args_.emplace_back("--no-sandbox"); + web_engine_args_.emplace_back("--ignore-certificate-errors"); + web_engine_args_.emplace_back("--use-mobile-user-agent"); + web_engine_args_.emplace_back( + "--browser-subprocess-path=/system/bin/web_render"); + web_engine_args_.emplace_back("--zygote-cmd-prefix=/system/bin/web_render"); + + for (auto arg : init_args.web_engine_args_to_delete) { + auto it = std::find(web_engine_args_.begin(), web_engine_args_.end(), arg); + if (it != web_engine_args_.end()) { + web_engine_args_.erase(it); + } + } + for (auto arg : init_args.web_engine_args_to_add) { + web_engine_args_.emplace_back(arg); + } + if (init_args.multi_renderer_process) { + web_engine_args_.emplace_back("--enable-multi-renderer-process"); + } +} + +void NWebImpl::PutDownloadCallback( + std::shared_ptr downloadListener) { + nweb_delegate_->RegisterDownLoadListener(downloadListener); +} + +void NWebImpl::SetNWebHandler(std::shared_ptr client) { + nweb_handle_ = client; + nweb_delegate_->RegisterNWebHandler(client); + client->SetNWeb(shared_from_this()); +} + +const std::shared_ptr NWebImpl::GetNWebHandler() const { + return nweb_handle_; +} + +void NWebImpl::Resize(uint32_t width, uint32_t height) { + if (input_handler_ == nullptr || output_handler_ == nullptr) { + return; + } + if (width > kSurfaceMaxWidth || height > kSurfaceMaxHeight) { + return; + } + nweb_delegate_->Resize(width, height); + output_handler_->Resize(width, height); +} + +void NWebImpl::OnTouchPress(int32_t id, double x, double y) { + if (input_handler_ == nullptr) { + return; + } + input_handler_->OnTouchPress(id, x, y); +} + +void NWebImpl::OnTouchRelease(int32_t id, double x, double y) { + if (input_handler_ == nullptr) { + return; + } + input_handler_->OnTouchRelease(id, x, y); +} + +void NWebImpl::OnTouchMove(int32_t id, double x, double y) { + if (input_handler_ == nullptr) { + return; + } + input_handler_->OnTouchMove(id, x, y); +} + +void NWebImpl::OnTouchCancel() { + if (input_handler_ == nullptr) { + return; + } + input_handler_->OnTouchCancel(); +} + +void NWebImpl::OnNavigateBack() { + if (input_handler_ == nullptr) { + return; + } + input_handler_->OnNavigateBack(); +} + +void NWebImpl::Load(const std::string& url) const { + if (nweb_delegate_ == nullptr || output_handler_ == nullptr) { + return; + } + + if (!output_handler_->IsSizeValid()) { + WVLOG_E("nweb size is invalid, stop Load"); + return; + } + + nweb_delegate_->Load(url); + output_handler_->StartRenderOutput(); +} + +bool NWebImpl::IsNavigatebackwardAllowed() const { + if (nweb_delegate_ == nullptr) { + return false; + } + return nweb_delegate_->IsNavigatebackwardAllowed(); +} + +bool NWebImpl::IsNavigateForwardAllowed() const { + if (nweb_delegate_ == nullptr) { + return false; + } + return nweb_delegate_->IsNavigateForwardAllowed(); +} + +bool NWebImpl::CanNavigateBackOrForward(int numSteps) const { + if (nweb_delegate_ == nullptr) { + return false; + } + return nweb_delegate_->CanNavigateBackOrForward(numSteps); +} + +void NWebImpl::NavigateBack() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->NavigateBack(); +} + +void NWebImpl::NavigateForward() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->NavigateForward(); +} + +void NWebImpl::Reload() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->Reload(); +} + +void NWebImpl::Zoom(float zoomFactor) const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->Zoom(zoomFactor); +} + +void NWebImpl::Stop() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->Stop(); +} + +void NWebImpl::ExecuteJavaScript(const std::string& code) const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->ExecuteJavaScript(code); +} + +void NWebImpl::PutBackgroundColor(int color) const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->PutBackgroundColor(color); +} + +void NWebImpl::OnPause() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->OnPause(); +} + +void NWebImpl::OnContinue() const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->OnContinue(); +} + +const std::shared_ptr NWebImpl::GetPreference() const { + if (nweb_delegate_ == nullptr) { + return nullptr; + } + return nweb_delegate_->GetPreference(); +} + +std::string NWebImpl::Title() { + if (nweb_delegate_ == nullptr) { + return ""; + } + return nweb_delegate_->Title(); +} + +const HitTestResult NWebImpl::GetHitTestResult() const { + return nweb_delegate_->GetHitTestResult(); +} + +int NWebImpl::PageLoadProgress() { + if (nweb_delegate_ == nullptr) { + return 0; + } + return nweb_delegate_->PageLoadProgress(); +} + +int NWebImpl::ContentHeight() { + if (nweb_delegate_ == nullptr) { + return 0; + } + return nweb_delegate_->ContentHeight(); +} + +float NWebImpl::Scale() { + if (nweb_delegate_ == nullptr) { + return 0; + } + return nweb_delegate_->Scale(); +} + +void NWebImpl::Load(std::string& url, + std::map additionalHttpHeaders) { + if (nweb_delegate_ == nullptr) { + return; + } + return nweb_delegate_->Load(url, additionalHttpHeaders); +} + +void NWebImpl::LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) { + if (nweb_delegate_ == nullptr) { + return; + } + return nweb_delegate_->LoadWithDataAndBaseUrl(baseUrl, data, mimeType, + encoding, historyUrl); +} + +void NWebImpl::LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) { + if (nweb_delegate_ == nullptr) { + return; + } + return nweb_delegate_->LoadWithData(data, mimeType, encoding); +} + +void NWebImpl::RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) { + if (nweb_delegate_ == nullptr) { + return; + } + return nweb_delegate_->RegisterArkJSfunction(object_name, method_list); +} + +void NWebImpl::UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) { + if (nweb_delegate_ == nullptr) { + return; + } + return nweb_delegate_->UnregisterArkJSfunction(object_name, method_list); +} + +void NWebImpl::SetNWebJavaScriptResultCallBack( + std::shared_ptr callback) { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->RegisterNWebJavaScriptCallBack(callback); +} + +void NWebImpl::ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->ExecuteJavaScript(code, callback); +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/nweb_impl.h b/ohos_nweb/src/nweb_impl.h new file mode 100755 index 0000000000..559f8487f2 --- /dev/null +++ b/ohos_nweb/src/nweb_impl.h @@ -0,0 +1,99 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_IMPL_H +#define NWEB_IMPL_H + +#include +#include +#include +#include +#include +#include "nweb_download_callback.h" +#include "nweb.h" +#include "nweb_input_handler.h" +#include "nweb_inputmethod_handler.h" +#include "nweb_output_handler.h" + +namespace OHOS::NWeb { +class NWebImpl : public NWeb { + public: + NWebImpl(uint32_t id); + ~NWebImpl() = default; + + bool Init(const NWebCreateInfo& create_info); + void OnDestroy() override; + + /* event interface */ + void Resize(uint32_t width, uint32_t height) override; + void OnTouchPress(int32_t id, double x, double y) override; + void OnTouchRelease(int32_t id, double x, double y) override; + void OnTouchMove(int32_t id, double x, double y) override; + void OnTouchCancel() override; + void OnNavigateBack() override; + + // public api + void Load(const std::string& url) const override; + bool IsNavigatebackwardAllowed() const override; + bool IsNavigateForwardAllowed() const override; + bool CanNavigateBackOrForward(int numSteps) const override; + void NavigateBack() const override; + void NavigateForward() const override; + void Reload() const override; + void Zoom(float zoomFactor) const override; + void Stop() const override; + void ExecuteJavaScript(const std::string& code) const override; + void ExecuteJavaScript( + const std::string& code, + std::shared_ptr> callback) const override; + void PutBackgroundColor(int color) const override; + void OnPause() const override; + void OnContinue() const override; + const std::shared_ptr GetPreference() const override; + void PutDownloadCallback( + std::shared_ptr downloadListener) override; + void SetNWebHandler(std::shared_ptr handler) override; + const std::shared_ptr GetNWebHandler() const override; + std::string Title() override; + const HitTestResult GetHitTestResult() const override; + int PageLoadProgress() override; + int ContentHeight() override; + float Scale() override; + void Load(std::string& url, + std::map additionalHttpHeaders) override; + void LoadWithDataAndBaseUrl(const std::string& baseUrl, + const std::string& data, + const std::string& mimeType, + const std::string& encoding, + const std::string& historyUrl) override; + void LoadWithData(const std::string& data, + const std::string& mimeType, + const std::string& encoding) override; + void RegisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) override; + void UnregisterArkJSfunction( + const std::string& object_name, + const std::vector& method_list) override; + void SetNWebJavaScriptResultCallBack( + std::shared_ptr callback) override; + + private: + void ProcessInitArgs(const NWebInitArgs& init_args); + void InitWebEngineArgs(const NWebInitArgs& init_args); + bool InitWebEngine(); + + private: + uint32_t nweb_id_ = 0; + std::shared_ptr nweb_handle_ = nullptr; + std::shared_ptr output_handler_ = nullptr; + std::shared_ptr input_handler_ = nullptr; + CefRefPtr inputmethod_handler_ = nullptr; + + std::shared_ptr nweb_delegate_ = nullptr; + std::list web_engine_args_; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_IMPL_H diff --git a/ohos_nweb/src/nweb_input_handler.cc b/ohos_nweb/src/nweb_input_handler.cc new file mode 100644 index 0000000000..710cbc5df4 --- /dev/null +++ b/ohos_nweb/src/nweb_input_handler.cc @@ -0,0 +1,119 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_input_handler.h" +#include "nweb_hilog.h" + +namespace OHOS::NWeb { +// static +std::shared_ptr NWebInputHandler::Create( + std::shared_ptr nweb_delegate) { + auto input_handler = std::make_shared(nweb_delegate); + if (input_handler == nullptr) { + WVLOG_E("fail to create NWebOutputHandler instance"); + return nullptr; + } + input_handler->Init(); + return input_handler; +} + +NWebInputHandler::NWebInputHandler( + std::shared_ptr nweb_delegate) + : nweb_delegate_(nweb_delegate) {} + +bool NWebInputHandler::Init() { + return true; +} + +void NWebInputHandler::OnDestroy() { + nweb_delegate_ = nullptr; +} + +void NWebInputHandler::OnTouchPress(int32_t id, double x, double y) { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->OnTouchPress(id, x, y); + + touch_press_id_map_[id] = true; + last_touch_start_x_ = x; + last_x_ = x; + last_y_ = y; +} + +void NWebInputHandler::OnTouchRelease(int32_t id, double x, double y) { + if (nweb_delegate_ == nullptr) { + return; + } + if (x == 0 && y == 0) { + x = last_x_; + y = last_y_; + } + nweb_delegate_->OnTouchRelease(id, x, y); + CheckSlideNavigation(last_touch_start_x_, x); + touch_press_id_map_.erase(id); +} + +void NWebInputHandler::OnTouchMove(int32_t id, double x, double y) { + if (nweb_delegate_ == nullptr) { + return; + } + + // For multi-finger touch-move event get from ArkUI, some fingers may start + // move without previous touch-press event, which may cause these fingers + // unrecognized by web_engine, and multi-finger gestures like pinch unsupport. + // For this reason, the first touch-move event would be treated as touch-press + // event. + if (touch_press_id_map_.find(id) == touch_press_id_map_.end() || + !touch_press_id_map_.at(id)) { + this->OnTouchPress(id, x, y); + } + + nweb_delegate_->OnTouchMove(id, x, y); + last_x_ = x; + last_y_ = y; +} + +void NWebInputHandler::OnTouchCancel() { + if (nweb_delegate_ == nullptr) { + return; + } + nweb_delegate_->OnTouchCancel(); +} + +void NWebInputHandler::OnNavigateBack() { + if (nweb_delegate_ == nullptr) { + return; + } + WVLOG_I("receive key navigate back"); + if (nweb_delegate_->IsNavigatebackwardAllowed()) { + WVLOG_I("do navigate back"); + nweb_delegate_->NavigateBack(); + } +} + +void NWebInputHandler::CheckSlideNavigation(int16_t start_x, int16_t end_x) { + if (nweb_delegate_ == nullptr) { + return; + } + + constexpr int16_t kTriggerDistance = 100; + constexpr int16_t kScreenWidth = 2560; + constexpr int16_t kEdgeWidth = 10; + if (start_x < kEdgeWidth && (end_x - start_x) > kTriggerDistance) { + WVLOG_I("receive slide navigate back"); + if (nweb_delegate_->IsNavigatebackwardAllowed()) { + WVLOG_I("do navigate back"); + nweb_delegate_->NavigateBack(); + } + } else if (start_x > (kScreenWidth - kEdgeWidth) && + (start_x - end_x) > kTriggerDistance) { + WVLOG_I("receive slide navigate forward"); + if (nweb_delegate_->IsNavigateForwardAllowed()) { + WVLOG_I("do navigate forward"); + nweb_delegate_->NavigateForward(); + } + } +} +} // namespace OHOS::NWeb diff --git a/ohos_nweb/src/nweb_input_handler.h b/ohos_nweb/src/nweb_input_handler.h new file mode 100644 index 0000000000..ee88ec0055 --- /dev/null +++ b/ohos_nweb/src/nweb_input_handler.h @@ -0,0 +1,44 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_INPUT_HANDLER_H +#define NWEB_INPUT_HANDLER_H + +#include +#include +#include "nweb_delegate_interface.h" + +namespace OHOS::NWeb { +class NWebInputHandler { + public: + static std::shared_ptr Create( + std::shared_ptr nweb_delegate); + + NWebInputHandler( + std::shared_ptr nweb_delegate); + ~NWebInputHandler() = default; + + bool Init(); + void OnDestroy(); + + /* event interface */ + void OnTouchPress(int32_t id, double x, double y); + void OnTouchRelease(int32_t id, double x, double y); + void OnTouchMove(int32_t id, double x, double y); + void OnTouchCancel(); + void OnNavigateBack(); + + private: + void CheckSlideNavigation(int16_t start_x, int16_t end_x); + + private: + std::shared_ptr nweb_delegate_; + int32_t last_touch_start_x_ = -1; + double last_x_ = -1; + double last_y_ = -1; + std::unordered_map touch_press_id_map_; +}; +} + +#endif // NWEB_INPUT_HANDLER_H diff --git a/ohos_nweb/src/nweb_inputmethod_handler.cc b/ohos_nweb/src/nweb_inputmethod_handler.cc new file mode 100644 index 0000000000..0456edc290 --- /dev/null +++ b/ohos_nweb/src/nweb_inputmethod_handler.cc @@ -0,0 +1,214 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_inputmethod_handler.h" + +#include +#include + +#include "base/bind.h" +#include "base/callback.h" +#include "base/callback_helpers.h" +#include "base/logging.h" +#include "cef/include/cef_task.h" +#include "content/public/browser/browser_thread.h" +#include "libcef/browser/thread_util.h" + +namespace OHOS::NWeb { +class OnTextChangedListenerImpl + : public OHOS::MiscServices::OnTextChangedListener { + public: + OnTextChangedListenerImpl(NWebInputMethodHandler* handler) + : handler_(handler) {} + + // All following listenser callbacks should invoke call on UI thread + void InsertText(const std::u16string& text) override { + handler_->InsertText(text); + } + + void DeleteForward(int32_t length) override { + handler_->DeleteForward(length); + } + + void DeleteBackward(int32_t length) override { + handler_->DeleteBackward(length); + } + + void SendKeyEventFromInputMethod( + const OHOS::MiscServices::KeyEvent& event) override { + LOG(INFO) << "NWebInputMethodHandler::DeleteBackward"; + } + + void SendKeyboardInfo(const OHOS::MiscServices::KeyboardInfo& info) override { + + } + + void SetKeyboardStatus(bool status) override { + handler_->SetIMEStatus(status); + } + + void MoveCursor(const OHOS::MiscServices::Direction direction) override { + LOG(INFO) << "NWebInputMethodHandler::MoveCursor "; + } + + private: + NWebInputMethodHandler* handler_; +}; + +// The object should be freed while keyboard hidden. +OHOS::sptr g_listener = nullptr; + +class InputMethodTask : public CefTask { + public: + explicit InputMethodTask(const base::Closure& closure) : closure_(closure) {} + + virtual void Execute() OVERRIDE { + closure_.Run(); + closure_.Reset(); + } + + private: + base::Closure closure_; + + IMPLEMENT_REFCOUNTING(InputMethodTask); + DISALLOW_COPY_AND_ASSIGN(InputMethodTask); +}; + +NWebInputMethodHandler::NWebInputMethodHandler() + : selected_from_(0), selected_to_(0) {} + +NWebInputMethodHandler::~NWebInputMethodHandler() {} + +void NWebInputMethodHandler::Attach(CefRefPtr browser) { + browser_ = browser; + if (ime_shown_) { + return; + } + + if (g_listener == nullptr) { + g_listener = new OnTextChangedListenerImpl(this); + } + OHOS::MiscServices::InputMethodController::GetInstance()->Attach(g_listener); +} + +void NWebInputMethodHandler::ShowTextInput() { + LOG(INFO) << "NWebInputMethodHandler::ShowTextInput"; +} + +void NWebInputMethodHandler::HideTextInput() { + LOG(INFO) << "NWebInputMethodHandler::HideTextInput " << ime_shown_; + OHOS::MiscServices::InputMethodController::GetInstance()->HideTextInput(); +} + +void NWebInputMethodHandler::OnTextSelectionChanged( + CefRefPtr browser, + const CefString& selected_text, + const CefRange& selected_range) { + selected_text_ = selected_text.ToString16(); + selected_from_ = selected_range.from; + selected_to_ = selected_range.to; + ime_text_composing_ = false; + composing_text_.clear(); +} + +void NWebInputMethodHandler::SetIMEStatus(bool status) { + if (browser_ != nullptr && browser_->GetHost() != nullptr) { + CefRefPtr insert_task = new InputMethodTask(base::Bind( + &NWebInputMethodHandler::SetIMEStatusOnUI, this, std::move(status))); + browser_->GetHost()->PostTaskToUIThread(insert_task); + } +} + +void NWebInputMethodHandler::InsertText(const std::u16string& text) { + if (browser_ != nullptr && browser_->GetHost() != nullptr) { + CefRefPtr insert_task = new InputMethodTask(base::Bind( + &NWebInputMethodHandler::InsertTextHandlerOnUI, this, std::move(text))); + browser_->GetHost()->PostTaskToUIThread(insert_task); + } +} + +void NWebInputMethodHandler::DeleteBackward(int32_t length) { + if (browser_ != nullptr && browser_->GetHost() != nullptr) { + CefRefPtr delete_task = new InputMethodTask(base::Bind( + &NWebInputMethodHandler::DeleteBackwardHandlerOnUI, this, length)); + browser_->GetHost()->PostTaskToUIThread(delete_task); + } +} + +void NWebInputMethodHandler::DeleteForward(int32_t length) { + if (browser_ != nullptr && browser_->GetHost() != nullptr) { + CefRefPtr delete_task = new InputMethodTask(base::Bind( + &NWebInputMethodHandler::DeleteForwardHandlerOnUI, this, length)); + browser_->GetHost()->PostTaskToUIThread(delete_task); + } +} + +void NWebInputMethodHandler::SetIMEStatusOnUI(bool status) { + if (!status && ime_text_composing_) { + browser_->GetHost()->ImeFinishComposingText(false); + ime_text_composing_ = false; + } + ime_shown_ = status; +} + +void NWebInputMethodHandler::InsertTextHandlerOnUI(const std::u16string& text) { + if (text.empty()) { + LOG(ERROR) << "insert text empty!"; + return; + } + + if (!ime_text_composing_) { + ime_text_composing_ = true; + composing_text_.clear(); + } + composing_text_.append(text); + + std::vector underlines; + CefRange new_range(0, static_cast(composing_text_.length())); + cef_composition_underline_t line = {new_range, 0xFF000000, 0, false}; + underlines.push_back(line); + CefRange replacement_range(selected_from_, selected_to_); + CefRange selection_range(0, static_cast(composing_text_.length())); + browser_->GetHost()->ImeSetComposition(CefString(composing_text_), underlines, + replacement_range, selection_range); +} + +void NWebInputMethodHandler::DeleteBackwardHandlerOnUI(int32_t length) { + LOG(INFO) << "DeleteBackwardHandlerOnUI unimplement" << length; +} + +void NWebInputMethodHandler::DeleteForwardHandlerOnUI(int32_t length) { + std::vector underlines; + if (ime_text_composing_) { + int text_length = static_cast(composing_text_.length()); + int new_to = (text_length > length) ? (text_length - length) : 0; + if (new_to == 0) { + browser_->GetHost()->ImeFinishComposingText(false); + ime_text_composing_ = false; + } else { + composing_text_ = composing_text_.substr(0, new_to); + CefRange new_range(0, new_to); + cef_composition_underline_t line = {new_range, 0xFF000000, 0, false}; + underlines.push_back(line); + CefRange replacement_range(selected_from_, selected_to_); + CefRange selection_range(0, new_to); + browser_->GetHost()->ImeSetComposition( + composing_text_, underlines, replacement_range, selection_range); + } + } + + if (!ime_text_composing_) { + CefRange replace_range; + if (selected_from_ == selected_to_) { + replace_range.from = + (selected_from_ > length) ? (selected_from_ - length) : 0; + } else { + replace_range.from = selected_from_; + } + replace_range.to = selected_to_; + CefString result = CefString(""); + browser_->GetHost()->ImeCommitText(result, replace_range, 0); + } +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/nweb_inputmethod_handler.h b/ohos_nweb/src/nweb_inputmethod_handler.h new file mode 100644 index 0000000000..7fc624e2b3 --- /dev/null +++ b/ohos_nweb/src/nweb_inputmethod_handler.h @@ -0,0 +1,46 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef OHOS_NWEB_SRC_NWEB_INPUTMETHOD_HANDLER_H_ +#define OHOS_NWEB_SRC_NWEB_INPUTMETHOD_HANDLER_H_ + +#include "cef_delegate/nweb_inputmethod_client.h" + +namespace OHOS::NWeb { +class NWebInputMethodHandler : public NWebInputMethodClient { + public: + NWebInputMethodHandler(); + ~NWebInputMethodHandler(); + void Attach(CefRefPtr browser) override; + void ShowTextInput() override; + void HideTextInput() override; + void OnTextSelectionChanged(CefRefPtr browser, + const CefString& selected_text, + const CefRange& selected_range) override; + + void SetIMEStatus(bool status); + void InsertText(const std::u16string& text); + void DeleteBackward(int32_t length); + void DeleteForward(int32_t length); + + private: + void SetIMEStatusOnUI(bool status); + void InsertTextHandlerOnUI(const std::u16string& text); + void DeleteBackwardHandlerOnUI(int32_t length); + void DeleteForwardHandlerOnUI(int32_t length); + + CefRefPtr browser_; + bool ime_shown_ = false; + bool ime_text_composing_ = false; + std::u16string selected_text_; + std::u16string composing_text_; + int selected_from_; + int selected_to_; + + IMPLEMENT_REFCOUNTING(NWebInputMethodHandler); + DISALLOW_COPY_AND_ASSIGN(NWebInputMethodHandler); +}; +} // namespace OHOS::NWeb + +#endif // OHOS_NWEB_SRC_NWEB_INPUTMETHOD_HANDLER_H_ \ No newline at end of file diff --git a/ohos_nweb/src/nweb_output_handler.cc b/ohos_nweb/src/nweb_output_handler.cc new file mode 100644 index 0000000000..07ddbc0c87 --- /dev/null +++ b/ohos_nweb/src/nweb_output_handler.cc @@ -0,0 +1,296 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_output_handler.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include "nweb_hilog.h" + +namespace OHOS::NWeb { +namespace { +#pragma pack(1) +struct BmpFileHeader { + unsigned int bf_size; /* Size of file */ + unsigned short bf_reserved_1 = 0; /* Reserved */ + unsigned short bf_reserved_2 = 0; /* ... */ + unsigned int bf_offbits = 0x36; /* Offset to bitmap data */ +}; + +/**** BMP file info structure ****/ +struct BmpInfoHeader { + unsigned int bi_size; /* Size of info header */ + int bi_width; /* Width of image */ + int bi_height; /* Height of image */ + unsigned short bi_planes = 1; /* Number of color planes */ + unsigned short bi_bit_count = 24; /* Number of bits per pixel */ + unsigned int bi_compression = 0; /* Type of compression to use */ + unsigned int bi_size_image = 0; /* Size of image data */ + int bi_x_pixels_per_meter = 5000; /* X pixels per meter */ + int bi_y_pixels_per_meter = 5000; /* Y pixels per meter */ + unsigned int bi_colors_used = 0; /* Number of colors used */ + unsigned int bi_colors_important = 0; /* Number of important colors */ +}; + +constexpr uint8_t kBitsPerPixel = 4; + +static int64_t GetNowTime() { + struct timeval start = {}; + gettimeofday(&start, nullptr); + constexpr uint32_t kSecToUsec = 1000 * 1000; + return static_cast(start.tv_sec) * kSecToUsec + start.tv_usec; +} +} // namespace + +// static +std::shared_ptr NWebOutputHandler::Create( + uint32_t width, + uint32_t height, + std::function output_frame_cb) { + if (output_frame_cb == nullptr) { + WVLOG_E("NWeb user must provide valid outputFrame callback!"); + return nullptr; + } + + auto output_handler = std::make_shared(output_frame_cb); + if (output_handler == nullptr) { + WVLOG_E("fail to create NWebOutputHandler instance"); + return nullptr; + } + + output_handler->Init(width, height); + + return output_handler; +} + +NWebOutputHandler::NWebOutputHandler( + std::function output_frame_cb) + : output_frame_cb_(output_frame_cb) { + dump_buf_.reset(nullptr); +} + +void NWebOutputHandler::Init(uint32_t width, uint32_t height) { + Resize(width, height); +} + +void NWebOutputHandler::GetWindowInfo(uint32_t& width, uint32_t& height) { + width = width_; + height = height_; +} + +void NWebOutputHandler::Resize(uint32_t width, uint32_t height) { + if (width_ != width || height_ != height) { + WVLOG_I( + "NWeb size change from %{public}u*%{public}u to " + "%{public}u*%{public}u", + width_, height_, width, height); + width_ = width; + height_ = height; + frame_size_ = width_ * height_ * kBitsPerPixel; + if (!dump_path_.empty() || dump_buf_ == nullptr) { + dump_buf_.reset(new char[frame_size_]); + } + } +} + +void NWebOutputHandler::StartDumpToFile() { + std::weak_ptr output_handler_weak(shared_from_this()); + std::thread dump_thread([output_handler_weak]() { + while (!output_handler_weak.expired() && + !output_handler_weak.lock()->dump_path_.empty()) { + auto outputHandler = output_handler_weak.lock(); + std::unique_lock lk(outputHandler->dump_mtx_); + outputHandler->dump_cv_.wait(lk); + static BmpDumpHelper helper; + const std::string kFileName = "1.bmp"; + std::string full_name = outputHandler->dump_path_ + kFileName; + if (outputHandler->dump_buf_ == nullptr) { + continue; + } + helper.DumpToBmp(full_name, outputHandler->dump_buf_.get(), + outputHandler->width_, outputHandler->height_); + } + }); + dump_thread.detach(); +} + +void NWebOutputHandler::StartFrameStat() { + std::weak_ptr output_handler_weak(shared_from_this()); + std::thread frame_stat_thread([output_handler_weak]() { + while (!output_handler_weak.expired() && + output_handler_weak.lock()->frame_info_dump_) { + { + auto output_handler = output_handler_weak.lock(); + std::unique_lock lk(output_handler->frame_stat_mtx_); + if (output_handler->local_time_base_ != + output_handler->local_time_curr_) { + auto fps_cur = 1000.0 * 1000 * + (output_handler->local_render_count_ - 1) / + (output_handler->local_time_curr_ - + output_handler->local_time_base_); + WVLOG_W( + "NWeb %{public}u fps_cur=%{public}0.1f " + "frame_total_count=%{public}lld" + " frame_miss_count=%{public}lld", + output_handler->nweb_id_, fps_cur, + output_handler->render_count_, output_handler->frame_miss_count_); + std::cout << "NWeb " << output_handler->nweb_id_ + << " fps_cur=" << std::fixed << std::setprecision(1) + << fps_cur + << " frame_total_count=" << output_handler->render_count_ + << " frame_miss_count=" << output_handler->frame_miss_count_ + << std::endl; + } + output_handler->local_render_count_ = 0; + output_handler->local_time_base_ = 0; + output_handler->local_time_curr_ = 0; + } + // during sleep(), output_handler_weak should not be + // promote to shared_ptr, to avoid add refcount + constexpr int kOutoutFrameStatDur = 1; + sleep(kOutoutFrameStatDur); + } + }); + frame_stat_thread.detach(); +} + +void NWebOutputHandler::StartRenderOutput() { + if (!dump_path_.empty()) { + StartDumpToFile(); + } + if (frame_info_dump_) { + StartFrameStat(); + } +} + +void NWebOutputHandler::OnRenderUpdate(const char* buffer) { + if (output_frame_cb_ == nullptr) { + WVLOG_I("output render frame cb is not available"); + UpdateStat(false); + return; + } + + if (!output_frame_cb_(buffer, width_, height_)) { + WVLOG_W("render frame is not consumed"); + UpdateStat(false); + } else { + UpdateStat(true); + } + + if (!dump_path_.empty()) { + if (dump_buf_ != nullptr) { + std::unique_lock lk(dump_mtx_); + memcpy(dump_buf_.get(), buffer, frame_size_); + dump_cv_.notify_one(); + } else { + WVLOG_E("fail to dump file. dump buffer is nullptr"); + } + } +} + +void NWebOutputHandler::UpdateStat(bool flag) { + if (!frame_info_dump_) { + return; + } + std::unique_lock lk(frame_stat_mtx_); + local_time_curr_ = GetNowTime(); + if (local_time_base_ <= 0L) { + local_time_base_ = local_time_curr_; + } + render_count_++; + local_render_count_++; + if (!flag) { + frame_miss_count_++; + } +} + +void NWebOutputHandler::SetFrameInfoDump(bool flag) { + frame_info_dump_ = flag; +} + +void NWebOutputHandler::SetDumpPath(const std::string& path) { + dump_path_ = path; +} + +void NWebOutputHandler::BmpDumpHelper::DumpToBmp(const std::string& filename, + char* buf, + int width, + int height) { + RgbaToRgb(buf, width, height); + WriteToBmp(filename, buf, width, height); + WVLOG_I("save render frame to %{public}s", filename.c_str()); +} + +void NWebOutputHandler::BmpDumpHelper::RgbaToRgb(char* buf, + int width, + int height) { + char* p_rgba = buf; + char* p_rgb = buf; + uint64_t len = width * height * kBitsPerPixel; + for (uint64_t i = 0; i < len; i++, p_rgba++) { + if (i % 4 == 3) { + // check alpha value, if 0, set related color to white + if (buf[i] == 0) { + *(p_rgb - 3) = 255; + *(p_rgb - 2) = 255; + *(p_rgb - 1) = 255; + } + continue; + } + *p_rgb++ = *p_rgba; + if (i % 4 == 2) { + char tmp = *(p_rgb - 1); + *(p_rgb - 1) = *(p_rgb - 3); + *(p_rgb - 3) = tmp; + } + } +} + +void NWebOutputHandler::BmpDumpHelper::WriteToBmp( + const std::string& filename, + char* buf, + int width, + int height) { + BmpFileHeader bmp_file_header; + BmpInfoHeader bmp_info_header; + // Magic number for file. It does not fit in the header structure + // due to alignment requirements, so put it outside + unsigned short bmp_file_type = 0x4d42; + constexpr int kRgbBitsPerPixel = 3; + int rgb_buf_size = width * height * kRgbBitsPerPixel; + bmp_file_header.bf_size = + sizeof(BmpFileHeader) + sizeof(BmpInfoHeader) + rgb_buf_size; + bmp_info_header.bi_size = sizeof(BmpInfoHeader); + bmp_info_header.bi_width = width; + bmp_info_header.bi_height = -height; + + FILE* file = fopen(filename.c_str(), "wb"); + if (!file) { + WVLOG_E("FAIL to open %{public}s", filename.c_str()); + return; + } + + // Write headers + fwrite(&bmp_file_type, sizeof(bmp_file_type), 1, file); + fwrite(&bmp_file_header, sizeof(bmp_file_header), 1, file); + fwrite(&bmp_info_header, sizeof(bmp_info_header), 1, file); + fwrite(buf, rgb_buf_size, 1, file); + fclose(file); +} + +void NWebOutputHandler::SetNWebId(uint32_t id) { + nweb_id_ = id; +} + +bool NWebOutputHandler::IsSizeValid() +{ + return (width_ > 0) && (height_ > 0); +} +} // namespace OHOS::NWeb \ No newline at end of file diff --git a/ohos_nweb/src/nweb_output_handler.h b/ohos_nweb/src/nweb_output_handler.h new file mode 100644 index 0000000000..0954f3f7a5 --- /dev/null +++ b/ohos_nweb/src/nweb_output_handler.h @@ -0,0 +1,81 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_OUTPUT_HANDLER_H +#define NWEB_OUTPUT_HANDLER_H + +#include +#include +#include +#include + +namespace OHOS::NWeb { +class NWebOutputHandler + : public std::enable_shared_from_this { + public: + static std::shared_ptr Create( + uint32_t width, + uint32_t height, + std::function output_frame_cb); + + NWebOutputHandler( + std::function output_frame_cb); + ~NWebOutputHandler() = default; + + void Init(uint32_t width, uint32_t height); + void GetWindowInfo(uint32_t& width, uint32_t& height); + void Resize(uint32_t width, uint32_t height); + void OnRenderUpdate(const char* buffer); + void SetFrameInfoDump(bool flag); + void StartFrameStat(); + void SetDumpPath(const std::string& path); + void StartRenderOutput(); + void SetNWebId(uint32_t id); + bool IsSizeValid(); + + private: + class BmpDumpHelper { + public: + void DumpToBmp(const std::string& filename, + char* buf, + int width, + int height); + + private: + void RgbaToRgb(char* buf, int width, int height); + void WriteToBmp(const std::string& filename, + char* buf, + int width, + int height); + }; + + void StartDumpToFile(); + void UpdateStat(bool flag); + + private: + uint32_t width_ = 0; + uint32_t height_ = 0; + uint32_t frame_size_ = 0; + + std::function output_frame_cb_; + + std::string dump_path_; + std::mutex dump_mtx_; + std::condition_variable dump_cv_; + std::unique_ptr dump_buf_; + + /* stat info */ + bool frame_info_dump_ = false; + std::mutex frame_stat_mtx_; + int64_t render_count_ = 0L; + int64_t local_render_count_ = 0L; + int64_t local_time_base_ = 0L; + int64_t local_time_curr_ = 0L; + int64_t frame_miss_count_ = 0L; + + uint32_t nweb_id_ = 0; +}; +} // namespace OHOS::NWeb + +#endif // NWEB_OUTPUT_HANDLER_H diff --git a/ohos_nweb/src/nweb_url_resource_error_impl.h b/ohos_nweb/src/nweb_url_resource_error_impl.h new file mode 100644 index 0000000000..d935afea26 --- /dev/null +++ b/ohos_nweb/src/nweb_url_resource_error_impl.h @@ -0,0 +1,25 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_URL_RESOURCE_ERROR_IMPL +#define NWEB_URL_RESOURCE_ERROR_IMPL + +#include "nweb_url_resource_error.h" + +namespace OHOS::NWeb { +class UrlResourceErrorImpl : public NWebUrlResourceError { + public: + UrlResourceErrorImpl(int error_code, const std::string& error_info) + : error_code_(error_code), error_info_(error_info){}; + ~UrlResourceErrorImpl() = default; + + const std::string& ErrorInfo() const override { return error_info_; } + int ErrorCode() const override { return error_code_; } + + private: + int error_code_; + std::string error_info_; +}; +} // namespace OHOS::NWeb +#endif // NWEB_URL_RESOURCE_ERROR_IMPL \ No newline at end of file diff --git a/ohos_nweb/src/nweb_url_resource_request_impl.cc b/ohos_nweb/src/nweb_url_resource_request_impl.cc new file mode 100644 index 0000000000..45b819debd --- /dev/null +++ b/ohos_nweb/src/nweb_url_resource_request_impl.cc @@ -0,0 +1,45 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "nweb_url_resource_request_impl.h" + +namespace OHOS::NWeb { +NWebUrlResourceRequestImpl::NWebUrlResourceRequestImpl( + const std::string& method, + const std::map& request_headers, + const std::string& url, + bool has_gesture, + bool is_for_main_frame, + bool is_redirect) + : method_(method), + request_headers_(request_headers), + url_(url), + has_gesture_(has_gesture), + is_for_main_frame_(is_for_main_frame), + is_redirect_(is_redirect) {} + +const std::string& NWebUrlResourceRequestImpl::Method() { + return method_; +} + +const std::map& NWebUrlResourceRequestImpl::RequestHeaders() { + return request_headers_; +} + +const std::string& NWebUrlResourceRequestImpl::Url() { + return url_; +} + +bool NWebUrlResourceRequestImpl::FromGesture() { + return has_gesture_; +} + +bool NWebUrlResourceRequestImpl::IsAboutMainFrame() { + return is_for_main_frame_; +} + +bool NWebUrlResourceRequestImpl::IsRequestRedirect() { + return is_redirect_; +} +} diff --git a/ohos_nweb/src/nweb_url_resource_request_impl.h b/ohos_nweb/src/nweb_url_resource_request_impl.h new file mode 100644 index 0000000000..9387b49884 --- /dev/null +++ b/ohos_nweb/src/nweb_url_resource_request_impl.h @@ -0,0 +1,37 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef NWEB_URL_RESOURCE_REQUEAST_IMPL_H +#define NWEB_URL_RESOURCE_REQUEAST_IMPL_H + +#include "nweb_url_resource_request.h" + +namespace OHOS::NWeb { +class NWebUrlResourceRequestImpl : public NWebUrlResourceRequest { + public: + NWebUrlResourceRequestImpl(const std::string& method, + const std::map& request_headers, + const std::string& url, + bool has_gesture, + bool is_for_main_frame, + bool is_redirect = false); + ~NWebUrlResourceRequestImpl() = default; + + const std::string& Method() override; + const std::map& RequestHeaders() override; + const std::string& Url() override; + bool FromGesture() override; + bool IsAboutMainFrame() override; + bool IsRequestRedirect() override; + + private: + std::string method_; + std::map request_headers_; + std::string url_; + bool has_gesture_; + bool is_for_main_frame_; + bool is_redirect_; +}; +} +#endif // NWEB_URL_RESOURCE_REQUEAST_IMPL_H \ No newline at end of file diff --git a/ohos_nweb/src/ohos_nweb_main.cc b/ohos_nweb/src/ohos_nweb_main.cc new file mode 100644 index 0000000000..defaae1499 --- /dev/null +++ b/ohos_nweb/src/ohos_nweb_main.cc @@ -0,0 +1,18 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include "include/cef_app.h" +#include "nweb_hilog.h" + +int main(int argc, const char* argv[]) { + WVLOG_I("nweb subprocess %{public}s begin, pid=%{public}d", argv[0], + getpid()); + + CefMainArgs main_args(argc, const_cast(argv)); + (void)CefExecuteProcess(main_args, NULL, NULL); + + WVLOG_I("nweb subprocess %{public}s end, pid=%{public}d", argv[0], + getpid()); +} \ No newline at end of file diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn index f5d6495c48..27c8bcf097 100644 --- a/services/device/geolocation/BUILD.gn +++ b/services/device/geolocation/BUILD.gn @@ -64,6 +64,21 @@ source_set("geolocation") { "//services/network/public/cpp", ] + if (is_ohos) { + sources += [ + "ohos/location_provider_ohos.cc", + "ohos/location_provider_ohos.h", + ] + import("//build/config/ohos/config.gni") + include_dirs = ohos_src_includes + lib_dirs = ohos_libs_dir + libs = [ + "locator_sdk.z", + "ipc_core.z", + "lbsservice_common.z", + ] + } + if (is_android) { sources += [ "location_api_adapter_android.cc", diff --git a/services/device/geolocation/location_arbitrator.cc b/services/device/geolocation/location_arbitrator.cc index 527cff5fbb..3932492409 100644 --- a/services/device/geolocation/location_arbitrator.cc +++ b/services/device/geolocation/location_arbitrator.cc @@ -1,4 +1,5 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -162,7 +163,7 @@ LocationArbitrator::NewNetworkLocationProvider( std::unique_ptr LocationArbitrator::NewSystemLocationProvider() { -#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) || defined(OS_OHOS) +#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA) return nullptr; #else return device::NewSystemLocationProvider(); diff --git a/services/device/geolocation/ohos/location_provider_ohos.cc b/services/device/geolocation/ohos/location_provider_ohos.cc new file mode 100644 index 0000000000..c438909982 --- /dev/null +++ b/services/device/geolocation/ohos/location_provider_ohos.cc @@ -0,0 +1,168 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/device/geolocation/ohos/location_provider_ohos.h" + +#include + +#include +#include +#include + +#include "base/bind.h" +#include "base/memory/singleton.h" + +namespace device { + +// LocationProviderOhos +LocationProviderOhos::LocationProviderOhos() { + locator_callback_ = this; +} + +LocationProviderOhos::~LocationProviderOhos() { + StopProvider(); + if (locator_ != nullptr) + locator_.reset(); +} + +void LocationProviderOhos::SetUpdateCallback( + const LocationProviderUpdateCallback& callback) { + callback_ = callback; +} + +void LocationProviderOhos::StartProvider(bool high_accuracy) { + StopProvider(); + RequestLocationUpdate(high_accuracy); +} + +void LocationProviderOhos::StopProvider() { + if (!is_running_) + return; + is_running_ = false; + locator_->StopLocating(locator_callback_); +} + +const mojom::Geoposition& LocationProviderOhos::GetPosition() { + return last_position_; +} + +void LocationProviderOhos::OnPermissionGranted() { + // Nothing to do here. +} + +void LocationProviderOhos::OnNewLocationAvailable( + const std::unique_ptr& location) { + mojom::Geoposition position; + position.latitude = location->GetLatitude(); + position.longitude = location->GetLongitude(); + // location->GetTimeStamp() has no value now, so that temporarily passed + // value 10. + position.timestamp = base::Time::FromDoubleT(10); + position.altitude = location->GetAltitude(); + position.accuracy = location->GetAccuracy(); + position.heading = location->GetDirection(); + position.speed = location->GetSpeed(); + + NewGeopositionReport(position); +} + +void LocationProviderOhos::OnNewErrorAvailable(std::string message) { + mojom::Geoposition position_error; + position_error.error_code = + mojom::Geoposition::ErrorCode::POSITION_UNAVAILABLE; + position_error.error_message = message; + + NewGeopositionReport(position_error); +} + +void LocationProviderOhos::RequestLocationUpdate(bool high_accuracy) { + is_running_ = true; + CreateLocationManagerIfNeeded(); + locator_->EnableAbility(true); + + std::unique_ptr requestConfig = + std::make_unique(); + SetRequestConfig(requestConfig, high_accuracy); + + locator_->StartLocating(requestConfig, locator_callback_, "location.ILocator", + 0, 0); +} + +void LocationProviderOhos::CreateLocationManagerIfNeeded() { + if (locator_ != nullptr) + return; + locator_ = std::make_unique( + OHOS::Location::CommonUtils::GetRemoteObject( + OHOS::LOCATION_LOCATOR_SA_ID, + OHOS::Location::CommonUtils::InitDeviceId())); +} + +void LocationProviderOhos::SetRequestConfig( + std::unique_ptr& requestConfig, + bool high_accuracy) { + requestConfig->SetPriority(OHOS::Location::PRIORITY_FAST_FIRST_FIX); + requestConfig->SetScenario(OHOS::Location::SCENE_UNSET); + requestConfig->SetTimeInterval(1); + requestConfig->SetDistanceInterval(0); + requestConfig->SetMaxAccuracy(0); + requestConfig->SetFixNumber(1); +} + +void LocationProviderOhos::NewGeopositionReport( + const mojom::Geoposition& position) { + last_position_ = position; + if (!callback_.is_null()) + callback_.Run(this, position); +} + +int LocationProviderOhos::OnRemoteRequest(uint32_t code, + OHOS::MessageParcel& data, + OHOS::MessageParcel& reply, + OHOS::MessageOption& option) { + switch (code) { + case RECEIVE_LOCATION_INFO_EVENT: { + std::unique_ptr location = + OHOS::Location::Location::Unmarshalling(data); + OnLocationReport(location); + break; + } + case RECEIVE_ERROR_INFO_EVENT: { + break; + } + case RECEIVE_LOCATION_STATUS_EVENT: { + OnLocatingStatusChange(0); + break; + } + default: { + break; + } + } + return 0; +} + +void LocationProviderOhos::OnLocationReport( + const std::unique_ptr& location) { + if (is_running_) { + OnNewLocationAvailable(location); + StopProvider(); + } +} + +void LocationProviderOhos::OnLocatingStatusChange(const int status) {} + +void LocationProviderOhos::OnErrorReport(const int errorCode) { + StopProvider(); + if (errorCode == LOCATION_GET_FAILED) { + OnNewErrorAvailable("Failed to get location!"); + } else { + OnNewErrorAvailable("Unknown error during the locating occured!"); + } +} + +// static +std::unique_ptr NewSystemLocationProvider() { + return base::WrapUnique(new LocationProviderOhos); +} + +} // namespace device diff --git a/services/device/geolocation/ohos/location_provider_ohos.h b/services/device/geolocation/ohos/location_provider_ohos.h new file mode 100644 index 0000000000..7b7adac934 --- /dev/null +++ b/services/device/geolocation/ohos/location_provider_ohos.h @@ -0,0 +1,83 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_DEVICE_GEOLOCATION_LOCATION_PROVIDER_OHOS_H_ +#define SERVICES_DEVICE_GEOLOCATION_LOCATION_PROVIDER_OHOS_H_ + +#include + +#include +#include +#include +#include +#include +#include + +#include "base/memory/scoped_refptr.h" +#include "base/single_thread_task_runner.h" +#include "base/threading/thread_checker.h" +#include "services/device/public/cpp/geolocation/location_provider.h" +#include "services/device/public/mojom/geoposition.mojom.h" + +namespace device { + +// Location provider for Android using the platform provider over JNI. +class LocationProviderOhos + : public LocationProvider, + public OHOS::IRemoteStub { + public: + LocationProviderOhos(); + ~LocationProviderOhos() override; + + enum LocationErrorCode { + LOCATION_GET_SUCCESS = 0, + LOCATION_GET_FAILED, + LOCATION_UNKNOWN_ERROR, + }; + + // LocationProvider implementation. + void SetUpdateCallback( + const LocationProviderUpdateCallback& callback) override; + void StartProvider(bool high_accuracy) override; + void StopProvider() override; + const mojom::Geoposition& GetPosition() override; + void OnPermissionGranted() override; + + // ILocatorCallback implementation. + virtual int OnRemoteRequest(uint32_t code, + OHOS::MessageParcel& data, + OHOS::MessageParcel& reply, + OHOS::MessageOption& option) override; + void OnLocationReport( + const std::unique_ptr& location) override; + void OnLocatingStatusChange(const int status) override; + void OnErrorReport(const int errorCode) override; + + void OnNewLocationAvailable( + const std::unique_ptr& location); + void OnNewErrorAvailable(std::string message); + + private: + void RequestLocationUpdate(bool high_accuracy); + void CreateLocationManagerIfNeeded(); + void SetRequestConfig( + std::unique_ptr& requestConfig, + bool high_accuracy); + + // Calls |callback_| with the new location. + void NewGeopositionReport(const mojom::Geoposition& position); + + std::unique_ptr locator_; + + mojom::Geoposition last_position_; + + LocationProviderUpdateCallback callback_; + + bool is_running_ = false; + OHOS::sptr locator_callback_; +}; + +} // namespace device + +#endif // SERVICES_DEVICE_GEOLOCATION_LOCATION_PROVIDER_OHOS_H_ diff --git a/skia/ext/fontmgr_default_ohos.cc b/skia/ext/fontmgr_default_ohos.cc index 6558bbebea..f2e506a550 100644 --- a/skia/ext/fontmgr_default_ohos.cc +++ b/skia/ext/fontmgr_default_ohos.cc @@ -1,4 +1,4 @@ -// Copyright 2022 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h index 08ed976ad4..2ddd9e0494 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -1,4 +1,5 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. +// Copyright (c) 2022 Huawei Device Co., Ltd. +// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index e0b3b8305a..09667cadf7 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1742,7 +1742,7 @@ component("platform") { "/wd4724", # Modulo by 0. ] } - + if (is_ohos) { sources += [ "fonts/android/font_cache_android.cc", diff --git a/third_party/blink/renderer/platform/widget/compositing/render_frame_metadata_observer_impl.cc b/third_party/blink/renderer/platform/widget/compositing/render_frame_metadata_observer_impl.cc index 775bafa715..972ce7ddd3 100644 --- a/third_party/blink/renderer/platform/widget/compositing/render_frame_metadata_observer_impl.cc +++ b/third_party/blink/renderer/platform/widget/compositing/render_frame_metadata_observer_impl.cc @@ -1,3 +1,4 @@ +// Copyright (c) 2022 Huawei Device Co., Ltd. // Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -168,7 +169,11 @@ bool RenderFrameMetadataObserverImpl::ShouldSendRenderFrameMetadata( rfm1.top_controls_shown_ratio != rfm2.top_controls_shown_ratio || rfm1.local_surface_id != rfm2.local_surface_id || rfm2.new_vertical_scroll_direction != - viz::VerticalScrollDirection::kNull) { + viz::VerticalScrollDirection::kNull +#if defined(OS_OHOS) + || rfm1.root_layer_size != rfm2.root_layer_size +#endif + ) { *needs_activation_notification = true; return true; } diff --git a/tools/clang/crashreports/.gitignore b/tools/clang/crashreports/.gitignore new file mode 100644 index 0000000000..d6b7ef32c8 --- /dev/null +++ b/tools/clang/crashreports/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/ui/ozone/common/egl_util.cc b/ui/ozone/common/egl_util.cc index d23a601460..7eda22ffbb 100644 --- a/ui/ozone/common/egl_util.cc +++ b/ui/ozone/common/egl_util.cc @@ -34,7 +34,12 @@ const base::FilePath::CharType kDefaultEglSoname[] = FILE_PATH_LITERAL("libEGL.so"); const base::FilePath::CharType kDefaultGlesSoname[] = FILE_PATH_LITERAL("libGLESv2.so"); -#else // !defined(OS_FUCHSIA) +#elif defined(OS_OHOS) +const base::FilePath::CharType kDefaultEglSoname[] = + FILE_PATH_LITERAL("libEGL.so"); +const base::FilePath::CharType kDefaultGlesSoname[] = + FILE_PATH_LITERAL("libGLES_mali.so"); +#else const base::FilePath::CharType kDefaultEglSoname[] = FILE_PATH_LITERAL("libEGL.so.1"); const base::FilePath::CharType kDefaultGlesSoname[] = diff --git a/ui/ozone/platform/headless/headless_surface_factory.cc b/ui/ozone/platform/headless/headless_surface_factory.cc index b3cfb3cf34..57528f4cad 100644 --- a/ui/ozone/platform/headless/headless_surface_factory.cc +++ b/ui/ozone/platform/headless/headless_surface_factory.cc @@ -224,7 +224,8 @@ HeadlessSurfaceFactory::~HeadlessSurfaceFactory() = default; std::vector HeadlessSurfaceFactory::GetAllowedGLImplementations() { - return std::vector{gl::kGLImplementationSwiftShaderGL}; + return std::vector{gl::kGLImplementationEGLGLES2, + gl::kGLImplementationSwiftShaderGL}; } GLOzone* HeadlessSurfaceFactory::GetGLOzone( diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc index 762a108fed..b0ef9c6c49 100644 --- a/ui/views/widget/desktop_aura/desktop_screen_win.cc +++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc @@ -19,7 +19,7 @@ DesktopScreenWin::~DesktopScreenWin() { HWND DesktopScreenWin::GetHWNDFromNativeWindow(gfx::NativeWindow window) const { if (!window) - return nullptr; + return nullptr; aura::WindowTreeHost* host = window->GetHost(); return host ? host->GetAcceleratedWidget() : nullptr; } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc index 55b70c6349..0cf04f6ee6 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -3107,13 +3107,10 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. - if (ui::RerouteMouseWheel(hwnd(), w_param, l_param) || - delegate_->HandleMouseEvent(&mouse_wheel_event)) { - SetMsgHandled(TRUE); - return 0; - } else { - return 1; - } + return (ui::RerouteMouseWheel(hwnd(), w_param, l_param) || + delegate_->HandleMouseEvent(&mouse_wheel_event)) + ? 0 + : 1; } // Suppress |ET_MOUSE_MOVED| and |ET_MOUSE_DRAGGED| events from WM_MOUSE* diff --git a/weblayer/browser/infobar_service.h b/weblayer/browser/infobar_service.h index bf2100338b..b06b305498 100644 --- a/weblayer/browser/infobar_service.h +++ b/weblayer/browser/infobar_service.h @@ -33,9 +33,11 @@ class InfoBarService : public infobars::ContentInfoBarManager, InfoBarService(const InfoBarService&) = delete; InfoBarService& operator=(const InfoBarService&) = delete; +#if defined(OS_ANDROID) // InfoBarManager: std::unique_ptr CreateConfirmInfoBar( std::unique_ptr delegate) override; +#endif protected: explicit InfoBarService(content::WebContents* web_contents);