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_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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" // NOLINT | 9 #include "build/build_config.h" // NOLINT |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/common/automation_constants.h" | 22 #include "chrome/common/automation_constants.h" |
23 #include "chrome/test/automation/automation_handle_tracker.h" | 23 #include "chrome/test/automation/automation_handle_tracker.h" |
24 #include "chrome/test/automation/dom_element_proxy.h" | 24 #include "chrome/test/automation/dom_element_proxy.h" |
25 #include "chrome/test/automation/javascript_execution_controller.h" | 25 #include "chrome/test/automation/javascript_execution_controller.h" |
26 #include "content/common/page_type.h" | 26 #include "content/common/page_type.h" |
27 #include "content/common/security_style.h" | 27 #include "content/common/security_style.h" |
28 #include "webkit/glue/window_open_disposition.h" | 28 #include "webkit/glue/window_open_disposition.h" |
29 | 29 |
30 class BrowserProxy; | 30 class BrowserProxy; |
31 class GURL; | 31 class GURL; |
32 class Value; | |
33 namespace IPC { | 32 namespace IPC { |
34 class Message; | 33 class Message; |
35 } | 34 } |
36 | 35 |
| 36 namespace base { |
| 37 class Value; |
| 38 } |
| 39 |
37 class TabProxy : public AutomationResourceProxy, | 40 class TabProxy : public AutomationResourceProxy, |
38 public JavaScriptExecutionController { | 41 public JavaScriptExecutionController { |
39 public: | 42 public: |
40 class TabProxyDelegate { | 43 class TabProxyDelegate { |
41 public: | 44 public: |
42 virtual bool OnMessageReceived(TabProxy* tab, const IPC::Message& msg) { | 45 virtual bool OnMessageReceived(TabProxy* tab, const IPC::Message& msg) { |
43 return false; | 46 return false; |
44 } | 47 } |
45 virtual void OnChannelError(TabProxy* tab) {} | 48 virtual void OnChannelError(TabProxy* tab) {} |
46 | 49 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 const std::wstring& jscript, | 83 const std::wstring& jscript, |
81 std::wstring* value) WARN_UNUSED_RESULT; | 84 std::wstring* value) WARN_UNUSED_RESULT; |
82 bool ExecuteAndExtractBool(const std::wstring& frame_xpath, | 85 bool ExecuteAndExtractBool(const std::wstring& frame_xpath, |
83 const std::wstring& jscript, | 86 const std::wstring& jscript, |
84 bool* value) WARN_UNUSED_RESULT; | 87 bool* value) WARN_UNUSED_RESULT; |
85 bool ExecuteAndExtractInt(const std::wstring& frame_xpath, | 88 bool ExecuteAndExtractInt(const std::wstring& frame_xpath, |
86 const std::wstring& jscript, | 89 const std::wstring& jscript, |
87 int* value) WARN_UNUSED_RESULT; | 90 int* value) WARN_UNUSED_RESULT; |
88 bool ExecuteAndExtractValue(const std::wstring& frame_xpath, | 91 bool ExecuteAndExtractValue(const std::wstring& frame_xpath, |
89 const std::wstring& jscript, | 92 const std::wstring& jscript, |
90 Value** value) WARN_UNUSED_RESULT; | 93 base::Value** value) WARN_UNUSED_RESULT; |
91 | 94 |
92 // Returns a DOMElementProxyRef to the tab's current DOM document. | 95 // Returns a DOMElementProxyRef to the tab's current DOM document. |
93 // This proxy is invalidated when the document changes. | 96 // This proxy is invalidated when the document changes. |
94 DOMElementProxyRef GetDOMDocument(); | 97 DOMElementProxyRef GetDOMDocument(); |
95 | 98 |
96 // Navigates to a url. This method accepts the same kinds of URL input that | 99 // Navigates to a url. This method accepts the same kinds of URL input that |
97 // 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 |
98 // hence blocks until the navigation completes. | 101 // hence blocks until the navigation completes. |
99 AutomationMsg_NavigationResponseValues NavigateToURL( | 102 AutomationMsg_NavigationResponseValues NavigateToURL( |
100 const GURL& url) WARN_UNUSED_RESULT; | 103 const GURL& url) WARN_UNUSED_RESULT; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // purposes. | 404 // purposes. |
402 void LastObjectRemoved(); | 405 void LastObjectRemoved(); |
403 | 406 |
404 private: | 407 private: |
405 base::Lock list_lock_; // Protects the observers_list_. | 408 base::Lock list_lock_; // Protects the observers_list_. |
406 ObserverList<TabProxyDelegate> observers_list_; | 409 ObserverList<TabProxyDelegate> observers_list_; |
407 DISALLOW_COPY_AND_ASSIGN(TabProxy); | 410 DISALLOW_COPY_AND_ASSIGN(TabProxy); |
408 }; | 411 }; |
409 | 412 |
410 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ | 413 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
OLD | NEW |