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

Side by Side Diff: content/renderer/browser_plugin/mock_browser_plugin_manager.cc

Issue 258373002: Towards moving guest management to chrome: Introduce GuestViewManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 6 years, 7 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
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 #include "content/renderer/browser_plugin/mock_browser_plugin_manager.h" 5 #include "content/renderer/browser_plugin/mock_browser_plugin_manager.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "content/common/browser_plugin/browser_plugin_messages.h" 8 #include "content/common/browser_plugin/browser_plugin_messages.h"
9 #include "content/renderer/browser_plugin/mock_browser_plugin.h" 9 #include "content/renderer/browser_plugin/mock_browser_plugin.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 BrowserPlugin* MockBrowserPluginManager::CreateBrowserPlugin( 23 BrowserPlugin* MockBrowserPluginManager::CreateBrowserPlugin(
24 RenderViewImpl* render_view, 24 RenderViewImpl* render_view,
25 blink::WebFrame* frame, 25 blink::WebFrame* frame,
26 bool auto_navigate) { 26 bool auto_navigate) {
27 return new MockBrowserPlugin(render_view, frame, auto_navigate); 27 return new MockBrowserPlugin(render_view, frame, auto_navigate);
28 } 28 }
29 29
30 void MockBrowserPluginManager::AllocateInstanceID( 30 void MockBrowserPluginManager::AllocateInstanceID(
31 const base::WeakPtr<BrowserPlugin>& browser_plugin) { 31 const base::WeakPtr<BrowserPlugin>& browser_plugin,
32 const std::string& src) {
32 int guest_instance_id = ++guest_instance_id_counter_; 33 int guest_instance_id = ++guest_instance_id_counter_;
33 base::MessageLoop::current()->PostTask( 34 base::MessageLoop::current()->PostTask(
34 FROM_HERE, 35 FROM_HERE,
35 base::Bind(&MockBrowserPluginManager::AllocateInstanceIDACK, 36 base::Bind(&MockBrowserPluginManager::AllocateInstanceIDACK,
36 this, 37 this,
37 browser_plugin.get(), 38 browser_plugin.get(),
38 guest_instance_id)); 39 guest_instance_id));
39 } 40 }
40 41
41 void MockBrowserPluginManager::AllocateInstanceIDACK( 42 void MockBrowserPluginManager::AllocateInstanceIDACK(
(...skipping 27 matching lines...) Expand all
69 } 70 }
70 71
71 bool MockBrowserPluginManager::OnMessageReceived( 72 bool MockBrowserPluginManager::OnMessageReceived(
72 const IPC::Message& message) { 73 const IPC::Message& message) {
73 // Save the message in the sink. 74 // Save the message in the sink.
74 sink_.OnMessageReceived(message); 75 sink_.OnMessageReceived(message);
75 return false; 76 return false;
76 } 77 }
77 78
78 } // namespace content 79 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698