Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: extensions/browser/process_manager.h

Issue 2419943002: [DevTools] Migrate from AgentStateCallbacks to DevToolsAgentHostObserver. (Closed)
Patch Set: mac Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/app_window/app_window_registry.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.h
diff --git a/extensions/browser/process_manager.h b/extensions/browser/process_manager.h
index bcd3192bbc8b78a73f3139f6a11d714966ce0599..c192e402be669762542f6218adc92b85958d7d0e 100644
--- a/extensions/browser/process_manager.h
+++ b/extensions/browser/process_manager.h
@@ -18,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "content/public/browser/devtools_agent_host_observer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "extensions/browser/event_page_tracker.h"
@@ -48,7 +49,8 @@ class ProcessManagerObserver;
class ProcessManager : public KeyedService,
public content::NotificationObserver,
public ExtensionRegistryObserver,
- public EventPageTracker {
+ public EventPageTracker,
+ public content::DevToolsAgentHostObserver {
public:
using ExtensionHostSet = std::set<extensions::ExtensionHost*>;
@@ -267,7 +269,14 @@ class ProcessManager : public KeyedService,
void CloseLazyBackgroundPageNow(const std::string& extension_id,
uint64_t sequence_id);
- void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached);
+ const Extension* GetExtensionForAgentHost(
+ content::DevToolsAgentHost* agent_host);
+
+ // content::DevToolsAgentHostObserver overrides.
+ void DevToolsAgentHostAttached(
+ content::DevToolsAgentHost* agent_host) override;
+ void DevToolsAgentHostDetached(
+ content::DevToolsAgentHost* agent_host) override;
// Unregister RenderFrameHosts and clear background page data for an extension
// which has been unloaded.
@@ -299,8 +308,6 @@ class ProcessManager : public KeyedService,
// True if we have created the startup set of background hosts.
bool startup_background_hosts_created_;
- base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
-
ImpulseCallbackForTesting keepalive_impulse_callback_for_testing_;
ImpulseCallbackForTesting keepalive_impulse_decrement_callback_for_testing_;
« no previous file with comments | « extensions/browser/app_window/app_window_registry.cc ('k') | extensions/browser/process_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698