Elim cr-checkbox
[chromium-blink-merge.git] / ppapi / cpp / dev / view_dev.cc
blob473e9b465c24db7af220095112b4e1ee206d7a30
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 #include "ppapi/cpp/dev/view_dev.h"
7 #include "ppapi/c/dev/ppb_view_dev.h"
8 #include "ppapi/cpp/module_impl.h"
10 namespace pp {
12 namespace {
14 template <> const char* interface_name<PPB_View_Dev>() {
15 return PPB_VIEW_DEV_INTERFACE;
18 } // namespace
20 float ViewDev::GetDeviceScale() const {
21 if (!has_interface<PPB_View_Dev>())
22 return 1.0f;
23 return get_interface<PPB_View_Dev>()->GetDeviceScale(pp_resource());
26 float ViewDev::GetCSSScale() const {
27 if (!has_interface<PPB_View_Dev>())
28 return 1.0f;
29 return get_interface<PPB_View_Dev>()->GetCSSScale(pp_resource());
32 } // namespace pp