summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_dispatcher.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 19:05:28 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 19:05:28 +0000
commit208aad79d76c5c9a5e05322be674b2d81738cb68 (patch)
tree6286cbea3bd340d8d5f61af9f6ace0b3d15e236c /ppapi/proxy/plugin_dispatcher.h
parentb6b19e26bb00c8e8bc4ab91b535520352fb009f9 (diff)
downloadchromium_src-208aad79d76c5c9a5e05322be674b2d81738cb68.zip
chromium_src-208aad79d76c5c9a5e05322be674b2d81738cb68.tar.gz
chromium_src-208aad79d76c5c9a5e05322be674b2d81738cb68.tar.bz2
Use the WebKit default fonts when specifying generic font families.
This pipes through a new preferences object that the font system can use. It now picks up these faces as well as the default font size. Clarify this behavior in the interface. TEST=manual (font example included). BUG=none Review URL: http://codereview.chromium.org/7053022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_dispatcher.h')
-rw-r--r--ppapi/proxy/plugin_dispatcher.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h
index 29460fa..1964d94 100644
--- a/ppapi/proxy/plugin_dispatcher.h
+++ b/ppapi/proxy/plugin_dispatcher.h
@@ -15,6 +15,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/proxy/dispatcher.h"
#include "ppapi/shared_impl/function_group_base.h"
+#include "ppapi/shared_impl/ppapi_preferences.h"
class MessageLoop;
@@ -22,6 +23,10 @@ namespace base {
class WaitableEvent;
}
+namespace ppapi {
+struct Preferences;
+}
+
namespace pp {
namespace proxy {
@@ -108,6 +113,9 @@ class PluginDispatcher : public Dispatcher {
// Returns the WebKitForwarding object used to forward events to WebKit.
ppapi::WebKitForwarding* GetWebKitForwarding();
+ // Returns the Preferences.
+ const ppapi::Preferences& preferences() const { return preferences_; }
+
// Returns the "new-style" function API for the given interface ID, creating
// it if necessary.
// TODO(brettw) this is in progress. It should be merged with the target
@@ -124,6 +132,7 @@ class PluginDispatcher : public Dispatcher {
// IPC message handlers.
void OnMsgSupportsInterface(const std::string& interface_name, bool* result);
+ void OnMsgSetPreferences(const ::ppapi::Preferences& prefs);
PluginDelegate* plugin_delegate_;
@@ -140,6 +149,11 @@ class PluginDispatcher : public Dispatcher {
typedef base::hash_map<PP_Instance, InstanceData> InstanceDataMap;
InstanceDataMap instance_map_;
+ // The preferences sent from the host. We only want to set this once, which
+ // is what the received_preferences_ indicates. See OnMsgSetPreferences.
+ bool received_preferences_;
+ ppapi::Preferences preferences_;
+
DISALLOW_COPY_AND_ASSIGN(PluginDispatcher);
};