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

Side by Side Diff: chrome/browser/ui/views/frame/immersive_mode_controller_factory.cc

Issue 13684002: cros: Instant extended support for immersive fullscreen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" 5 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
6 6
7 #include "chrome/browser/ui/views/frame/immersive_mode_controller_stub.h" 7 #include "chrome/browser/ui/views/frame/immersive_mode_controller_stub.h"
8 8
9 #if defined(OS_CHROMEOS) 9 #if defined(OS_CHROMEOS)
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h" 12 #include "chrome/browser/ui/views/frame/immersive_mode_controller_ash.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #endif // defined(OS_CHROMEOS) 14 #endif // defined(OS_CHROMEOS)
15 15
16 namespace chrome { 16 namespace chrome {
17 17
18 bool UseImmersiveFullscreen() { 18 bool UseImmersiveFullscreen() {
19 #if defined(OS_CHROMEOS) 19 #if defined(OS_CHROMEOS)
20 // Kiosk mode needs the whole screen. 20 // Kiosk mode needs the whole screen.
21 CommandLine* command_line = CommandLine::ForCurrentProcess(); 21 CommandLine* command_line = CommandLine::ForCurrentProcess();
22 return !command_line->HasSwitch(switches::kKioskMode) && 22 return !command_line->HasSwitch(switches::kKioskMode) &&
23 command_line->HasSwitch(ash::switches::kAshImmersiveFullscreen); 23 command_line->HasSwitch(ash::switches::kAshImmersiveFullscreen);
24 #endif 24 #endif
25 return false; 25 return false;
26 } 26 }
27 27
28 // Implemented here so all the code dealing with flags lives in one place.
29 void EnableImmersiveFullscreenForTest() {
30 #if defined(OS_CHROMEOS)
31 CommandLine* command_line = CommandLine::ForCurrentProcess();
32 command_line->AppendSwitch(ash::switches::kAshImmersiveFullscreen);
33 #endif
34 }
35
28 ImmersiveModeController* CreateImmersiveModeController() { 36 ImmersiveModeController* CreateImmersiveModeController() {
29 #if defined(OS_CHROMEOS) 37 #if defined(OS_CHROMEOS)
30 return new ImmersiveModeControllerAsh(); 38 return new ImmersiveModeControllerAsh();
31 #else 39 #else
32 return new ImmersiveModeControllerStub(); 40 return new ImmersiveModeControllerStub();
33 #endif 41 #endif
34 } 42 }
35 43
36 } // namespace chrome 44 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698