Chromium Code Reviews| Index: content/browser/browser_plugin/test_guest_manager_delegate.h |
| diff --git a/content/browser/browser_plugin/test_guest_manager_delegate.h b/content/browser/browser_plugin/test_guest_manager_delegate.h |
| index 79460cfa57d93f53ba9a9c2f20e2361e02af6d26..7a00e818bdcd144264d35090084563f7b29886ba 100644 |
| --- a/content/browser/browser_plugin/test_guest_manager_delegate.h |
| +++ b/content/browser/browser_plugin/test_guest_manager_delegate.h |
| @@ -12,6 +12,9 @@ |
| namespace content { |
| +class MessageLoopRunner; |
| +class WebContentsImpl; |
| + |
| // This class is temporary until BrowserPluginHostTest.* tests are entirely |
| // moved out of content. |
| class TestGuestManagerDelegate : public BrowserPluginGuestManagerDelegate { |
| @@ -24,6 +27,9 @@ class TestGuestManagerDelegate : public BrowserPluginGuestManagerDelegate { |
| void RemoveGuest(int guest_instance_id); |
| SiteInstance* GetGuestSiteInstance(const GURL& guest_site); |
| + // Waits until at least one guest is added to the guest manager. |
|
lazyboy
2014/05/05 21:40:54
nit:
s/to the guest manager/to this guest manager
Fady Samuel
2014/05/07 17:32:59
Done.
|
| + WebContentsImpl* WaitForGuestAdded(); |
| + |
| // BrowserPluginGuestManagerDelegate implementation. |
| virtual content::WebContents* CreateGuest( |
| content::SiteInstance* embedder_site_instance, |
| @@ -41,11 +47,13 @@ class TestGuestManagerDelegate : public BrowserPluginGuestManagerDelegate { |
| private: |
| friend struct DefaultSingletonTraits<TestGuestManagerDelegate>; |
| TestGuestManagerDelegate(); |
| + |
| // Contains guests' WebContents, mapping from their instance ids. |
| typedef std::map<int, WebContents*> GuestInstanceMap; |
| GuestInstanceMap guest_web_contents_by_instance_id_; |
| - |
| + WebContentsImpl* last_guest_added_; |
| int next_instance_id_; |
| + scoped_refptr<MessageLoopRunner> message_loop_runner_; |
| DISALLOW_COPY_AND_ASSIGN(TestGuestManagerDelegate); |
| }; |