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

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

Issue 6519057: Implement proxying for FileRef and FileChooser.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 "webkit/plugins/ppapi/ppb_proxy_impl.h" 5 #include "webkit/plugins/ppapi/ppb_proxy_impl.h"
6 6
7 #include "ppapi/c/private/ppb_proxy_private.h" 7 #include "ppapi/c/private/ppb_proxy_private.h"
8 #include "webkit/plugins/ppapi/plugin_module.h" 8 #include "webkit/plugins/ppapi/plugin_module.h"
9 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
10 #include "webkit/plugins/ppapi/resource.h"
9 #include "webkit/plugins/ppapi/resource_tracker.h" 11 #include "webkit/plugins/ppapi/resource_tracker.h"
10 12
11 namespace webkit { 13 namespace webkit {
12 namespace ppapi { 14 namespace ppapi {
13 15
14 namespace { 16 namespace {
15 17
16 void PluginCrashed(PP_Module module) { 18 void PluginCrashed(PP_Module module) {
17 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module); 19 PluginModule* plugin_module = ResourceTracker::Get()->GetModule(module);
18 if (plugin_module) 20 if (plugin_module)
19 plugin_module->PluginCrashed(); 21 plugin_module->PluginCrashed();
20 } 22 }
21 23
24 PP_Instance GetInstanceForResource(PP_Resource resource) {
25 scoped_refptr<Resource> obj(ResourceTracker::Get()->GetResource(resource));
26 if (!obj)
27 return 0;
28 return obj->instance()->pp_instance();
29 }
30
22 const PPB_Proxy_Private ppb_proxy = { 31 const PPB_Proxy_Private ppb_proxy = {
23 &PluginCrashed 32 &PluginCrashed,
33 &GetInstanceForResource
24 }; 34 };
25 35
26 } // namespace 36 } // namespace
27 37
28 // static 38 // static
29 const PPB_Proxy_Private* PPB_Proxy_Impl::GetInterface() { 39 const PPB_Proxy_Private* PPB_Proxy_Impl::GetInterface() {
30 return &ppb_proxy; 40 return &ppb_proxy;
31 } 41 }
32 42
33 } // namespace ppapi 43 } // namespace ppapi
34 } // namespace webkit 44 } // namespace webkit
OLDNEW
« ppapi/proxy/serialized_var.cc ('K') | « webkit/plugins/ppapi/ppb_file_ref_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698