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 CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 // Callback to WebContentCreated(). Cached so that we can unregister it. | 401 // Callback to WebContentCreated(). Cached so that we can unregister it. |
402 base::Callback<void(WebContents*)> web_contents_created_callback_; | 402 base::Callback<void(WebContents*)> web_contents_created_callback_; |
403 | 403 |
404 WebContents* web_contents_; | 404 WebContents* web_contents_; |
405 scoped_ptr<RenderViewCreatedObserver> child_observer_; | 405 scoped_ptr<RenderViewCreatedObserver> child_observer_; |
406 scoped_refptr<MessageLoopRunner> runner_; | 406 scoped_refptr<MessageLoopRunner> runner_; |
407 | 407 |
408 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); | 408 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); |
409 }; | 409 }; |
410 | 410 |
| 411 // Wait until the first compositor frame swap has occured. |
| 412 void WaitForFirstFrame(WebContents* web_contents); |
| 413 |
411 // Request a new frame be drawn, returns false if request fails. | 414 // Request a new frame be drawn, returns false if request fails. |
412 bool RequestFrame(WebContents* web_contents); | 415 bool RequestFrame(WebContents* web_contents); |
413 | 416 |
414 // Watches compositor frame changes, blocking until a frame has been | 417 // Watches compositor frame changes, blocking until a frame has been |
415 // composited. This class is intended to be run on the main thread; to | 418 // composited. This class is intended to be run on the main thread; to |
416 // synchronize the main thread against the impl thread. | 419 // synchronize the main thread against the impl thread. |
417 class FrameWatcher : public BrowserMessageFilter { | 420 class FrameWatcher : public BrowserMessageFilter { |
418 public: | 421 public: |
419 FrameWatcher(); | 422 FrameWatcher(); |
420 | 423 |
(...skipping 13 matching lines...) Expand all Loading... |
434 | 437 |
435 int frames_to_wait_; | 438 int frames_to_wait_; |
436 base::Closure quit_; | 439 base::Closure quit_; |
437 | 440 |
438 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); | 441 DISALLOW_COPY_AND_ASSIGN(FrameWatcher); |
439 }; | 442 }; |
440 | 443 |
441 } // namespace content | 444 } // namespace content |
442 | 445 |
443 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 446 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
OLD | NEW |