Chromium Code Reviews| Index: content/renderer/browser_plugin/browser_plugin.h |
| diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h |
| index 210774b25f4831e1525a63833aedbed87601209c..cd813448739e9bbfea3459d3cf32c6299ebd04e5 100644 |
| --- a/content/renderer/browser_plugin/browser_plugin.h |
| +++ b/content/renderer/browser_plugin/browser_plugin.h |
| @@ -23,6 +23,12 @@ class MockBrowserPlugin; |
| class CONTENT_EXPORT BrowserPlugin : |
| NON_EXPORTED_BASE(public WebKit::WebPlugin) { |
| public: |
| + enum BoolAttribute { |
|
michaeln
2012/09/10 23:01:43
Doesn't look like this needs to be public. Actuall
nasko
2012/09/10 23:16:08
We want to raise an exception if JavaScript is use
|
| + UNSET_VALUE = -1, |
| + FALSE_VALUE, |
| + TRUE_VALUE |
| + }; |
| + |
| // Called only by tests to clean up before we blow away the MockRenderProcess. |
| void Cleanup(); |
| @@ -33,6 +39,12 @@ class CONTENT_EXPORT BrowserPlugin : |
| // the guest_crashed_ flag. |
| void SetSrcAttribute(const std::string& src); |
| + std::string GetPartitionAttribute() const; |
| + bool SetPartitionAttribute(const std::string& partition_id); |
| + |
| + bool GetPersistAttribute() const; |
| + bool SetPersistAttribute(bool persist); |
| + |
| // Inform the BrowserPlugin to update its backing store with the pixels in |
| // its damage buffer. |
| void UpdateRect(int message_id, |
| @@ -116,10 +128,9 @@ class CONTENT_EXPORT BrowserPlugin : |
| // Virtual to allow for mocking in tests. |
| virtual float GetDeviceScaleFactor() const; |
| - // Parses the source URL of the browser plugin from the element's attributes |
| - // and outputs them. |
| - bool ParseSrcAttribute(const WebKit::WebPluginParams& params, |
| - std::string* src); |
| + // Parses the attributes of the browser plugin from the element's attributes |
| + // and sets them appropriately. |
| + void ParseAttributes(const WebKit::WebPluginParams& params); |
| // Cleanup event listener state to free v8 resources when a BrowserPlugin |
| // is destroyed. |
| @@ -137,7 +148,10 @@ class CONTENT_EXPORT BrowserPlugin : |
| bool guest_crashed_; |
| bool resize_pending_; |
| long long parent_frame_; |
| + bool has_navigated_; |
| std::string src_; |
| + std::string partition_id_; |
| + BoolAttribute persist_storage_; |
| typedef std::vector<v8::Persistent<v8::Function> > EventListeners; |
| typedef std::map<std::string, EventListeners> EventListenerMap; |
| EventListenerMap event_listener_map_; |