Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/test/automation/tab_proxy.h

Issue 255057: Unit Test for Toggling of Encoding Auto-Detect (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 // Causes a click on the link of the info-bar at |info_bar_index|. If 297 // Causes a click on the link of the info-bar at |info_bar_index|. If
298 // |wait_for_navigation| is true, this call does not return until a navigation 298 // |wait_for_navigation| is true, this call does not return until a navigation
299 // has occured. 299 // has occured.
300 bool ClickSSLInfoBarLink(int info_bar_index, bool wait_for_navigation); 300 bool ClickSSLInfoBarLink(int info_bar_index, bool wait_for_navigation);
301 301
302 // Retrieves the time at which the last navigation occured. This is intended 302 // Retrieves the time at which the last navigation occured. This is intended
303 // to be used with WaitForNavigation (see below). 303 // to be used with WaitForNavigation (see below).
304 bool GetLastNavigationTime(int64* last_navigation_time); 304 bool GetLastNavigationTime(int64* last_navigation_time);
305 305
306 // Waits for a new navigation if none as occurred since |last_navigation_time| 306 // Waits for a new navigation if none has occurred since
307 // The purpose of this function is for operations that causes asynchronous 307 // |last_navigation_time|. The purpose of this function is for operations
308 // navigation to happen. 308 // that causes asynchronous navigation to happen.
309 // It is supposed to be used as follow: 309 // It is supposed to be used as follow:
310 // int64 last_nav_time; 310 // int64 last_nav_time;
311 // tab_proxy->GetLastNavigationTime(&last_nav_time); 311 // tab_proxy->GetLastNavigationTime(&last_nav_time);
312 // tab_proxy->SomeOperationThatTriggersAnAsynchronousNavigation(); 312 // tab_proxy->SomeOperationThatTriggersAnAsynchronousNavigation();
313 // tab_proxy->WaitForNavigation(last_nav_time); 313 // tab_proxy->WaitForNavigation(last_nav_time);
314 bool WaitForNavigation(int64 last_navigation_time); 314 bool WaitForNavigation(int64 last_navigation_time);
315 315
316 // Gets the current used encoding of the page in the tab. 316 // Gets the current used encoding of the page in the tab.
317 bool GetPageCurrentEncoding(std::string* encoding); 317 bool GetPageCurrentEncoding(std::string* encoding);
318 318
319 // Toggles encoding auto-detect of the page in the tab
320 bool ToggleEncodingAutoDetect();
321
319 // Uses the specified encoding to override encoding of the page in the tab. 322 // Uses the specified encoding to override encoding of the page in the tab.
320 bool OverrideEncoding(const std::string& encoding); 323 bool OverrideEncoding(const std::string& encoding);
321 324
322 #if defined(OS_WIN) 325 #if defined(OS_WIN)
323 // Resizes the tab window. 326 // Resizes the tab window.
324 // The parent_window parameter allows a parent to be specified for the window 327 // The parent_window parameter allows a parent to be specified for the window
325 // passed in. 328 // passed in.
326 void Reposition(HWND window, HWND window_insert_after, int left, int top, 329 void Reposition(HWND window, HWND window_insert_after, int left, int top,
327 int width, int height, int flags, HWND parent_window); 330 int width, int height, int flags, HWND parent_window);
328 331
(...skipping 20 matching lines...) Expand all
349 void OnMessageReceived(const IPC::Message& message); 352 void OnMessageReceived(const IPC::Message& message);
350 protected: 353 protected:
351 virtual ~TabProxy() {} 354 virtual ~TabProxy() {}
352 private: 355 private:
353 Lock list_lock_; // Protects the observers_list_. 356 Lock list_lock_; // Protects the observers_list_.
354 ObserverList<TabProxyDelegate> observers_list_; 357 ObserverList<TabProxyDelegate> observers_list_;
355 DISALLOW_COPY_AND_ASSIGN(TabProxy); 358 DISALLOW_COPY_AND_ASSIGN(TabProxy);
356 }; 359 };
357 360
358 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_ 361 #endif // CHROME_TEST_AUTOMATION_TAB_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698