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

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

Issue 97013002: [Input View] Makes the input view window support window.resizeTo() and w3c visibility API its web c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 | Annotate | Revision Log
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_H_ 5 #ifndef UI_KEYBOARD_KEYBOARD_CONTROLLER_H_
6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ 6 #define UI_KEYBOARD_KEYBOARD_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Sets the override content url. This is used by for input view for extension 55 // Sets the override content url. This is used by for input view for extension
56 // IMEs. 56 // IMEs.
57 void SetOverrideContentUrl(const GURL& url); 57 void SetOverrideContentUrl(const GURL& url);
58 58
59 // Hides virtual keyboard and notifies observer bounds change. 59 // Hides virtual keyboard and notifies observer bounds change.
60 // This function should be called with a delay to avoid layout flicker 60 // This function should be called with a delay to avoid layout flicker
61 // when the focus of input field quickly change. |automatic| is true when the 61 // when the focus of input field quickly change. |automatic| is true when the
62 // call is made by the system rather than initiated by the user. 62 // call is made by the system rather than initiated by the user.
63 void HideKeyboard(HideReason reason); 63 void HideKeyboard(HideReason reason);
64 64
65 // Notifies the keyboard observer for keyboard bounds changed.
66 void NotifyKeyboardBoundsChanging(const gfx::Rect& new_bounds);
67
65 // Management of the observer list. 68 // Management of the observer list.
66 virtual void AddObserver(KeyboardControllerObserver* observer); 69 virtual void AddObserver(KeyboardControllerObserver* observer);
67 virtual void RemoveObserver(KeyboardControllerObserver* observer); 70 virtual void RemoveObserver(KeyboardControllerObserver* observer);
68 71
72 // Gets the proxy.
73 KeyboardControllerProxy* proxy() { return proxy_.get(); }
74
69 private: 75 private:
70 // For access to Observer methods for simulation. 76 // For access to Observer methods for simulation.
71 friend class KeyboardControllerTest; 77 friend class KeyboardControllerTest;
72 78
73 // aura::WindowObserver overrides 79 // aura::WindowObserver overrides
74 virtual void OnWindowHierarchyChanged( 80 virtual void OnWindowHierarchyChanged(
75 const HierarchyChangeParams& params) OVERRIDE; 81 const HierarchyChangeParams& params) OVERRIDE;
76 82
77 // InputMethodObserver overrides 83 // InputMethodObserver overrides
78 virtual void OnTextInputTypeChanged( 84 virtual void OnTextInputTypeChanged(
(...skipping 18 matching lines...) Expand all
97 ObserverList<KeyboardControllerObserver> observer_list_; 103 ObserverList<KeyboardControllerObserver> observer_list_;
98 104
99 base::WeakPtrFactory<KeyboardController> weak_factory_; 105 base::WeakPtrFactory<KeyboardController> weak_factory_;
100 106
101 DISALLOW_COPY_AND_ASSIGN(KeyboardController); 107 DISALLOW_COPY_AND_ASSIGN(KeyboardController);
102 }; 108 };
103 109
104 } // namespace keyboard 110 } // namespace keyboard
105 111
106 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ 112 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller.cc » ('j') | ui/keyboard/keyboard_controller_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698