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

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

Issue 1209663002: Use EventHandler for IME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/ash.gyp ('k') | ash/display/display_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) 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_DISPLAY_CONTROLLER_H_ 5 #ifndef ASH_DISPLAY_DISPLAY_CONTROLLER_H_
6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 6 #define ASH_DISPLAY_DISPLAY_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 28 matching lines...) Expand all
39 class Insets; 39 class Insets;
40 } 40 }
41 41
42 namespace ash { 42 namespace ash {
43 class AshWindowTreeHost; 43 class AshWindowTreeHost;
44 struct AshWindowTreeHostInitParams; 44 struct AshWindowTreeHostInitParams;
45 class CursorWindowController; 45 class CursorWindowController;
46 class DisplayInfo; 46 class DisplayInfo;
47 class DisplayManager; 47 class DisplayManager;
48 class FocusActivationStore; 48 class FocusActivationStore;
49 class InputMethodEventHandler;
49 class MirrorWindowController; 50 class MirrorWindowController;
50 class RootWindowController; 51 class RootWindowController;
51 52
52 // DisplayController owns and maintains RootWindows for each attached 53 // DisplayController owns and maintains RootWindows for each attached
53 // display, keeping them in sync with display configuration changes. 54 // display, keeping them in sync with display configuration changes.
54 class ASH_EXPORT DisplayController : public gfx::DisplayObserver, 55 class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
55 public aura::WindowTreeHostObserver, 56 public aura::WindowTreeHostObserver,
56 public DisplayManager::Delegate, 57 public DisplayManager::Delegate,
57 public ui::internal::InputMethodDelegate { 58 public ui::internal::InputMethodDelegate {
58 public: 59 public:
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // aura::DisplayManager::Delegate overrides: 166 // aura::DisplayManager::Delegate overrides:
166 void CreateOrUpdateMirroringDisplay( 167 void CreateOrUpdateMirroringDisplay(
167 const DisplayInfoList& info_list) override; 168 const DisplayInfoList& info_list) override;
168 void CloseMirroringDisplayIfNotNecessary() override; 169 void CloseMirroringDisplayIfNotNecessary() override;
169 void PreDisplayConfigurationChange(bool clear_focus) override; 170 void PreDisplayConfigurationChange(bool clear_focus) override;
170 void PostDisplayConfigurationChange() override; 171 void PostDisplayConfigurationChange() override;
171 172
172 // ui::internal::InputMethodDelegate overrides: 173 // ui::internal::InputMethodDelegate overrides:
173 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override; 174 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
174 175
176 InputMethodEventHandler* input_method_event_handler() {
177 return input_method_event_handler_.get();
178 }
179
175 private: 180 private:
176 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated); 181 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated);
177 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout); 182 FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout);
178 friend class DisplayManager; 183 friend class DisplayManager;
179 friend class MirrorWindowController; 184 friend class MirrorWindowController;
180 185
181 // Creates a WindowTreeHost for |display| and stores it in the 186 // Creates a WindowTreeHost for |display| and stores it in the
182 // |window_tree_hosts_| map. 187 // |window_tree_hosts_| map.
183 AshWindowTreeHost* AddWindowTreeHostForDisplay( 188 AshWindowTreeHost* AddWindowTreeHostForDisplay(
184 const gfx::Display& display, 189 const gfx::Display& display,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Store the primary window tree host temporarily while replacing 226 // Store the primary window tree host temporarily while replacing
222 // display. 227 // display.
223 AshWindowTreeHost* primary_tree_host_for_replace_; 228 AshWindowTreeHost* primary_tree_host_for_replace_;
224 229
225 scoped_ptr<FocusActivationStore> focus_activation_store_; 230 scoped_ptr<FocusActivationStore> focus_activation_store_;
226 231
227 scoped_ptr<CursorWindowController> cursor_window_controller_; 232 scoped_ptr<CursorWindowController> cursor_window_controller_;
228 scoped_ptr<MirrorWindowController> mirror_window_controller_; 233 scoped_ptr<MirrorWindowController> mirror_window_controller_;
229 234
230 scoped_ptr<ui::InputMethod> input_method_; 235 scoped_ptr<ui::InputMethod> input_method_;
236 scoped_ptr<InputMethodEventHandler> input_method_event_handler_;
231 237
232 // Stores the current cursor location (in native coordinates and screen 238 // Stores the current cursor location (in native coordinates and screen
233 // coordinates respectively). The locations are used to restore the cursor 239 // coordinates respectively). The locations are used to restore the cursor
234 // location when the display configuration changes and to determine whether 240 // location when the display configuration changes and to determine whether
235 // the mouse should be moved after a display configuration change. 241 // the mouse should be moved after a display configuration change.
236 gfx::Point cursor_location_in_native_coords_for_restore_; 242 gfx::Point cursor_location_in_native_coords_for_restore_;
237 gfx::Point cursor_location_in_screen_coords_for_restore_; 243 gfx::Point cursor_location_in_screen_coords_for_restore_;
238 244
239 // Stores the cursor's display. The id is used to determine whether the mouse 245 // Stores the cursor's display. The id is used to determine whether the mouse
240 // should be moved after a display configuration change. 246 // should be moved after a display configuration change.
241 int64 cursor_display_id_for_restore_; 247 int64 cursor_display_id_for_restore_;
242 248
243 base::WeakPtrFactory<DisplayController> weak_ptr_factory_; 249 base::WeakPtrFactory<DisplayController> weak_ptr_factory_;
244 250
245 DISALLOW_COPY_AND_ASSIGN(DisplayController); 251 DISALLOW_COPY_AND_ASSIGN(DisplayController);
246 }; 252 };
247 253
248 } // namespace ash 254 } // namespace ash
249 255
250 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_ 256 #endif // ASH_DISPLAY_DISPLAY_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/display_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698