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.
5 #ifndef PPAPI_CPP_DEV_VIEW_DEV_H_
6 #define PPAPI_CPP_DEV_VIEW_DEV_H_
8 #include "ppapi/cpp/view.h"
12 // ViewDev is a version of View that exposes under-development APIs related to
14 class ViewDev
: public View
{
17 ViewDev(const View
& other
) : View(other
) {}
21 /// GetDeviceScale returns the scale factor between device pixels and DIPs
22 /// (also known as logical pixels or UI pixels on some platforms). This allows
23 /// the developer to render their contents at device resolution, even as
24 /// coordinates / sizes are given in DIPs through the API.
26 /// Note that the coordinate system for Pepper APIs is DIPs. Also note that
27 /// one DIP might not equal one CSS pixel - when page scale/zoom is in effect.
29 /// @return A <code>float</code> value representing the number of device
31 float GetDeviceScale() const;
33 /// GetCSSScale returns the scale factor between DIPs and CSS pixels. This
34 /// allows proper scaling between DIPs - as sent via the Pepper API - and CSS
35 /// pixel coordinates used for Web content.
37 /// @return A <code>float</code> value representing the number of DIPs per CSS
39 float GetCSSScale() const;
44 #endif // PPAPI_CPP_DEV_VIEW_DEV_H_