| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_UI_TEST_UTILS_H_ | 5 #ifndef CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 6 #define CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // Wait for a new browser to be created, and return a pointer to it. | 254 // Wait for a new browser to be created, and return a pointer to it. |
| 255 Browser* WaitForSingleNewBrowser(); | 255 Browser* WaitForSingleNewBrowser(); |
| 256 | 256 |
| 257 private: | 257 private: |
| 258 content::WindowedNotificationObserver notification_observer_; | 258 content::WindowedNotificationObserver notification_observer_; |
| 259 std::set<Browser*> original_browsers_; | 259 std::set<Browser*> original_browsers_; |
| 260 | 260 |
| 261 DISALLOW_COPY_AND_ASSIGN(BrowserAddedObserver); | 261 DISALLOW_COPY_AND_ASSIGN(BrowserAddedObserver); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 // Takes a snapshot of the given render widget, rendered at |page_size|. The | |
| 265 // snapshot is set to |bitmap|. Returns true on success. | |
| 266 bool TakeRenderWidgetSnapshot(content::RenderWidgetHost* rwh, | |
| 267 const gfx::Size& page_size, | |
| 268 SkBitmap* bitmap) WARN_UNUSED_RESULT; | |
| 269 | |
| 270 // Takes a snapshot of the entire page, according to the width and height | 264 // Takes a snapshot of the entire page, according to the width and height |
| 271 // properties of the DOM's document. Returns true on success. DOMAutomation | 265 // properties of the DOM's document. Returns true on success. DOMAutomation |
| 272 // must be enabled. | 266 // must be enabled. |
| 273 bool TakeEntirePageSnapshot(content::RenderViewHost* rvh, | 267 bool TakeEntirePageSnapshot(content::RenderViewHost* rvh, |
| 274 SkBitmap* bitmap) WARN_UNUSED_RESULT; | 268 SkBitmap* bitmap) WARN_UNUSED_RESULT; |
| 275 | 269 |
| 276 #if defined(OS_WIN) | 270 #if defined(OS_WIN) |
| 277 // Saves a snapshot of the entire screen to a file named | 271 // Saves a snapshot of the entire screen to a file named |
| 278 // ChromiumSnapshotYYYYMMDDHHMMSS.png to |directory|, returning true on success. | 272 // ChromiumSnapshotYYYYMMDDHHMMSS.png to |directory|, returning true on success. |
| 279 // The path to the file produced is returned in |screenshot_path| if non-NULL. | 273 // The path to the file produced is returned in |screenshot_path| if non-NULL. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 306 std::vector<GURL> urls_; | 300 std::vector<GURL> urls_; |
| 307 | 301 |
| 308 CancelableRequestConsumer consumer_; | 302 CancelableRequestConsumer consumer_; |
| 309 | 303 |
| 310 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); | 304 DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator); |
| 311 }; | 305 }; |
| 312 | 306 |
| 313 } // namespace ui_test_utils | 307 } // namespace ui_test_utils |
| 314 | 308 |
| 315 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ | 309 #endif // CHROME_TEST_BASE_UI_TEST_UTILS_H_ |
| OLD | NEW |