| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // tab_proxy->WaitForNavigation(last_nav_time); | 303 // tab_proxy->WaitForNavigation(last_nav_time); |
| 304 bool WaitForNavigation(int64 last_navigation_time); | 304 bool WaitForNavigation(int64 last_navigation_time); |
| 305 | 305 |
| 306 // Gets the current used encoding of the page in the tab. | 306 // Gets the current used encoding of the page in the tab. |
| 307 bool GetPageCurrentEncoding(std::string* encoding); | 307 bool GetPageCurrentEncoding(std::string* encoding); |
| 308 | 308 |
| 309 // Uses the specified encoding to override encoding of the page in the tab. | 309 // Uses the specified encoding to override encoding of the page in the tab. |
| 310 bool OverrideEncoding(const std::string& encoding); | 310 bool OverrideEncoding(const std::string& encoding); |
| 311 | 311 |
| 312 #if defined(OS_WIN) | 312 #if defined(OS_WIN) |
| 313 // Resizes the tab window. | |
| 314 // The parent_window parameter allows a parent to be specified for the window | |
| 315 // passed in. | |
| 316 void Reposition(HWND window, HWND window_insert_after, int left, int top, | |
| 317 int width, int height, int flags, HWND parent_window); | |
| 318 | |
| 319 // Sends the selected context menu command to the chrome instance | 313 // Sends the selected context menu command to the chrome instance |
| 320 void SendContextMenuCommand(int selected_command); | 314 void SendContextMenuCommand(int selected_command); |
| 321 | |
| 322 #endif // defined(OS_WIN) | 315 #endif // defined(OS_WIN) |
| 323 | 316 |
| 324 // Selects all contents on the page. | 317 // Selects all contents on the page. |
| 325 void SelectAll(); | 318 void SelectAll(); |
| 326 | 319 |
| 327 // Edit operations on the page. | 320 // Edit operations on the page. |
| 328 void Cut(); | 321 void Cut(); |
| 329 void Copy(); | 322 void Copy(); |
| 330 void Paste(); | 323 void Paste(); |
| 331 | 324 |
| 332 // These handlers issue asynchronous Reload and Stop notifications to the | 325 // These handlers issue asynchronous Reload and Stop notifications to the |
| 333 // chrome instance. | 326 // chrome instance. |
| 334 void ReloadAsync(); | 327 void ReloadAsync(); |
| 335 void StopAsync(); | 328 void StopAsync(); |
| 336 | 329 |
| 337 // Calls delegates | 330 // Calls delegates |
| 338 void AddObserver(TabProxyDelegate* observer); | 331 void AddObserver(TabProxyDelegate* observer); |
| 339 void RemoveObserver(TabProxyDelegate* observer); | 332 void RemoveObserver(TabProxyDelegate* observer); |
| 340 void OnMessageReceived(const IPC::Message& message); | 333 void OnMessageReceived(const IPC::Message& message); |
| 341 protected: | 334 protected: |
| 342 virtual ~TabProxy() {} | 335 virtual ~TabProxy() {} |
| 343 private: | 336 private: |
| 344 Lock list_lock_; // Protects the observers_list_. | 337 Lock list_lock_; // Protects the observers_list_. |
| 345 ObserverList<TabProxyDelegate> observers_list_; | 338 ObserverList<TabProxyDelegate> observers_list_; |
| 346 DISALLOW_COPY_AND_ASSIGN(TabProxy); | 339 DISALLOW_COPY_AND_ASSIGN(TabProxy); |
| 347 }; | 340 }; |
| 348 | 341 |
| 349 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ | 342 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ |
| OLD | NEW |