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 PPAPI_CPP_VIEW_H_ | 5 #ifndef PPAPI_CPP_VIEW_H_ |
6 #define PPAPI_CPP_VIEW_H_ | 6 #define PPAPI_CPP_VIEW_H_ |
7 | 7 |
8 #include "ppapi/cpp/resource.h" | 8 #include "ppapi/cpp/resource.h" |
9 #include "ppapi/cpp/rect.h" | 9 #include "ppapi/cpp/rect.h" |
10 #include "ppapi/cpp/size.h" | 10 #include "ppapi/cpp/size.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 /// pixels per DIP. | 131 /// pixels per DIP. |
132 float GetDeviceScale() const; | 132 float GetDeviceScale() const; |
133 | 133 |
134 /// GetCSSScale returns the scale factor between DIPs and CSS pixels. This | 134 /// GetCSSScale returns the scale factor between DIPs and CSS pixels. This |
135 /// allows proper scaling between DIPs - as sent via the Pepper API - and CSS | 135 /// allows proper scaling between DIPs - as sent via the Pepper API - and CSS |
136 /// pixel coordinates used for Web content. | 136 /// pixel coordinates used for Web content. |
137 /// | 137 /// |
138 /// @return A <code>float</code> value representing the number of DIPs per CSS | 138 /// @return A <code>float</code> value representing the number of DIPs per CSS |
139 /// pixel. | 139 /// pixel. |
140 float GetCSSScale() const; | 140 float GetCSSScale() const; |
| 141 |
| 142 /// GetScrollOffset returns the scroll offset of the window containing the |
| 143 /// plugin. This value will only be valid if the module instance is visible |
| 144 /// (that is, IsVisible() is true) otherwise (0, 0) will be returned. |
| 145 /// |
| 146 /// @return A <code>Point</code> which is set to the value of the scroll |
| 147 /// offset in CSS pixels. |
| 148 Point GetScrollOffset() const; |
141 }; | 149 }; |
142 | 150 |
143 } // namespace pp | 151 } // namespace pp |
144 | 152 |
145 #endif // PPAPI_CPP_VIEW_H_ | 153 #endif // PPAPI_CPP_VIEW_H_ |
OLD | NEW |