Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ash / system / chromeos / tray_display.cc
index 1e02e30..fc6facf 100644 (file)
@@ -120,9 +120,12 @@ void OpenSettings() {
     case user::LOGGED_IN_GUEST:
     case user::LOGGED_IN_RETAIL_MODE:
     case user::LOGGED_IN_PUBLIC:
-    case user::LOGGED_IN_LOCALLY_MANAGED:
+    case user::LOGGED_IN_SUPERVISED:
     case user::LOGGED_IN_KIOSK_APP:
-      Shell::GetInstance()->system_tray_delegate()->ShowDisplaySettings();
+      ash::SystemTrayDelegate* delegate =
+          Shell::GetInstance()->system_tray_delegate();
+      if (delegate->ShouldShowSettings())
+        delegate->ShowDisplaySettings();
   }
 }
 
@@ -167,7 +170,7 @@ class DisplayView : public ActionableView {
 
   // Overridden from views::View.
   virtual bool GetTooltipText(const gfx::Point& p,
-                              base::string16* tooltip) const OVERRIDE {
+                              base::string16* tooltip) const override {
     base::string16 tray_message = GetTrayDisplayMessage(NULL);
     base::string16 display_message = GetAllDisplayInfo();
     if (tray_message.empty() && display_message.empty())
@@ -266,12 +269,12 @@ class DisplayView : public ActionableView {
   }
 
   // Overridden from ActionableView.
-  virtual bool PerformAction(const ui::Event& event) OVERRIDE {
+  virtual bool PerformAction(const ui::Event& event) override {
     OpenSettings();
     return true;
   }
 
-  virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE {
+  virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
     int label_max_width = bounds().width() - kTrayPopupPaddingHorizontal * 2 -
         kTrayPopupPaddingBetweenItems - image_->GetPreferredSize().width();
     label_->SizeToFit(label_max_width);
@@ -378,7 +381,7 @@ void TrayDisplay::CreateOrUpdateNotification(
   // Don't display notifications for accelerometer triggered screen rotations.
   // See http://crbug.com/364949
   if (Shell::GetInstance()->maximize_mode_controller()->
-      in_set_screen_rotation()) {
+      ignore_display_configuration_updates()) {
     return;
   }