Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: ppapi/cpp/private/view_private.cc

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "ppapi/cpp/private/view_private.h"
6
7 #include "ppapi/c/private/ppb_view_private.h"
8 #include "ppapi/cpp/module_impl.h"
9
10 namespace pp {
11
12 namespace {
13
14 template <> const char* interface_name<PPB_View_Private>() {
15 return PPB_VIEW_PRIVATE_INTERFACE;
16 }
17
18 } // namespace
19
20 float ViewPrivate::GetDeviceScale() const {
21 if (has_interface<PPB_View_Private>()) {
22 float out;
23 if (PP_ToBool(get_interface<PPB_View_Private>()->GetDeviceScale(
24 pp_resource(), &out)))
25 return out;
26 }
27 return 1.0f;
28 }
29
30 float ViewPrivate::GetCSSScale() const {
31 if (has_interface<PPB_View_Private>()) {
32 float out;
33 if (PP_ToBool(get_interface<PPB_View_Private>()->GetCSSScale(
34 pp_resource(), &out)))
35 return out;
36 }
37 return 1.0f;
38 }
39
40 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698