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 2ee635121be64f53667c48acb21e89289a5d602d..3cb8702a7e9f9196c5e7c4418177aeb4d9526b33 100644 |
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc |
@@ -27,8 +27,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" |
@@ -379,7 +377,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(); |
James Su
2015/06/16 09:18:33
I'm wondering why this line is inside if (GetWidge
Shu Chen
2015/06/17 02:27:52
This CL doesn't change the original behaviors.
I
|
} |
} else { |
// If we're not active we need to deactivate the corresponding |
@@ -389,7 +387,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(); |
James Su
2015/06/16 09:18:33
ditto
Shu Chen
2015/06/17 02:27:52
ditto.
|
} |
} |
} |
@@ -627,17 +625,8 @@ bool DesktopNativeWidgetAura::HasCapture() const { |
desktop_window_tree_host_->HasCapture(); |
} |
-InputMethod* DesktopNativeWidgetAura::CreateInputMethod() { |
- 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) { |
@@ -980,10 +969,6 @@ gfx::Size DesktopNativeWidgetAura::GetMaximumSize() const { |
return native_widget_delegate_->GetMaximumSize(); |
} |
-ui::TextInputClient* DesktopNativeWidgetAura::GetFocusedTextInputClient() { |
- return GetWidget()->GetFocusedTextInputClient(); |
-} |
- |
gfx::NativeCursor DesktopNativeWidgetAura::GetCursor(const gfx::Point& point) { |
return cursor_; |
} |
@@ -1127,13 +1112,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(); |
@@ -1141,18 +1119,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) { |