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

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 12077055: Made launcher hidden when kicking off chrome in app mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ash/ash_init.h" 5 #include "chrome/browser/ui/ash/ash_init.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/high_contrast/high_contrast_controller.h" 9 #include "ash/high_contrast/high_contrast_controller.h"
10 #include "ash/magnifier/magnification_controller.h" 10 #include "ash/magnifier/magnification_controller.h"
11 #include "ash/magnifier/partial_magnification_controller.h" 11 #include "ash/magnifier/partial_magnification_controller.h"
12 #include "ash/shell.h" 12 #include "ash/shell.h"
13 #include "ash/wm/event_rewriter_event_filter.h" 13 #include "ash/wm/event_rewriter_event_filter.h"
14 #include "ash/wm/property_util.h" 14 #include "ash/wm/property_util.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
18 #include "chrome/browser/lifetime/application_lifetime.h" 18 #include "chrome/browser/lifetime/application_lifetime.h"
19 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" 19 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
20 #include "chrome/browser/ui/ash/event_rewriter.h" 20 #include "chrome/browser/ui/ash/event_rewriter.h"
21 #include "chrome/browser/ui/ash/screenshot_taker.h" 21 #include "chrome/browser/ui/ash/screenshot_taker.h"
22 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/switch_utils.h"
23 #include "ui/aura/aura_switches.h" 24 #include "ui/aura/aura_switches.h"
24 #include "ui/aura/display_util.h" 25 #include "ui/aura/display_util.h"
25 #include "ui/aura/env.h" 26 #include "ui/aura/env.h"
26 #include "ui/aura/root_window.h" 27 #include "ui/aura/root_window.h"
27 #include "ui/compositor/compositor_setup.h" 28 #include "ui/compositor/compositor_setup.h"
28 29
29 #if defined(OS_CHROMEOS) 30 #if defined(OS_CHROMEOS)
30 #include "base/chromeos/chromeos_version.h" 31 #include "base/chromeos/chromeos_version.h"
31 #include "chrome/browser/chromeos/login/user_manager.h" 32 #include "chrome/browser/chromeos/login/user_manager.h"
32 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" 33 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool magnifier_enabled = 100 bool magnifier_enabled =
100 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); 101 chromeos::MagnificationManager::Get()->IsMagnifierEnabled();
101 ash::MagnifierType magnifier_type = 102 ash::MagnifierType magnifier_type =
102 chromeos::MagnificationManager::Get()->GetMagnifierType(); 103 chromeos::MagnificationManager::Get()->GetMagnifierType();
103 ash::Shell::GetInstance()->magnification_controller()-> 104 ash::Shell::GetInstance()->magnification_controller()->
104 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_FULL); 105 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_FULL);
105 ash::Shell::GetInstance()->partial_magnification_controller()-> 106 ash::Shell::GetInstance()->partial_magnification_controller()->
106 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); 107 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL);
107 108
108 if (!CommandLine::ForCurrentProcess()->HasSwitch( 109 if (!CommandLine::ForCurrentProcess()->HasSwitch(
109 switches::kDisableZeroBrowsersOpenForTests)) { 110 switches::kDisableZeroBrowsersOpenForTests) &&
110 browser::StartKeepAlive(); 111 !switches::IsRunningInAppMode()) {
112 browser::StartKeepAlive();
oshima 2013/01/30 06:14:35 I think you should skip EndKeepAlive in applicatio
zel 2013/01/30 17:06:43 Done.
111 } 113 }
112 #endif 114 #endif
113 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); 115 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
114 } 116 }
115 117
116 void CloseAsh() { 118 void CloseAsh() {
117 if (ash::Shell::HasInstance()) 119 if (ash::Shell::HasInstance())
118 ash::Shell::DeleteInstance(); 120 ash::Shell::DeleteInstance();
119 } 121 }
120 122
121 } // namespace chrome 123 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698