OLD | NEW |
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" |
11 #include "ppapi/proxy/plugin_resource.h" | 11 #include "ppapi/proxy/plugin_resource.h" |
12 #include "ppapi/proxy/serialized_var.h" | 12 #include "ppapi/proxy/serialized_var.h" |
13 #include "ppapi/shared_impl/tracker_base.h" | 13 #include "ppapi/shared_impl/tracker_base.h" |
14 #include "ppapi/shared_impl/var.h" | 14 #include "ppapi/shared_impl/var.h" |
15 | 15 |
| 16 using ppapi::HostResource; |
| 17 |
16 namespace pp { | 18 namespace pp { |
17 namespace proxy { | 19 namespace proxy { |
18 | 20 |
19 namespace { | 21 namespace { |
20 | 22 |
21 // When non-NULL, this object overrides the ResourceTrackerSingleton. | 23 // When non-NULL, this object overrides the ResourceTrackerSingleton. |
22 PluginResourceTracker* g_resource_tracker_override = NULL; | 24 PluginResourceTracker* g_resource_tracker_override = NULL; |
23 | 25 |
24 ::ppapi::TrackerBase* GetTrackerBase() { | 26 ::ppapi::TrackerBase* GetTrackerBase() { |
25 return PluginResourceTracker::GetInstance(); | 27 return PluginResourceTracker::GetInstance(); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // tell the host about. | 180 // tell the host about. |
179 if (notify_browser_on_release && dispatcher && !host_resource.is_null()) { | 181 if (notify_browser_on_release && dispatcher && !host_resource.is_null()) { |
180 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( | 182 dispatcher->Send(new PpapiHostMsg_PPBCore_ReleaseResource( |
181 INTERFACE_ID_PPB_CORE, host_resource)); | 183 INTERFACE_ID_PPB_CORE, host_resource)); |
182 } | 184 } |
183 } | 185 } |
184 } | 186 } |
185 | 187 |
186 } // namespace proxy | 188 } // namespace proxy |
187 } // namespace pp | 189 } // namespace pp |
OLD | NEW |