| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TEST_AUTOMATION_TAB_PROXY_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
| 6 #define CHROME_TEST_AUTOMATION_TAB_PROXY_H_ | 6 #define CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 bool ExecuteAndExtractInt(const std::wstring& frame_xpath, | 70 bool ExecuteAndExtractInt(const std::wstring& frame_xpath, |
| 71 const std::wstring& jscript, | 71 const std::wstring& jscript, |
| 72 int* value); | 72 int* value); |
| 73 bool ExecuteAndExtractValue(const std::wstring& frame_xpath, | 73 bool ExecuteAndExtractValue(const std::wstring& frame_xpath, |
| 74 const std::wstring& jscript, | 74 const std::wstring& jscript, |
| 75 Value** value); | 75 Value** value); |
| 76 | 76 |
| 77 // Navigates to a url. This method accepts the same kinds of URL input that | 77 // Navigates to a url. This method accepts the same kinds of URL input that |
| 78 // can be passed to Chrome on the command line. This is a synchronous call and | 78 // can be passed to Chrome on the command line. This is a synchronous call and |
| 79 // hence blocks until the navigation completes. | 79 // hence blocks until the navigation completes. |
| 80 AutomationMsg_NavigationResponseValues NavigateToURL(const GURL& url); | 80 AutomationMsg_NavigationResponseValues NavigateToURL( |
| 81 const GURL& url); |
| 82 |
| 83 // Navigates to a url. This method accepts the same kinds of URL input that |
| 84 // can be passed to Chrome on the command line. This is a synchronous call and |
| 85 // hence blocks until the |number_of_navigations| navigations complete. |
| 86 AutomationMsg_NavigationResponseValues |
| 87 NavigateToURLBlockUntilNavigationsComplete(const GURL& url, |
| 88 int number_of_navigations); |
| 81 | 89 |
| 82 // Navigates to a url. This is same as NavigateToURL with a timeout option. | 90 // Navigates to a url. This is same as NavigateToURL with a timeout option. |
| 83 // The function returns until the navigation completes or timeout (in | 91 // The function blocks until the |number_of_navigations| navigations |
| 84 // milliseconds) occurs. If return after timeout, is_timeout is set to true. | 92 // completes or timeout (in milliseconds) occurs. If return after timeout, |
| 93 // is_timeout is set to true. |
| 85 AutomationMsg_NavigationResponseValues NavigateToURLWithTimeout( | 94 AutomationMsg_NavigationResponseValues NavigateToURLWithTimeout( |
| 86 const GURL& url, uint32 timeout_ms, bool* is_timeout); | 95 const GURL& url, int number_of_navigations, uint32 timeout_ms, |
| 96 bool* is_timeout); |
| 87 | 97 |
| 88 // Navigates to a url in an externally hosted tab. | 98 // Navigates to a url in an externally hosted tab. |
| 89 // This method accepts the same kinds of URL input that | 99 // This method accepts the same kinds of URL input that |
| 90 // can be passed to Chrome on the command line. This is a synchronous call and | 100 // can be passed to Chrome on the command line. This is a synchronous call and |
| 91 // hence blocks until the navigation completes. | 101 // hence blocks until the navigation completes. |
| 92 AutomationMsg_NavigationResponseValues NavigateInExternalTab(const GURL& url); | 102 AutomationMsg_NavigationResponseValues NavigateInExternalTab(const GURL& url); |
| 93 | 103 |
| 94 // Navigates to a url. This is an asynchronous version of NavigateToURL. | 104 // Navigates to a url. This is an asynchronous version of NavigateToURL. |
| 95 // The function returns immediately after sending the LoadURL notification | 105 // The function returns immediately after sending the LoadURL notification |
| 96 // to the browser. | 106 // to the browser. |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void OnMessageReceived(const IPC::Message& message); | 329 void OnMessageReceived(const IPC::Message& message); |
| 320 protected: | 330 protected: |
| 321 virtual ~TabProxy() {} | 331 virtual ~TabProxy() {} |
| 322 private: | 332 private: |
| 323 Lock list_lock_; // Protects the observers_list_. | 333 Lock list_lock_; // Protects the observers_list_. |
| 324 ObserverList<TabProxyDelegate> observers_list_; | 334 ObserverList<TabProxyDelegate> observers_list_; |
| 325 DISALLOW_COPY_AND_ASSIGN(TabProxy); | 335 DISALLOW_COPY_AND_ASSIGN(TabProxy); |
| 326 }; | 336 }; |
| 327 | 337 |
| 328 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ | 338 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
| OLD | NEW |