IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / browser / browser_plugin / test_browser_plugin_guest_manager.cc
blob7d0b5ac23ddd86cd7c103b4ed19feca789943ee3
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/browser_plugin/test_browser_plugin_guest_manager.h"
7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/test/test_utils.h"
10 namespace content {
12 TestBrowserPluginGuestManager::TestBrowserPluginGuestManager() {
15 TestBrowserPluginGuestManager::~TestBrowserPluginGuestManager() {
18 void TestBrowserPluginGuestManager::AddGuest(
19 int instance_id,
20 WebContentsImpl* guest_web_contents) {
21 BrowserPluginGuestManager::AddGuest(instance_id, guest_web_contents);
22 if (message_loop_runner_.get())
23 message_loop_runner_->Quit();
26 void TestBrowserPluginGuestManager::WaitForGuestAdded() {
27 // Check if guests were already created.
28 if (guest_web_contents_by_instance_id_.size() > 0)
29 return;
30 // Wait otherwise.
31 message_loop_runner_ = new MessageLoopRunner();
32 message_loop_runner_->Run();
35 } // namespace content