Chromium Code Reviews| Index: ash/ash_switches.cc |
| diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc |
| index 4ab34f80106e0902b596e90bd85ff65ddc01ba7b..7f052dcd2d1ec15b83157f5e9aba5b935ab1d197 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"; |
|
Jun Mukai
2015/04/26 23:45:07
Why don't you expose the flag to the header?
It'll
oshima
2015/04/27 17:48:38
I'll expose when I add a flag. (I don't want to ad
|
| + return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + kAshEnableUnifiedDesktop); |
| +} |
| + |
| +#endif |
| + |
| } // namespace switches |
| } // namespace ash |