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

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

Issue 1102933003: [Contextual Search] Add support for tap on the selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved implementation methods to match declaration order. Used INACTIVE for active_status_ state ch… Created 5 years, 7 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 | ui/touch_selection/touch_selection_controller.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_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 InputEventAckState ack_result) { 1575 InputEventAckState ack_result) {
1576 if (overscroll_controller_) 1576 if (overscroll_controller_)
1577 overscroll_controller_->OnGestureEventAck(event, ack_result); 1577 overscroll_controller_->OnGestureEventAck(event, ack_result);
1578 1578
1579 if (content_view_core_) 1579 if (content_view_core_)
1580 content_view_core_->OnGestureEventAck(event, ack_result); 1580 content_view_core_->OnGestureEventAck(event, ack_result);
1581 } 1581 }
1582 1582
1583 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent( 1583 InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent(
1584 const blink::WebInputEvent& input_event) { 1584 const blink::WebInputEvent& input_event) {
1585 if (selection_controller_) { 1585 if (selection_controller_ &&
1586 switch (input_event.type) { 1586 blink::WebInputEvent::isGestureEventType(input_event.type)) {
1587 case blink::WebInputEvent::GestureLongPress: 1587 const blink::WebGestureEvent& gesture_event =
1588 selection_controller_->OnLongPressEvent(); 1588 static_cast<const blink::WebGestureEvent&>(input_event);
1589 break; 1589 gfx::PointF gesture_location(gesture_event.x, gesture_event.y);
1590 case blink::WebInputEvent::GestureTap: 1590 if (input_event.type == blink::WebInputEvent::GestureLongPress) {
1591 selection_controller_->OnTapEvent(); 1591 if (selection_controller_->WillHandleLongPressEvent(gesture_location))
1592 break; 1592 return INPUT_EVENT_ACK_STATE_CONSUMED;
1593 default: 1593 } else if (input_event.type == blink::WebInputEvent::GestureTap) {
1594 break; 1594 if (selection_controller_->WillHandleTapEvent(gesture_location))
1595 return INPUT_EVENT_ACK_STATE_CONSUMED;
1595 } 1596 }
1596 } 1597 }
1597 1598
1598 if (overscroll_controller_ && 1599 if (overscroll_controller_ &&
1599 blink::WebInputEvent::isGestureEventType(input_event.type) && 1600 blink::WebInputEvent::isGestureEventType(input_event.type) &&
1600 overscroll_controller_->WillHandleGestureEvent( 1601 overscroll_controller_->WillHandleGestureEvent(
1601 static_cast<const blink::WebGestureEvent&>(input_event))) { 1602 static_cast<const blink::WebGestureEvent&>(input_event))) {
1602 return INPUT_EVENT_ACK_STATE_CONSUMED; 1603 return INPUT_EVENT_ACK_STATE_CONSUMED;
1603 } 1604 }
1604 1605
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 results->orientationAngle = display.RotationAsDegree(); 2016 results->orientationAngle = display.RotationAsDegree();
2016 results->orientationType = 2017 results->orientationType =
2017 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2018 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2018 gfx::DeviceDisplayInfo info; 2019 gfx::DeviceDisplayInfo info;
2019 results->depth = info.GetBitsPerPixel(); 2020 results->depth = info.GetBitsPerPixel();
2020 results->depthPerComponent = info.GetBitsPerComponent(); 2021 results->depthPerComponent = info.GetBitsPerComponent();
2021 results->isMonochrome = (results->depthPerComponent == 0); 2022 results->isMonochrome = (results->depthPerComponent == 0);
2022 } 2023 }
2023 2024
2024 } // namespace content 2025 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/touch_selection/touch_selection_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698