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

Unified Diff: chrome/browser/ui/chrome_web_contents_observer.h

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years, 4 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/chrome_web_contents_observer.h
diff --git a/chrome/browser/ui/chrome_web_contents_observer.h b/chrome/browser/ui/chrome_web_contents_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..838be2db36ca14ca2e68c66b0fecd06d601a36b0
--- /dev/null
+++ b/chrome/browser/ui/chrome_web_contents_observer.h
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_CHROME_WEB_CONTENTS_OBSERVER_H_
+#define CHROME_BROWSER_UI_CHROME_WEB_CONTENTS_OBSERVER_H_
+
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+
+class ChromeBubbleManager;
+
+class ChromeWebContentsObserver
hcarmona 2015/08/06 17:43:44 Move this to anon. namespace in chrome bubble mana
+ : public content::WebContentsObserver,
+ public content::WebContentsUserData<ChromeWebContentsObserver> {
+ public:
+ ~ChromeWebContentsObserver() override;
+
+ void SetBubbleManager(ChromeBubbleManager* manager);
+
+ // WebContentsObserver:
+ void NavigationEntryCommitted(
+ const content::LoadCommittedDetails& details) override;
+ void WebContentsDestroyed() override;
+
+ private:
+ friend class content::WebContentsUserData<ChromeWebContentsObserver>;
+
+ explicit ChromeWebContentsObserver(content::WebContents* web_contents);
+
+ // Weak.
+ ChromeBubbleManager* manager_;
+};
+
+#endif // CHROME_BROWSER_UI_CHROME_WEB_CONTENTS_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698