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

Unified Diff: ui/views/widget/desktop_aura/desktop_native_widget_aura.cc

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 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/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 914c1d24a83c462a87c35a24314b3c2cb8a4f00d..d7347d008257c90ea2aa568c9c466cebf935ec6e 100644
--- a/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
+++ b/ui/views/widget/desktop_aura/desktop_native_widget_aura.cc
@@ -15,6 +15,7 @@
#include "ui/aura/window_property.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/hit_test.h"
+#include "ui/base/ui_base_switches_util.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/display.h"
@@ -25,8 +26,8 @@
#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.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"
@@ -628,6 +629,9 @@ bool DesktopNativeWidgetAura::HasCapture() const {
}
InputMethod* DesktopNativeWidgetAura::CreateInputMethod() {
+ if (switches::IsTextInputFocusManagerEnabled())
+ return new NullInputMethod();
+
ui::InputMethod* host = input_method_event_filter_->input_method();
return new InputMethodBridge(this, host, false);
}
@@ -637,6 +641,10 @@ internal::InputMethodDelegate*
return this;
}
+ui::InputMethod* DesktopNativeWidgetAura::GetHostInputMethod() {
+ return input_method_event_filter_->input_method();
+}
+
void DesktopNativeWidgetAura::CenterWindow(const gfx::Size& size) {
if (content_window_)
desktop_window_tree_host_->CenterWindow(size);
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.h ('k') | ui/views/widget/desktop_aura/x11_desktop_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698