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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 83753006: Merge 236478 "Update accept_return_character_ for synthetic even..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 event->SetHandled(); 2571 event->SetHandled();
2572 return; 2572 return;
2573 } 2573 }
2574 } 2574 }
2575 } 2575 }
2576 if (!in_shutdown_) { 2576 if (!in_shutdown_) {
2577 in_shutdown_ = true; 2577 in_shutdown_ = true;
2578 host_->Shutdown(); 2578 host_->Shutdown();
2579 } 2579 }
2580 } else { 2580 } else {
2581 // Accept return key character events between its press and release events.
2582 if (event->key_code() == ui::VKEY_RETURN)
2583 accept_return_character_ = event->type() == ui::ET_KEY_PRESSED;
2584
2581 // We don't have to communicate with an input method here. 2585 // We don't have to communicate with an input method here.
2582 if (!event->HasNativeEvent()) { 2586 if (!event->HasNativeEvent()) {
2583 NativeWebKeyboardEvent webkit_event( 2587 NativeWebKeyboardEvent webkit_event(
2584 event->type(), 2588 event->type(),
2585 event->is_char(), 2589 event->is_char(),
2586 event->is_char() ? event->GetCharacter() : event->key_code(), 2590 event->is_char() ? event->GetCharacter() : event->key_code(),
2587 event->flags(), 2591 event->flags(),
2588 ui::EventTimeForNow().InSecondsF()); 2592 ui::EventTimeForNow().InSecondsF());
2589 host_->ForwardKeyboardEvent(webkit_event); 2593 host_->ForwardKeyboardEvent(webkit_event);
2590 } else { 2594 } else {
2591 if (event->key_code() == ui::VKEY_RETURN)
2592 accept_return_character_ = event->type() == ui::ET_KEY_PRESSED;
2593 NativeWebKeyboardEvent webkit_event(event); 2595 NativeWebKeyboardEvent webkit_event(event);
2594 host_->ForwardKeyboardEvent(webkit_event); 2596 host_->ForwardKeyboardEvent(webkit_event);
2595 } 2597 }
2596 } 2598 }
2597 event->SetHandled(); 2599 event->SetHandled();
2598 } 2600 }
2599 2601
2600 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { 2602 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
2601 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnMouseEvent"); 2603 TRACE_EVENT0("input", "RenderWidgetHostViewAura::OnMouseEvent");
2602 2604
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 RenderWidgetHost* widget) { 3322 RenderWidgetHost* widget) {
3321 return new RenderWidgetHostViewAura(widget); 3323 return new RenderWidgetHostViewAura(widget);
3322 } 3324 }
3323 3325
3324 // static 3326 // static
3325 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3327 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3326 GetScreenInfoForWindow(results, NULL); 3328 GetScreenInfoForWindow(results, NULL);
3327 } 3329 }
3328 3330
3329 } // namespace content 3331 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698