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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.h

Issue 11140046: Add a content API to connect a Native Client module to an out-of-process PPAPI proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 class Rect; 38 class Rect;
39 } 39 }
40 40
41 namespace IPC { 41 namespace IPC {
42 struct ChannelHandle; 42 struct ChannelHandle;
43 } 43 }
44 44
45 namespace ppapi { 45 namespace ppapi {
46 class PepperFilePath; 46 class PepperFilePath;
47 class PPB_X509Certificate_Fields; 47 class PPB_X509Certificate_Fields;
48 class PpapiPermissions;
48 } 49 }
49 50
50 namespace ui { 51 namespace ui {
51 class Range; 52 class Range;
52 } 53 }
53 54
54 namespace webkit { 55 namespace webkit {
55 struct WebPluginInfo; 56 struct WebPluginInfo;
56 namespace ppapi { 57 namespace ppapi {
57 class PluginInstance; 58 class PluginInstance;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set 92 // a PPAPI plugin. In this case, |*pepper_plugin_was_registered| will be set
92 // to false and the caller may want to fall back on creating an NPAPI plugin. 93 // to false and the caller may want to fall back on creating an NPAPI plugin.
93 // the second is that the plugin failed to initialize. In this case, 94 // the second is that the plugin failed to initialize. In this case,
94 // |*pepper_plugin_was_registered| will be set to true and the caller should 95 // |*pepper_plugin_was_registered| will be set to true and the caller should
95 // not fall back on any other plugin types. 96 // not fall back on any other plugin types.
96 CONTENT_EXPORT scoped_refptr<webkit::ppapi::PluginModule> 97 CONTENT_EXPORT scoped_refptr<webkit::ppapi::PluginModule>
97 CreatePepperPluginModule( 98 CreatePepperPluginModule(
98 const webkit::WebPluginInfo& webplugin_info, 99 const webkit::WebPluginInfo& webplugin_info,
99 bool* pepper_plugin_was_registered); 100 bool* pepper_plugin_was_registered);
100 101
102 // Sets up the renderer host and out-of-process proxy for an external plugin
103 // module. Returns the renderer host, or NULL if it couldn't be created.
104 RendererPpapiHost* CreateExternalPluginModule(
105 scoped_refptr<webkit::ppapi::PluginModule> module,
106 const FilePath& path,
107 ppapi::PpapiPermissions permissions,
108 const IPC::ChannelHandle& channel_handle,
109 int plugin_child_id);
110
101 // Creates a browser plugin instance given the process handle, and channel 111 // Creates a browser plugin instance given the process handle, and channel
102 // handle to access the guest renderer. 112 // handle to access the guest renderer.
103 // If the plugin fails to initialize then return NULL. 113 // If the plugin fails to initialize then return NULL.
104 scoped_refptr<webkit::ppapi::PluginModule> CreateBrowserPluginModule( 114 scoped_refptr<webkit::ppapi::PluginModule> CreateBrowserPluginModule(
105 const IPC::ChannelHandle& channel_handle, 115 const IPC::ChannelHandle& channel_handle,
106 int guest_process_id); 116 int guest_process_id);
107 117
108 // Called by RenderView to tell us about painting events, these two functions 118 // Called by RenderView to tell us about painting events, these two functions
109 // just correspond to the WillInitiatePaint, DidInitiatePaint and 119 // just correspond to the WillInitiatePaint, DidInitiatePaint and
110 // DidFlushPaint hooks in RenderView. 120 // DidFlushPaint hooks in RenderView.
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 const OpenDeviceCallback& callback); 467 const OpenDeviceCallback& callback);
458 void CloseDevice(const std::string& label); 468 void CloseDevice(const std::string& label);
459 // Gets audio/video session ID given a label. 469 // Gets audio/video session ID given a label.
460 int GetSessionID(PP_DeviceType_Dev type, const std::string& label); 470 int GetSessionID(PP_DeviceType_Dev type, const std::string& label);
461 471
462 private: 472 private:
463 // Asynchronously attempts to create a PPAPI broker for the given plugin. 473 // Asynchronously attempts to create a PPAPI broker for the given plugin.
464 scoped_refptr<PepperBrokerImpl> CreateBroker( 474 scoped_refptr<PepperBrokerImpl> CreateBroker(
465 webkit::ppapi::PluginModule* plugin_module); 475 webkit::ppapi::PluginModule* plugin_module);
466 476
477 // Create a new HostDispatcher for proxying, hook it to the PluginModule,
478 // and perform other common initialization.
479 RendererPpapiHost* CreateOutOfProcessModule(
480 webkit::ppapi::PluginModule* module,
481 const FilePath& path,
482 ppapi::PpapiPermissions permissions,
483 const IPC::ChannelHandle& channel_handle,
484 int plugin_child_id);
485
467 // ContextMenuClient implementation. 486 // ContextMenuClient implementation.
468 virtual void OnMenuAction(int request_id, unsigned action) OVERRIDE; 487 virtual void OnMenuAction(int request_id, unsigned action) OVERRIDE;
469 virtual void OnMenuClosed(int request_id) OVERRIDE; 488 virtual void OnMenuClosed(int request_id) OVERRIDE;
470 489
471 // Implementation of PepperParentContextProvider. 490 // Implementation of PepperParentContextProvider.
472 virtual WebGraphicsContext3DCommandBufferImpl* 491 virtual WebGraphicsContext3DCommandBufferImpl*
473 GetParentContextForPlatformContext3D() OVERRIDE; 492 GetParentContextForPlatformContext3D() OVERRIDE;
474 493
475 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter( 494 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(
476 webkit::ppapi::PluginInstance* instance); 495 webkit::ppapi::PluginInstance* instance);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 549
531 scoped_ptr<PepperDeviceEnumerationEventHandler> 550 scoped_ptr<PepperDeviceEnumerationEventHandler>
532 device_enumeration_event_handler_; 551 device_enumeration_event_handler_;
533 552
534 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl); 553 DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
535 }; 554 };
536 555
537 } // namespace content 556 } // namespace content
538 557
539 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_ 558 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_DELEGATE_IMPL_H_
OLDNEW
« no previous file with comments | « content/public/renderer/renderer_ppapi_host.h ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698