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

Side by Side Diff: trunk/src/ppapi/proxy/plugin_resource_tracker.cc

Issue 12920003: Revert 189518 "PPAPI: Remove threading options; it's always on" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
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_resource_tracker.h" 5 #include "ppapi/proxy/plugin_resource_tracker.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_globals.h" 10 #include "ppapi/proxy/plugin_globals.h"
11 #include "ppapi/proxy/ppapi_messages.h" 11 #include "ppapi/proxy/ppapi_messages.h"
12 #include "ppapi/proxy/serialized_var.h" 12 #include "ppapi/proxy/serialized_var.h"
13 #include "ppapi/shared_impl/proxy_lock.h" 13 #include "ppapi/shared_impl/proxy_lock.h"
14 #include "ppapi/shared_impl/resource.h" 14 #include "ppapi/shared_impl/resource.h"
15 #include "ppapi/shared_impl/var.h" 15 #include "ppapi/shared_impl/var.h"
16 16
17 namespace ppapi { 17 namespace ppapi {
18 namespace proxy { 18 namespace proxy {
19 19
20 PluginResourceTracker::PluginResourceTracker() : ResourceTracker(THREAD_SAFE) { 20 PluginResourceTracker::PluginResourceTracker() {
21 } 21 }
22 22
23 PluginResourceTracker::~PluginResourceTracker() { 23 PluginResourceTracker::~PluginResourceTracker() {
24 } 24 }
25 25
26 PP_Resource PluginResourceTracker::PluginResourceForHostResource( 26 PP_Resource PluginResourceTracker::PluginResourceForHostResource(
27 const HostResource& resource) const { 27 const HostResource& resource) const {
28 HostResourceMap::const_iterator found = host_resource_map_.find(resource); 28 HostResourceMap::const_iterator found = host_resource_map_.find(resource);
29 if (found == host_resource_map_.end()) 29 if (found == host_resource_map_.end())
30 return 0; 30 return 0;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // the instance was destroyed. In that case the browser-side resource has 62 // the instance was destroyed. In that case the browser-side resource has
63 // already been freed correctly on the browser side. 63 // already been freed correctly on the browser side.
64 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( 64 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource(
65 API_ID_PPB_CORE, object->host_resource())); 65 API_ID_PPB_CORE, object->host_resource()));
66 } 66 }
67 } 67 }
68 } 68 }
69 69
70 } // namespace proxy 70 } // namespace proxy
71 } // namespace ppapi 71 } // namespace ppapi
OLDNEW
« no previous file with comments | « trunk/src/ppapi/proxy/plugin_globals.cc ('k') | trunk/src/ppapi/proxy/plugin_resource_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698