summaryrefslogtreecommitdiffstats
path: root/ui/message_center/notifier_settings.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 20:22:10 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-08 20:22:10 +0000
commit70972786c4482be756009025b0750e4e72a3d088 (patch)
treed275122c00bdff05570193a432dd2cbe9a3a9799 /ui/message_center/notifier_settings.cc
parente9c42d5cb01ffdc5956e226190208a915f321bbb (diff)
downloadchromium_src-70972786c4482be756009025b0750e4e72a3d088.zip
chromium_src-70972786c4482be756009025b0750e4e72a3d088.tar.gz
chromium_src-70972786c4482be756009025b0750e4e72a3d088.tar.bz2
Break the dependency of MessageCenterSettingsController on views.
This refactors NotifierSettingsViewDelegate into a NotifierSettingsProvider (controller), a NotifierSettingsDelegate (view), and a function ShowSettings() to bring up up the UI. BUG=179916 Review URL: https://codereview.chromium.org/12614009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/message_center/notifier_settings.cc')
-rw-r--r--ui/message_center/notifier_settings.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/ui/message_center/notifier_settings.cc b/ui/message_center/notifier_settings.cc
new file mode 100644
index 0000000..78246f5
--- /dev/null
+++ b/ui/message_center/notifier_settings.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/message_center/notifier_settings.h"
+
+namespace message_center {
+
+#if !defined(TOOLKIT_VIEWS)
+NotifierSettingsDelegate* ShowSettings(NotifierSettingsProvider* provider,
+ gfx::NativeView context) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+#endif
+
+Notifier::Notifier(const std::string& id,
+ const string16& name,
+ bool enabled)
+ : id(id),
+ name(name),
+ enabled(enabled),
+ type(APPLICATION) {
+}
+
+Notifier::Notifier(const GURL& url, const string16& name, bool enabled)
+ : url(url),
+ name(name),
+ enabled(enabled),
+ type(WEB_PAGE) {
+}
+
+Notifier::~Notifier() {
+}
+
+} // namespace message_center