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

Unified Diff: content/shell/browser/layout_test/layout_test_content_browser_client.cc

Issue 659073004: Content Shell: Move ShellMessageFilter to LayoutTestMessageFilter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cs-move-cbc
Patch Set: another (tentative) rebase Created 6 years, 2 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
Index: content/shell/browser/layout_test/layout_test_content_browser_client.cc
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index c6b033f612a9738b20416ec2ab799afe4e6f61a6..5194da29cd364dc29a82b1b2dcd9efbc1767f04d 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -4,8 +4,15 @@
#include "content/shell/browser/layout_test/layout_test_content_browser_client.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/storage_partition.h"
+#include "content/shell/browser/layout_test/layout_test_message_filter.h"
#include "content/shell/browser/layout_test/layout_test_notification_manager.h"
+#include "content/shell/browser/shell_browser_context.h"
+#include "content/shell/common/shell_messages.h"
+#include "content/shell/common/webkit_test_helpers.h"
namespace content {
namespace {
@@ -50,6 +57,21 @@ LayoutTestContentBrowserClient::GetLayoutTestNotificationManager() {
return layout_test_notification_manager_.get();
}
+void LayoutTestContentBrowserClient::RenderProcessWillLaunch(
+ RenderProcessHost* host) {
+ ShellContentBrowserClient::RenderProcessWillLaunch(host);
+
+ StoragePartition* partition =
+ BrowserContext::GetDefaultStoragePartition(browser_context());
+ host->AddFilter(new LayoutTestMessageFilter(
+ host->GetID(),
+ partition->GetDatabaseTracker(),
+ partition->GetQuotaManager(),
+ partition->GetURLRequestContext()));
+
+ host->Send(new ShellViewMsg_SetWebKitSourceDir(GetWebKitRootDirFilePath()));
+}
+
void LayoutTestContentBrowserClient::RequestDesktopNotificationPermission(
const GURL& source_origin,
RenderFrameHost* render_frame_host,

Powered by Google App Engine
This is Rietveld 408576698