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

Side by Side Diff: webkit/plugins/ppapi/resource_helper.cc

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix self-assignment 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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/plugins/ppapi/resource_helper.h"
6
7 #include "base/logging.h"
8 #include "ppapi/shared_impl/resource.h"
9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
10 #include "webkit/plugins/ppapi/plugin_module.h"
11 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
12 #include "webkit/plugins/ppapi/resource_tracker.h"
13
14 namespace webkit {
15 namespace ppapi {
16
17 // static
18 PluginInstance* ResourceHelper::GetPluginInstance(
19 const ::ppapi::Resource* resource) {
20 ResourceTracker* tracker = ResourceTracker::Get();
21 return tracker->GetInstance(resource->pp_instance());
22 }
23
24 PluginModule* ResourceHelper::GetPluginModule(
25 const ::ppapi::Resource* resource) {
26 return GetPluginInstance(resource)->module();
viettrungluu 2011/08/23 17:28:13 Crashes if the resource has outlived its instance.
27 }
28
29 PluginDelegate* ResourceHelper::GetPluginDelegate(
30 const ::ppapi::Resource* resource) {
31 return GetPluginInstance(resource)->delegate();
viettrungluu 2011/08/23 17:28:13 "
32 }
33
34 } // namespace ppapi
35 } // namespace webkit
36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698