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_CHROME_FRAME_AUTOMATION_H_ | 5 #ifndef CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 6 #define CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlwin.h> | 9 #include <atlwin.h> |
10 #include <string> | 10 #include <string> |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // This structure contains information used for launching chrome. | 82 // This structure contains information used for launching chrome. |
83 struct ChromeFrameLaunchParams { | 83 struct ChromeFrameLaunchParams { |
84 int automation_server_launch_timeout; | 84 int automation_server_launch_timeout; |
85 GURL url; | 85 GURL url; |
86 GURL referrer; | 86 GURL referrer; |
87 std::wstring profile_name; | 87 std::wstring profile_name; |
88 std::wstring extra_chrome_arguments; | 88 std::wstring extra_chrome_arguments; |
89 bool perform_version_check; | 89 bool perform_version_check; |
90 bool incognito_mode; | 90 bool incognito_mode; |
91 bool is_widget_mode; | |
92 }; | 91 }; |
93 | 92 |
94 // We must create and destroy automation proxy in a thread with a message loop. | 93 // We must create and destroy automation proxy in a thread with a message loop. |
95 // Hence thread cannot be a member of the proxy. | 94 // Hence thread cannot be a member of the proxy. |
96 class ProxyFactory { | 95 class ProxyFactory { |
97 public: | 96 public: |
98 // Callback when chrome process launch is complete and automation handshake | 97 // Callback when chrome process launch is complete and automation handshake |
99 // (Hello message) is established. | 98 // (Hello message) is established. |
100 struct DECLSPEC_NOVTABLE LaunchDelegate { | 99 struct DECLSPEC_NOVTABLE LaunchDelegate { |
101 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, | 100 virtual void LaunchComplete(ChromeFrameAutomationProxy* proxy, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 public base::RefCountedThreadSafe<ChromeFrameAutomationClient>, | 151 public base::RefCountedThreadSafe<ChromeFrameAutomationClient>, |
153 public PluginUrlRequestDelegate, | 152 public PluginUrlRequestDelegate, |
154 public TabProxy::TabProxyDelegate, | 153 public TabProxy::TabProxyDelegate, |
155 public ProxyFactory::LaunchDelegate { | 154 public ProxyFactory::LaunchDelegate { |
156 public: | 155 public: |
157 ChromeFrameAutomationClient(); | 156 ChromeFrameAutomationClient(); |
158 ~ChromeFrameAutomationClient(); | 157 ~ChromeFrameAutomationClient(); |
159 | 158 |
160 // Called from UI thread. | 159 // Called from UI thread. |
161 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, | 160 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, |
162 const ChromeFrameLaunchParams& chrome_launch_params); | 161 int automation_server_launch_timeout, |
| 162 bool perform_version_check, |
| 163 const std::wstring& profile_name, |
| 164 const std::wstring& extra_chrome_arguments, |
| 165 bool incognito); |
163 void Uninitialize(); | 166 void Uninitialize(); |
164 | 167 |
165 virtual bool InitiateNavigation(const std::string& url, | 168 virtual bool InitiateNavigation(const std::string& url, |
166 const std::string& referrer, | 169 const std::string& referrer, |
167 bool is_privileged); | 170 bool is_privileged); |
168 virtual bool NavigateToIndex(int index); | 171 virtual bool NavigateToIndex(int index); |
169 bool ForwardMessageFromExternalHost(const std::string& message, | 172 bool ForwardMessageFromExternalHost(const std::string& message, |
170 const std::string& origin, | 173 const std::string& origin, |
171 const std::string& target); | 174 const std::string& target); |
172 bool SetProxySettings(const std::string& json_encoded_proxy_settings); | 175 bool SetProxySettings(const std::string& json_encoded_proxy_settings); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 public: | 356 public: |
354 void SetUrlFetcher(PluginUrlRequestManager* url_fetcher) { | 357 void SetUrlFetcher(PluginUrlRequestManager* url_fetcher) { |
355 DCHECK(url_fetcher != NULL); | 358 DCHECK(url_fetcher != NULL); |
356 url_fetcher_ = url_fetcher; | 359 url_fetcher_ = url_fetcher; |
357 thread_safe_url_fetcher_ = url_fetcher->IsThreadSafe(); | 360 thread_safe_url_fetcher_ = url_fetcher->IsThreadSafe(); |
358 url_fetcher_->set_delegate(this); | 361 url_fetcher_->set_delegate(this); |
359 } | 362 } |
360 }; | 363 }; |
361 | 364 |
362 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 365 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
OLD | NEW |