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

Unified Diff: ash/display/display_controller.h

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: ash/display/display_controller.h
diff --git a/ash/display/display_controller.h b/ash/display/display_controller.h
index bb476ef4369ff559f1f84caf202252f23bcb5636..f5033434338ca3d2d109ae2d8f5a3a62c13abfc5 100644
--- a/ash/display/display_controller.h
+++ b/ash/display/display_controller.h
@@ -19,6 +19,8 @@
#include "base/time/time.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host_observer.h"
+#include "ui/base/ime/input_method.h"
+#include "ui/base/ime/input_method_delegate.h"
#include "ui/gfx/display_observer.h"
#include "ui/gfx/geometry/point.h"
@@ -51,7 +53,8 @@ class RootWindowController;
// display, keeping them in sync with display configuration changes.
class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
public aura::WindowTreeHostObserver,
- public DisplayManager::Delegate {
+ public DisplayManager::Delegate,
+ public ui::internal::InputMethodDelegate {
public:
class ASH_EXPORT Observer {
public:
@@ -163,6 +166,9 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
void PreDisplayConfigurationChange(bool clear_focus) override;
void PostDisplayConfigurationChange() override;
+ // ui::internal::InputMethodDelegate overrides:
+ bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
+
private:
FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, BoundsUpdated);
FRIEND_TEST_ALL_PREFIXES(DisplayControllerTest, SecondaryDisplayLayout);
@@ -218,6 +224,8 @@ class ASH_EXPORT DisplayController : public gfx::DisplayObserver,
scoped_ptr<CursorWindowController> cursor_window_controller_;
scoped_ptr<MirrorWindowController> mirror_window_controller_;
+ scoped_ptr<ui::InputMethod> input_method_;
+
// Stores the current cursor location (in native coordinates and screen
// coordinates respectively). The locations are used to restore the cursor
// location when the display configuration changes and to determine whether

Powered by Google App Engine
This is Rietveld 408576698