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

Side by Side Diff: ui/keyboard/keyboard_controller_proxy.h

Issue 1128173003: Implements onBoundsChanged event in virtualKeyboardPrivate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dont set KC in KCP Created 5 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
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 UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ 5 #ifndef UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_
6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/public/common/media_stream_request.h" 9 #include "content/public/common/media_stream_request.h"
10 #include "ui/aura/window_observer.h" 10 #include "ui/aura/window_observer.h"
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 namespace ui { 25 namespace ui {
26 class InputMethod; 26 class InputMethod;
27 } 27 }
28 namespace wm { 28 namespace wm {
29 class Shadow; 29 class Shadow;
30 } 30 }
31 31
32 namespace keyboard { 32 namespace keyboard {
33 33
34 class KeyboardController;
35
34 // A proxy used by the KeyboardController to get access to the virtual 36 // A proxy used by the KeyboardController to get access to the virtual
35 // keyboard window. 37 // keyboard window.
36 class KEYBOARD_EXPORT KeyboardControllerProxy : public aura::WindowObserver { 38 class KEYBOARD_EXPORT KeyboardControllerProxy : public aura::WindowObserver {
37 public: 39 public:
38 class TestApi { 40 class TestApi {
39 public: 41 public:
40 explicit TestApi(KeyboardControllerProxy* proxy) : proxy_(proxy) {} 42 explicit TestApi(KeyboardControllerProxy* proxy) : proxy_(proxy) {}
41 43
42 const content::WebContents* keyboard_contents() { 44 const content::WebContents* keyboard_contents() {
43 return proxy_->keyboard_contents_.get(); 45 return proxy_->keyboard_contents_.get();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // different. The URL can be different if user switch from password field to 96 // different. The URL can be different if user switch from password field to
95 // any other type input field. 97 // any other type input field.
96 // At password field, the system virtual keyboard is forced to load even if 98 // At password field, the system virtual keyboard is forced to load even if
97 // the current IME provides a customized virtual keyboard. This is needed to 99 // the current IME provides a customized virtual keyboard. This is needed to
98 // prevent IME virtual keyboard logging user's password. Once user switch to 100 // prevent IME virtual keyboard logging user's password. Once user switch to
99 // other input fields, the virtual keyboard should switch back to the IME 101 // other input fields, the virtual keyboard should switch back to the IME
100 // provided keyboard, or keep using the system virtual keyboard if IME doesn't 102 // provided keyboard, or keep using the system virtual keyboard if IME doesn't
101 // provide one. 103 // provide one.
102 virtual void ReloadKeyboardIfNeeded(); 104 virtual void ReloadKeyboardIfNeeded();
103 105
106 virtual void SetController(KeyboardController* controller) {};
sadrul 2015/05/14 07:58:42 No ; at the end. Add a comment clarifying that th
bshe 2015/05/14 15:07:14 Done.
107
104 protected: 108 protected:
105 // The implementation can choose to setup the WebContents before the virtual 109 // The implementation can choose to setup the WebContents before the virtual
106 // keyboard page is loaded (e.g. install a WebContentsObserver). 110 // keyboard page is loaded (e.g. install a WebContentsObserver).
107 // SetupWebContents() is called right after creating the WebContents, before 111 // SetupWebContents() is called right after creating the WebContents, before
108 // loading the keyboard page. 112 // loading the keyboard page.
109 virtual void SetupWebContents(content::WebContents* contents); 113 virtual void SetupWebContents(content::WebContents* contents);
110 114
111 // aura::WindowObserver overrides: 115 // aura::WindowObserver overrides:
112 void OnWindowBoundsChanged(aura::Window* window, 116 void OnWindowBoundsChanged(aura::Window* window,
113 const gfx::Rect& old_bounds, 117 const gfx::Rect& old_bounds,
(...skipping 19 matching lines...) Expand all
133 137
134 scoped_ptr<content::WebContents> keyboard_contents_; 138 scoped_ptr<content::WebContents> keyboard_contents_;
135 scoped_ptr<wm::Shadow> shadow_; 139 scoped_ptr<wm::Shadow> shadow_;
136 140
137 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy); 141 DISALLOW_COPY_AND_ASSIGN(KeyboardControllerProxy);
138 }; 142 };
139 143
140 } // namespace keyboard 144 } // namespace keyboard
141 145
142 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_ 146 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_PROXY_H_
OLDNEW
« chrome/browser/ui/ash/ash_keyboard_controller_proxy.h ('K') | « ui/keyboard/keyboard_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698