2020-09-24 21:40:47 -04:00
|
|
|
diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc
|
2023-05-30 11:55:32 +03:00
|
|
|
index 2480282a19d12..dbd1fbf8a15b5 100644
|
2020-09-24 21:40:47 -04:00
|
|
|
--- chrome/browser/browser_about_handler.cc
|
|
|
|
+++ chrome/browser/browser_about_handler.cc
|
2023-05-30 11:55:32 +03:00
|
|
|
@@ -72,6 +72,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) {
|
2020-09-24 21:40:47 -04:00
|
|
|
FROM_HERE, base::BindOnce(&chrome::AttemptExit));
|
|
|
|
return true;
|
|
|
|
}
|
2022-06-17 16:28:55 +03:00
|
|
|
+ if (base::EqualsCaseInsensitiveASCII(spec, "chrome://ignore/")) {
|
2020-09-24 21:40:47 -04:00
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2023-11-14 17:16:43 +00:00
|
|
|
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
index 4acc7a7a3998c..d80104e8f5aa3 100644
|
2023-11-14 17:16:43 +00:00
|
|
|
--- chrome/browser/devtools/devtools_window.cc
|
|
|
|
+++ chrome/browser/devtools/devtools_window.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -38,6 +38,7 @@
|
2024-03-19 17:11:42 -04:00
|
|
|
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
2023-11-14 17:16:43 +00:00
|
|
|
#include "chrome/browser/task_manager/web_contents_tags.h"
|
|
|
|
#include "chrome/browser/ui/browser.h"
|
|
|
|
+#include "chrome/browser/ui/browser_finder.h"
|
|
|
|
#include "chrome/browser/ui/browser_list.h"
|
|
|
|
#include "chrome/browser/ui/browser_tabstrip.h"
|
|
|
|
#include "chrome/browser/ui/browser_window.h"
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1211,6 +1212,13 @@ DevToolsWindow* DevToolsWindow::Create(
|
2023-11-14 17:16:43 +00:00
|
|
|
!browser->is_type_normal()) {
|
|
|
|
can_dock = false;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (can_dock && browser && browser->cef_delegate()) {
|
|
|
|
+ // Don't dock DevTools for CEF-managed browsers.
|
|
|
|
+ can_dock = false;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create WebContents with devtools.
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1674,9 +1682,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) {
|
2024-07-11 14:13:40 -04:00
|
|
|
if (!inspected_web_contents ||
|
|
|
|
!inspected_web_contents->OpenURL(params,
|
|
|
|
/*navigation_handle_callback=*/{})) {
|
|
|
|
+#if !BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ // Remove default behavior when CEF handles the open via OnOpenURLFromTab.
|
|
|
|
+ // See CEF issue #3735.
|
|
|
|
chrome::ScopedTabbedBrowserDisplayer displayer(profile_);
|
|
|
|
chrome::AddSelectedTabWithURL(displayer.browser(), fixed_url,
|
|
|
|
ui::PAGE_TRANSITION_LINK);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1839,12 +1851,28 @@ void DevToolsWindow::CreateDevToolsBrowser() {
|
2023-11-14 17:16:43 +00:00
|
|
|
Browser::CreationStatus::kOk) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
- browser_ =
|
|
|
|
- Browser::Create(Browser::CreateParams::CreateForDevTools(profile_));
|
|
|
|
- browser_->tab_strip_model()->AddWebContents(
|
|
|
|
- OwnedMainWebContents::TakeWebContents(
|
|
|
|
- std::move(owned_main_web_contents_)),
|
|
|
|
- -1, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, AddTabTypes::ADD_ACTIVE);
|
|
|
|
+
|
2024-04-17 12:01:26 -04:00
|
|
|
+ auto* inspected_web_contents = GetInspectedWebContents();
|
|
|
|
+ auto* opener = chrome::FindBrowserWithTab(inspected_web_contents);
|
2023-11-14 17:16:43 +00:00
|
|
|
+ auto devtools_contents = OwnedMainWebContents::TakeWebContents(
|
|
|
|
+ std::move(owned_main_web_contents_));
|
|
|
|
+
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2024-04-17 12:01:26 -04:00
|
|
|
+ // If a Browser is created, it will take ownership of |devtools_contents|.
|
|
|
|
+ browser_ = cef::BrowserDelegate::CreateDevToolsBrowser(
|
|
|
|
+ profile_, opener, inspected_web_contents, devtools_contents);
|
2023-11-14 17:16:43 +00:00
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+ if (!browser_) {
|
|
|
|
+ auto create_params = Browser::CreateParams::CreateForDevTools(profile_);
|
|
|
|
+ create_params.opener = opener;
|
|
|
|
+
|
|
|
|
+ browser_ = Browser::Create(std::move(create_params));
|
|
|
|
+ browser_->tab_strip_model()->AddWebContents(
|
|
|
|
+ std::move(devtools_contents),
|
|
|
|
+ -1, ui::PAGE_TRANSITION_AUTO_TOPLEVEL, AddTabTypes::ADD_ACTIVE);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
OverrideAndSyncDevToolsRendererPrefs();
|
|
|
|
}
|
|
|
|
|
2022-04-15 15:55:23 -04:00
|
|
|
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
2024-07-29 13:09:20 -04:00
|
|
|
index c54ec37e56ad7..fda899ec278ef 100644
|
2022-04-15 15:55:23 -04:00
|
|
|
--- chrome/browser/ui/BUILD.gn
|
|
|
|
+++ chrome/browser/ui/BUILD.gn
|
2024-01-25 21:12:43 -05:00
|
|
|
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
|
2022-05-19 13:28:44 +03:00
|
|
|
import("//build/config/features.gni")
|
2022-04-15 15:55:23 -04:00
|
|
|
import("//build/config/ozone.gni")
|
|
|
|
import("//build/config/ui.gni")
|
|
|
|
+import("//cef/libcef/features/features.gni")
|
|
|
|
import("//chrome/browser/buildflags.gni")
|
|
|
|
import("//chrome/common/features.gni")
|
2022-06-17 16:28:55 +03:00
|
|
|
import("//chromeos/ash/components/assistant/assistant.gni")
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -417,6 +418,10 @@ static_library("ui") {
|
2022-04-15 15:55:23 -04:00
|
|
|
"//build/config/compiler:wexit_time_destructors",
|
|
|
|
]
|
|
|
|
|
|
|
|
+ if (enable_cef) {
|
|
|
|
+ configs += [ "//cef/libcef/features:config" ]
|
|
|
|
+ }
|
|
|
|
+
|
2024-07-29 13:09:20 -04:00
|
|
|
public_deps = [
|
|
|
|
# WARNING WARNING WARNING
|
|
|
|
# New dependencies outside of //chrome/browser should be added to
|
|
|
|
@@ -438,6 +443,7 @@ static_library("ui") {
|
2022-04-15 15:55:23 -04:00
|
|
|
"//build:chromeos_buildflags",
|
2022-07-21 13:26:10 -04:00
|
|
|
"//build/config/chromebox_for_meetings:buildflags",
|
2022-04-15 15:55:23 -04:00
|
|
|
"//cc/paint",
|
|
|
|
+ "//cef/libcef/features",
|
|
|
|
"//chrome:resources",
|
|
|
|
"//chrome:strings",
|
2023-06-26 13:13:38 +03:00
|
|
|
"//chrome/app:chrome_dll_resources",
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -739,6 +745,10 @@ static_library("ui") {
|
2024-07-03 13:07:46 -04:00
|
|
|
deps += [ "//components/plus_addresses/resources:vector_icons" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
+ if (enable_cef) {
|
|
|
|
+ deps += [ "//cef:cef_resources" ]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
# TODO(crbug.com/41437292): Remove this circular dependency.
|
2024-07-29 13:09:20 -04:00
|
|
|
# Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies".
|
2024-07-03 13:07:46 -04:00
|
|
|
allow_circular_includes_from = [
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1540,7 +1550,6 @@ static_library("ui") {
|
|
|
|
"tabs/tab_menu_model_factory.h",
|
|
|
|
"tabs/tab_model.cc",
|
|
|
|
"tabs/tab_model.h",
|
|
|
|
- "tabs/tab_network_state.cc",
|
|
|
|
"tabs/tab_network_state.h",
|
|
|
|
"tabs/tab_renderer_data.cc",
|
|
|
|
"tabs/tab_renderer_data.h",
|
|
|
|
@@ -2323,6 +2332,8 @@ static_library("ui") {
|
2024-06-14 13:01:45 -04:00
|
|
|
"views/apps/app_dialog/app_local_block_dialog_view.h",
|
2023-01-12 16:49:21 +00:00
|
|
|
"views/apps/app_dialog/app_pause_dialog_view.cc",
|
|
|
|
"views/apps/app_dialog/app_pause_dialog_view.h",
|
|
|
|
+ "views/apps/app_dialog/app_uninstall_dialog_view.cc",
|
|
|
|
+ "views/apps/app_dialog/app_uninstall_dialog_view.h",
|
|
|
|
"views/apps/app_info_dialog/arc_app_info_links_panel.cc",
|
|
|
|
"views/apps/app_info_dialog/arc_app_info_links_panel.h",
|
|
|
|
"views/apps/chrome_app_window_client_views_chromeos.cc",
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -3875,8 +3886,6 @@ static_library("ui") {
|
2024-06-14 13:01:45 -04:00
|
|
|
"autofill/payments/webauthn_dialog_model.h",
|
|
|
|
"autofill/payments/webauthn_dialog_model_observer.h",
|
|
|
|
"autofill/payments/webauthn_dialog_state.h",
|
|
|
|
- "frame/window_frame_util.cc",
|
|
|
|
- "frame/window_frame_util.h",
|
|
|
|
"incognito_clear_browsing_data_dialog_interface.h",
|
2024-07-29 13:09:20 -04:00
|
|
|
"passwords/password_cross_domain_confirmation_popup_controller_impl.cc",
|
|
|
|
"passwords/password_cross_domain_confirmation_popup_controller_impl.h",
|
|
|
|
@@ -4758,8 +4767,6 @@ static_library("ui") {
|
2023-01-12 16:49:21 +00:00
|
|
|
"views/accessibility/theme_tracking_non_accessible_image_view.h",
|
|
|
|
"views/apps/app_dialog/app_dialog_view.cc",
|
|
|
|
"views/apps/app_dialog/app_dialog_view.h",
|
|
|
|
- "views/apps/app_dialog/app_uninstall_dialog_view.cc",
|
|
|
|
- "views/apps/app_dialog/app_uninstall_dialog_view.h",
|
|
|
|
"views/apps/app_info_dialog/app_info_dialog_container.cc",
|
|
|
|
"views/apps/app_info_dialog/app_info_dialog_container.h",
|
|
|
|
"views/apps/app_info_dialog/app_info_dialog_views.cc",
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -6578,6 +6585,7 @@ static_library("ui") {
|
2022-11-15 12:50:53 -05:00
|
|
|
if (enable_printing) {
|
2022-04-15 15:55:23 -04:00
|
|
|
deps += [
|
|
|
|
"//components/printing/browser",
|
|
|
|
+ "//components/printing/common:mojo_interfaces",
|
|
|
|
"//printing",
|
|
|
|
]
|
|
|
|
}
|
2020-09-17 18:24:08 -04:00
|
|
|
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
index 681fe10f28260..89da7d87b306b 100644
|
2020-09-17 18:24:08 -04:00
|
|
|
--- chrome/browser/ui/browser.cc
|
|
|
|
+++ chrome/browser/ui/browser.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -271,6 +271,25 @@
|
2020-09-17 18:24:08 -04:00
|
|
|
#include "components/captive_portal/content/captive_portal_tab_helper.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+#define CALL_CEF_DELEGATE(name, ...) \
|
|
|
|
+ if (cef_browser_delegate_) { \
|
|
|
|
+ cef_browser_delegate_->name(__VA_ARGS__); \
|
|
|
|
+ }
|
|
|
|
+#define CALL_CEF_DELEGATE_RETURN(name, ...) \
|
|
|
|
+ if (cef_browser_delegate_) { \
|
|
|
|
+ return cef_browser_delegate_->name(__VA_ARGS__); \
|
|
|
|
+ }
|
2022-03-21 17:22:07 -04:00
|
|
|
+#define CALL_CEF_DELEGATE_RESULT(name, result, ...) \
|
|
|
|
+ if (cef_browser_delegate_) { \
|
|
|
|
+ result = cef_browser_delegate_->name(__VA_ARGS__); \
|
|
|
|
+ }
|
2020-09-17 18:24:08 -04:00
|
|
|
+#else // !BUILDFLAG(ENABLE_CEF)
|
|
|
|
+#define CALL_CEF_DELEGATE(name, ...)
|
|
|
|
+#define CALL_CEF_DELEGATE_RETURN(name, ...)
|
2022-03-21 17:22:07 -04:00
|
|
|
+#define CALL_CEF_DELEGATE_RESULT(name, result, ...)
|
2020-09-17 18:24:08 -04:00
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
|
|
#include "chrome/browser/extensions/extension_browser_window_helper.h"
|
|
|
|
#endif
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -536,6 +555,10 @@ Browser::Browser(const CreateParams& params)
|
2023-09-07 13:28:27 -04:00
|
|
|
type_(params.type),
|
|
|
|
profile_(params.profile),
|
|
|
|
window_(nullptr),
|
2020-09-17 18:24:08 -04:00
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2023-09-07 13:28:27 -04:00
|
|
|
+ cef_browser_delegate_(
|
|
|
|
+ cef::BrowserDelegate::Create(this, params.cef_params, params.opener)),
|
2020-09-17 18:24:08 -04:00
|
|
|
+#endif
|
2023-09-07 13:28:27 -04:00
|
|
|
tab_strip_model_delegate_(
|
|
|
|
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
|
|
|
|
tab_strip_model_(std::make_unique<TabStripModel>(
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -769,6 +792,12 @@ Browser::~Browser() {
|
2023-01-02 18:34:43 -05:00
|
|
|
// away so they don't try and call back to us.
|
|
|
|
if (select_file_dialog_.get())
|
|
|
|
select_file_dialog_->ListenerDestroyed();
|
|
|
|
+
|
|
|
|
+ // Clean up any objects attached via UserData before implicit destruction
|
|
|
|
+ // of CreateParams. Destruction of those objects may call into something
|
|
|
|
+ // (ProfileImpl, PrefService, etc) that will be destroyed when the last
|
|
|
|
+ // CefRequestContextImpl reference (held by CreateParams) is released.
|
|
|
|
+ ClearAllUserData();
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1242,6 +1271,8 @@ void Browser::WindowFullscreenStateChanged() {
|
2023-09-25 15:40:17 -04:00
|
|
|
->WindowFullscreenStateChanged();
|
|
|
|
command_controller_->FullscreenStateChanged();
|
|
|
|
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
|
|
|
|
+
|
|
|
|
+ CALL_CEF_DELEGATE(WindowFullscreenStateChanged);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Browser::FullscreenTopUIStateChanged() {
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1615,6 +1646,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
|
2020-09-24 21:40:47 -04:00
|
|
|
if (exclusive_access_manager_->HandleUserKeyEvent(event))
|
|
|
|
return content::KeyboardEventProcessingResult::HANDLED;
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_) {
|
|
|
|
+ auto result = cef_browser_delegate_->PreHandleKeyboardEvent(source, event);
|
|
|
|
+ if (result != content::KeyboardEventProcessingResult::NOT_HANDLED)
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
return window()->PreHandleKeyboardEvent(event);
|
|
|
|
}
|
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1622,8 +1661,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
|
2020-09-24 21:40:47 -04:00
|
|
|
const NativeWebKeyboardEvent& event) {
|
|
|
|
DevToolsWindow* devtools_window =
|
|
|
|
DevToolsWindow::GetInstanceForInspectedWebContents(source);
|
|
|
|
- return (devtools_window && devtools_window->ForwardKeyboardEvent(event)) ||
|
|
|
|
- window()->HandleKeyboardEvent(event);
|
|
|
|
+ if (devtools_window && devtools_window->ForwardKeyboardEvent(event)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_ &&
|
|
|
|
+ cef_browser_delegate_->HandleKeyboardEvent(source, event)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+ return window()->HandleKeyboardEvent(event);
|
|
|
|
}
|
|
|
|
|
2024-01-25 21:12:43 -05:00
|
|
|
bool Browser::TabsNeedBeforeUnloadFired() const {
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1785,6 +1834,16 @@ WebContents* Browser::OpenURLFromTab(
|
2020-09-24 21:40:47 -04:00
|
|
|
}
|
2023-09-15 15:51:43 -04:00
|
|
|
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
2020-09-24 21:40:47 -04:00
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_) {
|
2024-04-23 16:06:00 -04:00
|
|
|
+ auto web_contents =
|
|
|
|
+ cef_browser_delegate_->OpenURLFromTabEx(source, params,
|
|
|
|
+ navigation_handle_callback);
|
2020-09-24 21:40:47 -04:00
|
|
|
+ if (!web_contents)
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
NavigateParams nav_params(this, params.url, params.transition);
|
|
|
|
nav_params.FillNavigateParamsFromOpenURLParams(params);
|
|
|
|
nav_params.source_contents = source;
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1947,6 +2006,8 @@ void Browser::LoadingStateChanged(WebContents* source,
|
2021-12-16 17:35:54 -05:00
|
|
|
bool should_show_loading_ui) {
|
2020-09-17 18:24:08 -04:00
|
|
|
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
|
2021-12-16 17:35:54 -05:00
|
|
|
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
|
2020-09-17 18:24:08 -04:00
|
|
|
+
|
2021-12-16 17:35:54 -05:00
|
|
|
+ CALL_CEF_DELEGATE(LoadingStateChanged, source, should_show_loading_ui);
|
2020-09-17 18:24:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Browser::CloseContents(WebContents* source) {
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1975,6 +2036,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
|
2020-09-17 18:24:08 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
|
|
|
+ CALL_CEF_DELEGATE(UpdateTargetURL, source, url);
|
|
|
|
+
|
|
|
|
if (!GetStatusBubble())
|
|
|
|
return;
|
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1982,6 +2045,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
2020-09-17 18:24:08 -04:00
|
|
|
GetStatusBubble()->SetURL(url);
|
|
|
|
}
|
|
|
|
|
|
|
|
+bool Browser::DidAddMessageToConsole(
|
|
|
|
+ content::WebContents* source,
|
|
|
|
+ blink::mojom::ConsoleMessageLevel log_level,
|
2021-04-20 18:52:34 -04:00
|
|
|
+ const std::u16string& message,
|
2020-09-17 18:24:08 -04:00
|
|
|
+ int32_t line_no,
|
2021-04-20 18:52:34 -04:00
|
|
|
+ const std::u16string& source_id) {
|
2020-09-17 18:24:08 -04:00
|
|
|
+ CALL_CEF_DELEGATE_RETURN(DidAddMessageToConsole, source, log_level, message,
|
|
|
|
+ line_no, source_id);
|
|
|
|
+ return false;
|
|
|
|
+}
|
|
|
|
+
|
2024-05-22 21:52:35 -04:00
|
|
|
void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) {
|
|
|
|
const ui::EventType type = event.type();
|
2024-07-29 13:09:20 -04:00
|
|
|
const bool exited = type == ui::EventType::kMouseExited;
|
|
|
|
@@ -2010,6 +2084,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
|
2022-03-22 17:40:28 -04:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
+void Browser::CanDownload(const GURL& url,
|
|
|
|
+ const std::string& request_method,
|
|
|
|
+ base::OnceCallback<void(bool)> callback) {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_) {
|
|
|
|
+ cef_browser_delegate_->CanDownload(url, request_method,
|
|
|
|
+ std::move(callback));
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+ std::move(callback).Run(true);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
void Browser::BeforeUnloadFired(WebContents* web_contents,
|
|
|
|
bool proceed,
|
|
|
|
bool* proceed_to_fire_unload) {
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2109,12 +2196,24 @@ void Browser::WebContentsCreated(WebContents* source_contents,
|
2020-09-24 21:40:47 -04:00
|
|
|
|
|
|
|
// Make the tab show up in the task manager.
|
|
|
|
task_manager::WebContentsTags::CreateForTabContents(new_contents);
|
|
|
|
+
|
|
|
|
+ CALL_CEF_DELEGATE(WebContentsCreated, source_contents,
|
|
|
|
+ opener_render_process_id, opener_render_frame_id,
|
|
|
|
+ frame_name, target_url, new_contents);
|
|
|
|
}
|
|
|
|
|
2023-12-06 15:16:15 -05:00
|
|
|
void Browser::RendererUnresponsive(
|
2024-03-12 15:47:10 -04:00
|
|
|
WebContents* source,
|
|
|
|
content::RenderWidgetHost* render_widget_host,
|
|
|
|
base::RepeatingClosure hang_monitor_restarter) {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_ &&
|
|
|
|
+ cef_browser_delegate_->RendererUnresponsiveEx(source, render_widget_host,
|
|
|
|
+ hang_monitor_restarter)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
// Don't show the page hung dialog when a HTML popup hangs because
|
|
|
|
// the dialog will take the focus and immediately close the popup.
|
|
|
|
RenderWidgetHostView* view = render_widget_host->GetView();
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2127,6 +2226,13 @@ void Browser::RendererUnresponsive(
|
2024-03-12 15:47:10 -04:00
|
|
|
void Browser::RendererResponsive(
|
|
|
|
WebContents* source,
|
|
|
|
content::RenderWidgetHost* render_widget_host) {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_ &&
|
|
|
|
+ cef_browser_delegate_->RendererResponsiveEx(source, render_widget_host)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
RenderWidgetHostView* view = render_widget_host->GetView();
|
|
|
|
if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) {
|
|
|
|
TabDialogs::FromWebContents(source)->HideHungRendererDialog(
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2136,6 +2242,15 @@ void Browser::RendererResponsive(
|
2024-06-04 12:19:14 -04:00
|
|
|
|
|
|
|
content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager(
|
|
|
|
WebContents* source) {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_) {
|
|
|
|
+ auto* cef_js_dialog_manager =
|
|
|
|
+ cef_browser_delegate_->GetJavaScriptDialogManager(source);
|
|
|
|
+ if (cef_js_dialog_manager) {
|
|
|
|
+ return cef_js_dialog_manager;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
return javascript_dialogs::TabModalDialogManager::FromWebContents(source);
|
|
|
|
}
|
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2171,6 +2286,11 @@ void Browser::DraggableRegionsChanged(
|
2024-04-23 16:06:00 -04:00
|
|
|
if (app_controller_) {
|
|
|
|
app_controller_->DraggableRegionsChanged(regions, contents);
|
|
|
|
}
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ else if (cef_delegate()) {
|
|
|
|
+ cef_delegate()->DraggableRegionsChanged(regions, contents);
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void Browser::DidFinishNavigation(
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2251,11 +2371,15 @@ void Browser::EnterFullscreenModeForTab(
|
2020-09-17 18:24:08 -04:00
|
|
|
const blink::mojom::FullscreenOptions& options) {
|
|
|
|
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
|
|
|
|
requesting_frame, options.display_id);
|
|
|
|
+
|
|
|
|
+ CALL_CEF_DELEGATE(EnterFullscreenModeForTab, requesting_frame, options);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Browser::ExitFullscreenModeForTab(WebContents* web_contents) {
|
|
|
|
exclusive_access_manager_->fullscreen_controller()->ExitFullscreenModeForTab(
|
|
|
|
web_contents);
|
|
|
|
+
|
|
|
|
+ CALL_CEF_DELEGATE(ExitFullscreenModeForTab, web_contents);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2456,6 +2580,15 @@ void Browser::RequestMediaAccessPermission(
|
2022-07-08 07:40:35 +00:00
|
|
|
content::WebContents* web_contents,
|
|
|
|
const content::MediaStreamRequest& request,
|
|
|
|
content::MediaResponseCallback callback) {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_browser_delegate_) {
|
|
|
|
+ callback = cef_browser_delegate_->RequestMediaAccessPermissionEx(
|
|
|
|
+ web_contents, request, std::move(callback));
|
|
|
|
+ if (callback.is_null())
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
const extensions::Extension* extension =
|
|
|
|
GetExtensionForOrigin(profile_, request.security_origin);
|
|
|
|
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -2998,9 +3131,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
|
2022-03-21 17:22:07 -04:00
|
|
|
// Browser, Getters for UI (private):
|
|
|
|
|
|
|
|
StatusBubble* Browser::GetStatusBubble() {
|
|
|
|
+ bool show_by_default = true;
|
|
|
|
+
|
2023-10-19 14:08:48 -04:00
|
|
|
// For kiosk and exclusive app mode we want to always hide the status bubble.
|
|
|
|
if (chrome::IsRunningInAppMode()) {
|
2022-03-21 17:22:07 -04:00
|
|
|
- return nullptr;
|
|
|
|
+ show_by_default = false;
|
|
|
|
}
|
|
|
|
|
2023-10-19 14:08:48 -04:00
|
|
|
// We hide the status bar for web apps windows as this matches native
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -3008,6 +3143,12 @@ StatusBubble* Browser::GetStatusBubble() {
|
2023-10-19 14:08:48 -04:00
|
|
|
// mode, as the minimal browser UI includes the status bar.
|
|
|
|
if (web_app::AppBrowserController::IsWebApp(this) &&
|
|
|
|
!app_controller()->HasMinimalUiButtons()) {
|
|
|
|
+ show_by_default = false;
|
|
|
|
+ }
|
|
|
|
+
|
2022-03-21 17:22:07 -04:00
|
|
|
+ bool show = show_by_default;
|
|
|
|
+ CALL_CEF_DELEGATE_RESULT(ShowStatusBubble, show, show_by_default);
|
2023-10-19 14:08:48 -04:00
|
|
|
+ if (!show) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
2022-03-21 17:22:07 -04:00
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -3157,6 +3298,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
|
2020-09-17 18:24:08 -04:00
|
|
|
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
|
2023-01-30 12:43:54 -05:00
|
|
|
web_contents_collection_.StopObserving(web_contents);
|
2020-09-17 18:24:08 -04:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ CALL_CEF_DELEGATE(SetAsDelegate, web_contents, set_delegate);
|
|
|
|
}
|
|
|
|
|
2021-04-20 18:52:34 -04:00
|
|
|
void Browser::TabDetachedAtImpl(content::WebContents* contents,
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -3311,6 +3454,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
|
2023-09-07 13:28:27 -04:00
|
|
|
|
|
|
|
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
|
|
|
|
bool check_can_support) const {
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (cef_delegate()) {
|
|
|
|
+ if (auto value = cef_delegate()->SupportsWindowFeature(feature)) {
|
|
|
|
+ return *value;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
switch (type_) {
|
|
|
|
case TYPE_NORMAL:
|
|
|
|
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
|
2020-09-17 18:24:08 -04:00
|
|
|
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
|
2024-07-29 13:09:20 -04:00
|
|
|
index cbc5ae1c02941..f0200afb918c1 100644
|
2020-09-17 18:24:08 -04:00
|
|
|
--- chrome/browser/ui/browser.h
|
|
|
|
+++ chrome/browser/ui/browser.h
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -24,6 +24,7 @@
|
2020-09-17 18:24:08 -04:00
|
|
|
#include "base/timer/elapsed_timer.h"
|
|
|
|
#include "build/build_config.h"
|
2021-01-27 18:13:12 -05:00
|
|
|
#include "build/chromeos_buildflags.h"
|
2024-07-05 13:07:07 -04:00
|
|
|
+#include "cef/libcef/features/features.h"
|
2023-01-30 12:43:54 -05:00
|
|
|
#include "chrome/browser/tab_contents/web_contents_collection.h"
|
2021-04-20 18:52:34 -04:00
|
|
|
#include "chrome/browser/themes/theme_service_observer.h"
|
2021-06-03 21:34:56 -04:00
|
|
|
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -53,6 +54,10 @@
|
2020-09-17 18:24:08 -04:00
|
|
|
#include "ui/gfx/geometry/rect.h"
|
|
|
|
#include "ui/shell_dialogs/select_file_dialog.h"
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+#include "cef/libcef/browser/chrome/browser_delegate.h"
|
|
|
|
+#endif
|
|
|
|
+
|
2022-01-25 15:26:51 -05:00
|
|
|
#if BUILDFLAG(IS_ANDROID)
|
2020-09-17 18:24:08 -04:00
|
|
|
#error This file should only be included on desktop.
|
|
|
|
#endif
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -376,6 +381,15 @@ class Browser : public TabStripModelObserver,
|
2023-08-09 17:17:17 -04:00
|
|
|
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
|
2024-01-25 21:12:43 -05:00
|
|
|
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
|
2020-09-17 18:24:08 -04:00
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ // Opaque CEF-specific configuration. Will be propagated to new Browsers.
|
|
|
|
+ scoped_refptr<cef::BrowserDelegate::CreateParams> cef_params;
|
2023-09-07 13:28:27 -04:00
|
|
|
+
|
|
|
|
+ // Specify the Browser that is opening this popup.
|
2023-11-14 17:16:43 +00:00
|
|
|
+ // Currently only used with TYPE_PICTURE_IN_PICTURE and TYPE_DEVTOOLS.
|
2023-09-07 13:28:27 -04:00
|
|
|
+ raw_ptr<Browser, DanglingUntriaged> opener = nullptr;
|
2020-09-17 18:24:08 -04:00
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
private:
|
|
|
|
friend class Browser;
|
|
|
|
friend class WindowSizerChromeOSTest;
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -457,6 +471,13 @@ class Browser : public TabStripModelObserver,
|
2023-08-09 17:17:17 -04:00
|
|
|
update_ui_immediately_for_testing_ = true;
|
2021-07-23 12:40:13 -04:00
|
|
|
}
|
2021-04-11 16:10:11 -04:00
|
|
|
|
|
|
|
+ // Return true if CEF will expose the toolbar to the client. This value is
|
|
|
|
+ // used to selectively enable toolbar behaviors such as command processing
|
|
|
|
+ // and omnibox focus without also including the toolbar in BrowserView layout
|
|
|
|
+ // calculations.
|
|
|
|
+ void set_toolbar_overridden(bool val) { toolbar_overridden_ = val; }
|
|
|
|
+ bool toolbar_overridden() const { return toolbar_overridden_; }
|
|
|
|
+
|
|
|
|
// Accessors ////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
const CreateParams& create_params() const { return create_params_; }
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -552,6 +573,12 @@ class Browser : public TabStripModelObserver,
|
2021-03-04 17:36:57 -05:00
|
|
|
base::WeakPtr<Browser> AsWeakPtr();
|
2023-12-06 15:16:15 -05:00
|
|
|
base::WeakPtr<const Browser> AsWeakPtr() const;
|
2020-09-17 18:24:08 -04:00
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ cef::BrowserDelegate* cef_delegate() const {
|
|
|
|
+ return cef_browser_delegate_.get();
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
// Get the FindBarController for this browser, creating it if it does not
|
|
|
|
// yet exist.
|
|
|
|
FindBarController* GetFindBarController();
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -963,10 +990,18 @@ class Browser : public TabStripModelObserver,
|
2020-09-17 18:24:08 -04:00
|
|
|
void SetContentsBounds(content::WebContents* source,
|
|
|
|
const gfx::Rect& bounds) override;
|
|
|
|
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
|
|
|
+ bool DidAddMessageToConsole(content::WebContents* source,
|
|
|
|
+ blink::mojom::ConsoleMessageLevel log_level,
|
2021-04-20 18:52:34 -04:00
|
|
|
+ const std::u16string& message,
|
2020-09-17 18:24:08 -04:00
|
|
|
+ int32_t line_no,
|
2021-04-20 18:52:34 -04:00
|
|
|
+ const std::u16string& source_id) override;
|
2020-09-17 18:24:08 -04:00
|
|
|
void ContentsMouseEvent(content::WebContents* source,
|
2024-05-22 21:52:35 -04:00
|
|
|
const ui::Event& event) override;
|
2022-03-22 17:40:28 -04:00
|
|
|
void ContentsZoomChange(bool zoom_in) override;
|
|
|
|
bool TakeFocus(content::WebContents* source, bool reverse) override;
|
|
|
|
+ void CanDownload(const GURL& url,
|
|
|
|
+ const std::string& request_method,
|
|
|
|
+ base::OnceCallback<void(bool)> callback) override;
|
|
|
|
void BeforeUnloadFired(content::WebContents* source,
|
|
|
|
bool proceed,
|
|
|
|
bool* proceed_to_fire_unload) override;
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1294,6 +1329,10 @@ class Browser : public TabStripModelObserver,
|
2023-09-07 13:28:27 -04:00
|
|
|
// This Browser's window.
|
|
|
|
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ std::unique_ptr<cef::BrowserDelegate> cef_browser_delegate_;
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
|
|
|
|
std::unique_ptr<TabStripModel> const tab_strip_model_;
|
|
|
|
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -1360,6 +1399,8 @@ class Browser : public TabStripModelObserver,
|
2021-04-11 16:10:11 -04:00
|
|
|
const std::string initial_workspace_;
|
|
|
|
bool initial_visible_on_all_workspaces_state_;
|
|
|
|
|
|
|
|
+ bool toolbar_overridden_ = false;
|
|
|
|
+
|
2021-07-23 12:40:13 -04:00
|
|
|
CreationSource creation_source_ = CreationSource::kUnknown;
|
2021-04-11 16:10:11 -04:00
|
|
|
|
2021-07-23 12:40:13 -04:00
|
|
|
UnloadController unload_controller_;
|
2023-09-07 13:28:27 -04:00
|
|
|
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
index 1e4d7bc3a4c0a..9ac5f645e4591 100644
|
2023-09-07 13:28:27 -04:00
|
|
|
--- chrome/browser/ui/browser_navigator.cc
|
|
|
|
+++ chrome/browser/ui/browser_navigator.cc
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -311,6 +311,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
|
|
|
|
|
2023-11-21 14:17:55 -05:00
|
|
|
browser_params.pip_options = pip_options;
|
2020-09-17 18:24:08 -04:00
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
2023-11-21 14:17:55 -05:00
|
|
|
+ browser_params.opener = params.browser;
|
2020-09-17 18:24:08 -04:00
|
|
|
+#endif
|
|
|
|
+
|
2023-11-21 14:17:55 -05:00
|
|
|
const BrowserWindow* const browser_window = params.browser->window();
|
|
|
|
const gfx::NativeWindow native_window =
|
|
|
|
browser_window ? browser_window->GetNativeWindow()
|
2024-07-29 13:09:20 -04:00
|
|
|
@@ -599,6 +603,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
|
2020-09-24 21:40:47 -04:00
|
|
|
std::unique_ptr<WebContents> target_contents =
|
|
|
|
WebContents::Create(create_params);
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ auto cef_delegate = params.browser->cef_delegate();
|
|
|
|
+ if (cef_delegate) {
|
|
|
|
+ cef_delegate->OnWebContentsCreated(target_contents.get());
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
// New tabs can have WebUI URLs that will make calls back to arbitrary
|
|
|
|
// tab helpers, so the entire set of tab helpers needs to be set up
|
|
|
|
// immediately.
|
|
|
|
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
|
2024-06-14 13:01:45 -04:00
|
|
|
index e12f401ab7d11..59222cc9601ba 100644
|
2020-09-24 21:40:47 -04:00
|
|
|
--- chrome/browser/ui/browser_tabstrip.cc
|
|
|
|
+++ chrome/browser/ui/browser_tabstrip.cc
|
2023-12-06 15:16:15 -05:00
|
|
|
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(
|
2020-09-24 21:40:47 -04:00
|
|
|
// Time new tab page creation time. We keep track of the timing data in
|
|
|
|
// WebContents, but we want to include the time it takes to create the
|
|
|
|
// WebContents object too.
|
|
|
|
+ // For CEF use a PageTransition that matches
|
|
|
|
+ // CefFrameHostImpl::kPageTransitionExplicit.
|
|
|
|
base::TimeTicks new_tab_start_time = base::TimeTicks::Now();
|
|
|
|
NavigateParams params(browser, url.is_empty() ? browser->GetNewTabURL() : url,
|
|
|
|
- ui::PAGE_TRANSITION_TYPED);
|
|
|
|
+ static_cast<ui::PageTransition>(
|
|
|
|
+ ui::PAGE_TRANSITION_TYPED |
|
|
|
|
+ ui::PAGE_TRANSITION_FROM_ADDRESS_BAR));
|
|
|
|
params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB
|
|
|
|
: WindowOpenDisposition::NEW_BACKGROUND_TAB;
|
|
|
|
params.tabstrip_index = idx;
|
2023-12-06 15:16:15 -05:00
|
|
|
@@ -81,6 +85,16 @@ void AddWebContents(Browser* browser,
|
2023-02-09 13:15:15 -05:00
|
|
|
// Can't create a new contents for the current tab - invalid case.
|
|
|
|
DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB);
|
|
|
|
|
|
|
|
+#if BUILDFLAG(ENABLE_CEF)
|
|
|
|
+ if (browser && browser->cef_delegate() && new_contents) {
|
|
|
|
+ new_contents = browser->cef_delegate()->AddWebContents(
|
|
|
|
+ std::move(new_contents));
|
|
|
|
+ if (!new_contents) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
NavigateParams params(browser, std::move(new_contents));
|
|
|
|
params.source_contents = source_contents;
|
|
|
|
params.url = target_url;
|