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

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: fixed bot failure: cast_shell_linux Created 5 years, 6 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 b4e7fc414d70d90c04527f1f71983cdc6ee4cc28..c66c0e262d0cc00b2c9bf3a9123f8edc9ef7f514 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"
@@ -274,10 +275,7 @@ InputMethod* NativeWidgetAura::CreateInputMethod() {
if (switches::IsTextInputFocusManagerEnabled())
return new NullInputMethod();
- aura::Window* root_window = window_->GetRootWindow();
- ui::InputMethod* host =
- root_window->GetProperty(aura::client::kRootWindowInputMethodKey);
- return new InputMethodBridge(this, host, true);
+ return new InputMethodBridge(this, GetHostInputMethod(), true);
}
internal::InputMethodDelegate* NativeWidgetAura::GetInputMethodDelegate() {
@@ -286,7 +284,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