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

Side by Side Diff: ppapi/proxy/plugin_globals.cc

Issue 15806016: Update ppapi/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_var_tracker.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/proxy/plugin_globals.h" 5 #include "ppapi/proxy/plugin_globals.h"
6 6
7 #include "ipc/ipc_message.h" 7 #include "ipc/ipc_message.h"
8 #include "ipc/ipc_sender.h" 8 #include "ipc/ipc_sender.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_proxy_delegate.h" 10 #include "ppapi/proxy/plugin_proxy_delegate.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 PluginGlobals::~PluginGlobals() { 71 PluginGlobals::~PluginGlobals() {
72 DCHECK(plugin_globals_ == this || !plugin_globals_); 72 DCHECK(plugin_globals_ == this || !plugin_globals_);
73 { 73 {
74 ProxyAutoLock lock; 74 ProxyAutoLock lock;
75 // Release the main-thread message loop. We should have the last reference 75 // Release the main-thread message loop. We should have the last reference
76 // count, so this will delete the MessageLoop resource. We do this before 76 // count, so this will delete the MessageLoop resource. We do this before
77 // we clear plugin_globals_, because the Resource destructor tries to access 77 // we clear plugin_globals_, because the Resource destructor tries to access
78 // this PluginGlobals. 78 // this PluginGlobals.
79 DCHECK(!loop_for_main_thread_ || loop_for_main_thread_->HasOneRef()); 79 DCHECK(!loop_for_main_thread_.get() || loop_for_main_thread_->HasOneRef());
80 loop_for_main_thread_ = NULL; 80 loop_for_main_thread_ = NULL;
81 } 81 }
82 plugin_globals_ = NULL; 82 plugin_globals_ = NULL;
83 } 83 }
84 84
85 ResourceTracker* PluginGlobals::GetResourceTracker() { 85 ResourceTracker* PluginGlobals::GetResourceTracker() {
86 return &plugin_resource_tracker_; 86 return &plugin_resource_tracker_;
87 } 87 }
88 88
89 VarTracker* PluginGlobals::GetVarTracker() { 89 VarTracker* PluginGlobals::GetVarTracker() {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 MessageLoopResource* PluginGlobals::loop_for_main_thread() { 172 MessageLoopResource* PluginGlobals::loop_for_main_thread() {
173 return loop_for_main_thread_.get(); 173 return loop_for_main_thread_.get();
174 } 174 }
175 175
176 bool PluginGlobals::IsPluginGlobals() const { 176 bool PluginGlobals::IsPluginGlobals() const {
177 return true; 177 return true;
178 } 178 }
179 179
180 } // namespace proxy 180 } // namespace proxy
181 } // namespace ppapi 181 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/plugin_dispatcher.cc ('k') | ppapi/proxy/plugin_var_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698