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

Side by Side 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 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/touch_web_contents_observer_win.h"
6
7 #include "base/win/win_util.h"
8 #include "chrome/common/render_messages.h"
9
10 using content::WebContents;
11
12 DEFINE_WEB_CONTENTS_USER_DATA_KEY(TouchWebContentsObserver);
13
14 TouchWebContentsObserver::TouchWebContentsObserver(WebContents* web_contents)
15 : content::WebContentsObserver(web_contents) {
16 }
17
18 TouchWebContentsObserver::~TouchWebContentsObserver() {
19 }
20
21 bool TouchWebContentsObserver::OnMessageReceived(const IPC::Message& message) {
22 bool handled = true;
23 IPC_BEGIN_MESSAGE_MAP(TouchWebContentsObserver, message)
24 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched,
25 OnFocusedNodeTouched)
26 IPC_MESSAGE_UNHANDLED(handled = false)
27 IPC_END_MESSAGE_MAP()
28 return handled;
29 }
30
31 void TouchWebContentsObserver::OnFocusedNodeTouched(bool editable) {
32 #if defined(USE_AURA)
33 if (editable) {
34 base::win::DisplayVirtualKeyboard();
35 } else {
36 base::win::DismissVirtualKeyboard();
37 }
38 #endif // USE_AURA
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698