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

Side by Side Diff: content/renderer/pepper/resource_helper.cc

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browsertest Created 7 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 "content/renderer/pepper/resource_helper.h"
6
7 #include "base/logging.h"
8 #include "content/renderer/pepper/host_globals.h"
9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
10 #include "content/renderer/pepper/plugin_module.h"
11 #include "ppapi/shared_impl/resource.h"
12
13 namespace content {
14
15 // static
16 PepperPluginInstanceImpl* ResourceHelper::GetPluginInstance(
17 const ::ppapi::Resource* resource) {
18 return PPInstanceToPluginInstance(resource->pp_instance());
19 }
20
21 PepperPluginInstanceImpl* ResourceHelper::PPInstanceToPluginInstance(
22 PP_Instance instance) {
23 return HostGlobals::Get()->GetInstance(instance);
24 }
25
26 PluginModule* ResourceHelper::GetPluginModule(
27 const ::ppapi::Resource* resource) {
28 PepperPluginInstanceImpl* instance = GetPluginInstance(resource);
29 return instance ? instance->module() : NULL;
30 }
31
32 PepperHelperImpl* ResourceHelper::GetHelper(const ::ppapi::Resource* resource) {
33 PepperPluginInstanceImpl* instance = GetPluginInstance(resource);
34 return instance ? instance->helper() : NULL;
35 }
36
37 } // namespace content
38
OLDNEW
« no previous file with comments | « content/renderer/pepper/resource_helper.h ('k') | content/renderer/pepper/url_request_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698