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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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/npobject_var.h" 5 #include "webkit/plugins/ppapi/npobject_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/c/pp_var.h" 8 #include "ppapi/c/pp_var.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
10 #include "webkit/plugins/ppapi/host_globals.h" 10 #include "webkit/plugins/ppapi/host_globals.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 DCHECK(pp_instance_); 43 DCHECK(pp_instance_);
44 pp_instance_ = 0; 44 pp_instance_ = 0;
45 } 45 }
46 46
47 // static 47 // static
48 scoped_refptr<NPObjectVar> NPObjectVar::FromPPVar(PP_Var var) { 48 scoped_refptr<NPObjectVar> NPObjectVar::FromPPVar(PP_Var var) {
49 if (var.type != PP_VARTYPE_OBJECT) 49 if (var.type != PP_VARTYPE_OBJECT)
50 return scoped_refptr<NPObjectVar>(NULL); 50 return scoped_refptr<NPObjectVar>(NULL);
51 scoped_refptr<Var> var_object( 51 scoped_refptr<Var> var_object(
52 PpapiGlobals::Get()->GetVarTracker()->GetVar(var)); 52 PpapiGlobals::Get()->GetVarTracker()->GetVar(var));
53 if (!var_object) 53 if (!var_object.get())
54 return scoped_refptr<NPObjectVar>(); 54 return scoped_refptr<NPObjectVar>();
55 return scoped_refptr<NPObjectVar>(var_object->AsNPObjectVar()); 55 return scoped_refptr<NPObjectVar>(var_object->AsNPObjectVar());
56 } 56 }
57 57
58 } // namespace ppapi 58 } // namespace ppapi
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc ('k') | webkit/quota/quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698