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

Side by Side Diff: webkit/plugins/ppapi/ppb_video_layer_impl.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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
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 "webkit/plugins/ppapi/ppb_video_layer_impl.h" 5 #include "webkit/plugins/ppapi/ppb_video_layer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/plugins/ppapi/common.h" 8 #include "webkit/plugins/ppapi/common.h"
9 #include "webkit/plugins/ppapi/ppb_video_layer_software.h" 9 #include "webkit/plugins/ppapi/ppb_video_layer_software.h"
10 10
11 using ppapi::thunk::PPB_VideoLayer_API; 11 using ppapi::thunk::PPB_VideoLayer_API;
12 12
13 namespace webkit { 13 namespace webkit {
14 namespace ppapi { 14 namespace ppapi {
15 15
16 PPB_VideoLayer_Impl::PPB_VideoLayer_Impl(PluginInstance* instance) 16 PPB_VideoLayer_Impl::PPB_VideoLayer_Impl(PluginInstance* instance)
17 : Resource(instance) { 17 : Resource(instance) {
18 } 18 }
19 19
20 PPB_VideoLayer_Impl::~PPB_VideoLayer_Impl() { 20 PPB_VideoLayer_Impl::~PPB_VideoLayer_Impl() {
21 } 21 }
22 22
23 // static 23 // static
24 PP_Resource PPB_VideoLayer_Impl::Create(PluginInstance* instance, 24 PP_Resource PPB_VideoLayer_Impl::Create(PluginInstance* instance,
25 PP_VideoLayerMode_Dev mode) { 25 PP_VideoLayerMode_Dev mode) {
26 if (mode != PP_VIDEOLAYERMODE_SOFTWARE) 26 if (mode != PP_VIDEOLAYERMODE_SOFTWARE)
27 return 0; 27 return 0;
28 28 return (new PPB_VideoLayer_Software(instance))->GetReference();
29 scoped_refptr<PPB_VideoLayer_Impl> layer(
30 new PPB_VideoLayer_Software(instance));
31 return layer->GetReference();
32 } 29 }
33 30
34 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() { 31 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() {
35 return this; 32 return this;
36 } 33 }
37 34
38 } // namespace ppapi 35 } // namespace ppapi
39 } // namespace webkit 36 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698