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

Unified Diff: chrome/browser/ui/touch_web_contents_observer_win.cc

Issue 89873002: Ensure that the OSK on Windows 8 shows up when we tap on an editable field in any WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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: chrome/browser/ui/touch_web_contents_observer_win.cc
===================================================================
--- chrome/browser/ui/touch_web_contents_observer_win.cc (revision 0)
+++ chrome/browser/ui/touch_web_contents_observer_win.cc (revision 0)
@@ -0,0 +1,39 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/touch_web_contents_observer_win.h"
+
+#include "base/win/win_util.h"
+#include "chrome/common/render_messages.h"
+
+using content::WebContents;
+
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(TouchWebContentsObserver);
+
+TouchWebContentsObserver::TouchWebContentsObserver(WebContents* web_contents)
+ : content::WebContentsObserver(web_contents) {
+}
+
+TouchWebContentsObserver::~TouchWebContentsObserver() {
+}
+
+bool TouchWebContentsObserver::OnMessageReceived(const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(TouchWebContentsObserver, message)
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched,
+ OnFocusedNodeTouched)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
+void TouchWebContentsObserver::OnFocusedNodeTouched(bool editable) {
+#if defined(USE_AURA)
+ if (editable) {
+ base::win::DisplayVirtualKeyboard();
+ } else {
+ base::win::DismissVirtualKeyboard();
+ }
+#endif // USE_AURA
+}
Property changes on: chrome\browser\ui\touch_web_contents_observer_win.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698