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

Side by Side Diff: chrome/browser/ui/ash/chrome_keyboard_ui.h

Issue 1392713002: Extract content dependency from keyboard code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_
6 #define CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ 6 #define CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "ui/keyboard/keyboard_controller_proxy.h" 11 #include "ui/keyboard/content/keyboard_ui_content.h"
12 12
13 namespace content { 13 namespace content {
14 class BrowserContext; 14 class BrowserContext;
15 class WebContents; 15 class WebContents;
16 } 16 }
17 namespace extensions { 17 namespace extensions {
18 class ExtensionFunctionDispatcher; 18 class ExtensionFunctionDispatcher;
19 class WindowController; 19 class WindowController;
20 } 20 }
21 namespace gfx { 21 namespace gfx {
22 class Rect; 22 class Rect;
23 } 23 }
24 namespace keyboard { 24 namespace keyboard {
25 class KeyboardController; 25 class KeyboardController;
26 class KeyboardControllerObserver; 26 class KeyboardControllerObserver;
27 } 27 }
28 namespace ui { 28 namespace ui {
29 class InputMethod; 29 class InputMethod;
30 } 30 }
31 31
32 // Subclass of KeyboardControllerProxy. It is used by KeyboardController to get 32 // Subclass of KeyboardUIContent. It is used by KeyboardController to get
33 // access to the virtual keyboard window and setup Chrome extension functions. 33 // access to the virtual keyboard window and setup Chrome extension functions.
34 class AshKeyboardControllerProxy 34 class ChromeKeyboardUI : public keyboard::KeyboardUIContent,
35 : public keyboard::KeyboardControllerProxy, 35 public content::WebContentsObserver {
36 public content::WebContentsObserver {
37 public: 36 public:
38 explicit AshKeyboardControllerProxy(content::BrowserContext* context); 37 explicit ChromeKeyboardUI(content::BrowserContext* context);
39 ~AshKeyboardControllerProxy() override; 38 ~ChromeKeyboardUI() override;
40 39
41 private: 40 private:
42 // keyboard::KeyboardControllerProxy overrides 41 // keyboard::KeyboardControllerProxy overrides
43 ui::InputMethod* GetInputMethod() override; 42 ui::InputMethod* GetInputMethod() override;
44 void RequestAudioInput( 43 void RequestAudioInput(
45 content::WebContents* web_contents, 44 content::WebContents* web_contents,
46 const content::MediaStreamRequest& request, 45 const content::MediaStreamRequest& request,
47 const content::MediaResponseCallback& callback) override; 46 const content::MediaResponseCallback& callback) override;
48 void SetupWebContents(content::WebContents* contents) override; 47 void SetupWebContents(content::WebContents* contents) override;
49 void SetController(keyboard::KeyboardController* controller) override; 48 void SetController(keyboard::KeyboardController* controller) override;
50 void ShowKeyboardContainer(aura::Window* container) override; 49 void ShowKeyboardContainer(aura::Window* container) override;
51 50
52 // The overridden implementation dispatches 51 // The overridden implementation dispatches
53 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to 52 // chrome.virtualKeyboardPrivate.onTextInputBoxFocused event to extension to
54 // provide the input type information. Naturally, when the virtual keyboard 53 // provide the input type information. Naturally, when the virtual keyboard
55 // extension is used as an IME then chrome.input.ime.onFocus provides the 54 // extension is used as an IME then chrome.input.ime.onFocus provides the
56 // information, but not when the virtual keyboard is used in conjunction with 55 // information, but not when the virtual keyboard is used in conjunction with
57 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in 56 // another IME. virtualKeyboardPrivate.onTextInputBoxFocused is the remedy in
58 // that case. 57 // that case.
59 void SetUpdateInputType(ui::TextInputType type) override; 58 void SetUpdateInputType(ui::TextInputType type) override;
60 59
61 // content::WebContentsObserver overrides 60 // content::WebContentsObserver overrides
62 void RenderViewCreated(content::RenderViewHost* render_view_host) override; 61 void RenderViewCreated(content::RenderViewHost* render_view_host) override;
63 62
64 scoped_ptr<keyboard::KeyboardControllerObserver> observer_; 63 scoped_ptr<keyboard::KeyboardControllerObserver> observer_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerProxy); 65 DISALLOW_COPY_AND_ASSIGN(ChromeKeyboardUI);
67 }; 66 };
68 67
69 #endif // CHROME_BROWSER_UI_ASH_ASH_KEYBOARD_CONTROLLER_PROXY_H_ 68 #endif // CHROME_BROWSER_UI_ASH_CHROME_KEYBOARD_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc ('k') | chrome/browser/ui/ash/chrome_keyboard_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698