Index: chrome/browser/ui/tab_contents/core_tab_helper.cc |
=================================================================== |
--- chrome/browser/ui/tab_contents/core_tab_helper.cc (revision 238152) |
+++ chrome/browser/ui/tab_contents/core_tab_helper.cc (working copy) |
@@ -31,6 +31,10 @@ |
#include "ui/base/l10n/l10n_util.h" |
#include "ui/gfx/codec/jpeg_codec.h" |
+#if defined(OS_WIN) |
+#include "base/win/win_util.h" |
+#endif |
+ |
using content::WebContents; |
DEFINE_WEB_CONTENTS_USER_DATA_KEY(CoreTabHelper); |
@@ -191,6 +195,8 @@ |
bool CoreTabHelper::OnMessageReceived(const IPC::Message& message) { |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(CoreTabHelper, message) |
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FocusedNodeTouched, |
+ OnFocusedNodeTouched) |
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestThumbnailForContextNode_ACK, |
OnRequestThumbnailForContextNodeACK) |
IPC_MESSAGE_UNHANDLED(handled = false) |
@@ -198,6 +204,16 @@ |
return handled; |
} |
+void CoreTabHelper::OnFocusedNodeTouched(bool editable) { |
+#if defined(OS_WIN) && defined(USE_AURA) |
+ if (editable) { |
+ base::win::DisplayVirtualKeyboard(); |
+ } else { |
+ base::win::DismissVirtualKeyboard(); |
+ } |
+#endif // OS_WIN && USE_AURA |
+} |
+ |
// Handles the image thumbnail for the context node, composes a image search |
// request based on the received thumbnail and opens the request in a new tab. |
void CoreTabHelper::OnRequestThumbnailForContextNodeACK( |