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

Unified Diff: content/renderer/browser_plugin/mock_browser_plugin_manager.cc

Issue 617123005: Remove BrowserPlugin tests (only one test remaining with existing coverage) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@make_lifetime_explicit
Patch Set: More cleanup Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/browser_plugin/mock_browser_plugin_manager.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/mock_browser_plugin_manager.cc
diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc b/content/renderer/browser_plugin/mock_browser_plugin_manager.cc
deleted file mode 100644
index 1c995ea008427ebbbe4d217920200aaede29aff5..0000000000000000000000000000000000000000
--- a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/renderer/browser_plugin/mock_browser_plugin_manager.h"
-
-#include "base/message_loop/message_loop.h"
-#include "content/common/browser_plugin/browser_plugin_messages.h"
-#include "content/renderer/browser_plugin/mock_browser_plugin.h"
-#include "ipc/ipc_message.h"
-
-namespace content {
-
-MockBrowserPluginManager::MockBrowserPluginManager(
- RenderViewImpl* render_view)
- : BrowserPluginManager(render_view),
- last_plugin_(NULL) {
-}
-
-MockBrowserPluginManager::~MockBrowserPluginManager() {
-}
-
-BrowserPlugin* MockBrowserPluginManager::CreateBrowserPlugin(
- RenderViewImpl* render_view,
- blink::WebFrame* frame,
- scoped_ptr<BrowserPluginDelegate> delegate) {
- last_plugin_ = new MockBrowserPlugin(render_view, frame, delegate.Pass());
- return last_plugin_;
-}
-
-bool MockBrowserPluginManager::Send(IPC::Message* msg) {
- // This is a copy-and-paste from MockRenderThread::Send.
- // We need to simulate a synchronous channel, thus we are going to receive
- // through this function messages, messages with reply and reply messages.
- // We can only handle one synchronous message at a time.
- if (msg->is_reply()) {
- if (reply_deserializer_) {
- reply_deserializer_->SerializeOutputParameters(*msg);
- reply_deserializer_.reset();
- }
- } else {
- if (msg->is_sync()) {
- // We actually need to handle deleting the reply deserializer for sync
- // messages.
- reply_deserializer_.reset(
- static_cast<IPC::SyncMessage*>(msg)->GetReplyDeserializer());
- }
- OnMessageReceived(*msg);
- }
- delete msg;
- return true;
-}
-
-bool MockBrowserPluginManager::OnMessageReceived(
- const IPC::Message& message) {
- // Save the message in the sink.
- sink_.OnMessageReceived(message);
- return false;
-}
-
-} // namespace content
« no previous file with comments | « content/renderer/browser_plugin/mock_browser_plugin_manager.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698