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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_controller.h

Issue 2775683002: CrOS: Apply flag which enables us to force maximize mode. (Closed)
Patch Set: Rebased. Created 3 years, 9 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 | « ash/common/ash_switches.cc ('k') | ash/common/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/maximize_mode/maximize_mode_controller.h
diff --git a/ash/common/wm/maximize_mode/maximize_mode_controller.h b/ash/common/wm/maximize_mode/maximize_mode_controller.h
index 383f26ec156624473f16189bbb46be5d937fb8e5..99b643c2e91e82ef820135fa0321ba77e306e66b 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_controller.h
+++ b/ash/common/wm/maximize_mode/maximize_mode_controller.h
@@ -52,6 +52,14 @@ class ASH_EXPORT MaximizeModeController :
public ShellObserver,
public WmDisplayObserver {
public:
+ // Used for keeping track if the user wants the machine to behave as a
+ // clamshell/touchview regardless of hardware orientation.
+ enum class ForceTabletMode {
+ NONE = 0,
+ CLAMSHELL,
+ TOUCHVIEW,
+ };
+
MaximizeModeController();
~MaximizeModeController() override;
@@ -83,6 +91,7 @@ class ASH_EXPORT MaximizeModeController :
void OnAppTerminating() override;
void OnMaximizeModeStarted() override;
void OnMaximizeModeEnded() override;
+ void OnShellInitialized() override;
// WmDisplayObserver:
void OnDisplayConfigurationChanged() override;
@@ -149,6 +158,11 @@ class ASH_EXPORT MaximizeModeController :
// mojom::TouchViewManager:
void AddObserver(mojom::TouchViewObserverPtr observer) override;
+ // Checks whether we want to allow entering and exiting maximize mode. This
+ // returns false if the user set a flag for the software to behave in a
+ // certain way regardless of configuration.
+ bool AllowEnterExitMaximizeMode() const;
+
// The maximized window manager (if enabled).
std::unique_ptr<MaximizeModeWindowManager> maximize_mode_window_manager_;
@@ -193,6 +207,9 @@ class ASH_EXPORT MaximizeModeController :
// The set of touchview observers to be notified about mode changes.
mojo::InterfacePtrSet<mojom::TouchViewObserver> observers_;
+ // Tracks whether a flag is used to force maximize mode.
+ ForceTabletMode force_tablet_mode_ = ForceTabletMode::NONE;
+
base::WeakPtrFactory<MaximizeModeController> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MaximizeModeController);
« no previous file with comments | « ash/common/ash_switches.cc ('k') | ash/common/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698