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

Side by Side Diff: chrome/browser/chrome_browser_main_extra_parts_ash.cc

Issue 10407089: Revert 138212 - Implement High Contrast mode for Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « ash/shell.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_util.h » ('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 (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"
10 #include "ash/shell.h" 9 #include "ash/shell.h"
11 #include "ash/wm/key_rewriter_event_filter.h" 10 #include "ash/wm/key_rewriter_event_filter.h"
12 #include "ash/wm/property_util.h" 11 #include "ash/wm/property_util.h"
13 #include "base/command_line.h" 12 #include "base/command_line.h"
14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
15 #include "chrome/browser/lifetime/application_lifetime.h" 13 #include "chrome/browser/lifetime/application_lifetime.h"
16 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" 14 #include "chrome/browser/ui/views/ash/caps_lock_handler.h"
17 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 15 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
18 #include "chrome/browser/ui/views/ash/key_rewriter.h" 16 #include "chrome/browser/ui/views/ash/key_rewriter.h"
19 #include "chrome/browser/ui/views/ash/screenshot_taker.h" 17 #include "chrome/browser/ui/views/ash/screenshot_taker.h"
20 #include "chrome/browser/ui/views/ash/user_gesture_handler.h" 18 #include "chrome/browser/ui/views/ash/user_gesture_handler.h"
21 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
22 #include "ui/aura/aura_switches.h" 20 #include "ui/aura/aura_switches.h"
23 #include "ui/aura/client/user_gesture_client.h" 21 #include "ui/aura/client/user_gesture_client.h"
24 #include "ui/aura/env.h" 22 #include "ui/aura/env.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 new BrightnessController).Pass()); 69 new BrightnessController).Pass());
72 chromeos::input_method::XKeyboard* xkeyboard = 70 chromeos::input_method::XKeyboard* xkeyboard =
73 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard(); 71 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard();
74 shell->accelerator_controller()->SetCapsLockDelegate( 72 shell->accelerator_controller()->SetCapsLockDelegate(
75 scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass()); 73 scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass());
76 shell->accelerator_controller()->SetImeControlDelegate( 74 shell->accelerator_controller()->SetImeControlDelegate(
77 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); 75 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
78 shell->accelerator_controller()->SetVolumeControlDelegate( 76 shell->accelerator_controller()->SetVolumeControlDelegate(
79 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass()); 77 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass());
80 78
81 ash::Shell::GetInstance()->high_contrast_controller()->SetEnabled(
82 chromeos::accessibility::IsHighContrastEnabled());
83
84 if (!CommandLine::ForCurrentProcess()->HasSwitch( 79 if (!CommandLine::ForCurrentProcess()->HasSwitch(
85 switches::kDisableZeroBrowsersOpenForTests)) { 80 switches::kDisableZeroBrowsersOpenForTests)) {
86 browser::StartKeepAlive(); 81 browser::StartKeepAlive();
87 } 82 }
88 #endif 83 #endif
89 gesture_handler_.reset(new UserGestureHandler); 84 gesture_handler_.reset(new UserGestureHandler);
90 aura::client::SetUserGestureClient( 85 aura::client::SetUserGestureClient(
91 ash::Shell::GetRootWindow(), gesture_handler_.get()); 86 ash::Shell::GetRootWindow(), gesture_handler_.get());
92 ash::Shell::GetRootWindow()->ShowRootWindow(); 87 ash::Shell::GetRootWindow()->ShowRootWindow();
93 } 88 }
94 89
95 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 90 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
96 } 91 }
97 92
98 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 93 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
99 ash::Shell::DeleteInstance(); 94 ash::Shell::DeleteInstance();
100 } 95 }
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698