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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 9097005: Move WebUIFactory into content/public/browser and make it use WebContents instead of TabContents.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 11 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 (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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "content/browser/renderer_host/render_view_host_delegate.h" 72 #include "content/browser/renderer_host/render_view_host_delegate.h"
73 #include "content/browser/renderer_host/render_widget_helper.h" 73 #include "content/browser/renderer_host/render_widget_helper.h"
74 #include "content/browser/renderer_host/render_widget_host.h" 74 #include "content/browser/renderer_host/render_widget_host.h"
75 #include "content/browser/renderer_host/resource_message_filter.h" 75 #include "content/browser/renderer_host/resource_message_filter.h"
76 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 76 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
77 #include "content/browser/renderer_host/text_input_client_message_filter.h" 77 #include "content/browser/renderer_host/text_input_client_message_filter.h"
78 #include "content/browser/resolve_proxy_msg_helper.h" 78 #include "content/browser/resolve_proxy_msg_helper.h"
79 #include "content/browser/resource_context.h" 79 #include "content/browser/resource_context.h"
80 #include "content/browser/speech/speech_input_dispatcher_host.h" 80 #include "content/browser/speech/speech_input_dispatcher_host.h"
81 #include "content/browser/trace_message_filter.h" 81 #include "content/browser/trace_message_filter.h"
82 #include "content/browser/webui/web_ui_factory.h"
83 #include "content/browser/worker_host/worker_message_filter.h" 82 #include "content/browser/worker_host/worker_message_filter.h"
84 #include "content/common/child_process_host_impl.h" 83 #include "content/common/child_process_host_impl.h"
85 #include "content/common/child_process_messages.h" 84 #include "content/common/child_process_messages.h"
86 #include "content/common/gpu/gpu_messages.h" 85 #include "content/common/gpu/gpu_messages.h"
87 #include "content/public/browser/notification_service.h" 86 #include "content/public/browser/notification_service.h"
87 #include "content/public/browser/web_ui_factory.h"
88 #include "content/common/resource_messages.h" 88 #include "content/common/resource_messages.h"
89 #include "content/common/view_messages.h" 89 #include "content/common/view_messages.h"
90 #include "content/public/browser/browser_context.h" 90 #include "content/public/browser/browser_context.h"
91 #include "content/public/browser/content_browser_client.h" 91 #include "content/public/browser/content_browser_client.h"
92 #include "content/public/browser/notification_service.h" 92 #include "content/public/browser/notification_service.h"
93 #include "content/public/browser/user_metrics.h" 93 #include "content/public/browser/user_metrics.h"
94 #include "content/public/common/content_constants.h" 94 #include "content/public/common/content_constants.h"
95 #include "content/public/common/content_switches.h" 95 #include "content/public/common/content_switches.h"
96 #include "content/public/common/process_type.h" 96 #include "content/public/common/process_type.h"
97 #include "content/public/common/result_codes.h" 97 #include "content/public/common/result_codes.h"
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 // static 1101 // static
1102 bool RenderProcessHostImpl::IsSuitableHost( 1102 bool RenderProcessHostImpl::IsSuitableHost(
1103 content::RenderProcessHost* host, 1103 content::RenderProcessHost* host,
1104 content::BrowserContext* browser_context, 1104 content::BrowserContext* browser_context,
1105 const GURL& site_url) { 1105 const GURL& site_url) {
1106 if (host->GetBrowserContext() != browser_context) 1106 if (host->GetBrowserContext() != browser_context)
1107 return false; 1107 return false;
1108 1108
1109 if (ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings( 1109 if (ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings(
1110 host->GetID()) != 1110 host->GetID()) !=
1111 content::WebUIFactory::Get()->UseWebUIBindingsForURL( 1111 content::GetContentClient()->browser()->GetWebUIFactory()->
1112 browser_context, site_url)) 1112 UseWebUIBindingsForURL(browser_context, site_url))
1113 return false; 1113 return false;
1114 1114
1115 return content::GetContentClient()->browser()->IsSuitableHost(host, site_url); 1115 return content::GetContentClient()->browser()->IsSuitableHost(host, site_url);
1116 } 1116 }
1117 1117
1118 // static 1118 // static
1119 bool content::RenderProcessHost::run_renderer_in_process() { 1119 bool content::RenderProcessHost::run_renderer_in_process() {
1120 return g_run_renderer_in_process_; 1120 return g_run_renderer_in_process_;
1121 } 1121 }
1122 1122
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) { 1303 void RenderProcessHostImpl::OnRevealFolderInOS(const FilePath& path) {
1304 // Only honor the request if appropriate persmissions are granted. 1304 // Only honor the request if appropriate persmissions are granted.
1305 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path)) 1305 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(GetID(), path))
1306 content::GetContentClient()->browser()->OpenItem(path); 1306 content::GetContentClient()->browser()->OpenItem(path);
1307 } 1307 }
1308 1308
1309 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 1309 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
1310 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> 1310 content::GetContentClient()->browser()->GetMHTMLGenerationManager()->
1311 MHTMLGenerated(job_id, data_size); 1311 MHTMLGenerated(job_id, data_size);
1312 } 1312 }
OLDNEW
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | content/browser/tab_contents/render_view_host_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698