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

Unified Diff: chrome/browser/ui/views/extensions/extension_popup.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
Index: chrome/browser/ui/views/extensions/extension_popup.h
diff --git a/chrome/browser/ui/views/extensions/extension_popup.h b/chrome/browser/ui/views/extensions/extension_popup.h
index af79bdf78010e423cfde329d0b992960aa702215..2692d913262f9e645bfc9d26d8db33877dffa614 100644
--- a/chrome/browser/ui/views/extensions/extension_popup.h
+++ b/chrome/browser/ui/views/extensions/extension_popup.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/extensions/extension_view_views.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 "ui/views/bubble/bubble_dialog_delegate.h"
@@ -33,7 +34,8 @@ class ExtensionViewHost;
class ExtensionPopup : public views::BubbleDialogDelegateView,
public ExtensionViewViews::Container,
public content::NotificationObserver,
- public TabStripModelObserver {
+ public TabStripModelObserver,
+ public content::DevToolsAgentHostObserver {
public:
enum ShowAction {
SHOW,
@@ -107,7 +109,11 @@ class ExtensionPopup : public views::BubbleDialogDelegateView,
// Show the bubble, focus on its content, and register listeners.
void ShowBubble();
- void OnDevToolsStateChanged(content::DevToolsAgentHost*, bool attached);
+ // content::DevToolsAgentHostObserver overrides.
+ void DevToolsAgentHostAttached(
+ content::DevToolsAgentHost* agent_host) override;
+ void DevToolsAgentHostDetached(
+ content::DevToolsAgentHost* agent_host) override;
// The contained host for the view.
std::unique_ptr<extensions::ExtensionViewHost> host_;
@@ -118,8 +124,6 @@ class ExtensionPopup : public views::BubbleDialogDelegateView,
content::NotificationRegistrar registrar_;
- base::Callback<void(content::DevToolsAgentHost*, bool)> devtools_callback_;
-
bool widget_initialized_;
DISALLOW_COPY_AND_ASSIGN(ExtensionPopup);

Powered by Google App Engine
This is Rietveld 408576698