Commit e91d21ce authored by Leonard Grey's avatar Leonard Grey Committed by Chromium LUCI CQ

[Code health] Finish converting DevtoolsWindow creation callback to repeating

Looks like I missed these in r835679

Bug: 1152274
Change-Id: I9ab585c62c753b2945b88a77ad1c3938f6693dae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626513Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843565}
parent d7d90146
...@@ -88,7 +88,8 @@ typedef std::vector<DevToolsWindow*> DevToolsWindows; ...@@ -88,7 +88,8 @@ typedef std::vector<DevToolsWindow*> DevToolsWindows;
base::LazyInstance<DevToolsWindows>::Leaky g_devtools_window_instances = base::LazyInstance<DevToolsWindows>::Leaky g_devtools_window_instances =
LAZY_INSTANCE_INITIALIZER; LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<std::vector<base::Callback<void(DevToolsWindow*)>>>::Leaky base::LazyInstance<
std::vector<base::RepeatingCallback<void(DevToolsWindow*)>>>::Leaky
g_creation_callbacks = LAZY_INSTANCE_INITIALIZER; g_creation_callbacks = LAZY_INSTANCE_INITIALIZER;
static const char kKeyUpEventName[] = "keyup"; static const char kKeyUpEventName[] = "keyup";
...@@ -1032,7 +1033,7 @@ DevToolsWindow::DevToolsWindow(FrontendType frontend_type, ...@@ -1032,7 +1033,7 @@ DevToolsWindow::DevToolsWindow(FrontendType frontend_type,
// so that it shows up in the task manager. // so that it shows up in the task manager.
task_manager::WebContentsTags::CreateForDevToolsContents(main_web_contents_); task_manager::WebContentsTags::CreateForDevToolsContents(main_web_contents_);
std::vector<base::Callback<void(DevToolsWindow*)>> copy( std::vector<base::RepeatingCallback<void(DevToolsWindow*)>> copy(
g_creation_callbacks.Get()); g_creation_callbacks.Get());
for (const auto& callback : copy) for (const auto& callback : copy)
callback.Run(this); callback.Run(this);
......
...@@ -81,7 +81,7 @@ class DevToolsWindowCreationObserver { ...@@ -81,7 +81,7 @@ class DevToolsWindowCreationObserver {
void DevToolsWindowCreated(DevToolsWindow* devtools_window); void DevToolsWindowCreated(DevToolsWindow* devtools_window);
base::Callback<void(DevToolsWindow*)> creation_callback_; base::RepeatingCallback<void(DevToolsWindow*)> creation_callback_;
DevToolsWindows devtools_windows_; DevToolsWindows devtools_windows_;
scoped_refptr<content::MessageLoopRunner> runner_; scoped_refptr<content::MessageLoopRunner> runner_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment