summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_dispatcher.h
diff options
context:
space:
mode:
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);
};