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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 183 |
184 // Called from UI thread. | 184 // Called from UI thread. |
185 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, | 185 virtual bool Initialize(ChromeFrameDelegate* chrome_frame_delegate, |
186 int automation_server_launch_timeout, | 186 int automation_server_launch_timeout, |
187 bool perform_version_check, | 187 bool perform_version_check, |
188 const std::wstring& profile_name, | 188 const std::wstring& profile_name, |
189 const std::wstring& extra_chrome_arguments, | 189 const std::wstring& extra_chrome_arguments, |
190 bool incognito); | 190 bool incognito); |
191 void Uninitialize(); | 191 void Uninitialize(); |
192 | 192 |
193 virtual bool InitiateNavigation(const std::string& url, bool is_privileged); | 193 virtual bool InitiateNavigation(const std::string& url, |
| 194 const std::string& referrer, |
| 195 bool is_privileged); |
194 virtual bool NavigateToIndex(int index); | 196 virtual bool NavigateToIndex(int index); |
195 bool ForwardMessageFromExternalHost(const std::string& message, | 197 bool ForwardMessageFromExternalHost(const std::string& message, |
196 const std::string& origin, | 198 const std::string& origin, |
197 const std::string& target); | 199 const std::string& target); |
198 bool SetProxySettings(const std::string& json_encoded_proxy_settings); | 200 bool SetProxySettings(const std::string& json_encoded_proxy_settings); |
199 | 201 |
200 virtual void SetEnableExtensionAutomation(bool enable_automation); | 202 virtual void SetEnableExtensionAutomation(bool enable_automation); |
201 | 203 |
202 void FindInPage(const std::wstring& search_string, | 204 void FindInPage(const std::wstring& search_string, |
203 FindInPageDirection forward, | 205 FindInPageDirection forward, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 // ChromeFrameDelegate::Something, | 303 // ChromeFrameDelegate::Something, |
302 // param1, | 304 // param1, |
303 // param2)); | 305 // param2)); |
304 void CallDelegate(const tracked_objects::Location& from_here, | 306 void CallDelegate(const tracked_objects::Location& from_here, |
305 Task* delegate_task); | 307 Task* delegate_task); |
306 // The workhorse method called in main/GUI thread which is going to | 308 // The workhorse method called in main/GUI thread which is going to |
307 // execute ChromeFrameDelegate method encapsulated in delegate_task. | 309 // execute ChromeFrameDelegate method encapsulated in delegate_task. |
308 void CallDelegateImpl(Task* delegate_task); | 310 void CallDelegateImpl(Task* delegate_task); |
309 | 311 |
310 HWND chrome_window() const { return chrome_window_; } | 312 HWND chrome_window() const { return chrome_window_; } |
311 void BeginNavigate(const GURL& url); | 313 void BeginNavigate(const GURL& url, const GURL& referrer); |
312 void BeginNavigateCompleted(AutomationMsg_NavigationResponseValues result); | 314 void BeginNavigateCompleted(AutomationMsg_NavigationResponseValues result); |
313 | 315 |
314 // Helpers | 316 // Helpers |
315 void ReportNavigationError(AutomationMsg_NavigationResponseValues error_code, | 317 void ReportNavigationError(AutomationMsg_NavigationResponseValues error_code, |
316 const std::string& url); | 318 const std::string& url); |
317 | 319 |
318 bool is_initialized() const { | 320 bool is_initialized() const { |
319 return init_state_ == INITIALIZED; | 321 return init_state_ == INITIALIZED; |
320 } | 322 } |
321 | 323 |
(...skipping 28 matching lines...) Expand all Loading... |
350 InitializationState init_state_; | 352 InitializationState init_state_; |
351 bool use_chrome_network_; | 353 bool use_chrome_network_; |
352 bool handle_top_level_requests_; | 354 bool handle_top_level_requests_; |
353 ProxyFactory* proxy_factory_; | 355 ProxyFactory* proxy_factory_; |
354 int tab_handle_; | 356 int tab_handle_; |
355 // Only used if we attach to an existing tab. | 357 // Only used if we attach to an existing tab. |
356 intptr_t external_tab_cookie_; | 358 intptr_t external_tab_cookie_; |
357 }; | 359 }; |
358 | 360 |
359 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ | 361 #endif // CHROME_FRAME_CHROME_FRAME_AUTOMATION_H_ |
OLD | NEW |