summaryrefslogtreecommitdiffstats
path: root/ash/system/chromeos/tray_display.cc
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 23:34:53 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 23:34:53 +0000
commit3a3ed7fbff49436e42617a9b05179f341ceab725 (patch)
treeb64b6b9132bb81b024ffe9f0930e73913043be8e /ash/system/chromeos/tray_display.cc
parent5d8d98d28ddcb0ee30b35950fafcf62304da19b0 (diff)
downloadchromium_src-3a3ed7fbff49436e42617a9b05179f341ceab725.zip
chromium_src-3a3ed7fbff49436e42617a9b05179f341ceab725.tar.gz
chromium_src-3a3ed7fbff49436e42617a9b05179f341ceab725.tar.bz2
Do not show the notification of display configuration when unnecessary.
It should not be notified if the configuration change happens from the settings UI. To achieve this casually, this CL simply blocks the display notifications when chrome://settings/display is active. This is not perfect but good enough I guess. BUG=250650, 246271 R=oshima@chromium.org, jamescook@chromium.org, stevenjb@chromium.org Review URL: https://chromiumcodereview.appspot.com/16818028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/chromeos/tray_display.cc')
-rw-r--r--ash/system/chromeos/tray_display.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 484e0d2..0a8d61a 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -26,8 +26,6 @@ namespace ash {
namespace internal {
namespace {
-bool display_notifications_disabled = false;
-
DisplayManager* GetDisplayManager() {
return Shell::GetInstance()->display_manager();
}
@@ -309,8 +307,10 @@ bool TrayDisplay::ShouldShowLauncher() const {
}
void TrayDisplay::OnDisplayConfigurationChanged() {
- if (display_notifications_disabled)
+ if (!Shell::GetInstance()->system_tray_delegate()->
+ ShouldShowDisplayNotification()) {
return;
+ }
// TODO(mukai): do not show the notification when the configuration changed
// due to the user operation on display settings page.
@@ -321,11 +321,6 @@ void TrayDisplay::OnDisplayConfigurationChanged() {
ShowNotificationView();
}
-// static
-void TrayDisplay::SetDisplayNotificationsDisabledForTest(bool disabled) {
- display_notifications_disabled = disabled;
-}
-
base::string16 TrayDisplay::GetDefaultViewMessage() {
if (!default_ || !default_->visible())
return base::string16();