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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.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/options/content_settings_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/content_settings_handler.cc (revision 91968)
+++ chrome/browser/ui/webui/options/content_settings_handler.cc (working copy)
@@ -21,13 +21,14 @@
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/content_settings_helper.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "content/common/content_notification_types.h"
#include "content/common/notification_service.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "ui/base/l10n/l10n_util.h"
@@ -268,25 +269,25 @@
void ContentSettingsHandler::Initialize() {
const HostContentSettingsMap* settings_map = GetContentSettingsMap();
notification_registrar_.Add(
- this, NotificationType::OTR_PROFILE_CREATED,
+ this, chrome::NOTIFICATION_OTR_PROFILE_CREATED,
NotificationService::AllSources());
notification_registrar_.Add(
- this, NotificationType::PROFILE_DESTROYED,
+ this, chrome::NOTIFICATION_PROFILE_DESTROYED,
NotificationService::AllSources());
UpdateHandlersEnabledRadios();
UpdateAllExceptionsViewsFromModel();
notification_registrar_.Add(
- this, NotificationType::CONTENT_SETTINGS_CHANGED,
+ this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED,
Source<HostContentSettingsMap>(settings_map));
notification_registrar_.Add(
- this, NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED,
+ this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_DEFAULT_CHANGED,
NotificationService::AllSources());
notification_registrar_.Add(
- this, NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
+ this, chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
NotificationService::AllSources());
notification_registrar_.Add(
- this, NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED,
+ this, chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED,
NotificationService::AllSources());
PrefService* prefs = web_ui_->GetProfile()->GetPrefs();
@@ -295,11 +296,11 @@
pref_change_registrar_.Add(prefs::kGeolocationContentSettings, this);
}
-void ContentSettingsHandler::Observe(NotificationType type,
+void ContentSettingsHandler::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::PROFILE_DESTROYED: {
+ switch (type) {
+ case chrome::NOTIFICATION_PROFILE_DESTROYED: {
Profile* profile = static_cast<Source<Profile> >(source).ptr();
if (profile->IsOffTheRecord()) {
web_ui_->CallJavascriptFunction(
@@ -308,12 +309,12 @@
break;
}
- case NotificationType::OTR_PROFILE_CREATED: {
+ case chrome::NOTIFICATION_OTR_PROFILE_CREATED: {
UpdateAllOTRExceptionsViewsFromModel();
break;
}
- case NotificationType::CONTENT_SETTINGS_CHANGED: {
+ case chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED: {
const ContentSettingsDetails* settings_details =
Details<const ContentSettingsDetails>(details).ptr();
@@ -325,7 +326,7 @@
break;
}
- case NotificationType::PREF_CHANGED: {
+ case chrome::NOTIFICATION_PREF_CHANGED: {
const std::string& pref_name = *Details<std::string>(details).ptr();
if (pref_name == prefs::kGeolocationDefaultContentSetting)
UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_GEOLOCATION);
@@ -334,17 +335,17 @@
break;
}
- case NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED: {
+ case chrome::NOTIFICATION_DESKTOP_NOTIFICATION_DEFAULT_CHANGED: {
UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
break;
}
- case NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED: {
+ case chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED: {
UpdateNotificationExceptionsView();
break;
}
- case NotificationType::PROTOCOL_HANDLER_REGISTRY_CHANGED: {
+ case chrome::NOTIFICATION_PROTOCOL_HANDLER_REGISTRY_CHANGED: {
UpdateHandlersEnabledRadios();
break;
}
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.h ('k') | chrome/browser/ui/webui/options/core_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698