OLD | NEW |
---|---|
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/chrome_browser_main_extra_parts_ash.h" | 5 #include "chrome/browser/chrome_browser_main_extra_parts_ash.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/shell.h" | 10 #include "ash/shell.h" |
10 #include "ash/wm/key_rewriter_event_filter.h" | 11 #include "ash/wm/key_rewriter_event_filter.h" |
11 #include "ash/wm/property_util.h" | 12 #include "ash/wm/property_util.h" |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | |
13 #include "chrome/browser/ui/browser_list.h" | 15 #include "chrome/browser/ui/browser_list.h" |
14 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" | 16 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" |
15 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" | 17 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
16 #include "chrome/browser/ui/views/ash/key_rewriter.h" | 18 #include "chrome/browser/ui/views/ash/key_rewriter.h" |
17 #include "chrome/browser/ui/views/ash/screenshot_taker.h" | 19 #include "chrome/browser/ui/views/ash/screenshot_taker.h" |
18 #include "chrome/browser/ui/views/ash/user_gesture_handler.h" | 20 #include "chrome/browser/ui/views/ash/user_gesture_handler.h" |
19 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
20 #include "ui/aura/aura_switches.h" | 22 #include "ui/aura/aura_switches.h" |
21 #include "ui/aura/client/user_gesture_client.h" | 23 #include "ui/aura/client/user_gesture_client.h" |
22 #include "ui/aura/env.h" | 24 #include "ui/aura/env.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 new BrightnessController).Pass()); | 71 new BrightnessController).Pass()); |
70 chromeos::input_method::XKeyboard* xkeyboard = | 72 chromeos::input_method::XKeyboard* xkeyboard = |
71 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard(); | 73 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard(); |
72 shell->accelerator_controller()->SetCapsLockDelegate( | 74 shell->accelerator_controller()->SetCapsLockDelegate( |
73 scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass()); | 75 scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass()); |
74 shell->accelerator_controller()->SetImeControlDelegate( | 76 shell->accelerator_controller()->SetImeControlDelegate( |
75 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); | 77 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); |
76 shell->accelerator_controller()->SetVolumeControlDelegate( | 78 shell->accelerator_controller()->SetVolumeControlDelegate( |
77 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass()); | 79 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass()); |
78 | 80 |
81 if (chromeos::accessibility::IsHighContrastEnabled()) | |
sky
2012/05/17 15:54:15
Can you remove the if, so that it's:
ash::Shell::
Zachary Kuznia
2012/05/21 05:50:05
Done.
| |
82 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(true); | |
83 | |
79 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 84 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
80 switches::kDisableZeroBrowsersOpenForTests)) | 85 switches::kDisableZeroBrowsersOpenForTests)) |
81 BrowserList::StartKeepAlive(); | 86 BrowserList::StartKeepAlive(); |
82 #endif | 87 #endif |
83 gesture_handler_.reset(new UserGestureHandler); | 88 gesture_handler_.reset(new UserGestureHandler); |
84 aura::client::SetUserGestureClient( | 89 aura::client::SetUserGestureClient( |
85 ash::Shell::GetRootWindow(), gesture_handler_.get()); | 90 ash::Shell::GetRootWindow(), gesture_handler_.get()); |
86 ash::Shell::GetRootWindow()->ShowRootWindow(); | 91 ash::Shell::GetRootWindow()->ShowRootWindow(); |
87 } | 92 } |
88 | 93 |
89 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { | 94 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { |
90 } | 95 } |
91 | 96 |
92 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 97 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
93 ash::Shell::DeleteInstance(); | 98 ash::Shell::DeleteInstance(); |
94 } | 99 } |
OLD | NEW |