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

Unified Diff: chrome/browser/extensions/extension_browser_event_router.cc

Issue 8983012: Get rid of content::NavigationController in cc file and use "using" instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 12 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/extension_browser_event_router.cc
===================================================================
--- chrome/browser/extensions/extension_browser_event_router.cc (revision 116288)
+++ chrome/browser/extensions/extension_browser_event_router.cc (working copy)
@@ -30,6 +30,7 @@
namespace tab_keys = extension_tabs_module_constants;
namespace page_action_keys = extension_page_actions_module_constants;
+using content::NavigationController;
using content::WebContents;
ExtensionBrowserEventRouter::TabEntry::TabEntry()
@@ -149,8 +150,7 @@
WebContents* contents) {
registrar_.Add(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
- &contents->GetController()));
+ content::Source<NavigationController>(&contents->GetController()));
// Observing TAB_CONTENTS_DESTROYED is necessary because it's
// possible for tabs to be created, detached and then destroyed without
@@ -163,8 +163,7 @@
void ExtensionBrowserEventRouter::UnregisterForTabNotifications(
WebContents* contents) {
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
- &contents->GetController()));
+ content::Source<NavigationController>(&contents->GetController()));
registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<WebContents>(contents));
}
@@ -542,15 +541,14 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
- content::NavigationController* source_controller =
- content::Source<content::NavigationController>(source).ptr();
+ NavigationController* source_controller =
+ content::Source<NavigationController>(source).ptr();
TabUpdated(source_controller->GetWebContents(), true);
} else if (type == content::NOTIFICATION_WEB_CONTENTS_DESTROYED) {
// Tab was destroyed after being detached (without being re-attached).
WebContents* contents = content::Source<WebContents>(source).ptr();
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<content::NavigationController>(
- &contents->GetController()));
+ content::Source<NavigationController>(&contents->GetController()));
registrar_.Remove(this, content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<WebContents>(contents));
} else if (type == chrome::NOTIFICATION_BROWSER_WINDOW_READY) {
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/extensions/extension_browsertests_misc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698