| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 | 409 |
| 410 private: | 410 private: |
| 411 class RenderViewCreatedObserver; | 411 class RenderViewCreatedObserver; |
| 412 | 412 |
| 413 void WebContentsCreated(WebContents* web_contents); | 413 void WebContentsCreated(WebContents* web_contents); |
| 414 | 414 |
| 415 // Callback to WebContentCreated(). Cached so that we can unregister it. | 415 // Callback to WebContentCreated(). Cached so that we can unregister it. |
| 416 base::Callback<void(WebContents*)> web_contents_created_callback_; | 416 base::Callback<void(WebContents*)> web_contents_created_callback_; |
| 417 | 417 |
| 418 WebContents* web_contents_; | 418 WebContents* web_contents_; |
| 419 scoped_ptr<RenderViewCreatedObserver> child_observer_; | 419 std::unique_ptr<RenderViewCreatedObserver> child_observer_; |
| 420 scoped_refptr<MessageLoopRunner> runner_; | 420 scoped_refptr<MessageLoopRunner> runner_; |
| 421 | 421 |
| 422 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); | 422 DISALLOW_COPY_AND_ASSIGN(WebContentsAddedObserver); |
| 423 }; | 423 }; |
| 424 | 424 |
| 425 // Request a new frame be drawn, returns false if request fails. | 425 // Request a new frame be drawn, returns false if request fails. |
| 426 bool RequestFrame(WebContents* web_contents); | 426 bool RequestFrame(WebContents* web_contents); |
| 427 | 427 |
| 428 // Watches compositor frame changes, blocking until a frame has been | 428 // Watches compositor frame changes, blocking until a frame has been |
| 429 // composited. This class is intended to be run on the main thread; to | 429 // composited. This class is intended to be run on the main thread; to |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // thread. | 468 // thread. |
| 469 void Wait(); | 469 void Wait(); |
| 470 | 470 |
| 471 // Overridden IPC::Listener methods. | 471 // Overridden IPC::Listener methods. |
| 472 bool OnMessageReceived(const IPC::Message& msg) override; | 472 bool OnMessageReceived(const IPC::Message& msg) override; |
| 473 | 473 |
| 474 private: | 474 private: |
| 475 void Quit(); | 475 void Quit(); |
| 476 | 476 |
| 477 RenderWidgetHost* render_widget_host_; | 477 RenderWidgetHost* render_widget_host_; |
| 478 scoped_ptr<base::RunLoop> run_loop_; | 478 std::unique_ptr<base::RunLoop> run_loop_; |
| 479 int routing_id_; | 479 int routing_id_; |
| 480 | 480 |
| 481 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver); | 481 DISALLOW_COPY_AND_ASSIGN(MainThreadFrameObserver); |
| 482 }; | 482 }; |
| 483 | 483 |
| 484 // Watches for an input msg to be consumed. | 484 // Watches for an input msg to be consumed. |
| 485 class InputMsgWatcher : public BrowserMessageFilter { | 485 class InputMsgWatcher : public BrowserMessageFilter { |
| 486 public: | 486 public: |
| 487 InputMsgWatcher(RenderWidgetHost* render_widget_host, | 487 InputMsgWatcher(RenderWidgetHost* render_widget_host, |
| 488 blink::WebInputEvent::Type type); | 488 blink::WebInputEvent::Type type); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 519 TextInputStateTestExport(const ui::TextInputType& type, | 519 TextInputStateTestExport(const ui::TextInputType& type, |
| 520 const std::string& value); | 520 const std::string& value); |
| 521 | 521 |
| 522 ui::TextInputType type_; | 522 ui::TextInputType type_; |
| 523 std::string value_; | 523 std::string value_; |
| 524 }; | 524 }; |
| 525 | 525 |
| 526 } // namespace content | 526 } // namespace content |
| 527 | 527 |
| 528 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ | 528 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ |
| OLD | NEW |