diff options
author | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-25 14:30:55 +0000 |
---|---|---|
committer | raymes@chromium.org <raymes@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-25 14:30:55 +0000 |
commit | 1c081e5727bbb538bf50bb1b10e96fd17d78b728 (patch) | |
tree | de655c781f349ca82bdd2d8761fcc97bfd0e230e /ppapi/proxy/flash_device_id_resource.cc | |
parent | 8b8da41b39c9c7699ab7b63090a5c4b3ba2e41ed (diff) | |
download | chromium_src-1c081e5727bbb538bf50bb1b10e96fd17d78b728.zip chromium_src-1c081e5727bbb538bf50bb1b10e96fd17d78b728.tar.gz chromium_src-1c081e5727bbb538bf50bb1b10e96fd17d78b728.tar.bz2 |
Rename PPB_Flash_DeviceID interface to PPB_Flash_DRM
This is mainly a mechanical change to rename PPB_Flash_DeviceID to PPB_Flash_DRM. It deprecates the old interface. The reason is that we will be adding more DRM-related APIs and it makes sense to put them into a single interface.
BUG=242241
TBR=brettw for chrome_browser.gypi
Review URL: https://chromiumcodereview.appspot.com/15491006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/flash_device_id_resource.cc')
-rw-r--r-- | ppapi/proxy/flash_device_id_resource.cc | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/ppapi/proxy/flash_device_id_resource.cc b/ppapi/proxy/flash_device_id_resource.cc deleted file mode 100644 index 493ebda..0000000 --- a/ppapi/proxy/flash_device_id_resource.cc +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ppapi/proxy/flash_device_id_resource.h" - -#include "base/bind.h" -#include "ppapi/c/pp_errors.h" -#include "ppapi/proxy/dispatch_reply_message.h" -#include "ppapi/proxy/ppapi_messages.h" -#include "ppapi/shared_impl/var.h" - -namespace ppapi { -namespace proxy { - -FlashDeviceIDResource::FlashDeviceIDResource(Connection connection, - PP_Instance instance) - : PluginResource(connection, instance), - dest_(NULL) { - SendCreate(BROWSER, PpapiHostMsg_FlashDeviceID_Create()); -} - -FlashDeviceIDResource::~FlashDeviceIDResource() { -} - -thunk::PPB_Flash_DeviceID_API* -FlashDeviceIDResource::AsPPB_Flash_DeviceID_API() { - return this; -} - -int32_t FlashDeviceIDResource::GetDeviceID( - PP_Var* id, - scoped_refptr<TrackedCallback> callback) { - if (TrackedCallback::IsPending(callback_)) - return PP_ERROR_INPROGRESS; - if (!id) - return PP_ERROR_BADARGUMENT; - - dest_ = id; - callback_ = callback; - - Call<PpapiPluginMsg_FlashDeviceID_GetDeviceIDReply>( - BROWSER, - PpapiHostMsg_FlashDeviceID_GetDeviceID(), - base::Bind(&FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply, this)); - return PP_OK_COMPLETIONPENDING; -} - -void FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply( - const ResourceMessageReplyParams& params, - const std::string& id) { - if (params.result() == PP_OK) - *dest_ = StringVar::StringToPPVar(id); - else - *dest_ = PP_MakeUndefined(); - dest_ = NULL; - callback_->Run(params.result()); -} - -} // namespace proxy -} // namespace ppapi |