| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Handles GetURL/GetURLNotify/PostURL/PostURLNotify requests initiated | 120 // Handles GetURL/GetURLNotify/PostURL/PostURLNotify requests initiated |
| 121 // by plugins. | 121 // by plugins. |
| 122 virtual void HandleURLRequest(const char *method, | 122 virtual void HandleURLRequest(const char *method, |
| 123 bool is_javascript_url, | 123 bool is_javascript_url, |
| 124 const char* target, unsigned int len, | 124 const char* target, unsigned int len, |
| 125 const char* buf, bool is_file_data, | 125 const char* buf, bool is_file_data, |
| 126 bool notify, const char* url, | 126 bool notify, const char* url, |
| 127 void* notify_data, bool popups_allowed) = 0; | 127 void* notify_data, bool popups_allowed) = 0; |
| 128 | 128 |
| 129 // Cancels document load. |
| 130 virtual void CancelDocumentLoad() = 0; |
| 131 |
| 132 // Initiates a HTTP range request. |
| 133 virtual void InitiateHTTPRangeRequest(const char* url, |
| 134 const char* range_info, |
| 135 void* existing_stream, |
| 136 bool notify_needed, |
| 137 HANDLE notify_data) = 0; |
| 138 |
| 129 private: | 139 private: |
| 130 DISALLOW_EVIL_CONSTRUCTORS(WebPlugin); | 140 DISALLOW_EVIL_CONSTRUCTORS(WebPlugin); |
| 131 }; | 141 }; |
| 132 | 142 |
| 133 // Simpler version of ResourceHandleClient that lends itself to proxying. | 143 // Simpler version of ResourceHandleClient that lends itself to proxying. |
| 134 class WebPluginResourceClient { | 144 class WebPluginResourceClient { |
| 135 public: | 145 public: |
| 136 virtual ~WebPluginResourceClient() {} | 146 virtual ~WebPluginResourceClient() {} |
| 137 virtual void WillSendRequest(const GURL& url) = 0; | 147 virtual void WillSendRequest(const GURL& url) = 0; |
| 138 virtual void DidReceiveResponse(const std::string& mime_type, | 148 virtual void DidReceiveResponse(const std::string& mime_type, |
| 139 const std::string& headers, | 149 const std::string& headers, |
| 140 uint32 expected_length, | 150 uint32 expected_length, |
| 141 uint32 last_modified, | 151 uint32 last_modified, |
| 142 bool* cancel) = 0; | 152 bool* cancel) = 0; |
| 143 virtual void DidReceiveData(const char* buffer, int length) = 0; | 153 virtual void DidReceiveData(const char* buffer, int length, |
| 154 int data_offset) = 0; |
| 144 virtual void DidFinishLoading() = 0; | 155 virtual void DidFinishLoading() = 0; |
| 145 virtual void DidFail() = 0; | 156 virtual void DidFail() = 0; |
| 146 }; | 157 }; |
| 147 | 158 |
| 148 | 159 |
| 149 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ | 160 #endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H__ |
| 150 | 161 |
| OLD | NEW |