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

Unified Diff: ui/views/corewm/input_method_event_filter.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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
« no previous file with comments | « ui/views/corewm/input_method_event_filter.h ('k') | ui/views/corewm/tooltip_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/input_method_event_filter.cc
diff --git a/ui/views/corewm/input_method_event_filter.cc b/ui/views/corewm/input_method_event_filter.cc
index cfdab6b7c67546882e3165fd475fbec475355032..8c99063afb09b1351bbc65e2e4d04c2a99d68f30 100644
--- a/ui/views/corewm/input_method_event_filter.cc
+++ b/ui/views/corewm/input_method_event_filter.cc
@@ -18,7 +18,7 @@ namespace corewm {
InputMethodEventFilter::InputMethodEventFilter(gfx::AcceleratedWidget widget)
: input_method_(ui::CreateInputMethod(this, widget)),
- target_root_window_(NULL) {
+ target_dispatcher_(NULL) {
// TODO(yusukes): Check if the root window is currently focused and pass the
// result to Init().
input_method_->Init(true);
@@ -28,7 +28,7 @@ InputMethodEventFilter::~InputMethodEventFilter() {
}
void InputMethodEventFilter::SetInputMethodPropertyInRootWindow(
- aura::RootWindow* root_window) {
+ aura::Window* root_window) {
root_window->SetProperty(aura::client::kRootWindowInputMethodKey,
input_method_.get());
}
@@ -45,10 +45,10 @@ void InputMethodEventFilter::OnKeyEvent(ui::KeyEvent* event) {
static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent();
} else {
// If the focused window is changed, all requests to IME will be
- // discarded so it's safe to update the target_root_window_ here.
+ // discarded so it's safe to update the target_dispatcher_ here.
aura::Window* target = static_cast<aura::Window*>(event->target());
- target_root_window_ = target->GetRootWindow();
- DCHECK(target_root_window_);
+ target_dispatcher_ = target->GetRootWindow()->GetDispatcher();
+ DCHECK(target_dispatcher_);
bool handled = false;
if (event->HasNativeEvent())
handled = input_method_->DispatchKeyEvent(event->native_event());
@@ -68,7 +68,7 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME(
DCHECK(event.message != WM_CHAR);
#endif
ui::TranslatedKeyEvent aura_event(event, false /* is_char */);
- return target_root_window_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
@@ -78,7 +78,7 @@ bool InputMethodEventFilter::DispatchFabricatedKeyEventPostIME(
int flags) {
ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code,
flags);
- return target_root_window_->AsRootWindowHostDelegate()->OnHostKeyEvent(
+ return target_dispatcher_->AsRootWindowHostDelegate()->OnHostKeyEvent(
&aura_event);
}
« no previous file with comments | « ui/views/corewm/input_method_event_filter.h ('k') | ui/views/corewm/tooltip_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698