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

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

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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(PP_Instance instance) 16 PPB_VideoLayer_Impl::PPB_VideoLayer_Impl(PP_Instance instance)
17 : Resource(instance) { 17 : Resource(::ppapi::OBJECT_IS_IMPL, 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(PP_Instance instance, 24 PP_Resource PPB_VideoLayer_Impl::Create(PP_Instance 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 return (new PPB_VideoLayer_Software(instance))->GetReference(); 28 return (new PPB_VideoLayer_Software(instance))->GetReference();
29 } 29 }
30 30
31 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() { 31 PPB_VideoLayer_API* PPB_VideoLayer_Impl::AsPPB_VideoLayer_API() {
32 return this; 32 return this;
33 } 33 }
34 34
35 } // namespace ppapi 35 } // namespace ppapi
36 } // namespace webkit 36 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698