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

Unified Diff: ui/keyboard/keyboard_controller.h

Issue 14477010: Partial fix for keyboard occlusion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/keyboard_controller.h
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index ca7d0ada03ee37eccecc99ebc2fa492b1507349b..d3207f3156a9db799d4fa4de931cc097cf8441e1 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "ui/aura/window_observer.h"
#include "ui/base/ime/input_method_observer.h"
#include "ui/keyboard/keyboard_export.h"
@@ -14,7 +15,9 @@
namespace aura {
class Window;
}
-
+namespace gfx {
+class Rect;
+}
namespace ui {
class InputMethod;
class TextInputClient;
@@ -30,6 +33,12 @@ class KeyboardLayoutManager;
class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
public aura::WindowObserver {
public:
+ class Observer {
Ben Goodger (Google) 2013/04/29 16:16:38 avoid nested classes, they can't be forward-declar
bryeung 2013/04/29 18:31:43 Got it. Fixed.
+ public:
+ // Called when the keyboard bounds or visibility are about to change.
+ virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) = 0;
+ };
+
// Takes ownership of |proxy|.
explicit KeyboardController(KeyboardControllerProxy* proxy);
virtual ~KeyboardController();
@@ -38,6 +47,10 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
// It is the responsibility of the caller to Show() the returned window.
aura::Window* GetContainerWindow();
+ // Management of the observer list.
+ virtual void AddObserver(Observer* observer);
+ virtual void RemoveObserver(Observer* observer);
+
private:
// For access to Observer methods for simulation.
friend class KeyboardControllerTest;
@@ -57,6 +70,8 @@ class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver,
aura::Window* container_;
ui::InputMethod* input_method_;
+ ObserverList<Observer> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(KeyboardController);
};
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698