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

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: 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') | ui/keyboard/keyboard_controller.cc » ('J')
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 <set>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/event_types.h" 11 #include "base/event_types.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "base/observer_list.h" 13 #include "base/observer_list.h"
12 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
13 #include "ui/base/ime/input_method_observer.h" 15 #include "ui/base/ime/input_method_observer.h"
14 #include "ui/base/ime/text_input_type.h" 16 #include "ui/base/ime/text_input_type.h"
15 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
16 #include "ui/keyboard/keyboard_export.h" 18 #include "ui/keyboard/keyboard_export.h"
17 #include "url/gurl.h" 19 #include "url/gurl.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 void RemoveBoundsChangedObserver(aura::Window* window); 148 void RemoveBoundsChangedObserver(aura::Window* window);
147 149
148 scoped_ptr<KeyboardControllerProxy> proxy_; 150 scoped_ptr<KeyboardControllerProxy> proxy_;
149 scoped_ptr<aura::Window> container_; 151 scoped_ptr<aura::Window> container_;
150 // CallbackAnimationObserver should destructed before container_ because it 152 // CallbackAnimationObserver should destructed before container_ because it
151 // uses container_'s animator. 153 // uses container_'s animator.
152 scoped_ptr<CallbackAnimationObserver> animation_observer_; 154 scoped_ptr<CallbackAnimationObserver> animation_observer_;
153 155
154 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_; 156 scoped_ptr<WindowBoundsChangeObserver> window_bounds_observer_;
155 157
158 std::set<aura::Window*> observed_windows_;
159
156 ui::InputMethod* input_method_; 160 ui::InputMethod* input_method_;
157 bool keyboard_visible_; 161 bool keyboard_visible_;
158 bool show_on_resize_; 162 bool show_on_resize_;
159 bool lock_keyboard_; 163 bool lock_keyboard_;
160 ui::TextInputType type_; 164 ui::TextInputType type_;
161 165
162 ObserverList<KeyboardControllerObserver> observer_list_; 166 ObserverList<KeyboardControllerObserver> observer_list_;
163 167
164 base::WeakPtrFactory<KeyboardController> weak_factory_; 168 base::WeakPtrFactory<KeyboardController> weak_factory_;
165 169
166 // The currently used keyboard position. 170 // The currently used keyboard position.
167 gfx::Rect current_keyboard_bounds_; 171 gfx::Rect current_keyboard_bounds_;
168 172
169 static KeyboardController* instance_; 173 static KeyboardController* instance_;
170 174
171 DISALLOW_COPY_AND_ASSIGN(KeyboardController); 175 DISALLOW_COPY_AND_ASSIGN(KeyboardController);
172 }; 176 };
173 177
174 } // namespace keyboard 178 } // namespace keyboard
175 179
176 #endif // UI_KEYBOARD_KEYBOARD_CONTROLLER_H_ 180 #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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698