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

Side by Side Diff: content/shell/browser/shell_content_browser_client.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shell/browser/shell_content_browser_client.h" 5 #include "content/shell/browser/shell_content_browser_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( 72 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
73 const MainFunctionParams& parameters) { 73 const MainFunctionParams& parameters) {
74 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters); 74 shell_browser_main_parts_ = new ShellBrowserMainParts(parameters);
75 return shell_browser_main_parts_; 75 return shell_browser_main_parts_;
76 } 76 }
77 77
78 void ShellContentBrowserClient::RenderProcessHostCreated( 78 void ShellContentBrowserClient::RenderProcessHostCreated(
79 RenderProcessHost* host) { 79 RenderProcessHost* host) {
80 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 80 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
81 return; 81 return;
82 host->GetChannel()->AddFilter(new ShellMessageFilter( 82 host->AddFilter(new ShellMessageFilter(
83 host->GetID(), 83 host->GetID(),
84 BrowserContext::GetDefaultStoragePartition(browser_context()) 84 BrowserContext::GetDefaultStoragePartition(browser_context())
85 ->GetDatabaseTracker(), 85 ->GetDatabaseTracker(),
86 BrowserContext::GetDefaultStoragePartition(browser_context()) 86 BrowserContext::GetDefaultStoragePartition(browser_context())
87 ->GetQuotaManager(), 87 ->GetQuotaManager(),
88 BrowserContext::GetDefaultStoragePartition(browser_context()) 88 BrowserContext::GetDefaultStoragePartition(browser_context())
89 ->GetURLRequestContext())); 89 ->GetURLRequestContext()));
90 host->Send(new ShellViewMsg_SetWebKitSourceDir(webkit_source_dir_)); 90 host->Send(new ShellViewMsg_SetWebKitSourceDir(webkit_source_dir_));
91 registrar_.Add(this, 91 registrar_.Add(this,
92 NOTIFICATION_RENDERER_PROCESS_CREATED, 92 NOTIFICATION_RENDERER_PROCESS_CREATED,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 ShellBrowserContext* 273 ShellBrowserContext*
274 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( 274 ShellContentBrowserClient::ShellBrowserContextForBrowserContext(
275 BrowserContext* content_browser_context) { 275 BrowserContext* content_browser_context) {
276 if (content_browser_context == browser_context()) 276 if (content_browser_context == browser_context())
277 return browser_context(); 277 return browser_context();
278 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); 278 DCHECK_EQ(content_browser_context, off_the_record_browser_context());
279 return off_the_record_browser_context(); 279 return off_the_record_browser_context();
280 } 280 }
281 281
282 } // namespace content 282 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.cc ('k') | content/test/webrtc_audio_device_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698