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

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

Issue 2762553002: Add canUpdateLayout & canHandleGestureEvent to WebViewClient. (Closed)
Patch Set: Fix merge issues. Created 3 years, 8 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/renderer/render_view_impl.h ('k') | content/shell/test_runner/web_view_test_client.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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 } 1820 }
1821 1821
1822 RenderWidget::show(policy); 1822 RenderWidget::show(policy);
1823 } 1823 }
1824 1824
1825 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) { 1825 void RenderViewImpl::onMouseDown(const WebNode& mouse_down_node) {
1826 for (auto& observer : observers_) 1826 for (auto& observer : observers_)
1827 observer.OnMouseDown(mouse_down_node); 1827 observer.OnMouseDown(mouse_down_node);
1828 } 1828 }
1829 1829
1830 bool RenderViewImpl::canHandleGestureEvent() {
1831 return true;
1832 }
1833
1834 bool RenderViewImpl::canUpdateLayout() {
1835 return true;
1836 }
1837
1830 void RenderViewImpl::didHandleGestureEvent( 1838 void RenderViewImpl::didHandleGestureEvent(
1831 const WebGestureEvent& event, 1839 const WebGestureEvent& event,
1832 bool event_cancelled) { 1840 bool event_cancelled) {
1833 RenderWidget::didHandleGestureEvent(event, event_cancelled); 1841 RenderWidget::didHandleGestureEvent(event, event_cancelled);
1834 1842
1835 if (!event_cancelled) { 1843 if (!event_cancelled) {
1836 for (auto& observer : observers_) 1844 for (auto& observer : observers_)
1837 observer.DidHandleGestureEvent(event); 1845 observer.DidHandleGestureEvent(event);
1838 } 1846 }
1839 } 1847 }
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2721 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2714 } 2722 }
2715 2723
2716 std::unique_ptr<InputEventAck> ack( 2724 std::unique_ptr<InputEventAck> ack(
2717 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), 2725 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(),
2718 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2726 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2719 OnInputEventAck(std::move(ack)); 2727 OnInputEventAck(std::move(ack));
2720 } 2728 }
2721 2729
2722 } // namespace content 2730 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/shell/test_runner/web_view_test_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698