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

Side by Side Diff: content/renderer/input/render_widget_input_handler.cc

Issue 2654703002: Rename showVirtualKeyboard() to showVirtualKeyboardOnElementFocus(). (Closed)
Patch Set: Fixing Android-specific compile error in render_widget_input_handler.cc Created 3 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 | « no previous file | content/renderer/render_view_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/input/render_widget_input_handler.h" 5 #include "content/renderer/input/render_widget_input_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 // behavior is to just show the IME and don't propagate the key. 272 // behavior is to just show the IME and don't propagate the key.
273 // A typical use case is a web form: the DPAD_CENTER should bring up the IME 273 // A typical use case is a web form: the DPAD_CENTER should bring up the IME
274 // when clicked on an input text field and cause the form submit if clicked 274 // when clicked on an input text field and cause the form submit if clicked
275 // when the submit button is focused, but not vice-versa. 275 // when the submit button is focused, but not vice-versa.
276 // The UI layer takes care of translating DPAD_CENTER into a RETURN key, 276 // The UI layer takes care of translating DPAD_CENTER into a RETURN key,
277 // but at this point we have to swallow the event for the scenario (2). 277 // but at this point we have to swallow the event for the scenario (2).
278 const WebKeyboardEvent& key_event = 278 const WebKeyboardEvent& key_event =
279 static_cast<const WebKeyboardEvent&>(input_event); 279 static_cast<const WebKeyboardEvent&>(input_event);
280 if (key_event.nativeKeyCode == AKEYCODE_DPAD_CENTER && 280 if (key_event.nativeKeyCode == AKEYCODE_DPAD_CENTER &&
281 widget_->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) { 281 widget_->GetTextInputType() != ui::TEXT_INPUT_TYPE_NONE) {
282 widget_->showVirtualKeyboard(); 282 widget_->showVirtualKeyboardOnElementFocus();
283 prevent_default = true; 283 prevent_default = true;
284 } 284 }
285 #endif 285 #endif
286 } 286 }
287 287
288 if (WebInputEvent::isGestureEventType(input_event.type())) { 288 if (WebInputEvent::isGestureEventType(input_event.type())) {
289 const WebGestureEvent& gesture_event = 289 const WebGestureEvent& gesture_event =
290 static_cast<const WebGestureEvent&>(input_event); 290 static_cast<const WebGestureEvent&>(input_event);
291 if (input_event.type() == WebInputEvent::GestureLongPress) { 291 if (input_event.type() == WebInputEvent::GestureLongPress) {
292 context_menu_source_type_ = ui::MENU_SOURCE_LONG_PRESS; 292 context_menu_source_type_ = ui::MENU_SOURCE_LONG_PRESS;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // it can be bundled in the event ack. 461 // it can be bundled in the event ack.
462 if (handling_event_overscroll_) { 462 if (handling_event_overscroll_) {
463 *handling_event_overscroll_ = std::move(params); 463 *handling_event_overscroll_ = std::move(params);
464 return; 464 return;
465 } 465 }
466 466
467 delegate_->OnDidOverscroll(*params); 467 delegate_->OnDidOverscroll(*params);
468 } 468 }
469 469
470 } // namespace content 470 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698