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 "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "chrome_frame/plugin_url_request.h" | 15 #include "chrome_frame/plugin_url_request.h" |
16 #include "chrome_frame/urlmon_moniker.h" | 16 #include "chrome_frame/urlmon_moniker.h" |
17 #include "chrome_frame/utils.h" | 17 #include "chrome_frame/utils.h" |
18 | 18 |
| 19 namespace base { |
| 20 namespace win { |
| 21 class ScopedCOMInitializer; |
| 22 } |
| 23 } |
| 24 |
19 class UrlmonUrlRequest; | 25 class UrlmonUrlRequest; |
20 | 26 |
21 class UrlmonUrlRequestManager | 27 class UrlmonUrlRequestManager |
22 : public PluginUrlRequestManager, | 28 : public PluginUrlRequestManager, |
23 public PluginUrlRequestDelegate { | 29 public PluginUrlRequestDelegate { |
24 public: | 30 public: |
25 // Sub resources on the pages in chrome frame are fetched on this thread. | 31 // Sub resources on the pages in chrome frame are fetched on this thread. |
26 class ResourceFetcherThread : public base::Thread { | 32 class ResourceFetcherThread : public base::Thread { |
27 public: | 33 public: |
28 explicit ResourceFetcherThread(const char* name); | 34 explicit ResourceFetcherThread(const char* name); |
29 virtual ~ResourceFetcherThread(); | 35 virtual ~ResourceFetcherThread(); |
30 | 36 |
31 virtual void Init(); | 37 virtual void Init(); |
32 virtual void CleanUp(); | 38 virtual void CleanUp(); |
| 39 |
| 40 private: |
| 41 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(ResourceFetcherThread); |
33 }; | 44 }; |
34 | 45 |
35 // Contains the privacy information for all requests issued by this instance. | 46 // Contains the privacy information for all requests issued by this instance. |
36 struct PrivacyInfo { | 47 struct PrivacyInfo { |
37 public: | 48 public: |
38 struct PrivacyEntry { | 49 struct PrivacyEntry { |
39 PrivacyEntry() : flags(0) {} | 50 PrivacyEntry() : flags(0) {} |
40 std::wstring policy_ref; | 51 std::wstring policy_ref; |
41 int32 flags; | 52 int32 flags; |
42 }; | 53 }; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // The window to be used to fire notifications on. | 163 // The window to be used to fire notifications on. |
153 HWND notification_window_; | 164 HWND notification_window_; |
154 // Set to true if the ChromeFrame instance is running in privileged mode. | 165 // Set to true if the ChromeFrame instance is running in privileged mode. |
155 bool privileged_mode_; | 166 bool privileged_mode_; |
156 // A pointer to the containing object. We maintain a weak reference to avoid | 167 // A pointer to the containing object. We maintain a weak reference to avoid |
157 // lifetime issues. | 168 // lifetime issues. |
158 IUnknown* container_; | 169 IUnknown* container_; |
159 }; | 170 }; |
160 | 171 |
161 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ | 172 #endif // CHROME_FRAME_URLMON_URL_REQUEST_H_ |
OLD | NEW |