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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.h

Issue 10692097: Introduce webNavigation.onTabReplaced event that is fired when a tab from instant or prerender repl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 5 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 | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.h
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
index b5a3c964a5bb10af628b20322527dcd8d908420a..5325a7892a22644299b594396e721afffed7a548 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
@@ -15,6 +15,8 @@
#include "base/compiler_specific.h"
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
@@ -193,7 +195,9 @@ class WebNavigationTabObserver : public content::NotificationObserver,
// Observes navigation notifications and routes them as events to the extension
// system.
-class WebNavigationEventRouter : public content::NotificationObserver {
+class WebNavigationEventRouter : public TabStripModelObserver,
+ public BrowserList::Observer,
+ public content::NotificationObserver {
public:
explicit WebNavigationEventRouter(Profile* profile);
virtual ~WebNavigationEventRouter();
@@ -220,6 +224,16 @@ class WebNavigationEventRouter : public content::NotificationObserver {
GURL target_url;
};
+ // TabStripModelObserver implementation.
+ virtual void TabReplacedAt(TabStripModel* tab_strip_model,
+ TabContents* old_contents,
+ TabContents* new_contents,
+ int index) OVERRIDE;
+
+ // BrowserList::Observer implementation.
+ virtual void OnBrowserAdded(Browser* browser) OVERRIDE;
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
+
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
« no previous file with comments | « no previous file | chrome/browser/extensions/api/web_navigation/web_navigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698