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_URLMON_URL_REQUEST_H_ | 5 #ifndef CHROME_FRAME_URLMON_URL_REQUEST_H_ |
6 #define CHROME_FRAME_URLMON_URL_REQUEST_H_ | 6 #define CHROME_FRAME_URLMON_URL_REQUEST_H_ |
7 | 7 |
8 #include <urlmon.h> | 8 #include <urlmon.h> |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlcom.h> | 10 #include <atlcom.h> |
11 #include <map> | 11 #include <map> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "chrome_frame/plugin_url_request.h" | 14 #include "chrome_frame/plugin_url_request.h" |
15 #include "chrome_frame/urlmon_moniker.h" | 15 #include "chrome_frame/urlmon_moniker.h" |
16 #include "chrome_frame/utils.h" | 16 #include "chrome_frame/utils.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
| 19 class MessageLoop; |
19 class Thread; | 20 class Thread; |
20 } | 21 } |
21 | 22 |
22 class UrlmonUrlRequest; | 23 class UrlmonUrlRequest; |
23 | 24 |
24 class UrlmonUrlRequestManager | 25 class UrlmonUrlRequestManager |
25 : public PluginUrlRequestManager, | 26 : public PluginUrlRequestManager, |
26 public PluginUrlRequestDelegate { | 27 public PluginUrlRequestDelegate { |
27 public: | 28 public: |
28 // Contains the privacy information for all requests issued by this instance. | 29 // Contains the privacy information for all requests issued by this instance. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // privileged mode. | 69 // privileged mode. |
69 void set_privileged_mode(bool privileged_mode) { | 70 void set_privileged_mode(bool privileged_mode) { |
70 privileged_mode_ = privileged_mode; | 71 privileged_mode_ = privileged_mode; |
71 } | 72 } |
72 | 73 |
73 void set_container(IUnknown* container) { | 74 void set_container(IUnknown* container) { |
74 container_ = container; | 75 container_ = container; |
75 } | 76 } |
76 | 77 |
77 private: | 78 private: |
78 friend class MessageLoop; | 79 friend class base::MessageLoop; |
79 | 80 |
80 // PluginUrlRequestManager implementation. | 81 // PluginUrlRequestManager implementation. |
81 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); | 82 virtual PluginUrlRequestManager::ThreadSafeFlags GetThreadSafeFlags(); |
82 virtual void StartRequest(int request_id, | 83 virtual void StartRequest(int request_id, |
83 const AutomationURLRequest& request_info); | 84 const AutomationURLRequest& request_info); |
84 virtual void ReadRequest(int request_id, int bytes_to_read); | 85 virtual void ReadRequest(int request_id, int bytes_to_read); |
85 virtual void EndRequest(int request_id); | 86 virtual void EndRequest(int request_id); |
86 virtual void DownloadRequestInHost(int request_id); | 87 virtual void DownloadRequestInHost(int request_id); |
87 virtual void StopAll(); | 88 virtual void StopAll(); |
88 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); | 89 virtual void GetCookiesForUrl(const GURL& url, int cookie_id); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // The window to be used to fire notifications on. | 146 // The window to be used to fire notifications on. |
146 HWND notification_window_; | 147 HWND notification_window_; |
147 // Set to true if the ChromeFrame instance is running in privileged mode. | 148 // Set to true if the ChromeFrame instance is running in privileged mode. |
148 bool privileged_mode_; | 149 bool privileged_mode_; |
149 // A pointer to the containing object. We maintain a weak reference to avoid | 150 // A pointer to the containing object. We maintain a weak reference to avoid |
150 // lifetime issues. | 151 // lifetime issues. |
151 IUnknown* container_; | 152 IUnknown* container_; |
152 }; | 153 }; |
153 | 154 |
154 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ | 155 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ |
OLD | NEW |