diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 22:31:09 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 22:31:09 +0000 |
commit | d259a8ecab95cd657b9c7d413e8bfa3c86d0d4cb (patch) | |
tree | 83805324a9ffeeb10b334d544b13155c8c52b069 /ppapi/proxy/dispatcher.h | |
parent | 772b57ab0dcd7843157b961f10999e48088e8973 (diff) | |
download | chromium_src-d259a8ecab95cd657b9c7d413e8bfa3c86d0d4cb.zip chromium_src-d259a8ecab95cd657b9c7d413e8bfa3c86d0d4cb.tar.gz chromium_src-d259a8ecab95cd657b9c7d413e8bfa3c86d0d4cb.tar.bz2 |
Support getting the font list in Pepper. This currently only works out of
process.
This adds a function to the font interface to get the font list. Since we
don't have arrays or dictionaries in Pepper yet, I used a string with nulls
separating the names. A previous attempt to make a "font list resource" proved
excessively complicated and not actually much easier for clients to deal with.
This refactors the existing font list getting that used to be in the options
for the browser. I moved it to content and split it into two pieces, the
synchronous version, and then an asynchronous wrapper around that which both
the prefs code and the pepper code use. This cleaned up some of the preferences
code, and also fixes the leak of the entire font list in the code.
I used the new callback/bind system for the async font loading. I had to add
BrowserThread support for the new system.
This uses the PepperMessageFilter to listen for font load requests from the
plugin in the browser process. This is nice because we can add stuff here and
have messages serviced for both in-process and out-of-process plugins. This
proved to be complicated due to the HostResolver used in some of the existing
code, and thread restrictions for how to deal with it. This is why there are
two modes for the filter object.
I changed the delegates around for the Dispatcher. Now the PluginDispatcher
has the delegate interface since the HostDispatcher didn't actually need any
of them and we were accumulating a lot of empty functions in the
PepperPluginRegistry.
It's possible for the fonts to be loaded on Windows and Mac without IPC, since
enumerating fonts should be possible inside the sandbox. I didn't implement
this since it adds extra complexity and probably doesn't give that much
benefit.
TEST=manual
BUG=none
Review URL: http://codereview.chromium.org/7044012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/dispatcher.h')
-rw-r--r-- | ppapi/proxy/dispatcher.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h index 2dc1fe6..39fa1e0 100644 --- a/ppapi/proxy/dispatcher.h +++ b/ppapi/proxy/dispatcher.h @@ -48,27 +48,6 @@ class Dispatcher : public ProxyChannel { typedef const void* (*GetInterfaceFunc)(const char*); typedef int32_t (*InitModuleFunc)(PP_Module, GetInterfaceFunc); - class Delegate : public ProxyChannel::Delegate { - public: - // Returns the set used for globally uniquifying PP_Instances. This same - // set must be returned for all channels. This is required only for the - // plugin side, for the host side, the return value may be NULL. - // - // 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. The host side can return NULL. - virtual ppapi::WebKitForwarding* GetWebKitForwarding() = 0; - - // Posts the given task to the WebKit thread associated with this plugin - // process. For host processes, this will not be called and can do - // nothing. 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; - }; - virtual ~Dispatcher(); // Returns true if the dispatcher is on the plugin side, or false if it's the @@ -121,8 +100,6 @@ class Dispatcher : public ProxyChannel { Dispatcher(base::ProcessHandle remote_process_handle, GetInterfaceFunc local_get_interface); - void SetDelegate(Delegate* delegate); - // Setter for the derived classes to set the appropriate var serialization. // Takes ownership of the given pointer, which must be on the heap. void SetSerializationRules(VarSerializationRules* var_serialization_rules); @@ -131,8 +108,6 @@ class Dispatcher : public ProxyChannel { return disallow_trusted_interfaces_; } - Delegate* dispatcher_delegate_; - private: bool disallow_trusted_interfaces_; |