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

Side by Side Diff: ash/shell/shell_delegate_impl.cc

Issue 22465007: Whitelist virtual keyboard container to process events at login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move keyboard_controller_proxy_stub from ash/shell to ash/ Created 7 years, 4 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/root_window_controller_unittest.cc ('k') | ash/shell_window_ids.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 "ash/shell/shell_delegate_impl.h" 5 #include "ash/shell/shell_delegate_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/caps_lock_delegate_stub.h" 9 #include "ash/caps_lock_delegate_stub.h"
10 #include "ash/host/root_window_host_factory.h" 10 #include "ash/host/root_window_host_factory.h"
11 #include "ash/keyboard_controller_proxy_stub.h"
11 #include "ash/session_state_delegate.h" 12 #include "ash/session_state_delegate.h"
12 #include "ash/session_state_delegate_stub.h" 13 #include "ash/session_state_delegate_stub.h"
13 #include "ash/shell/context_menu.h" 14 #include "ash/shell/context_menu.h"
14 #include "ash/shell/example_factory.h" 15 #include "ash/shell/example_factory.h"
15 #include "ash/shell/launcher_delegate_impl.h" 16 #include "ash/shell/launcher_delegate_impl.h"
16 #include "ash/shell/toplevel_window.h" 17 #include "ash/shell/toplevel_window.h"
17 #include "ash/shell_window_ids.h" 18 #include "ash/shell_window_ids.h"
18 #include "ash/wm/window_util.h" 19 #include "ash/wm/window_util.h"
19 #include "base/message_loop/message_loop.h" 20 #include "base/message_loop/message_loop.h"
20 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
21 #include "ui/keyboard/keyboard_controller_proxy.h"
22 #include "ui/views/corewm/input_method_event_filter.h" 22 #include "ui/views/corewm/input_method_event_filter.h"
23 23
24 namespace ash { 24 namespace ash {
25
26 namespace {
27
28 class DummyKeyboardControllerProxy : public keyboard::KeyboardControllerProxy {
29 public:
30 DummyKeyboardControllerProxy() {}
31 virtual ~DummyKeyboardControllerProxy() {}
32
33 private:
34 // Overridden from keyboard::KeyboardControllerProxy:
35 virtual content::BrowserContext* GetBrowserContext() OVERRIDE {
36 return Shell::GetInstance()->browser_context();
37 }
38
39 virtual ui::InputMethod* GetInputMethod() OVERRIDE {
40 return Shell::GetInstance()->input_method_filter()->input_method();
41 }
42
43 virtual void RequestAudioInput(content::WebContents* web_contents,
44 const content::MediaStreamRequest& request,
45 const content::MediaResponseCallback& callback) OVERRIDE {
46 return;
47 }
48
49 DISALLOW_COPY_AND_ASSIGN(DummyKeyboardControllerProxy);
50 };
51
52 } // namespace
53
54 namespace shell { 25 namespace shell {
55 26
56 ShellDelegateImpl::ShellDelegateImpl() 27 ShellDelegateImpl::ShellDelegateImpl()
57 : watcher_(NULL), 28 : watcher_(NULL),
58 launcher_delegate_(NULL), 29 launcher_delegate_(NULL),
59 spoken_feedback_enabled_(false), 30 spoken_feedback_enabled_(false),
60 high_contrast_enabled_(false), 31 high_contrast_enabled_(false),
61 screen_magnifier_enabled_(false), 32 screen_magnifier_enabled_(false),
62 screen_magnifier_type_(kDefaultMagnifierType), 33 screen_magnifier_type_(kDefaultMagnifierType),
63 large_cursor_enabled_(false) { 34 large_cursor_enabled_(false) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 92 }
122 93
123 void ShellDelegateImpl::RestoreTab() { 94 void ShellDelegateImpl::RestoreTab() {
124 } 95 }
125 96
126 void ShellDelegateImpl::ShowKeyboardOverlay() { 97 void ShellDelegateImpl::ShowKeyboardOverlay() {
127 } 98 }
128 99
129 keyboard::KeyboardControllerProxy* 100 keyboard::KeyboardControllerProxy*
130 ShellDelegateImpl::CreateKeyboardControllerProxy() { 101 ShellDelegateImpl::CreateKeyboardControllerProxy() {
131 return new DummyKeyboardControllerProxy(); 102 return new KeyboardControllerProxyStub();
132 } 103 }
133 104
134 void ShellDelegateImpl::ShowTaskManager() { 105 void ShellDelegateImpl::ShowTaskManager() {
135 } 106 }
136 107
137 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { 108 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() {
138 return Shell::GetInstance()->browser_context(); 109 return Shell::GetInstance()->browser_context();
139 } 110 }
140 111
141 void ShellDelegateImpl::ToggleSpokenFeedback( 112 void ShellDelegateImpl::ToggleSpokenFeedback(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { 216 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() {
246 return RootWindowHostFactory::Create(); 217 return RootWindowHostFactory::Create();
247 } 218 }
248 219
249 base::string16 ShellDelegateImpl::GetProductName() const { 220 base::string16 ShellDelegateImpl::GetProductName() const {
250 return base::string16(); 221 return base::string16();
251 } 222 }
252 223
253 } // namespace shell 224 } // namespace shell
254 } // namespace ash 225 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller_unittest.cc ('k') | ash/shell_window_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698