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

Side by Side Diff: ppapi/cpp/dev/video_capture_client_dev.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 9 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
« no previous file with comments | « ppapi/cpp/dev/video_capture_client_dev.h ('k') | ppapi/cpp/dev/video_capture_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/dev/video_capture_client_dev.h" 5 #include "ppapi/cpp/dev/video_capture_client_dev.h"
6 6
7 #include "ppapi/c/dev/ppp_video_capture_dev.h" 7 #include "ppapi/c/dev/ppp_video_capture_dev.h"
8 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/instance_handle.h"
9 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
10 11
11 namespace pp { 12 namespace pp {
12 13
13 namespace { 14 namespace {
14 15
15 const char kPPPVideoCaptureInterface[] = PPP_VIDEO_CAPTURE_DEV_INTERFACE; 16 const char kPPPVideoCaptureInterface[] = PPP_VIDEO_CAPTURE_DEV_INTERFACE;
16 17
17 void OnDeviceInfo(PP_Instance instance, 18 void OnDeviceInfo(PP_Instance instance,
18 PP_Resource resource, 19 PP_Resource resource,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 58
58 PPP_VideoCapture_Dev ppp_video_capture = { 59 PPP_VideoCapture_Dev ppp_video_capture = {
59 OnDeviceInfo, 60 OnDeviceInfo,
60 OnStatus, 61 OnStatus,
61 OnError, 62 OnError,
62 OnBufferReady 63 OnBufferReady
63 }; 64 };
64 65
65 } // namespace 66 } // namespace
66 67
67 VideoCaptureClient_Dev::VideoCaptureClient_Dev(Instance* instance) 68 VideoCaptureClient_Dev::VideoCaptureClient_Dev(const InstanceHandle& instance)
68 : instance_(instance) { 69 : instance_(instance) {
69 pp::Module::Get()->AddPluginInterface(kPPPVideoCaptureInterface, 70 Module::Get()->AddPluginInterface(kPPPVideoCaptureInterface,
70 &ppp_video_capture); 71 &ppp_video_capture);
71 instance_->AddPerInstanceObject(kPPPVideoCaptureInterface, this); 72 Instance::AddPerInstanceObject(instance, kPPPVideoCaptureInterface, this);
72 } 73 }
73 74
74 VideoCaptureClient_Dev::~VideoCaptureClient_Dev() { 75 VideoCaptureClient_Dev::~VideoCaptureClient_Dev() {
75 instance_->RemovePerInstanceObject(kPPPVideoCaptureInterface, this); 76 Instance::RemovePerInstanceObject(instance_,
77 kPPPVideoCaptureInterface, this);
76 } 78 }
77 79
78 } // namespace pp 80 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/video_capture_client_dev.h ('k') | ppapi/cpp/dev/video_capture_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698