OLD | NEW |
| (Empty) |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 | |
6 /* This file contains the <code>PPB_View_Dev</code> interface. */ | |
7 | |
8 [generate_thunk] | |
9 | |
10 label Chrome { | |
11 M22 = 0.1 | |
12 }; | |
13 | |
14 /* PPB_View_Dev interface */ | |
15 interface PPB_View_Dev { | |
16 /** | |
17 * GetDeviceScale returns the scale factor between device pixels and DIPs | |
18 * (also known as logical pixels or UI pixels on some platforms). This allows | |
19 * the developer to render their contents at device resolution, even as | |
20 * coordinates / sizes are given in DIPs through the API. | |
21 * | |
22 * Note that the coordinate system for Pepper APIs is DIPs. Also note that | |
23 * one DIP might not equal one CSS pixel - when page scale/zoom is in effect. | |
24 * | |
25 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
26 * <code>PPB_View</code> resource. | |
27 * | |
28 * @return A <code>float</code> value representing the number of device pixels | |
29 * per DIP. If the resource is invalid, the value will be 0.0. | |
30 */ | |
31 float_t GetDeviceScale([in] PP_Resource resource); | |
32 | |
33 /** | |
34 * GetCSSScale returns the scale factor between DIPs and CSS pixels. This | |
35 * allows proper scaling between DIPs - as sent via the Pepper API - and CSS | |
36 * pixel coordinates used for Web content. | |
37 * | |
38 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
39 * <code>PPB_View</code> resource. | |
40 * | |
41 * @return css_scale A <code>float</code> value representing the number of | |
42 * DIPs per CSS pixel. If the resource is invalid, the value will be 0.0. | |
43 */ | |
44 float_t GetCSSScale([in] PP_Resource resource); | |
45 }; | |
46 | |
OLD | NEW |