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

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

Issue 10535046: Add Windows commandline switch --enable-views-textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and merge. Created 8 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
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_win.cc
diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc
index a9499f3467f34035d046443bdd2739386e7adf2b..d7a98f0d25942db8b479711c984a87ef8131fbb2 100644
--- a/ui/views/widget/native_widget_win.cc
+++ b/ui/views/widget/native_widget_win.cc
@@ -51,6 +51,11 @@
#include "ui/views/widget/widget_hwnd_utils.h"
#include "ui/views/window/native_frame_view.h"
+#if !defined(USE_AURA)
+#include "base/command_line.h"
+#include "ui/base/ui_base_switches.h"
+#endif
+
#pragma comment(lib, "dwmapi.lib")
// From msdn:
@@ -668,13 +673,14 @@ bool NativeWidgetWin::HasCapture() const {
}
InputMethod* NativeWidgetWin::CreateInputMethod() {
-#if defined(USE_AURA)
+#if !defined(USE_AURA)
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(switches::kEnableViewsTextfield))
+ return NULL;
+#endif
InputMethod* input_method = new InputMethodWin(this);
input_method->Init(GetWidget());
return input_method;
-#else
- return NULL;
-#endif
}
void NativeWidgetWin::CenterWindow(const gfx::Size& size) {
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698