Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(708)

Side by Side Diff: content/browser/browser_plugin/test_browser_plugin_embedder.cc

Issue 10868012: Browser Plugin: New Implementation (Browser Side) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master-trial-obrowser
Patch Set: Clean up BrowserPluginHostTest, remove unused var, use constants for str. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/browser_plugin/test_browser_plugin_embedder.h"
6
7 #include "base/time.h"
8 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h"
11 #include "content/browser/web_contents/web_contents_impl.h"
12 #include "content/public/test/test_utils.h"
13
14 namespace content {
15
16 TestBrowserPluginEmbedder::TestBrowserPluginEmbedder(
17 WebContentsImpl* web_contents,
18 RenderViewHost* render_view_host)
19 : BrowserPluginEmbedder(web_contents, render_view_host),
20 guest_count_(0) {
awong 2012/09/09 18:08:09 What is guest_count_ used for?
lazyboy 2012/09/10 16:30:17 Removed, unused now.
21 }
22
23 TestBrowserPluginEmbedder::~TestBrowserPluginEmbedder() {
24 }
25
26 void TestBrowserPluginEmbedder::AddGuest(int instance_id,
27 BrowserPluginGuest* guest,
28 int64 frame_id) {
29 BrowserPluginEmbedder::AddGuest(instance_id, guest, frame_id);
30 if (message_loop_runner_)
31 message_loop_runner_->Quit();
32 }
33
34 void TestBrowserPluginEmbedder::WaitForGuestAdded() {
35 // Check if guests were already created.
36 if (guests_by_instance_id_.size() > 0)
37 return;
38 // Wait otherwise.
39 message_loop_runner_ = new MessageLoopRunner();
40 message_loop_runner_->Run();
41 }
42
43 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698