cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / cpp / dev / view_dev.h
blob2c99e48366ca32e234bbc4391d14c527cbaf4994
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"
10 namespace pp {
12 // ViewDev is a version of View that exposes under-development APIs related to
13 // HiDPI
14 class ViewDev : public View {
15 public:
16 ViewDev() : View() {}
17 ViewDev(const View& other) : View(other) {}
19 virtual ~ViewDev() {}
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.
25 ///
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.
28 ///
29 /// @return A <code>float</code> value representing the number of device
30 /// pixels per DIP.
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.
36 ///
37 /// @return A <code>float</code> value representing the number of DIPs per CSS
38 /// pixel.
39 float GetCSSScale() const;
42 } // namespace pp
44 #endif // PPAPI_CPP_DEV_VIEW_DEV_H_