OLD | NEW |
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 CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/common/top_controls_state.h" | 13 #include "content/public/common/top_controls_state.h" |
14 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 15 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 class WebElement; | 19 class WebElement; |
20 class WebFrame; | 20 class WebFrame; |
21 class WebLocalFrame; | 21 class WebLocalFrame; |
22 class WebNode; | 22 class WebNode; |
23 class WebString; | 23 class WebString; |
24 class WebURLRequest; | 24 class WebURLRequest; |
25 class WebView; | 25 class WebView; |
26 struct WebContextMenuData; | 26 struct WebContextMenuData; |
| 27 struct WebFloatRect; |
27 struct WebRect; | 28 struct WebRect; |
28 } | 29 } |
29 | 30 |
30 namespace gfx { | 31 namespace gfx { |
31 class Point; | 32 class Point; |
32 class Size; | 33 class Size; |
33 } | 34 } |
34 | 35 |
35 namespace content { | 36 namespace content { |
36 | 37 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 TopControlsState current, | 124 TopControlsState current, |
124 bool animate) = 0; | 125 bool animate) = 0; |
125 #endif | 126 #endif |
126 | 127 |
127 // Converts the |rect| from Blink's Viewport coordinates to the | 128 // Converts the |rect| from Blink's Viewport coordinates to the |
128 // coordinates in the native window used to display the content, in | 129 // coordinates in the native window used to display the content, in |
129 // DIP. They're identical in tradional world, but will differ when | 130 // DIP. They're identical in tradional world, but will differ when |
130 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates | 131 // use-zoom-for-dsf feature is eanbled, and Viewport coordinates |
131 // becomes DSF times larger than window coordinates. | 132 // becomes DSF times larger than window coordinates. |
132 virtual void convertViewportToWindow(blink::WebRect* rect) = 0; | 133 virtual void convertViewportToWindow(blink::WebRect* rect) = 0; |
| 134 virtual void convertViewportToWindow(blink::WebFloatRect* rect) = 0; |
| 135 |
| 136 // Returns the bounding box for |element| in Window coordinates. This function |
| 137 // will update the layout if required. |
| 138 virtual void getElementBoundingBoxWindow(blink::WebElement* element, |
| 139 blink::WebFloatRect* rect) = 0; |
133 | 140 |
134 protected: | 141 protected: |
135 ~RenderView() override {} | 142 ~RenderView() override {} |
136 | 143 |
137 private: | 144 private: |
138 // This interface should only be implemented inside content. | 145 // This interface should only be implemented inside content. |
139 friend class RenderViewImpl; | 146 friend class RenderViewImpl; |
140 RenderView() {} | 147 RenderView() {} |
141 }; | 148 }; |
142 | 149 |
143 } // namespace content | 150 } // namespace content |
144 | 151 |
145 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 152 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |