| 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 "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/session_state_delegate.h" | 11 #include "ash/session_state_delegate.h" |
| 12 #include "ash/session_state_delegate_stub.h" | 12 #include "ash/session_state_delegate_stub.h" |
| 13 #include "ash/shell/context_menu.h" | 13 #include "ash/shell/context_menu.h" |
| 14 #include "ash/shell/example_factory.h" | 14 #include "ash/shell/example_factory.h" |
| 15 #include "ash/shell/keyboard_controller_proxy_stub.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 Loading... |
| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { | 226 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { |
| 256 return RootWindowHostFactory::Create(); | 227 return RootWindowHostFactory::Create(); |
| 257 } | 228 } |
| 258 | 229 |
| 259 base::string16 ShellDelegateImpl::GetProductName() const { | 230 base::string16 ShellDelegateImpl::GetProductName() const { |
| 260 return base::string16(); | 231 return base::string16(); |
| 261 } | 232 } |
| 262 | 233 |
| 263 } // namespace shell | 234 } // namespace shell |
| 264 } // namespace ash | 235 } // namespace ash |
| OLD | NEW |