| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_FRAME_NPAPI_URL_REQUEST_H_ | 5 #ifndef CHROME_FRAME_NPAPI_URL_REQUEST_H_ |
| 6 #define CHROME_FRAME_NPAPI_URL_REQUEST_H_ | 6 #define CHROME_FRAME_NPAPI_URL_REQUEST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 // Notifications from the browser. We find the appropriate NPAPIUrlRequest | 25 // Notifications from the browser. We find the appropriate NPAPIUrlRequest |
| 26 // and forward the call. | 26 // and forward the call. |
| 27 NPError NewStream(NPMIMEType type, NPStream* stream, | 27 NPError NewStream(NPMIMEType type, NPStream* stream, |
| 28 NPBool seekable, uint16* stream_type); | 28 NPBool seekable, uint16* stream_type); |
| 29 int32 WriteReady(NPStream* stream); | 29 int32 WriteReady(NPStream* stream); |
| 30 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); | 30 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); |
| 31 NPError DestroyStream(NPStream* stream, NPReason reason); | 31 NPError DestroyStream(NPStream* stream, NPReason reason); |
| 32 void UrlNotify(const char* url, NPReason reason, void* notify_data); | 32 void UrlNotify(const char* url, NPReason reason, void* notify_data); |
| 33 void UrlRedirectNotify(const char* url, int status, void* notify_data); |
| 33 | 34 |
| 34 private: | 35 private: |
| 35 // PluginUrlRequestManager implementation. Called from AutomationClient. | 36 // PluginUrlRequestManager implementation. Called from AutomationClient. |
| 36 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); | 37 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); |
| 37 virtual void StartRequest(int request_id, | 38 virtual void StartRequest(int request_id, |
| 38 const AutomationURLRequest& request_info); | 39 const AutomationURLRequest& request_info); |
| 39 virtual void ReadRequest(int request_id, int bytes_to_read); | 40 virtual void ReadRequest(int request_id, int bytes_to_read); |
| 40 virtual void EndRequest(int request_id); | 41 virtual void EndRequest(int request_id); |
| 41 virtual void DownloadRequestInHost(int request_id) { | 42 virtual void DownloadRequestInHost(int request_id) { |
| 42 // Not yet implemented. | 43 // Not yet implemented. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 62 const std::string& cookie_string, int cookie_id); | 63 const std::string& cookie_string, int cookie_id); |
| 63 | 64 |
| 64 static inline NPAPIUrlRequest* RequestFromNotifyData(void* notify_data) { | 65 static inline NPAPIUrlRequest* RequestFromNotifyData(void* notify_data) { |
| 65 return reinterpret_cast<NPAPIUrlRequest*>(notify_data); | 66 return reinterpret_cast<NPAPIUrlRequest*>(notify_data); |
| 66 } | 67 } |
| 67 | 68 |
| 68 NPP instance_; | 69 NPP instance_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 #endif // CHROME_FRAME_NPAPI_URL_REQUEST_H_ | 72 #endif // CHROME_FRAME_NPAPI_URL_REQUEST_H_ |
| OLD | NEW |