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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/browser/extensions/extension_tabs_module.h ('k') | chrome/browser/extensions/extension_test_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.cc
===================================================================
--- chrome/browser/extensions/extension_tabs_module.cc (revision 91968)
+++ chrome/browser/extensions/extension_tabs_module.cc (working copy)
@@ -27,6 +27,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/window_sizer.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_error_utils.h"
@@ -1205,7 +1206,7 @@
TabContentsWrapper* wrapper = browser->GetSelectedTabContentsWrapper();
wrapper->CaptureSnapshot();
registrar_.Add(this,
- NotificationType::TAB_SNAPSHOT_TAKEN,
+ chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
Source<TabContentsWrapper>(wrapper));
AddRef(); // Balanced in CaptureVisibleTabFunction::Observe().
@@ -1234,10 +1235,10 @@
// If a backing store was not available in CaptureVisibleTabFunction::RunImpl,
// than the renderer was asked for a snapshot. Listen for a notification
// that the snapshot is available.
-void CaptureVisibleTabFunction::Observe(NotificationType type,
+void CaptureVisibleTabFunction::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::TAB_SNAPSHOT_TAKEN);
+ DCHECK(type == chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN);
const SkBitmap *screen_capture = Details<const SkBitmap>(details).ptr();
const bool error = screen_capture->empty();
@@ -1347,20 +1348,20 @@
}
// The tab contents does not know its language yet. Let's wait until it
// receives it, or until the tab is closed/navigates to some other page.
- registrar_.Add(this, NotificationType::TAB_LANGUAGE_DETERMINED,
+ registrar_.Add(this, chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
Source<TabContents>(contents->tab_contents()));
- registrar_.Add(this, NotificationType::TAB_CLOSING,
+ registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
Source<NavigationController>(&(contents->controller())));
- registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
+ registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
Source<NavigationController>(&(contents->controller())));
return true;
}
-void DetectTabLanguageFunction::Observe(NotificationType type,
+void DetectTabLanguageFunction::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
std::string language;
- if (type == NotificationType::TAB_LANGUAGE_DETERMINED)
+ if (type == chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED)
language = *Details<std::string>(details).ptr();
registrar_.RemoveAll();
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.h ('k') | chrome/browser/extensions/extension_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698