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

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

Issue 68773004: Pepper: Add MonitorIsExternal function to PPB_Flash_DRM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/cpp/private/flash_drm.h" 5 #include "ppapi/cpp/private/flash_drm.h"
6 6
7 #include "ppapi/c/pp_errors.h" 7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/private/ppb_flash_device_id.h" 8 #include "ppapi/c/private/ppb_flash_device_id.h"
9 #include "ppapi/c/private/ppb_flash_drm.h" 9 #include "ppapi/c/private/ppb_flash_drm.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
11 11
12 namespace pp { 12 namespace pp {
13 13
14 namespace { 14 namespace {
15 15
16 template <> const char* interface_name<PPB_Flash_DRM_1_0>() { 16 template <> const char* interface_name<PPB_Flash_DRM_1_0>() {
yzshen1 2013/11/19 23:22:59 We should also have one for PPB_Flash_DRM_1_1? Be
bbudge 2013/11/25 21:47:59 Done. Good catch.
17 return PPB_FLASH_DRM_INTERFACE_1_0; 17 return PPB_FLASH_DRM_INTERFACE_1_0;
18 } 18 }
19 19
20 template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() { 20 template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() {
21 return PPB_FLASH_DEVICEID_INTERFACE_1_0; 21 return PPB_FLASH_DEVICEID_INTERFACE_1_0;
22 } 22 }
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace flash { 26 namespace flash {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const CompletionCallbackWithOutput<FileRef>& callback) { 67 const CompletionCallbackWithOutput<FileRef>& callback) {
68 if (has_interface<PPB_Flash_DRM_1_0>()) { 68 if (has_interface<PPB_Flash_DRM_1_0>()) {
69 return get_interface<PPB_Flash_DRM_1_0>()->GetVoucherFile( 69 return get_interface<PPB_Flash_DRM_1_0>()->GetVoucherFile(
70 pp_resource(), 70 pp_resource(),
71 callback.output(), 71 callback.output(),
72 callback.pp_completion_callback()); 72 callback.pp_completion_callback());
73 } 73 }
74 return PP_ERROR_NOINTERFACE; 74 return PP_ERROR_NOINTERFACE;
75 } 75 }
76 76
77 int32_t DRM::MonitorIsExternal(
78 const CompletionCallbackWithOutput<PP_Bool>& callback) {
79 if (has_interface<PPB_Flash_DRM_1_1>()) {
80 return get_interface<PPB_Flash_DRM_1_1>()->MonitorIsExternal(
81 pp_resource(),
82 callback.output(),
83 callback.pp_completion_callback());
84 }
85 return PP_ERROR_NOINTERFACE;
86 }
87
77 } // namespace flash 88 } // namespace flash
78 } // namespace pp 89 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698