OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 18 matching lines...) Expand all Loading... |
29 NPBool seekable, uint16* stream_type); | 29 NPBool seekable, uint16* stream_type); |
30 int32 WriteReady(NPStream* stream); | 30 int32 WriteReady(NPStream* stream); |
31 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); | 31 int32 Write(NPStream* stream, int32 offset, int32 len, void* buffer); |
32 NPError DestroyStream(NPStream* stream, NPReason reason); | 32 NPError DestroyStream(NPStream* stream, NPReason reason); |
33 void UrlNotify(const char* url, NPReason reason, void* notify_data); | 33 void UrlNotify(const char* url, NPReason reason, void* notify_data); |
34 | 34 |
35 private: | 35 private: |
36 // PluginUrlRequestManager implementation. Called from AutomationClient. | 36 // PluginUrlRequestManager implementation. Called from AutomationClient. |
37 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); | 37 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); |
38 virtual void StartRequest(int request_id, | 38 virtual void StartRequest(int request_id, |
39 const IPC::AutomationURLRequest& request_info); | 39 const AutomationURLRequest& request_info); |
40 virtual void ReadRequest(int request_id, int bytes_to_read); | 40 virtual void ReadRequest(int request_id, int bytes_to_read); |
41 virtual void EndRequest(int request_id); | 41 virtual void EndRequest(int request_id); |
42 virtual void DownloadRequestInHost(int request_id) { | 42 virtual void DownloadRequestInHost(int request_id) { |
43 // Not yet implemented. | 43 // Not yet implemented. |
44 } | 44 } |
45 virtual void StopAll(); | 45 virtual void StopAll(); |
46 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie); | 46 virtual void SetCookiesForUrl(const GURL& url, const std::string& cookie); |
47 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); | 47 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); |
48 | 48 |
49 // Outstanding requests map. | 49 // Outstanding requests map. |
(...skipping 12 matching lines...) Expand all Loading... |
62 const std::string& cookie_string, int cookie_id); | 62 const std::string& cookie_string, int cookie_id); |
63 | 63 |
64 static inline NPAPIUrlRequest* RequestFromNotifyData(void* notify_data) { | 64 static inline NPAPIUrlRequest* RequestFromNotifyData(void* notify_data) { |
65 return reinterpret_cast<NPAPIUrlRequest*>(notify_data); | 65 return reinterpret_cast<NPAPIUrlRequest*>(notify_data); |
66 } | 66 } |
67 | 67 |
68 NPP instance_; | 68 NPP instance_; |
69 }; | 69 }; |
70 | 70 |
71 #endif // CHROME_FRAME_NPAPI_URL_REQUEST_H_ | 71 #endif // CHROME_FRAME_NPAPI_URL_REQUEST_H_ |
72 | |
OLD | NEW |