| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ | 5 #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ |
| 6 #define WEBKIT_GLUE_WEBPLUGIN_H__ | 6 #define WEBKIT_GLUE_WEBPLUGIN_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool notify_needed, | 124 bool notify_needed, |
| 125 intptr_t notify_data) = 0; | 125 intptr_t notify_data) = 0; |
| 126 | 126 |
| 127 // Returns true iff in off the record (Incognito) mode. | 127 // Returns true iff in off the record (Incognito) mode. |
| 128 virtual bool IsOffTheRecord() = 0; | 128 virtual bool IsOffTheRecord() = 0; |
| 129 | 129 |
| 130 // Called when the WebPluginResourceClient instance is deleted. | 130 // Called when the WebPluginResourceClient instance is deleted. |
| 131 virtual void ResourceClientDeleted( | 131 virtual void ResourceClientDeleted( |
| 132 WebPluginResourceClient* resource_client) {} | 132 WebPluginResourceClient* resource_client) {} |
| 133 | 133 |
| 134 // Defers the loading of the resource identified by resource_id. This is |
| 135 // controlled by the defer parameter. |
| 136 virtual void SetDeferResourceLoading(int resource_id, bool defer) = 0; |
| 137 |
| 134 private: | 138 private: |
| 135 DISALLOW_EVIL_CONSTRUCTORS(WebPlugin); | 139 DISALLOW_EVIL_CONSTRUCTORS(WebPlugin); |
| 136 }; | 140 }; |
| 137 | 141 |
| 138 // Simpler version of ResourceHandleClient that lends itself to proxying. | 142 // Simpler version of ResourceHandleClient that lends itself to proxying. |
| 139 class WebPluginResourceClient { | 143 class WebPluginResourceClient { |
| 140 public: | 144 public: |
| 141 virtual ~WebPluginResourceClient() {} | 145 virtual ~WebPluginResourceClient() {} |
| 142 virtual void WillSendRequest(const GURL& url) = 0; | 146 virtual void WillSendRequest(const GURL& url) = 0; |
| 143 // The request_is_seekable parameter indicates whether byte range requests | 147 // The request_is_seekable parameter indicates whether byte range requests |
| 144 // can be issued for the underlying stream. | 148 // can be issued for the underlying stream. |
| 145 virtual void DidReceiveResponse(const std::string& mime_type, | 149 virtual void DidReceiveResponse(const std::string& mime_type, |
| 146 const std::string& headers, | 150 const std::string& headers, |
| 147 uint32 expected_length, | 151 uint32 expected_length, |
| 148 uint32 last_modified, | 152 uint32 last_modified, |
| 149 bool request_is_seekable, | 153 bool request_is_seekable) = 0; |
| 150 bool* cancel) = 0; | |
| 151 virtual void DidReceiveData(const char* buffer, int length, | 154 virtual void DidReceiveData(const char* buffer, int length, |
| 152 int data_offset) = 0; | 155 int data_offset) = 0; |
| 153 virtual void DidFinishLoading() = 0; | 156 virtual void DidFinishLoading() = 0; |
| 154 virtual void DidFail() = 0; | 157 virtual void DidFail() = 0; |
| 155 virtual bool IsMultiByteResponseExpected() = 0; | 158 virtual bool IsMultiByteResponseExpected() = 0; |
| 156 }; | 159 }; |
| 157 | 160 |
| 158 | 161 |
| 159 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ | 162 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ |
| OLD | NEW |