chore: bump chromium to 111.0.5544.3 (main) (#36820)
* chore: bump chromium in DEPS to 111.0.5522.0 * chore: bump chromium in DEPS to 111.0.5524.0 * chore: bump chromium in DEPS to 111.0.5526.0 * chore: bump chromium in DEPS to 111.0.5528.0 * chore: update patches/chromium/mas_avoid_usage_of_private_macos_apis.patch Xref:4132807
Fix simple code shear * chore: update patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch Xref:4130675
Fix simple code shear * chore: update patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch Xref:4144281
Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/disable_unload_metrics.patch Xref:4126173
Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/feat_add_data_parameter_to_processsingleton.patch Xref:4144281
Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/chromium/preconnect_manager.patch4144281
Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches/v8/force_cppheapcreateparams_to_be_noncopyable.patch3533019
Fix simple code shear; applied cleanly w/patch-fuzz * chore: update patches * chore: update patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch Xref:4128765
Upstream added a new call to HeaderContext(), whose signature we have patched * chore: bump chromium in DEPS to 111.0.5530.0 * chore: update patches * Move ChildProcessHost* from content/common to content/browser Xref: Move ChildProcessHost* from content/common to content/browser * Remove RenderViewHostChanged Xref:4134103
[upstream removal of RenderViewHostChanged] Xref:4092763
Xref:4093234
Xref:4133892
Xref:4134103
[examples of upstream code adjusting to the change] Upstream handles this change in roughly two approaches: 1. Move the code over to RenderFrameHostChanged(old_host, new_host) but test for new_host->IsInPrimaryMainFrame() before acting 2. Migrate to the PrimaryPageChanged(page) API and use page.GetMainDocument() to get the RenderFrameHost. I've chosen 1. because electron_api_web_contents needed that pointer to old_host to call RemoveInputEventListener(), but I may be missing some context & would appreciate review on this commit. * Make electron/shell/browser/relauncher_win.cc use <winternl.h> Xref:4129135
Many internal Windows types are now available in winternl.h so upstrem no longer defines the types themselves. * Move ChildProcessHost* from content/common to content/browser Xref:4134795
* fixup! Make electron/shell/browser/relauncher_win.cc use <winternl.h> winternl.h does not define the field we need, so clone the struct Chromium was using into unnamed namespace * fixup! Move ChildProcessHost* from content/common to content/browser chore: update #includes too * chore: bump chromium in DEPS to 111.0.5532.0 * chore: sync patches/chromium/pepper_plugin_support.patch Xref:4133323
manually reync patch; no code changes * chore: sync patches/chromium/mas_no_private_api.patch Xref:4143865
the content/common/pseudonymization_salt.cc patch is no longer needed * chore: sync patches/chromium/mas_disable_remote_accessibility.patch patch-fuzz update; no manual changes * chore: sync patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch Xref:4111725
manually reync patch; no code changes * chore: sync patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch Xref:4133323
manually reync patch; no code changes * chore: sync patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch Xref:4127230
patch-fuzz update; no manual changes * chore: rebuild patches * fixup! Remove RenderViewHostChanged Use PrimaryPageChanged() * chore: remove unused method TabsUpdateFunction::OnExecuteCodeFinished() Xref:4133991
This private, already-unused function showed up as a FTBFS because it took a base::ListValue parameter and ListValue was removed upstream. * task posting v3: remove includes of runner handles and IWYU task runners Xref:4133323
* chore: lint * chore: more lint * fixup! task posting v3: remove includes of runner handles and IWYU task runners macOS, too * fixup! task posting v3: remove includes of runner handles and IWYU task runners * chore: bump chromium in DEPS to 111.0.5534.0 * chore: sync patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch Xref:4141862
patch-fuzz update; no manual changes * chore: sync patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch Xref:4153110
Sync to minor upstream changes. Add const correctness. * chore: sync electron/patches/chromium/feat_configure_launch_options_for_service_process.patch4141862
patch-fuzz update; no manual changes * chore: patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch sync4147787
patch-fuzz update; no manual changes * chore: update patches * chore: bump chromium in DEPS to 111.0.5536.0 * chore: sync patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch Xref:4141863
Sync with upstream code changes. Minor code golf for readability. Note: upstream is laying groundwork for being able to work off of env vars instead of switches. Doesn't affect us yet but worth being aware of. > + // Environment variables could be supported in the future, but are not > + // currently supported when launching with the zygote. * chore: update patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch Xref:4126836
patch-fuzz update; no manual changes * chore: sync electron/patches/chromium/feat_configure_launch_options_for_service_process.patch Xref:4141863
manual sync * chore: sync electron/patches/v8/fix_build_deprecated_attribute_for_older_msvc_versions.patch4147788
fuzz-patch * chore: rebuild patches * chore: bump chromium in DEPS to 111.0.5538.0 * chore: bump chromium in DEPS to 111.0.5540.0 * chore: update patches * Remove sdk_forward_declarations4166680
* task posting v3: Remove task runner handles from codebase entirely Refs4150928
* Cleanup child_process_launcher_helper* Refs4141863
* fix: utilityprocess spec on macOS * fix: build on windows Refs4141863
* chore: fix lint * chore: bump chromium 111.0.5544.3 * chore: gen filenames.libcxx.gni * Add check for Executable+Writable handles in renderer processes. Refs3774416
* fixup! Add check for Executable+Writable handles in renderer processes. * 4143761: [110] Disable SwiftShader for WebGL on M1 Macs.4143761
(cherry picked from commit 2f74db3c2139424c416f92d9169aeaa8a2f9c1ec) * chore: bump chromium to 111.0.5555.0 * 56085: Remove hmac.h include from ssl.h. https://boringssl-review.googlesource.com/c/boringssl/+/56085 * 4167020: Remove forwarding headers4167020
* chore: bump chromium to 111.0.5559.0 * 4181044: Restrict WebCursor usage to RenderWidgetHostViewAura4181044
* 4189437: views: rename ink_drop_host_view to ink_drop_host4189437
* chore: bump chromium to 111.0.5560.0 * 4167016: win7dep: remove non aeroglass code4167016
* fixup after rebase: Remove forwarding header s4167020
* 4125755: Reland "Reject getDisplayMedia calls without user activation"4125755
* test: add workaround * chore: update patches * fix: alter coreModuleRegExp to prevent arm crash * Revert "fix: alter coreModuleRegExp to prevent arm crash" This reverts commit 7e50630c98137831a711c5abdbc8809e60cf1d73. * 4218354: Disable the use of preserve_most on arm64 Windows4218354
* chore: review changes --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
446c7809cc
commit
d02c9f8bc6
244 changed files with 1051 additions and 927 deletions
|
@ -9,12 +9,12 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback_helpers.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/containers/span.h"
|
||||
#include "base/environment.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "base/values.h"
|
||||
|
@ -533,7 +533,7 @@ bool NotificationCallbackWrapper(
|
|||
callback.Run(cmd, cwd, std::move(additional_data));
|
||||
} else {
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner(
|
||||
base::ThreadTaskRunnerHandle::Get());
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault());
|
||||
|
||||
// Make a copy of the span so that the data isn't lost.
|
||||
task_runner->PostTask(FROM_HERE,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "shell/browser/api/electron_api_browser_view.h"
|
||||
|
@ -116,7 +117,8 @@ BaseWindow::~BaseWindow() {
|
|||
|
||||
// Destroy the native window in next tick because the native code might be
|
||||
// iterating all windows.
|
||||
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, window_.release());
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->DeleteSoon(
|
||||
FROM_HERE, window_.release());
|
||||
|
||||
// Remove global reference so the JS object can be garbage collected.
|
||||
self_ref_.Reset();
|
||||
|
@ -164,7 +166,8 @@ void BaseWindow::OnWindowClosed() {
|
|||
BaseWindow::ResetBrowserViews();
|
||||
|
||||
// Destroy the native class when window is closed.
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, GetDestroyClosure());
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, GetDestroyClosure());
|
||||
}
|
||||
|
||||
void BaseWindow::OnWindowEndSession() {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "shell/browser/api/electron_api_browser_window.h"
|
||||
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h" // nogncheck
|
||||
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck
|
||||
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
|
||||
|
@ -402,7 +402,7 @@ void BrowserWindow::ScheduleUnresponsiveEvent(int ms) {
|
|||
|
||||
window_unresponsive_closure_.Reset(base::BindRepeating(
|
||||
&BrowserWindow::NotifyWindowUnresponsive, GetWeakPtr()));
|
||||
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask(
|
||||
FROM_HERE, window_unresponsive_closure_.callback(),
|
||||
base::Milliseconds(ms));
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "mojo/public/cpp/system/data_pipe.h"
|
||||
#include "mojo/public/cpp/system/simple_watcher.h"
|
||||
#include "net/base/net_errors.h"
|
||||
|
@ -40,7 +41,7 @@ class DataPipeReader {
|
|||
data_pipe_getter_(std::move(data_pipe_getter)),
|
||||
handle_watcher_(FROM_HERE,
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunnerHandle::Get()) {
|
||||
base::SequencedTaskRunner::GetCurrentDefault()) {
|
||||
// Get a new data pipe and start.
|
||||
mojo::ScopedDataPipeProducerHandle producer_handle;
|
||||
CHECK_EQ(mojo::CreateDataPipe(nullptr, producer_handle, data_pipe_),
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <map>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/values.h"
|
||||
#include "content/public/browser/devtools_agent_host_client.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <memory>
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "net/base/filename_util.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/common/gin_converters/file_dialog_converter.h"
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#include "shell/browser/api/electron_api_event_emitter.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/callback.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "chrome/browser/extensions/global_shortcut_listener.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/wrappable.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "gin/arguments.h"
|
||||
#include "shell/browser/api/electron_api_base_window.h"
|
||||
#include "shell/browser/event_emitter_mixin.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "base/mac/scoped_sending_event.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
@ -64,7 +65,8 @@ void MenuMac::PopupAt(BaseWindow* window,
|
|||
base::BindOnce(&MenuMac::PopupOnUI, weak_factory_.GetWeakPtr(),
|
||||
native_window->GetWeakPtr(), window->weak_map_id(), x, y,
|
||||
positioning_item, std::move(callback_with_ref));
|
||||
base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(popup));
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(FROM_HERE,
|
||||
std::move(popup));
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> Menu::GetUserAcceleratorAt(int command_id) const {
|
||||
|
@ -161,8 +163,8 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
|||
void MenuMac::ClosePopupAt(int32_t window_id) {
|
||||
auto close_popup = base::BindOnce(&MenuMac::ClosePopupOnUI,
|
||||
weak_factory_.GetWeakPtr(), window_id);
|
||||
base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE,
|
||||
std::move(close_popup));
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, std::move(close_popup));
|
||||
}
|
||||
|
||||
std::u16string MenuMac::GetAcceleratorTextAtForTesting(int index) const {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "shell/browser/api/electron_api_native_theme.h"
|
||||
|
||||
#include "base/mac/sdk_forward_declarations.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
|
||||
namespace electron::api {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "components/net_log/chrome_net_log.h"
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/values.h"
|
||||
#include "gin/handle.h"
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/callback_helpers.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/functional/callback_helpers.h"
|
||||
#include "content/public/browser/device_service.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/function_template.h"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/handle.h"
|
||||
#include "shell/browser/browser.h"
|
||||
|
@ -120,20 +120,20 @@ static gfx::Rect DIPToScreenRect(electron::NativeWindow* window,
|
|||
#endif
|
||||
|
||||
void Screen::OnDisplayAdded(const display::Display& new_display) {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask(
|
||||
FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this),
|
||||
"display-added", new_display));
|
||||
}
|
||||
|
||||
void Screen::OnDisplayRemoved(const display::Display& old_display) {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask(
|
||||
FROM_HERE, base::BindOnce(&DelayEmit, base::Unretained(this),
|
||||
"display-removed", old_display));
|
||||
}
|
||||
|
||||
void Screen::OnDisplayMetricsChanged(const display::Display& display,
|
||||
uint32_t changed_metrics) {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostNonNestableTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostNonNestableTask(
|
||||
FROM_HERE, base::BindOnce(&DelayEmitWithMetrics, base::Unretained(this),
|
||||
"display-metrics-changed", display,
|
||||
MetricsToArray(changed_metrics)));
|
||||
|
|
|
@ -528,7 +528,7 @@ v8::Local<v8::Promise> Session::SetProxy(gin::Arguments* args) {
|
|||
createProxyConfig(proxy_mode, pac_url, proxy_rules, bypass_list)},
|
||||
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
|
||||
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(gin_helper::Promise<void>::ResolvePromise,
|
||||
std::move(promise)));
|
||||
|
||||
|
|
|
@ -15,11 +15,9 @@
|
|||
#import <Security/Security.h>
|
||||
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/mac/sdk_forward_declarations.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/threading/sequenced_task_runner_handle.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"
|
||||
#include "net/base/mac/url_conversions.h"
|
||||
|
@ -450,7 +448,7 @@ v8::Local<v8::Promise> SystemPreferences::PromptTouchID(
|
|||
nullptr));
|
||||
|
||||
scoped_refptr<base::SequencedTaskRunner> runner =
|
||||
base::SequencedTaskRunnerHandle::Get();
|
||||
base::SequencedTaskRunner::GetCurrentDefault();
|
||||
|
||||
__block gin_helper::Promise<void> p = std::move(promise);
|
||||
[context
|
||||
|
|
|
@ -74,7 +74,7 @@ std::string ConvertDeviceAccessStatus(DeviceAccessStatus value) {
|
|||
namespace api {
|
||||
|
||||
bool SystemPreferences::IsAeroGlassEnabled() {
|
||||
return ui::win::IsAeroGlassEnabled();
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string hexColorDWORDToRGBA(DWORD color) {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/process/kill.h"
|
||||
#include "base/process/launch.h"
|
||||
#include "base/process/process.h"
|
||||
#include "content/public/browser/child_process_host.h"
|
||||
#include "content/public/browser/service_process_host.h"
|
||||
#include "content/public/common/child_process_host.h"
|
||||
#include "content/public/common/result_codes.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
|
@ -187,7 +187,7 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
|||
connector_ = std::make_unique<mojo::Connector>(
|
||||
host_port_.TakeHandleToEntangleWithEmbedder(),
|
||||
mojo::Connector::SINGLE_THREADED_SEND,
|
||||
base::ThreadTaskRunnerHandle::Get());
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault());
|
||||
connector_->set_incoming_receiver(this);
|
||||
connector_->set_connection_error_handler(base::BindOnce(
|
||||
&UtilityProcessWrapper::CloseConnectorPort, weak_factory_.GetWeakPtr()));
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
#include "base/task/current_thread.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "base/threading/scoped_blocking_call.h"
|
||||
#include "base/threading/sequenced_task_runner_handle.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
|
||||
|
@ -1605,6 +1603,13 @@ void WebContents::RenderFrameDeleted(
|
|||
|
||||
void WebContents::RenderFrameHostChanged(content::RenderFrameHost* old_host,
|
||||
content::RenderFrameHost* new_host) {
|
||||
if (new_host->IsInPrimaryMainFrame()) {
|
||||
if (old_host)
|
||||
old_host->GetRenderWidgetHost()->RemoveInputEventObserver(this);
|
||||
if (new_host)
|
||||
new_host->GetRenderWidgetHost()->AddInputEventObserver(this);
|
||||
}
|
||||
|
||||
// During cross-origin navigation, a FrameTreeNode will swap out its RFH.
|
||||
// If an instance of WebFrameMain exists, it will need to have its RFH
|
||||
// swapped as well.
|
||||
|
@ -1702,14 +1707,6 @@ void WebContents::OnWebContentsLostFocus(
|
|||
Emit("blur");
|
||||
}
|
||||
|
||||
void WebContents::RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) {
|
||||
if (old_host)
|
||||
old_host->GetWidget()->RemoveInputEventObserver(this);
|
||||
if (new_host)
|
||||
new_host->GetWidget()->AddInputEventObserver(this);
|
||||
}
|
||||
|
||||
void WebContents::DOMContentLoaded(
|
||||
content::RenderFrameHost* render_frame_host) {
|
||||
auto* web_frame = WebFrameMain::FromRenderFrameHost(render_frame_host);
|
||||
|
@ -3282,9 +3279,7 @@ bool WebContents::IsBeingCaptured() {
|
|||
return web_contents()->IsBeingCaptured();
|
||||
}
|
||||
|
||||
void WebContents::OnCursorChanged(const content::WebCursor& webcursor) {
|
||||
const ui::Cursor& cursor = webcursor.cursor();
|
||||
|
||||
void WebContents::OnCursorChanged(const ui::Cursor& cursor) {
|
||||
if (cursor.type() == ui::mojom::CursorType::kCustom) {
|
||||
Emit("cursor-changed", CursorTypeToString(cursor),
|
||||
gfx::Image::CreateFrom1xBitmap(cursor.custom_bitmap()),
|
||||
|
@ -3550,8 +3545,10 @@ v8::Local<v8::Promise> WebContents::TakeHeapSnapshot(
|
|||
v8::Local<v8::Promise> handle = promise.GetHandle();
|
||||
|
||||
ScopedAllowBlockingForElectron allow_blocking;
|
||||
base::File file(file_path,
|
||||
base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
|
||||
uint32_t flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
|
||||
// The snapshot file is passed to an untrusted process.
|
||||
flags = base::File::AddFlagsForPassingToUntrustedProcess(flags);
|
||||
base::File file(file_path, flags);
|
||||
if (!file.IsValid()) {
|
||||
promise.RejectWithErrorMessage("takeHeapSnapshot failed");
|
||||
return handle;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "chrome/browser/devtools/devtools_eye_dropper.h"
|
||||
#include "chrome/browser/devtools/devtools_file_system_indexer.h"
|
||||
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h" // nogncheck
|
||||
#include "content/common/cursors/webcursor.h"
|
||||
#include "content/common/frame.mojom.h"
|
||||
#include "content/public/browser/devtools_agent_host.h"
|
||||
#include "content/public/browser/keyboard_event_processing_result.h"
|
||||
|
@ -42,6 +41,7 @@
|
|||
#include "shell/common/gin_helper/constructible.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
#include "shell/common/gin_helper/pinnable.h"
|
||||
#include "ui/base/cursor/cursor.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
|
@ -619,14 +619,12 @@ class WebContents : public ExclusiveAccessContext,
|
|||
const content::MediaPlayerId& id,
|
||||
content::WebContentsObserver::MediaStoppedReason reason) override;
|
||||
void DidChangeThemeColor() override;
|
||||
void OnCursorChanged(const content::WebCursor& cursor) override;
|
||||
void OnCursorChanged(const ui::Cursor& cursor) override;
|
||||
void DidAcquireFullscreen(content::RenderFrameHost* rfh) override;
|
||||
void OnWebContentsFocused(
|
||||
content::RenderWidgetHost* render_widget_host) override;
|
||||
void OnWebContentsLostFocus(
|
||||
content::RenderWidgetHost* render_widget_host) override;
|
||||
void RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) override;
|
||||
|
||||
// InspectableWebContentsDelegate:
|
||||
void DevToolsReloadPage() override;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/values.h"
|
||||
#include "extensions/browser/api/web_request/web_request_resource_type.h"
|
||||
#include "gin/converter.h"
|
||||
|
@ -505,7 +506,7 @@ void WebRequest::OnListenerResult(uint64_t id,
|
|||
|
||||
// The ProxyingURLLoaderFactory expects the callback to be executed
|
||||
// asynchronously, because it used to work on IO thread before NetworkService.
|
||||
base::SequencedTaskRunnerHandle::Get()->PostTask(
|
||||
base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(callbacks_[id]), result));
|
||||
callbacks_.erase(iter);
|
||||
}
|
||||
|
|
|
@ -27,9 +27,7 @@ FrameSubscriber::FrameSubscriber(content::WebContents* web_contents,
|
|||
: content::WebContentsObserver(web_contents),
|
||||
callback_(callback),
|
||||
only_dirty_(only_dirty) {
|
||||
content::RenderViewHost* rvh = web_contents->GetRenderViewHost();
|
||||
if (rvh)
|
||||
AttachToHost(rvh->GetWidget());
|
||||
AttachToHost(web_contents->GetPrimaryMainFrame()->GetRenderWidgetHost());
|
||||
}
|
||||
|
||||
FrameSubscriber::~FrameSubscriber() = default;
|
||||
|
@ -72,11 +70,11 @@ void FrameSubscriber::RenderViewDeleted(content::RenderViewHost* host) {
|
|||
}
|
||||
}
|
||||
|
||||
void FrameSubscriber::RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) {
|
||||
if ((old_host && old_host->GetWidget() == host_) || (!old_host && !host_)) {
|
||||
void FrameSubscriber::PrimaryPageChanged(content::Page& page) {
|
||||
if (auto* host = page.GetMainDocument().GetMainFrame()->GetRenderWidgetHost();
|
||||
host_ != host) {
|
||||
DetachFromHost();
|
||||
AttachToHost(new_host->GetWidget());
|
||||
AttachToHost(host);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "components/viz/host/client_frame_sink_video_capturer.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
@ -46,9 +46,8 @@ class FrameSubscriber : public content::WebContentsObserver,
|
|||
void DetachFromHost();
|
||||
|
||||
void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
|
||||
void PrimaryPageChanged(content::Page& page) override;
|
||||
void RenderViewDeleted(content::RenderViewHost* host) override;
|
||||
void RenderViewHostChanged(content::RenderViewHost* old_host,
|
||||
content::RenderViewHost* new_host) override;
|
||||
|
||||
// viz::mojom::FrameSinkVideoConsumer implementation.
|
||||
void OnFrameCaptured(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "gpu/config/gpu_info_collector.h"
|
||||
#include "shell/browser/api/gpu_info_enumerator.h"
|
||||
|
@ -54,7 +54,7 @@ void GPUInfoManager::OnGpuInfoUpdate() {
|
|||
// Ignore if called when not asked for complete GPUInfo
|
||||
if (NeedsCompleteGpuInfoCollection())
|
||||
return;
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&GPUInfoManager::ProcessCompleteInfo,
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ void GPUInfoManager::CompleteInfoFetcher(
|
|||
|
||||
void GPUInfoManager::FetchCompleteInfo(
|
||||
gin_helper::Promise<base::Value> promise) {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&GPUInfoManager::CompleteInfoFetcher,
|
||||
base::Unretained(this), std::move(promise)));
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "gin/arguments.h"
|
||||
#include "gin/data_object_builder.h"
|
||||
#include "gin/handle.h"
|
||||
|
@ -128,7 +129,7 @@ void MessagePort::Entangle(blink::MessagePortDescriptor port) {
|
|||
connector_ = std::make_unique<mojo::Connector>(
|
||||
port_.TakeHandleToEntangleWithEmbedder(),
|
||||
mojo::Connector::SINGLE_THREADED_SEND,
|
||||
base::ThreadTaskRunnerHandle::Get());
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault());
|
||||
connector_->PauseIncomingMethodCallProcessing();
|
||||
connector_->set_incoming_receiver(this);
|
||||
connector_->set_connection_error_handler(
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue