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

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

Issue 7621070: Merge the plugin and impl side of the audio config and input event resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile issues Created 9 years, 4 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) 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/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/ppapi_messages.h" 10 #include "ppapi/proxy/ppapi_messages.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 69
70 VarTracker* PluginResourceTracker::GetVarTracker() { 70 VarTracker* PluginResourceTracker::GetVarTracker() {
71 return &var_tracker(); 71 return &var_tracker();
72 } 72 }
73 73
74 ResourceTracker* PluginResourceTracker::GetResourceTracker() { 74 ResourceTracker* PluginResourceTracker::GetResourceTracker() {
75 return this; 75 return this;
76 } 76 }
77 77
78 PP_Module PluginResourceTracker::GetModuleForInstance(PP_Instance instance) {
79 // Currently proxied plugins don't use the PP_Module for anything useful.
80 return 0;
81 }
82
78 PP_Resource PluginResourceTracker::AddResource(Resource* object) { 83 PP_Resource PluginResourceTracker::AddResource(Resource* object) {
79 PP_Resource ret = ResourceTracker::AddResource(object); 84 PP_Resource ret = ResourceTracker::AddResource(object);
80 85
81 // Some resources are plugin-only, so they don't have a host resource. 86 // Some resources are plugin-only, so they don't have a host resource.
82 if (object->host_resource().host_resource()) 87 if (object->host_resource().host_resource())
83 host_resource_map_.insert(std::make_pair(object->host_resource(), ret)); 88 host_resource_map_.insert(std::make_pair(object->host_resource(), ret));
84 return ret; 89 return ret;
85 } 90 }
86 91
87 void PluginResourceTracker::RemoveResource(Resource* object) { 92 void PluginResourceTracker::RemoveResource(Resource* object) {
(...skipping 13 matching lines...) Expand all
101 // the instance was destroyed. In that case the browser-side resource has 106 // the instance was destroyed. In that case the browser-side resource has
102 // already been freed correctly on the browser side. 107 // already been freed correctly on the browser side.
103 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( 108 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource(
104 INTERFACE_ID_PPB_CORE, object->host_resource())); 109 INTERFACE_ID_PPB_CORE, object->host_resource()));
105 } 110 }
106 } 111 }
107 } 112 }
108 113
109 } // namespace proxy 114 } // namespace proxy
110 } // namespace ppapi 115 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698