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

Unified Diff: ash/system/chromeos/rotation/tray_rotation_lock.h

Issue 303723003: Lock Rotation on user settings changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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/system/chromeos/rotation/tray_rotation_lock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/rotation/tray_rotation_lock.h
diff --git a/ash/system/chromeos/rotation/tray_rotation_lock.h b/ash/system/chromeos/rotation/tray_rotation_lock.h
index 9c53e6ed268cd80c9e37f95438a7bb1eee957b4f..2a134d0b7ddd7e069b42b30f42315b414540b9b5 100644
--- a/ash/system/chromeos/rotation/tray_rotation_lock.h
+++ b/ash/system/chromeos/rotation/tray_rotation_lock.h
@@ -7,6 +7,7 @@
#include "ash/shell_observer.h"
#include "ash/system/tray/tray_image_item.h"
+#include "ash/wm/maximize_mode/maximize_mode_controller.h"
namespace ash {
@@ -20,11 +21,15 @@ class RotationLockDefaultView;
// be interacted with, it toggles the state of the rotation lock.
// TrayRotationLock is only available on the primary display.
class ASH_EXPORT TrayRotationLock : public TrayImageItem,
+ public MaximizeModeController::Observer,
public ShellObserver {
public:
explicit TrayRotationLock(SystemTray* system_tray);
virtual ~TrayRotationLock();
+ // MaximizeModeController::Observer:
+ virtual void OnRotationLockChanged(bool rotation_locked) OVERRIDE;
+
// SystemTrayItem:
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
@@ -39,6 +44,10 @@ class ASH_EXPORT TrayRotationLock : public TrayImageItem,
private:
friend class TrayRotationLockTest;
+ // True if |on_primary_display_|, maximize mode is enabled, and rotation is
+ // locked.
+ bool ShouldBeVisible();
+
// True if this has been created by a SystemTray on the primary display.
bool on_primary_display_;
« no previous file with comments | « no previous file | ash/system/chromeos/rotation/tray_rotation_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698