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

Side by Side Diff: ash/display/window_tree_host_manager.h

Issue 2909603002: Revert of Remove InputMethodEventHandler. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/display/window_tree_host_manager.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_ 5 #ifndef ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_
6 #define ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_ 6 #define ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 21 matching lines...) Expand all
32 32
33 namespace gfx { 33 namespace gfx {
34 class Insets; 34 class Insets;
35 } 35 }
36 36
37 namespace ash { 37 namespace ash {
38 class AshWindowTreeHost; 38 class AshWindowTreeHost;
39 struct AshWindowTreeHostInitParams; 39 struct AshWindowTreeHostInitParams;
40 class CursorWindowController; 40 class CursorWindowController;
41 class FocusActivationStore; 41 class FocusActivationStore;
42 class InputMethodEventHandler;
42 class MirrorWindowController; 43 class MirrorWindowController;
43 class RootWindowController; 44 class RootWindowController;
44 45
45 // WindowTreeHostManager owns and maintains RootWindows for each attached 46 // WindowTreeHostManager owns and maintains RootWindows for each attached
46 // display, keeping them in sync with display configuration changes. 47 // display, keeping them in sync with display configuration changes.
47 class ASH_EXPORT WindowTreeHostManager 48 class ASH_EXPORT WindowTreeHostManager
48 : public display::DisplayObserver, 49 : public display::DisplayObserver,
49 public aura::WindowTreeHostObserver, 50 public aura::WindowTreeHostObserver,
50 public display::DisplayManager::Delegate, 51 public display::DisplayManager::Delegate,
51 public ui::internal::InputMethodDelegate { 52 public ui::internal::InputMethodDelegate {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const display::DisplayInfoList& info_list) override; 153 const display::DisplayInfoList& info_list) override;
153 void CloseMirroringDisplayIfNotNecessary() override; 154 void CloseMirroringDisplayIfNotNecessary() override;
154 void PreDisplayConfigurationChange(bool clear_focus) override; 155 void PreDisplayConfigurationChange(bool clear_focus) override;
155 void PostDisplayConfigurationChange(bool must_clear_window) override; 156 void PostDisplayConfigurationChange(bool must_clear_window) override;
156 display::DisplayConfigurator* display_configurator() override; 157 display::DisplayConfigurator* display_configurator() override;
157 158
158 // ui::internal::InputMethodDelegate overrides: 159 // ui::internal::InputMethodDelegate overrides:
159 ui::EventDispatchDetails DispatchKeyEventPostIME( 160 ui::EventDispatchDetails DispatchKeyEventPostIME(
160 ui::KeyEvent* event) override; 161 ui::KeyEvent* event) override;
161 162
163 InputMethodEventHandler* input_method_event_handler() {
164 return input_method_event_handler_.get();
165 }
166
162 private: 167 private:
163 FRIEND_TEST_ALL_PREFIXES(WindowTreeHostManagerTest, BoundsUpdated); 168 FRIEND_TEST_ALL_PREFIXES(WindowTreeHostManagerTest, BoundsUpdated);
164 FRIEND_TEST_ALL_PREFIXES(WindowTreeHostManagerTest, SecondaryDisplayLayout); 169 FRIEND_TEST_ALL_PREFIXES(WindowTreeHostManagerTest, SecondaryDisplayLayout);
165 friend class MirrorWindowController; 170 friend class MirrorWindowController;
166 171
167 // Creates a WindowTreeHost for |display| and stores it in the 172 // Creates a WindowTreeHost for |display| and stores it in the
168 // |window_tree_hosts_| map. 173 // |window_tree_hosts_| map.
169 AshWindowTreeHost* AddWindowTreeHostForDisplay( 174 AshWindowTreeHost* AddWindowTreeHostForDisplay(
170 const display::Display& display, 175 const display::Display& display,
171 const AshWindowTreeHostInitParams& params); 176 const AshWindowTreeHostInitParams& params);
(...skipping 11 matching lines...) Expand all
183 // Store the primary window tree host temporarily while replacing 188 // Store the primary window tree host temporarily while replacing
184 // display. 189 // display.
185 AshWindowTreeHost* primary_tree_host_for_replace_; 190 AshWindowTreeHost* primary_tree_host_for_replace_;
186 191
187 std::unique_ptr<FocusActivationStore> focus_activation_store_; 192 std::unique_ptr<FocusActivationStore> focus_activation_store_;
188 193
189 std::unique_ptr<CursorWindowController> cursor_window_controller_; 194 std::unique_ptr<CursorWindowController> cursor_window_controller_;
190 std::unique_ptr<MirrorWindowController> mirror_window_controller_; 195 std::unique_ptr<MirrorWindowController> mirror_window_controller_;
191 196
192 std::unique_ptr<ui::InputMethod> input_method_; 197 std::unique_ptr<ui::InputMethod> input_method_;
198 std::unique_ptr<InputMethodEventHandler> input_method_event_handler_;
193 199
194 // Stores the current cursor location (in native coordinates and screen 200 // Stores the current cursor location (in native coordinates and screen
195 // coordinates respectively). The locations are used to restore the cursor 201 // coordinates respectively). The locations are used to restore the cursor
196 // location when the display configuration changes and to determine whether 202 // location when the display configuration changes and to determine whether
197 // the mouse should be moved after a display configuration change. 203 // the mouse should be moved after a display configuration change.
198 gfx::Point cursor_location_in_native_coords_for_restore_; 204 gfx::Point cursor_location_in_native_coords_for_restore_;
199 gfx::Point cursor_location_in_screen_coords_for_restore_; 205 gfx::Point cursor_location_in_screen_coords_for_restore_;
200 206
201 // Stores the cursor's display. The id is used to determine whether the mouse 207 // Stores the cursor's display. The id is used to determine whether the mouse
202 // should be moved after a display configuration change. 208 // should be moved after a display configuration change.
203 int64_t cursor_display_id_for_restore_; 209 int64_t cursor_display_id_for_restore_;
204 210
205 base::WeakPtrFactory<WindowTreeHostManager> weak_ptr_factory_; 211 base::WeakPtrFactory<WindowTreeHostManager> weak_ptr_factory_;
206 212
207 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager); 213 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager);
208 }; 214 };
209 215
210 } // namespace ash 216 } // namespace ash
211 217
212 #endif // ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_ 218 #endif // ASH_DISPLAY_WINDOW_TREE_HOST_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/display/window_tree_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698