summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-09 21:16:44 +0000
committerdbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-09 21:16:44 +0000
commit6ec9e5cdb41d74168750d2d51055420457d56a8f (patch)
tree571962cc526d506259513a43f82b2b6cfe790bde /chrome
parent16af1688562d8407ffe77a4b870d5cfa4ee25b08 (diff)
downloadchromium_src-6ec9e5cdb41d74168750d2d51055420457d56a8f.zip
chromium_src-6ec9e5cdb41d74168750d2d51055420457d56a8f.tar.gz
chromium_src-6ec9e5cdb41d74168750d2d51055420457d56a8f.tar.bz2
Revert 116903 - On Windows 8 if the user touches the omnibox on a touch screen the On-screen keyboard(OSK) will now display immediately.
Creates an ITextInputPanel object and binds it to the omnibox and then uses it to display the keyboard when we receive a WM_POINTER event. Only works on Win 8 since we need to use WM_POINTER to avoid issues with focus handling. BUG=105637 TEST=Verify 105637 Review URL: http://codereview.chromium.org/8662018 TBR=abodenha@chromium.org Review URL: http://codereview.chromium.org/9155002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_win.cc17
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_win.h15
2 files changed, 2 insertions, 30 deletions
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index cc6da3d..5fd6c70 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,7 +8,6 @@
#include <locale>
#include <string>
-#include <peninputpanel.h>
#include <richedit.h>
#include <textserv.h>
@@ -475,10 +474,6 @@ OmniboxViewWin::OmniboxViewWin(AutocompleteEditController* controller,
SetReadOnly(popup_window_mode_);
SetFont(font_.GetNativeFont());
- if (SUCCEEDED(keyboard_.CreateInstance(CLSID_TextInputPanel, NULL,
- CLSCTX_INPROC)))
- keyboard_->put_AttachedEditWindow(m_hWnd);
-
// NOTE: Do not use SetWordBreakProcEx() here, that is no longer supported as
// of Rich Edit 2.0 onward.
SendMessage(m_hWnd, EM_SETWORDBREAKPROC, 0,
@@ -1424,16 +1419,6 @@ LRESULT OmniboxViewWin::OnImeNotify(UINT message,
return DefWindowProc(message, wparam, lparam);
}
-LRESULT OmniboxViewWin::OnPointerDown(UINT message,
- WPARAM wparam,
- LPARAM lparam) {
- SetFocus();
- // ITextInputPanel is not supported on all platforms. NULL is fine.
- if (keyboard_ != NULL)
- keyboard_->SetInPlaceVisibility(true);
- return DefWindowProc(message, wparam, lparam);
-}
-
void OmniboxViewWin::OnKeyDown(TCHAR key,
UINT repeat_count,
UINT flags) {
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.h b/chrome/browser/ui/views/omnibox/omnibox_view_win.h
index 386179d..6d1dfd7 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -11,7 +11,6 @@
#include <atlcrack.h>
#include <atlctrls.h>
#include <atlmisc.h>
-#include <peninputpanel.h>
#include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl.
#include "base/memory/scoped_ptr.h"
@@ -36,12 +35,6 @@ class NativeViewHost;
class View;
}
-// TODO(abodenha): This should be removed once we have the new windows SDK
-// which defines these messages.
-#if !defined(WM_POINTERDOWN)
-#define WM_POINTERDOWN 0x0246
-#endif // WM_POINTERDOWN
-
// Provides the implementation of an edit control with a drop-down
// autocomplete box. The box itself is implemented in autocomplete_popup.cc
// This file implements the edit box and management for the popup.
@@ -179,7 +172,6 @@ class OmniboxViewWin
MESSAGE_HANDLER_EX(WM_GETOBJECT, OnGetObject)
MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition)
MESSAGE_HANDLER_EX(WM_IME_NOTIFY, OnImeNotify)
- MESSAGE_HANDLER_EX(WM_POINTERDOWN, OnPointerDown)
MSG_WM_KEYDOWN(OnKeyDown)
MSG_WM_KEYUP(OnKeyUp)
MSG_WM_KILLFOCUS(OnKillFocus)
@@ -279,7 +271,6 @@ class OmniboxViewWin
LRESULT OnGetObject(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeNotify(UINT message, WPARAM wparam, LPARAM lparam);
- LRESULT OnPointerDown(UINT message, WPARAM wparam, LPARAM lparam);
void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags);
void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags);
void OnKillFocus(HWND focus_wnd);
@@ -547,10 +538,6 @@ class OmniboxViewWin
// The native view host.
views::NativeViewHost* native_view_host_;
- // ITextInputPanel to allow us to show the Windows virtual keyboard when a
- // user touches the Omnibox.
- base::win::ScopedComPtr<ITextInputPanel> keyboard_;
-
DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin);
};