OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // until the browser has initiated the close (wait_until_closed = false). | 190 // until the browser has initiated the close (wait_until_closed = false). |
191 // | 191 // |
192 // When a tab is closed the browser does additional work via invoke later | 192 // When a tab is closed the browser does additional work via invoke later |
193 // and may wait for messages from the renderer. Supplying a value of true to | 193 // and may wait for messages from the renderer. Supplying a value of true to |
194 // this method waits until all processing is done. Be careful with this, | 194 // this method waits until all processing is done. Be careful with this, |
195 // when closing the last tab it is possible for the browser to shutdown BEFORE | 195 // when closing the last tab it is possible for the browser to shutdown BEFORE |
196 // the tab has completely closed. In other words, this may NOT be sent for | 196 // the tab has completely closed. In other words, this may NOT be sent for |
197 // the last tab. | 197 // the last tab. |
198 bool Close(bool wait_until_closed) WARN_UNUSED_RESULT; | 198 bool Close(bool wait_until_closed) WARN_UNUSED_RESULT; |
199 | 199 |
200 #if defined(OS_WIN) | |
201 // TODO(port): Use portable replacement for HWND. | |
202 | |
203 // Gets the HWND that corresponds to the content area of this tab. | |
204 // Returns true if the call was successful. | |
205 bool GetHWND(HWND* hwnd) const WARN_UNUSED_RESULT; | |
206 #endif // defined(OS_WIN) | |
207 | |
208 // Gets the process ID that corresponds to the content area of this tab. | 200 // Gets the process ID that corresponds to the content area of this tab. |
209 // Returns true if the call was successful. If the specified tab has no | 201 // Returns true if the call was successful. If the specified tab has no |
210 // separate process for rendering its content, the return value is true but | 202 // separate process for rendering its content, the return value is true but |
211 // the process_id is 0. | 203 // the process_id is 0. |
212 bool GetProcessID(int* process_id) const WARN_UNUSED_RESULT; | 204 bool GetProcessID(int* process_id) const WARN_UNUSED_RESULT; |
213 | 205 |
214 // Supply or cancel authentication to a login prompt. These are synchronous | 206 // Supply or cancel authentication to a login prompt. These are synchronous |
215 // calls and hence block until the load finishes (or another login prompt | 207 // calls and hence block until the load finishes (or another login prompt |
216 // appears, in the case of invalid login info). | 208 // appears, in the case of invalid login info). |
217 bool SetAuth(const std::wstring& username, | 209 bool SetAuth(const std::wstring& username, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 // purposes. | 423 // purposes. |
432 void LastObjectRemoved(); | 424 void LastObjectRemoved(); |
433 | 425 |
434 private: | 426 private: |
435 Lock list_lock_; // Protects the observers_list_. | 427 Lock list_lock_; // Protects the observers_list_. |
436 ObserverList<TabProxyDelegate> observers_list_; | 428 ObserverList<TabProxyDelegate> observers_list_; |
437 DISALLOW_COPY_AND_ASSIGN(TabProxy); | 429 DISALLOW_COPY_AND_ASSIGN(TabProxy); |
438 }; | 430 }; |
439 | 431 |
440 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ | 432 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
OLD | NEW |