| 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_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 6 #define CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 10 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 11 #include "content/public/test/test_utils.h" | 11 #include "content/public/test/test_utils.h" |
| 12 #include "ui/gfx/size.h" | 12 #include "ui/gfx/size.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class RenderProcessHost; | 16 class RenderProcessHost; |
| 17 class RenderViewHost; | 17 class RenderViewHost; |
| 18 class WebContentsImpl; | 18 class WebContentsImpl; |
| 19 | 19 |
| 20 // Test class for BrowserPluginGuest. | 20 // Test class for BrowserPluginGuest. |
| 21 // | 21 // |
| 22 // Provides utilities to wait for certain state/messages in BrowserPluginGuest | 22 // Provides utilities to wait for certain state/messages in BrowserPluginGuest |
| 23 // to be used in tests. | 23 // to be used in tests. |
| 24 class TestBrowserPluginGuest : public BrowserPluginGuest { | 24 class TestBrowserPluginGuest : public BrowserPluginGuest { |
| 25 public: | 25 public: |
| 26 TestBrowserPluginGuest(int instance_id, | 26 TestBrowserPluginGuest(int instance_id, |
| 27 WebContentsImpl* web_contents, | 27 WebContentsImpl* web_contents, |
| 28 RenderViewHost* render_view_host, | 28 RenderViewHost* render_view_host, |
| 29 bool focused, | 29 const BrowserPluginHostMsg_CreateGuest_Params& params); |
| 30 bool visible); | |
| 31 virtual ~TestBrowserPluginGuest(); | 30 virtual ~TestBrowserPluginGuest(); |
| 32 | 31 |
| 33 WebContentsImpl* web_contents() const; | 32 WebContentsImpl* web_contents() const; |
| 34 | 33 |
| 35 // NotificationObserver method override. | 34 // NotificationObserver method override. |
| 36 virtual void Observe(int type, | 35 virtual void Observe(int type, |
| 37 const NotificationSource& source, | 36 const NotificationSource& source, |
| 38 const NotificationDetails& details) OVERRIDE; | 37 const NotificationDetails& details) OVERRIDE; |
| 39 | 38 |
| 40 // Overridden methods from BrowserPluginGuest to intercept in test objects. | 39 // Overridden methods from BrowserPluginGuest to intercept in test objects. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 scoped_refptr<MessageLoopRunner> damage_buffer_message_loop_runner_; | 109 scoped_refptr<MessageLoopRunner> damage_buffer_message_loop_runner_; |
| 111 scoped_refptr<MessageLoopRunner> input_message_loop_runner_; | 110 scoped_refptr<MessageLoopRunner> input_message_loop_runner_; |
| 112 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_; | 111 scoped_refptr<MessageLoopRunner> load_stop_message_loop_runner_; |
| 113 | 112 |
| 114 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); | 113 DISALLOW_COPY_AND_ASSIGN(TestBrowserPluginGuest); |
| 115 }; | 114 }; |
| 116 | 115 |
| 117 } // namespace content | 116 } // namespace content |
| 118 | 117 |
| 119 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ | 118 #endif // CONTENT_BROWSER_BROWSER_PLUGIN_TEST_BROWSER_PLUGIN_GUEST_H_ |
| OLD | NEW |