| 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
|
|
|
|
|