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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Converts the |rect| from Viewport coordinates to Window coordinates. | 130 // Converts the |rect| from Viewport coordinates to Window coordinates. |
131 // See blink::WebWidgetClient::convertViewportToWindow for more details. | 131 // See blink::WebWidgetClient::convertViewportToWindow for more details. |
132 virtual void convertViewportToWindow(blink::WebRect* rect) = 0; | 132 virtual void convertViewportToWindow(blink::WebRect* rect) = 0; |
133 | 133 |
134 // Returns the bounds of |element| in Window coordinates. The bounds have been | 134 // Returns the bounds of |element| in Window coordinates. The bounds have been |
135 // adjusted to include any transformations, including page scale. | 135 // adjusted to include any transformations, including page scale. |
136 // This function will update the layout if required. | 136 // This function will update the layout if required. |
137 virtual gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) | 137 virtual gfx::RectF ElementBoundsInWindow(const blink::WebElement& element) |
138 = 0; | 138 = 0; |
139 | 139 |
| 140 // Returns the device scale factor for unit tests. |
| 141 virtual float GetDeviceScaleFactorForTest() const = 0; |
| 142 |
140 protected: | 143 protected: |
141 ~RenderView() override {} | 144 ~RenderView() override {} |
142 | 145 |
143 private: | 146 private: |
144 // This interface should only be implemented inside content. | 147 // This interface should only be implemented inside content. |
145 friend class RenderViewImpl; | 148 friend class RenderViewImpl; |
146 RenderView() {} | 149 RenderView() {} |
147 }; | 150 }; |
148 | 151 |
149 } // namespace content | 152 } // namespace content |
150 | 153 |
151 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ | 154 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_H_ |
OLD | NEW |