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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.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
Index: chrome/browser/ui/webui/ntp/new_tab_ui.cc
===================================================================
--- chrome/browser/ui/webui/ntp/new_tab_ui.cc (revision 91771)
+++ chrome/browser/ui/webui/ntp/new_tab_ui.cc (working copy)
@@ -40,6 +40,7 @@
#include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
#include "chrome/browser/ui/webui/ntp/value_helper.h"
#include "chrome/browser/ui/webui/theme_source.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/pref_names.h"
@@ -266,7 +267,7 @@
NOTREACHED();
}
NotificationService::current()->Notify(
- NotificationType::METRIC_EVENT_DURATION,
+ chrome::METRIC_EVENT_DURATION,
Source<TabContents>(tab),
Details<MetricEventDurationDetails>(&details));
}
@@ -339,7 +340,7 @@
const ListValue* args) {
web_ui_->GetProfile()->GetPrefs()->SetBoolean(prefs::kNTPPromoClosed, true);
NotificationService* service = NotificationService::current();
- service->Notify(NotificationType::PROMO_RESOURCE_STATE_CHANGED,
+ service->Notify(chrome::PROMO_RESOURCE_STATE_CHANGED,
Source<NewTabPageClosePromoHandler>(this),
NotificationService::NoDetails());
}
@@ -409,11 +410,11 @@
contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
// Listen for theme installation.
- registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ registrar_.Add(this, chrome::BROWSER_THEME_CHANGED,
Source<ThemeService>(
ThemeServiceFactory::GetForProfile(GetProfile())));
// Listen for bookmark bar visibility changes.
- registrar_.Add(this, NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
+ registrar_.Add(this, chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED,
NotificationService::AllSources());
}
@@ -431,7 +432,7 @@
base::TimeDelta load_time = last_paint_ - start_;
int load_time_ms = static_cast<int>(load_time.InMilliseconds());
NotificationService::current()->Notify(
- NotificationType::INITIAL_NEW_TAB_UI_LOAD,
+ chrome::INITIAL_NEW_TAB_UI_LOAD,
NotificationService::AllSources(),
Details<int>(&load_time_ms));
UMA_HISTOGRAM_TIMES("NewTabUI load", load_time);
@@ -465,7 +466,7 @@
const NotificationSource& source,
const NotificationDetails& details) {
switch (type.value) {
- case NotificationType::BROWSER_THEME_CHANGED: {
+ case chrome::BROWSER_THEME_CHANGED: {
InitializeCSSCaches();
ListValue args;
args.Append(Value::CreateStringValue(
@@ -475,7 +476,7 @@
CallJavascriptFunction("themeChanged", args);
break;
}
- case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: {
+ case chrome::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: {
if (GetProfile()->GetPrefs()->IsManagedPreference(
prefs::kEnableBookmarkBar)) {
break;

Powered by Google App Engine
This is Rietveld 408576698