diff options
author | oshima <oshima@chromium.org> | 2015-04-27 16:27:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-27 23:27:21 +0000 |
commit | 55ef921cb46ae2b1a95ddda8a376120db53eee69 (patch) | |
tree | d3b7ca8e0b457fe20567851b820ba5a6cdb5f77c /ash/ash_switches.cc | |
parent | 172214038410fb835cc36721fcc2dc7b7a7dd5fd (diff) | |
download | chromium_src-55ef921cb46ae2b1a95ddda8a376120db53eee69.zip chromium_src-55ef921cb46ae2b1a95ddda8a376120db53eee69.tar.gz chromium_src-55ef921cb46ae2b1a95ddda8a376120db53eee69.tar.bz2 |
Add unified desktop flag "--ash-enable-unified-desktop"
Enhanced MirrorWindowController to manage multiple mirroring windows.
BUG=365662
Review URL: https://codereview.chromium.org/1107733006
Cr-Commit-Position: refs/heads/master@{#327172}
Diffstat (limited to 'ash/ash_switches.cc')
-rw-r--r-- | ash/ash_switches.cc | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc index 4ab34f8..7f052dc 100644 --- a/ash/ash_switches.cc +++ b/ash/ash_switches.cc @@ -5,6 +5,7 @@ #include "ash/ash_switches.h" #include "base/command_line.h" +#include "base/sys_info.h" namespace ash { namespace switches { @@ -17,9 +18,6 @@ namespace switches { const char kAshAnimateFromBootSplashScreen[] = "ash-animate-from-boot-splash-screen"; -// Constrains the pointer movement within a root window on desktop. -const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root"; - // Copies the host window's content to the system background layer at startup. // Can make boot slightly slower, but also hides an even-longer awkward period // where we display a white background if the login wallpaper takes a long time @@ -56,6 +54,7 @@ const char kAshEnableFullscreenAppList[] = "ash-enable-fullscreen-app-list"; // Enables key bindings to scroll magnified screen. const char kAshEnableMagnifierKeyScroller[] = "ash-enable-magnifier-key-scroller"; + #endif // Enables mirrored screen. @@ -122,5 +121,24 @@ const char kForceAshToDesktop[] = "ash-force-desktop"; #endif +#if defined(OS_CHROMEOS) +// Constrains the pointer movement within a root window on desktop. +bool ConstrainPointerToRoot() { + const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root"; + + return base::SysInfo::IsRunningOnChromeOS() || + base::CommandLine::ForCurrentProcess()->HasSwitch( + kAshConstrainPointerToRoot); +} + +// Enables unified desktop mode. +bool UnifiedDesktopEnabled() { + const char kAshEnableUnifiedDesktop[] = "ash-enable-unified-desktop"; + return base::CommandLine::ForCurrentProcess()->HasSwitch( + kAshEnableUnifiedDesktop); +} + +#endif + } // namespace switches } // namespace ash |