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

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

Issue 8487001: Remove 13 exit time constructors and 3 static initializers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 9 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 | 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 "ppapi/proxy/ppb_core_proxy.h" 5 #include "ppapi/proxy/ppb_core_proxy.h"
6 6
7 #include <stdlib.h> // For malloc 7 #include <stdlib.h> // For malloc
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 10 matching lines...) Expand all
21 #include "ppapi/shared_impl/ppapi_globals.h" 21 #include "ppapi/shared_impl/ppapi_globals.h"
22 #include "ppapi/shared_impl/proxy_lock.h" 22 #include "ppapi/shared_impl/proxy_lock.h"
23 #include "ppapi/shared_impl/time_conversion.h" 23 #include "ppapi/shared_impl/time_conversion.h"
24 24
25 namespace ppapi { 25 namespace ppapi {
26 namespace proxy { 26 namespace proxy {
27 27
28 namespace { 28 namespace {
29 29
30 base::MessageLoopProxy* GetMainThreadMessageLoop() { 30 base::MessageLoopProxy* GetMainThreadMessageLoop() {
31 static scoped_refptr<base::MessageLoopProxy> proxy( 31 CR_DEFINE_STATIC_LOCAL(scoped_refptr<base::MessageLoopProxy>, proxy,
32 base::MessageLoopProxy::current()); 32 (base::MessageLoopProxy::current()));
33 return proxy.get(); 33 return proxy.get();
34 } 34 }
35 35
36 void AddRefResource(PP_Resource resource) { 36 void AddRefResource(PP_Resource resource) {
37 ppapi::ProxyAutoLock lock; 37 ppapi::ProxyAutoLock lock;
38 PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource); 38 PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource);
39 } 39 }
40 40
41 void ReleaseResource(PP_Resource resource) { 41 void ReleaseResource(PP_Resource resource) {
42 ppapi::ProxyAutoLock lock; 42 ppapi::ProxyAutoLock lock;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 void PPB_Core_Proxy::OnMsgAddRefResource(const HostResource& resource) { 115 void PPB_Core_Proxy::OnMsgAddRefResource(const HostResource& resource) {
116 ppb_core_impl_->AddRefResource(resource.host_resource()); 116 ppb_core_impl_->AddRefResource(resource.host_resource());
117 } 117 }
118 118
119 void PPB_Core_Proxy::OnMsgReleaseResource(const HostResource& resource) { 119 void PPB_Core_Proxy::OnMsgReleaseResource(const HostResource& resource) {
120 ppb_core_impl_->ReleaseResource(resource.host_resource()); 120 ppb_core_impl_->ReleaseResource(resource.host_resource());
121 } 121 }
122 122
123 } // namespace proxy 123 } // namespace proxy
124 } // namespace ppapi 124 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc ('k') | ppapi/proxy/ppb_font_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698