| Index: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| index 0d009776c476c2b524d366ec23c18a494352785d..04087c0dccda980c8477579df8290aa1971dd0a4 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
|
| @@ -28,8 +28,6 @@
|
| #include "ui/views/corewm/tooltip.h"
|
| #include "ui/views/corewm/tooltip_controller.h"
|
| #include "ui/views/drag_utils.h"
|
| -#include "ui/views/ime/input_method_bridge.h"
|
| -#include "ui/views/ime/null_input_method.h"
|
| #include "ui/views/view_constants_aura.h"
|
| #include "ui/views/widget/desktop_aura/desktop_capture_client.h"
|
| #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater.h"
|
| @@ -380,7 +378,7 @@ void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
|
| view_for_activation->GetWidget()->GetNativeView());
|
| // Refreshes the focus info to IMF in case that IMF cached the old info
|
| // about focused text input client when it was "inactive".
|
| - GetHostInputMethod()->OnFocus();
|
| + GetInputMethod()->OnFocus();
|
| }
|
| } else {
|
| // If we're not active we need to deactivate the corresponding
|
| @@ -390,7 +388,7 @@ void DesktopNativeWidgetAura::HandleActivationChanged(bool active) {
|
| aura::Window* active_window = activation_client->GetActiveWindow();
|
| if (active_window) {
|
| activation_client->DeactivateWindow(active_window);
|
| - GetHostInputMethod()->OnBlur();
|
| + GetInputMethod()->OnBlur();
|
| }
|
| }
|
| }
|
| @@ -628,20 +626,8 @@ bool DesktopNativeWidgetAura::HasCapture() const {
|
| desktop_window_tree_host_->HasCapture();
|
| }
|
|
|
| -InputMethod* DesktopNativeWidgetAura::CreateInputMethod() {
|
| - if (switches::IsTextInputFocusManagerEnabled())
|
| - return new NullInputMethod();
|
| -
|
| - return new InputMethodBridge(this, GetHostInputMethod(), false);
|
| -}
|
| -
|
| -internal::InputMethodDelegate*
|
| - DesktopNativeWidgetAura::GetInputMethodDelegate() {
|
| - return this;
|
| -}
|
| -
|
| -ui::InputMethod* DesktopNativeWidgetAura::GetHostInputMethod() {
|
| - return host()->GetInputMethod();
|
| +ui::InputMethod* DesktopNativeWidgetAura::GetInputMethod() {
|
| + return host() ? host()->GetInputMethod() : nullptr;
|
| }
|
|
|
| void DesktopNativeWidgetAura::CenterWindow(const gfx::Size& size) {
|
| @@ -1131,13 +1117,6 @@ void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
|
| if (content_window_ == gained_focus) {
|
| desktop_window_tree_host_->OnNativeWidgetFocus();
|
| native_widget_delegate_->OnNativeFocus();
|
| -
|
| - // If focus is moving from a descendant Window to |content_window_| then
|
| - // native activation hasn't changed. Still, the InputMethod must be informed
|
| - // of the Window focus change.
|
| - InputMethod* input_method = GetWidget()->GetInputMethod();
|
| - if (input_method)
|
| - input_method->OnFocus();
|
| } else if (content_window_ == lost_focus) {
|
| desktop_window_tree_host_->OnNativeWidgetBlur();
|
| native_widget_delegate_->OnNativeBlur();
|
| @@ -1145,18 +1124,6 @@ void DesktopNativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| -// DesktopNativeWidgetAura, views::internal::InputMethodDelegate:
|
| -
|
| -void DesktopNativeWidgetAura::DispatchKeyEventPostIME(const ui::KeyEvent& key) {
|
| - FocusManager* focus_manager =
|
| - native_widget_delegate_->AsWidget()->GetFocusManager();
|
| - native_widget_delegate_->OnKeyEvent(const_cast<ui::KeyEvent*>(&key));
|
| - if (key.handled() || !focus_manager)
|
| - return;
|
| - focus_manager->OnKeyEvent(key);
|
| -}
|
| -
|
| -////////////////////////////////////////////////////////////////////////////////
|
| // DesktopNativeWidgetAura, aura::WindowDragDropDelegate implementation:
|
|
|
| void DesktopNativeWidgetAura::OnDragEntered(const ui::DropTargetEvent& event) {
|
|
|