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

Unified Diff: ash/system/chromeos/tray_display.cc

Issue 267743010: Suppressed screen rotation notifications triggeres by the accelerometer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed minor nits. Created 6 years, 7 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
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index b5814c1304f39c7bdc5835b17bd001905e128155..e8882a6610ef93e60b3091061e34d6f4059b6d02 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -14,6 +14,7 @@
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_notification_view.h"
+#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "base/bind.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -388,7 +389,13 @@ void TrayDisplay::CreateOrUpdateNotification(
message_center::RichNotificationData(),
new message_center::HandleNotificationClickedDelegate(
base::Bind(&OpenSettings))));
- message_center::MessageCenter::Get()->AddNotification(notification.Pass());
+
+ // Don't display notifications for accelerometer triggered screen rotations.
+ // See http://crbug.com/364949
+ if (!Shell::GetInstance()->maximize_mode_controller()->
+ in_set_screen_rotation()) {
sadrul 2014/05/14 23:55:55 Early out above in line 377 instead? So you don't
+ message_center::MessageCenter::Get()->AddNotification(notification.Pass());
+ }
}
views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
« no previous file with comments | « no previous file | ash/wm/maximize_mode/maximize_mode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698