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

Unified Diff: chrome/browser/ui/views/frame/browser_root_view.cc

Issue 7324029: Fix the bug of the hide key on Omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 months 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
« no previous file with comments | « no previous file | views/widget/root_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_root_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index d1d07f3ec627af6a9e1c47330c3bb199c4ce9aff..51c606ad2821f9c64b29088d6969cea20e6f6311 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -21,7 +21,7 @@
#if defined(TOUCH_UI)
#include "content/common/notification_service.h"
#include "content/common/notification_type.h"
-#include "views/ime/text_input_client.h"
+#include "views/ime/input_method.h"
#endif
// static
@@ -38,13 +38,14 @@ BrowserRootView::BrowserRootView(BrowserView* browser_view,
ui::TouchStatus BrowserRootView::OnTouchEvent(const views::TouchEvent& event) {
const ui::TouchStatus status = views::internal::RootView::OnTouchEvent(event);
- views::View* handler = touch_pressed_handler();
- if (!handler)
+ if (event.type() != ui::ET_TOUCH_PRESSED)
return status;
- views::TextInputClient* text_input_client = handler->GetTextInputClient();
- if (!text_input_client)
+
+ views::InputMethod* input_method = GetInputMethod();
+ if (!input_method)
return status;
- ui::TextInputType text_input_type = text_input_client->GetTextInputType();
+
+ ui::TextInputType text_input_type = input_method->GetTextInputType();
if (text_input_type != ui::TEXT_INPUT_TYPE_NONE) {
NotificationService::current()->Notify(
NotificationType::EDITABLE_ELEMENT_TOUCHED,
« no previous file with comments | « no previous file | views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698