OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/virtual_keyboard/public/virtual_keyboard_manager.h" | 5 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" |
6 | 6 |
7 #include "athena/screen/public/screen_manager.h" | 7 #include "athena/screen/public/screen_manager.h" |
8 #include "athena/util/container_priorities.h" | 8 #include "athena/util/container_priorities.h" |
9 #include "athena/util/fill_layout_manager.h" | 9 #include "athena/util/fill_layout_manager.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // A very basic and simple implementation of KeyboardControllerProxy. | 29 // A very basic and simple implementation of KeyboardControllerProxy. |
30 class BasicKeyboardControllerProxy : public keyboard::KeyboardControllerProxy { | 30 class BasicKeyboardControllerProxy : public keyboard::KeyboardControllerProxy { |
31 public: | 31 public: |
32 BasicKeyboardControllerProxy(content::BrowserContext* context, | 32 BasicKeyboardControllerProxy(content::BrowserContext* context, |
33 aura::Window* root_window) | 33 aura::Window* root_window) |
34 : browser_context_(context), root_window_(root_window) {} | 34 : browser_context_(context), root_window_(root_window) {} |
35 virtual ~BasicKeyboardControllerProxy() {} | 35 virtual ~BasicKeyboardControllerProxy() {} |
36 | 36 |
37 // keyboard::KeyboardControllerProxy: | 37 // keyboard::KeyboardControllerProxy: |
38 virtual ui::InputMethod* GetInputMethod() OVERRIDE { | 38 virtual ui::InputMethod* GetInputMethod() override { |
39 ui::InputMethod* input_method = | 39 ui::InputMethod* input_method = |
40 root_window_->GetProperty(aura::client::kRootWindowInputMethodKey); | 40 root_window_->GetProperty(aura::client::kRootWindowInputMethodKey); |
41 return input_method; | 41 return input_method; |
42 } | 42 } |
43 | 43 |
44 virtual void RequestAudioInput( | 44 virtual void RequestAudioInput( |
45 content::WebContents* web_contents, | 45 content::WebContents* web_contents, |
46 const content::MediaStreamRequest& request, | 46 const content::MediaStreamRequest& request, |
47 const content::MediaResponseCallback& callback) OVERRIDE {} | 47 const content::MediaResponseCallback& callback) override {} |
48 | 48 |
49 virtual content::BrowserContext* GetBrowserContext() OVERRIDE { | 49 virtual content::BrowserContext* GetBrowserContext() override { |
50 return browser_context_; | 50 return browser_context_; |
51 } | 51 } |
52 | 52 |
53 virtual void SetUpdateInputType(ui::TextInputType type) OVERRIDE {} | 53 virtual void SetUpdateInputType(ui::TextInputType type) override {} |
54 | 54 |
55 private: | 55 private: |
56 content::BrowserContext* browser_context_; | 56 content::BrowserContext* browser_context_; |
57 aura::Window* root_window_; | 57 aura::Window* root_window_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(BasicKeyboardControllerProxy); | 59 DISALLOW_COPY_AND_ASSIGN(BasicKeyboardControllerProxy); |
60 }; | 60 }; |
61 | 61 |
62 class VirtualKeyboardManagerImpl : public VirtualKeyboardManager { | 62 class VirtualKeyboardManagerImpl : public VirtualKeyboardManager { |
63 public: | 63 public: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 return instance; | 118 return instance; |
119 } | 119 } |
120 | 120 |
121 void VirtualKeyboardManager::Shutdown() { | 121 void VirtualKeyboardManager::Shutdown() { |
122 CHECK(instance); | 122 CHECK(instance); |
123 delete instance; | 123 delete instance; |
124 CHECK(!instance); | 124 CHECK(!instance); |
125 } | 125 } |
126 | 126 |
127 } // namespace athena | 127 } // namespace athena |
OLD | NEW |