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

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

Issue 9233058: Some touch-event forwarding optimization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | content/common/view_messages.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/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/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/backing_store_skia.h" 8 #include "content/browser/renderer_host/backing_store_skia.h"
9 #include "content/browser/renderer_host/render_widget_host.h" 9 #include "content/browser/renderer_host/render_widget_host.h"
10 #include "content/browser/renderer_host/web_input_event_aura.h" 10 #include "content/browser/renderer_host/web_input_event_aura.h"
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 // Return true so that we receive released/drag events. 886 // Return true so that we receive released/drag events.
887 return true; 887 return true;
888 } 888 }
889 889
890 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent( 890 ui::TouchStatus RenderWidgetHostViewAura::OnTouchEvent(
891 aura::TouchEvent* event) { 891 aura::TouchEvent* event) {
892 // Update the touch event first. 892 // Update the touch event first.
893 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event, 893 WebKit::WebTouchPoint* point = content::UpdateWebTouchEvent(event,
894 &touch_event_); 894 &touch_event_);
895 895
896 // Forward the touch event only if a touch point was updated. 896 // Forward the touch event only if a touch point was updated, and there's a
897 if (point) { 897 // touch-event handler in the page.
898 if (point && host_->has_touch_handler()) {
898 host_->ForwardTouchEvent(touch_event_); 899 host_->ForwardTouchEvent(touch_event_);
899 UpdateWebTouchEventAfterDispatch(&touch_event_, point); 900 UpdateWebTouchEventAfterDispatch(&touch_event_, point);
900 return DecideTouchStatus(touch_event_, point); 901 return DecideTouchStatus(touch_event_, point);
901 } 902 }
902 903
903 return ui::TOUCH_STATUS_UNKNOWN; 904 return ui::TOUCH_STATUS_UNKNOWN;
904 } 905 }
905 906
906 ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent( 907 ui::GestureStatus RenderWidgetHostViewAura::OnGestureEvent(
907 aura::GestureEvent* event) { 908 aura::GestureEvent* event) {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 // static 1088 // static
1088 void RenderWidgetHostView::GetDefaultScreenInfo( 1089 void RenderWidgetHostView::GetDefaultScreenInfo(
1089 WebKit::WebScreenInfo* results) { 1090 WebKit::WebScreenInfo* results) {
1090 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 1091 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
1091 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 1092 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
1092 results->availableRect = results->rect; 1093 results->availableRect = results->rect;
1093 // TODO(derat): Don't hardcode this? 1094 // TODO(derat): Don't hardcode this?
1094 results->depth = 24; 1095 results->depth = 24;
1095 results->depthPerComponent = 8; 1096 results->depthPerComponent = 8;
1096 } 1097 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698