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

Side by Side Diff: ppapi/cpp/private/instance_private.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/private/flash_net_connector.cc ('k') | ppapi/cpp/private/net_address_private.cc » ('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/private/instance_private.h" 5 #include "ppapi/cpp/private/instance_private.h"
6 6
7 #include "ppapi/c/private/ppb_instance_private.h" 7 #include "ppapi/c/private/ppb_instance_private.h"
8 #include "ppapi/c/private/ppp_instance_private.h" 8 #include "ppapi/c/private/ppp_instance_private.h"
9 #include "ppapi/cpp/module_impl.h" 9 #include "ppapi/cpp/module_impl.h"
10 #include "ppapi/cpp/private/var_private.h" 10 #include "ppapi/cpp/private/var_private.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 InstancePrivate::~InstancePrivate() {} 44 InstancePrivate::~InstancePrivate() {}
45 45
46 Var InstancePrivate::GetInstanceObject() { 46 Var InstancePrivate::GetInstanceObject() {
47 return Var(); 47 return Var();
48 } 48 }
49 49
50 VarPrivate InstancePrivate::GetWindowObject() { 50 VarPrivate InstancePrivate::GetWindowObject() {
51 if (!has_interface<PPB_Instance_Private>()) 51 if (!has_interface<PPB_Instance_Private>())
52 return VarPrivate(); 52 return VarPrivate();
53 return VarPrivate(Var::PassRef(), 53 return VarPrivate(PASS_REF,
54 get_interface<PPB_Instance_Private>()->GetWindowObject(pp_instance())); 54 get_interface<PPB_Instance_Private>()->GetWindowObject(pp_instance()));
55 } 55 }
56 56
57 VarPrivate InstancePrivate::GetOwnerElementObject() { 57 VarPrivate InstancePrivate::GetOwnerElementObject() {
58 if (!has_interface<PPB_Instance_Private>()) 58 if (!has_interface<PPB_Instance_Private>())
59 return VarPrivate(); 59 return VarPrivate();
60 return VarPrivate(Var::PassRef(), 60 return VarPrivate(PASS_REF,
61 get_interface<PPB_Instance_Private>()->GetOwnerElementObject( 61 get_interface<PPB_Instance_Private>()->GetOwnerElementObject(
62 pp_instance())); 62 pp_instance()));
63 } 63 }
64 64
65 VarPrivate InstancePrivate::ExecuteScript(const Var& script, Var* exception) { 65 VarPrivate InstancePrivate::ExecuteScript(const Var& script, Var* exception) {
66 if (!has_interface<PPB_Instance_Private>()) 66 if (!has_interface<PPB_Instance_Private>())
67 return VarPrivate(); 67 return VarPrivate();
68 return VarPrivate(Var::PassRef(), 68 return VarPrivate(PASS_REF,
69 get_interface<PPB_Instance_Private>()->ExecuteScript( 69 get_interface<PPB_Instance_Private>()->ExecuteScript(
70 pp_instance(), 70 pp_instance(),
71 script.pp_var(), 71 script.pp_var(),
72 VarPrivate::OutException(exception).get())); 72 VarPrivate::OutException(exception).get()));
73 } 73 }
74 74
75 } // namespace pp 75 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/private/flash_net_connector.cc ('k') | ppapi/cpp/private/net_address_private.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698