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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 1155013005: Refactoring the ownership of ui::InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased. 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: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index bf113e6e119de7bcb3ab99b2f21a1d185eba9ef7..55f35827c22f651c267aa22f3ba2764349e574be 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -16,6 +16,7 @@
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/aura/window_observer.h"
+#include "ui/aura/window_tree_host.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/base/ui_base_types.h"
@@ -275,8 +276,7 @@ InputMethod* NativeWidgetAura::CreateInputMethod() {
return new NullInputMethod();
aura::Window* root_window = window_->GetRootWindow();
- ui::InputMethod* host =
- root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
+ ui::InputMethod* host = root_window->GetHost()->GetInputMethod();
James Su 2015/06/02 07:05:27 You can just call GetHostInputMethod() here.
Shu Chen 2015/06/02 07:20:21 Done.
return new InputMethodBridge(this, host, true);
}
@@ -286,7 +286,7 @@ internal::InputMethodDelegate* NativeWidgetAura::GetInputMethodDelegate() {
ui::InputMethod* NativeWidgetAura::GetHostInputMethod() {
aura::Window* root_window = window_->GetRootWindow();
- return root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
+ return root_window->GetHost()->GetInputMethod();
}
void NativeWidgetAura::CenterWindow(const gfx::Size& size) {

Powered by Google App Engine
This is Rietveld 408576698