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

Unified Diff: ppapi/proxy/plugin_dispatcher.h

Issue 7044012: Support getting the font list in Pepper. This currently only works out of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/host_dispatcher.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_dispatcher.h
===================================================================
--- ppapi/proxy/plugin_dispatcher.h (revision 85766)
+++ ppapi/proxy/plugin_dispatcher.h (working copy)
@@ -34,6 +34,29 @@
class PluginDispatcher : public Dispatcher {
public:
+ class PluginDelegate : public ProxyChannel::Delegate {
+ public:
+ // Returns the set used for globally uniquifying PP_Instances. This same
+ // set must be returned for all channels.
+ //
+ // DEREFERENCE ONLY ON THE I/O THREAD.
+ virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() = 0;
+
+ // Returns the WebKit forwarding object used to make calls into WebKit.
+ // Necessary only on the plugin side.
+ virtual ppapi::WebKitForwarding* GetWebKitForwarding() = 0;
+
+ // Posts the given task to the WebKit thread associated with this plugin
+ // process. The WebKit thread should be lazily created if it does not
+ // exist yet.
+ virtual void PostToWebKitThread(const tracked_objects::Location& from_here,
+ const base::Closure& task) = 0;
+
+ // Sends the given message to the browser. Identical semantics to
+ // IPC::Message::Sender interface.
+ virtual bool SendToBrowser(IPC::Message* msg) = 0;
+ };
+
// Constructor for the plugin side. The init and shutdown functions will be
// will be automatically called when requested by the renderer side. The
// module ID will be set upon receipt of the InitializeModule message.
@@ -54,9 +77,9 @@
// You must call this function before anything else. Returns true on success.
// The delegate pointer must outlive this class, ownership is not
// transferred.
- virtual bool InitPluginWithChannel(Dispatcher::Delegate* delegate,
- const IPC::ChannelHandle& channel_handle,
- bool is_client);
+ bool InitPluginWithChannel(PluginDelegate* delegate,
+ const IPC::ChannelHandle& channel_handle,
+ bool is_client);
// Dispatcher overrides.
virtual bool IsPlugin() const;
@@ -79,6 +102,9 @@
void PostToWebKitThread(const tracked_objects::Location& from_here,
const base::Closure& task);
+ // Calls the PluginDelegate.SendToBrowser function.
+ bool SendToBrowser(IPC::Message* msg);
+
// Returns the WebKitForwarding object used to forward events to WebKit.
ppapi::WebKitForwarding* GetWebKitForwarding();
@@ -99,6 +125,8 @@
// IPC message handlers.
void OnMsgSupportsInterface(const std::string& interface_name, bool* result);
+ PluginDelegate* plugin_delegate_;
+
// All target proxies currently created. These are ones that receive
// messages.
scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT];
« no previous file with comments | « ppapi/proxy/host_dispatcher.cc ('k') | ppapi/proxy/plugin_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698