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

Unified Diff: chrome/browser/extensions/browser_event_router.h

Issue 10696208: Move ExtensionEventRouter and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed bug + latest master 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
Index: chrome/browser/extensions/browser_event_router.h
diff --git a/chrome/browser/extensions/extension_browser_event_router.h b/chrome/browser/extensions/browser_event_router.h
similarity index 93%
rename from chrome/browser/extensions/extension_browser_event_router.h
rename to chrome/browser/extensions/browser_event_router.h
index 9dd8b971fce9ddd3b3d0442e672556a4bb375b96..a82ced1f1707b92eea661628d0cb4ae8d95318bb 100644
--- a/chrome/browser/extensions/extension_browser_event_router.h
+++ b/chrome/browser/extensions/browser_event_router.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_EVENT_ROUTER_H_
+#define CHROME_BROWSER_EXTENSIONS_BROWSER_EVENT_ROUTER_H_
#include <map>
#include <string>
@@ -25,12 +25,14 @@ namespace content {
class WebContents;
}
-// The ExtensionBrowserEventRouter listens to Browser window & tab events
+namespace extensions {
+
+// The BrowserEventRouter listens to Browser window & tab events
// and routes them to listeners inside extension process renderers.
-// ExtensionBrowserEventRouter listens to *all* events, but will only route
+// BrowserEventRouter listens to *all* events, but will only route
// events from windows/tabs within a profile to extension processes in the same
// profile.
-class ExtensionBrowserEventRouter : public TabStripModelObserver,
+class BrowserEventRouter : public TabStripModelObserver,
#if defined(TOOLKIT_VIEWS)
public views::WidgetFocusChangeListener,
#elif defined(TOOLKIT_GTK)
@@ -39,8 +41,8 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
public chrome::BrowserListObserver,
public content::NotificationObserver {
public:
- explicit ExtensionBrowserEventRouter(Profile* profile);
- virtual ~ExtensionBrowserEventRouter();
+ explicit BrowserEventRouter(Profile* profile);
+ virtual ~BrowserEventRouter();
// Must be called once. Subsequent calls have no effect.
void Init();
@@ -121,7 +123,7 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
void TabUpdated(content::WebContents* contents, bool did_navigate);
// The DispatchEvent methods forward events to the |profile|'s event router.
- // The ExtensionBrowserEventRouter listens to events for all profiles,
+ // The BrowserEventRouter listens to events for all profiles,
// so we avoid duplication by dropping events destined for other profiles.
void DispatchEvent(Profile* profile,
const char* event_name,
@@ -236,7 +238,9 @@ class ExtensionBrowserEventRouter : public TabStripModelObserver,
// windows.onFocusChanged events with the same windowId.
int focused_window_id_;
- DISALLOW_COPY_AND_ASSIGN(ExtensionBrowserEventRouter);
+ DISALLOW_COPY_AND_ASSIGN(BrowserEventRouter);
};
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_EVENT_ROUTER_H_
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_BROWSER_EVENT_ROUTER_H_

Powered by Google App Engine
This is Rietveld 408576698