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

Side by Side Diff: content/renderer/render_widget.cc

Issue 826713002: [ChromeOS] Show autofill popup after keyboard (if any) is shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable autofill popup waiting for keyboard when keyboard has been disabled. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « content/common/view_messages.h ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) 696 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown)
697 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive) 697 IPC_MESSAGE_HANDLER(ViewMsg_SetInputMethodActive, OnSetInputMethodActive)
698 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShown, OnCandidateWindowShown) 698 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowShown, OnCandidateWindowShown)
699 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdated, 699 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowUpdated,
700 OnCandidateWindowUpdated) 700 OnCandidateWindowUpdated)
701 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHidden, OnCandidateWindowHidden) 701 IPC_MESSAGE_HANDLER(ViewMsg_CandidateWindowHidden, OnCandidateWindowHidden)
702 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) 702 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint)
703 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 703 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
704 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 704 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
705 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 705 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
706 IPC_MESSAGE_HANDLER(ViewMsg_FocusChangeComplete, FocusChangeComplete)
706 #if defined(OS_ANDROID) 707 #if defined(OS_ANDROID)
707 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded) 708 IPC_MESSAGE_HANDLER(ViewMsg_ShowImeIfNeeded, OnShowImeIfNeeded)
708 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck) 709 IPC_MESSAGE_HANDLER(ViewMsg_ImeEventAck, OnImeEventAck)
709 #endif 710 #endif
710 IPC_MESSAGE_UNHANDLED(handled = false) 711 IPC_MESSAGE_UNHANDLED(handled = false)
711 IPC_END_MESSAGE_MAP() 712 IPC_END_MESSAGE_MAP()
712 return handled; 713 return handled;
713 } 714 }
714 715
715 bool RenderWidget::Send(IPC::Message* message) { 716 bool RenderWidget::Send(IPC::Message* message) {
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 1234
1234 if (!prevent_default) { 1235 if (!prevent_default) {
1235 if (WebInputEvent::isKeyboardEventType(input_event->type)) 1236 if (WebInputEvent::isKeyboardEventType(input_event->type))
1236 DidHandleKeyEvent(); 1237 DidHandleKeyEvent();
1237 if (WebInputEvent::isMouseEventType(input_event->type)) 1238 if (WebInputEvent::isMouseEventType(input_event->type))
1238 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event))); 1239 DidHandleMouseEvent(*(static_cast<const WebMouseEvent*>(input_event)));
1239 if (WebInputEvent::isTouchEventType(input_event->type)) 1240 if (WebInputEvent::isTouchEventType(input_event->type))
1240 DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event))); 1241 DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event)));
1241 } 1242 }
1242 1243
1243 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with 1244 // TODO(rouslan): Fix Windows 8 behavior of autofill popup with virtual
1244 // virtual keyboard. 1245 // keyboard.
1245 #if !defined(OS_ANDROID) 1246 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
1246 // Virtual keyboard is not supported, so react to focus change immediately. 1247 // Virtual keyboard is not supported, so react to focus change immediately.
1247 if (processed && (input_event->type == WebInputEvent::TouchEnd || 1248 if (processed && (input_event->type == WebInputEvent::TouchEnd ||
1248 input_event->type == WebInputEvent::MouseUp)) { 1249 input_event->type == WebInputEvent::MouseUp)) {
1249 FocusChangeComplete(); 1250 FocusChangeComplete();
1250 } 1251 }
1251 #endif 1252 #endif
1252 } 1253 }
1253 1254
1254 void RenderWidget::OnCursorVisibilityChange(bool is_visible) { 1255 void RenderWidget::OnCursorVisibilityChange(bool is_visible) {
1255 if (webwidget_) 1256 if (webwidget_)
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 1699
1699 void RenderWidget::showImeIfNeeded() { 1700 void RenderWidget::showImeIfNeeded() {
1700 OnShowImeIfNeeded(); 1701 OnShowImeIfNeeded();
1701 } 1702 }
1702 1703
1703 void RenderWidget::OnShowImeIfNeeded() { 1704 void RenderWidget::OnShowImeIfNeeded() {
1704 #if defined(OS_ANDROID) || defined(USE_AURA) 1705 #if defined(OS_ANDROID) || defined(USE_AURA)
1705 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME); 1706 UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
1706 #endif 1707 #endif
1707 1708
1708 // TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with 1709 // TODO(rouslan): Fix Windows 8 behavior of autofill popup with virtual
1709 // virtual keyboard. 1710 // keyboard.
1710 #if !defined(OS_ANDROID) 1711 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
1711 FocusChangeComplete(); 1712 FocusChangeComplete();
1712 #endif 1713 #endif
1713 } 1714 }
1714 1715
1715 #if defined(OS_ANDROID) 1716 #if defined(OS_ANDROID)
1716 void RenderWidget::IncrementOutstandingImeEventAcks() { 1717 void RenderWidget::IncrementOutstandingImeEventAcks() {
1717 ++outstanding_ime_acks_; 1718 ++outstanding_ime_acks_;
1718 } 1719 }
1719 1720
1720 void RenderWidget::OnImeEventAck() { 1721 void RenderWidget::OnImeEventAck() {
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2372 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2372 video_hole_frames_.AddObserver(frame); 2373 video_hole_frames_.AddObserver(frame);
2373 } 2374 }
2374 2375
2375 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2376 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2376 video_hole_frames_.RemoveObserver(frame); 2377 video_hole_frames_.RemoveObserver(frame);
2377 } 2378 }
2378 #endif // defined(VIDEO_HOLE) 2379 #endif // defined(VIDEO_HOLE)
2379 2380
2380 } // namespace content 2381 } // namespace content
OLDNEW
« no previous file with comments | « content/common/view_messages.h ('k') | ui/base/ime/dummy_input_method.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698