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

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

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Helper code Created 5 years, 11 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
Index: ash/system/chromeos/tray_display.cc
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc
index 3de751e7b728648784c94488c2ce63e665f8652e..4612450af5c8242d86fecbf7c9bef8aa0db30d38 100644
--- a/ash/system/chromeos/tray_display.cc
+++ b/ash/system/chromeos/tray_display.cc
@@ -4,6 +4,9 @@
#include "ash/system/chromeos/tray_display.h"
+#include <vector>
+
+#include "ash/content/display/screen_orientation_controller_chromeos.h"
#include "ash/display/display_controller.h"
#include "ash/display/display_manager.h"
#include "ash/shell.h"
@@ -14,7 +17,6 @@
#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"
@@ -168,8 +170,8 @@ class DisplayView : public ActionableView {
const views::Label* label() const { return label_; }
// Overridden from views::View.
- virtual bool GetTooltipText(const gfx::Point& p,
- base::string16* tooltip) const override {
+ bool GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const override {
base::string16 tray_message = GetTrayDisplayMessage(NULL);
base::string16 display_message = GetAllDisplayInfo();
if (tray_message.empty() && display_message.empty())
@@ -268,12 +270,12 @@ class DisplayView : public ActionableView {
}
// Overridden from ActionableView.
- virtual bool PerformAction(const ui::Event& event) override {
+ bool PerformAction(const ui::Event& event) override {
OpenSettings();
return true;
}
- virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) override {
+ 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);
@@ -379,8 +381,9 @@ void TrayDisplay::CreateOrUpdateNotification(
// Don't display notifications for accelerometer triggered screen rotations.
// See http://crbug.com/364949
- if (Shell::GetInstance()->maximize_mode_controller()->
- ignore_display_configuration_updates()) {
+ if (Shell::GetInstance()
+ ->screen_orientation_controller()
+ ->ignore_display_configuration_updates()) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698