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

Side by Side Diff: android_webview/browser/renderer_host/aw_render_view_host_ext.h

Issue 475633002: Pass TouchMajor to HitTestResult (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use hitTestResultAt in RenderViewImpl::NodeContainsPoint Created 6 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
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 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
7 7
8 #include "content/public/browser/web_contents_observer.h" 8 #include "content/public/browser/web_contents_observer.h"
9 9
10 #include "android_webview/common/aw_hit_test_data.h" 10 #include "android_webview/common/aw_hit_test_data.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "third_party/skia/include/core/SkColor.h" 13 #include "third_party/skia/include/core/SkColor.h"
14 #include "ui/gfx/geometry/point_f.h"
15 #include "ui/gfx/geometry/size_f.h"
14 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
15 17
16 class GURL; 18 class GURL;
17 19
18 namespace content { 20 namespace content {
19 struct FrameNavigateParams; 21 struct FrameNavigateParams;
20 struct LoadCommittedDetails; 22 struct LoadCommittedDetails;
21 } // namespace content 23 } // namespace content
22 24
23 namespace android_webview { 25 namespace android_webview {
(...skipping 22 matching lines...) Expand all
46 virtual ~AwRenderViewHostExt(); 48 virtual ~AwRenderViewHostExt();
47 49
48 // |result| will be invoked with the outcome of the request. 50 // |result| will be invoked with the outcome of the request.
49 typedef base::Callback<void(bool)> DocumentHasImagesResult; 51 typedef base::Callback<void(bool)> DocumentHasImagesResult;
50 void DocumentHasImages(DocumentHasImagesResult result); 52 void DocumentHasImages(DocumentHasImagesResult result);
51 53
52 // Clear all WebCore memory cache (not only for this view). 54 // Clear all WebCore memory cache (not only for this view).
53 void ClearCache(); 55 void ClearCache();
54 56
55 // Do a hit test at the view port coordinates and asynchronously update 57 // Do a hit test at the view port coordinates and asynchronously update
56 // |last_hit_test_data_|. |view_x| and |view_y| are in density independent 58 // |last_hit_test_data_|. Width and height in |touch_area| are in density
57 // pixels used by blink::WebView. 59 // independent pixels used by blink::WebView.
58 void RequestNewHitTestDataAt(int view_x, int view_y); 60 void RequestNewHitTestDataAt(gfx::PointF touch_center, gfx::SizeF touch_area);
dcheng 2014/11/13 02:37:58 Pass by const ref, not by value.
hush (inactive) 2014/11/13 18:37:59 Done.
59 61
60 // Optimization to avoid unnecessary Java object creation on hit test. 62 // Optimization to avoid unnecessary Java object creation on hit test.
61 bool HasNewHitTestData() const; 63 bool HasNewHitTestData() const;
62 void MarkHitTestDataRead(); 64 void MarkHitTestDataRead();
63 65
64 // Return |last_hit_test_data_|. Note that this is unavoidably racy; 66 // Return |last_hit_test_data_|. Note that this is unavoidably racy;
65 // the corresponding public WebView API is as well. 67 // the corresponding public WebView API is as well.
66 const AwHitTestData& GetLastHitTestData() const; 68 const AwHitTestData& GetLastHitTestData() const;
67 69
68 // Sets the zoom factor for text only. Used in layout modes other than 70 // Sets the zoom factor for text only. Used in layout modes other than
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 AwHitTestData last_hit_test_data_; 108 AwHitTestData last_hit_test_data_;
107 109
108 bool has_new_hit_test_data_; 110 bool has_new_hit_test_data_;
109 111
110 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); 112 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);
111 }; 113 };
112 114
113 } // namespace android_webview 115 } // namespace android_webview
114 116
115 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 117 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698