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

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

Issue 15491006: Rename PPB_Flash_DeviceID interface to PPB_Flash_DRM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/flash_device_id.h"
6
7 #include "ppapi/c/pp_errors.h"
8 #include "ppapi/c/private/ppb_flash_device_id.h"
9 #include "ppapi/cpp/module_impl.h"
10
11 namespace pp {
12
13 namespace {
14
15 template <> const char* interface_name<PPB_Flash_DeviceID_1_0>() {
16 return PPB_FLASH_DEVICEID_INTERFACE_1_0;
17 }
18
19 } // namespace
20
21 namespace flash {
22
23 DeviceID::DeviceID() {
24 }
25
26 DeviceID::DeviceID(const InstanceHandle& instance) : Resource() {
27 if (has_interface<PPB_Flash_DeviceID_1_0>()) {
28 PassRefFromConstructor(get_interface<PPB_Flash_DeviceID_1_0>()->Create(
29 instance.pp_instance()));
30 }
31 }
32
33 int32_t DeviceID::GetDeviceID(
34 const CompletionCallbackWithOutput<Var>& callback) {
35 if (has_interface<PPB_Flash_DeviceID_1_0>()) {
36 return get_interface<PPB_Flash_DeviceID_1_0>()->GetDeviceID(
37 pp_resource(),
38 callback.output(),
39 callback.pp_completion_callback());
40 }
41 return callback.MayForce(PP_ERROR_NOINTERFACE);
42 }
43
44 } // namespace flash
45 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698