Chromium Code Reviews| 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_Private</code> interface. */ | |
| 7 label Chrome { | |
| 8 M22 = 0.1 | |
| 9 }; | |
| 10 | |
| 11 /* PPB_View_Private interface */ | |
| 12 interface PPB_View_Private { | |
|
brettw
2012/06/18 21:17:24
Do you mind making this a dev interface instead of
Josh Horwich
2012/06/19 02:01:04
Done.
| |
| 13 /** | |
| 14 * GetDeviceScale returns the scale factor between device pixels and DIPs | |
| 15 * (also known as logical pixels or UI pixels on some platforms). This allows | |
| 16 * the developer to render their contents at device resolution, even as | |
| 17 * coordinates / sizes are given in DIPs through the API. | |
| 18 * | |
| 19 * Note that the coordinate system for Pepper APIs is DIPs. Also note that | |
| 20 * one DIP might not equal one CSS pixel - when page scale/zoom is in effect. | |
| 21 * | |
| 22 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 23 * <code>PPB_View</code> resource. | |
| 24 * | |
| 25 * @param[out] device_scale A <code>float</code> value representing the number | |
| 26 * of device pixels per DIP. | |
| 27 * | |
| 28 * @return Returns <code>PP_TRUE</code> if the resource was valid and the | |
| 29 * scale was filled in, <code>PP_FALSE</code> if not. | |
| 30 */ | |
| 31 PP_Bool GetDeviceScale([in] PP_Resource resource, | |
|
brettw
2012/06/18 21:17:24
I usually prefer APIs that just return the value w
Josh Horwich
2012/06/19 02:01:04
Done.
| |
| 32 [out] float_t device_scale); | |
| 33 | |
| 34 /** | |
| 35 * GetCSSScale returns the scale factor between DIPs and CSS pixels. This | |
| 36 * allows proper scaling between DIPs - as sent via the Pepper API - and CSS | |
| 37 * pixel coordinates used for Web content. | |
| 38 * | |
| 39 * @param[in] resource A <code>PP_Resource</code> corresponding to a | |
| 40 * <code>PPB_View</code> resource. | |
| 41 * | |
| 42 * @param[out] css_scale A <code>float</code> value representing the number of | |
| 43 * DIPs per CSS pixel. | |
| 44 * | |
| 45 * @return Returns <code>PP_TRUE</code> if the resource was valid and the | |
| 46 * scale was filled in, <code>PP_FALSE</code> if not. | |
| 47 */ | |
| 48 PP_Bool GetCSSScale([in] PP_Resource resource, | |
|
brettw
2012/06/18 21:17:24
Ditto on the return value.
Josh Horwich
2012/06/19 02:01:04
Done.
| |
| 49 [out] float_t css_scale); | |
| 50 }; | |
| 51 | |
| OLD | NEW |