summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-25 10:40:08 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-25 10:40:08 +0000
commite3270f1d393a374f3d60ffb532ec5d78ee674669 (patch)
treec3364cfcb76282f3af690c0e5e10f154380382e9 /chrome/browser/ui
parentc059dabc305ba73ff8b0eeab96cef04d3adeecf1 (diff)
downloadchromium_src-e3270f1d393a374f3d60ffb532ec5d78ee674669.zip
chromium_src-e3270f1d393a374f3d60ffb532ec5d78ee674669.tar.gz
chromium_src-e3270f1d393a374f3d60ffb532ec5d78ee674669.tar.bz2
Introduces 'context' param to NotifierSettingsView.
I don't know why the existing code was once running on my local environment, but 'context' parameter in WidgetParams is mandatory in Aura. To specify the context properly, the best way would be to add another method to show the settings window with the current context. BUG=None Review URL: https://chromiumcodereview.appspot.com/12052057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178815 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc10
-rw-r--r--chrome/browser/ui/views/ash/balloon_collection_impl_ash.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
index 1045490..8d0e37d 100644
--- a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
+++ b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc
@@ -21,6 +21,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/permissions/api_permission.h"
+#include "ui/views/widget/widget.h"
using message_center::NotifierSettingsView;
@@ -85,6 +86,15 @@ void BalloonCollectionImplAsh::ShowSettings(
chrome::ShowContentSettings(browser, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
}
+void BalloonCollectionImplAsh::ShowSettingsDialog(gfx::NativeView context) {
+ if (settings_view_) {
+ settings_view_->GetWidget()->StackAtTop();
+ } else {
+ settings_view_ =
+ message_center::NotifierSettingsView::Create(this, context);
+ }
+}
+
void BalloonCollectionImplAsh::OnClicked(const std::string& notification_id) {
Balloon* balloon = base().FindBalloonById(notification_id);
if (!balloon)
diff --git a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.h b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.h
index b99d477..ac96886 100644
--- a/chrome/browser/ui/views/ash/balloon_collection_impl_ash.h
+++ b/chrome/browser/ui/views/ash/balloon_collection_impl_ash.h
@@ -33,6 +33,7 @@ class BalloonCollectionImplAsh
virtual void DisableNotificationsFromSource(
const std::string& notification_id) OVERRIDE;
virtual void ShowSettings(const std::string& notification_id) OVERRIDE;
+ virtual void ShowSettingsDialog(gfx::NativeView context) OVERRIDE;
virtual void OnClicked(const std::string& notification_id) OVERRIDE;
virtual void OnButtonClicked(const std::string& notification_id,
int button_index) OVERRIDE;