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

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

Issue 527153002: Fix the issue that GetFrameWindow() may change between AddObserver and RemoveObserver in KeyboardCo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised per comments. Created 6 years, 3 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
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void ResetWindowInsets(); 132 void ResetWindowInsets();
133 133
134 // Returns true if keyboard is scheduled to hide. 134 // Returns true if keyboard is scheduled to hide.
135 bool WillHideKeyboard() const; 135 bool WillHideKeyboard() const;
136 136
137 // Called when show and hide animation finished successfully. If the animation 137 // Called when show and hide animation finished successfully. If the animation
138 // is aborted, it won't be called. 138 // is aborted, it won't be called.
139 void ShowAnimationFinished(); 139 void ShowAnimationFinished();
140 void HideAnimationFinished(); 140 void HideAnimationFinished();
141 141
142 // Adds or removes an observer for tracking changes to a window size or 142 // Adds an observer for tracking changes to a window size or
143 // position while the keyboard is displayed. Any window repositioning 143 // position while the keyboard is displayed. Any window repositioning
144 // invalidates insets for overscrolling. 144 // invalidates insets for overscrolling.
145 void AddBoundsChangedObserver(aura::Window* window); 145 void AddBoundsChangedObserver(aura::Window* window);
146 void RemoveBoundsChangedObserver(aura::Window* window);
147 146
148 scoped_ptr<KeyboardControllerProxy> proxy_; 147 scoped_ptr<KeyboardControllerProxy> proxy_;
149 scoped_ptr<aura::Window> container_; 148 scoped_ptr<aura::Window> container_;
150 // CallbackAnimationObserver should destructed before container_ because it 149 // CallbackAnimationObserver should destructed before container_ because it
151 // uses container_'s animator. 150 // uses container_'s animator.
152 scoped_ptr<CallbackAnimationObserver> animation_observer_; 151 scoped_ptr<CallbackAnimationObserver> animation_observer_;
153 152
154 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_; 153 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_;
155 154
156 ui::InputMethod* input_method_; 155 ui::InputMethod* input_method_;
(...skipping 10 matching lines...) Expand all
167 gfx::Rect current_keyboard_bounds_; 166 gfx::Rect current_keyboard_bounds_;
168 167
169 static KeyboardController* instance_; 168 static KeyboardController* instance_;
170 169
171 DISALLOW_COPY_AND_ASSIGN(KeyboardController); 170 DISALLOW_COPY_AND_ASSIGN(KeyboardController);
172 }; 171 };
173 172
174 } // namespace keyboard 173 } // namespace keyboard
175 174
176 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ 175 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/keyboard/keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698