| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include "chrome/browser/character_encoding.h" | 7 #include "chrome/browser/character_encoding.h" |
| 8 #include "chrome/browser/debugger/devtools_handler.h" | 8 #include "chrome/browser/debugger/devtools_handler.h" |
| 9 #include "chrome/browser/desktop_notification_handler.h" | 9 #include "chrome/browser/desktop_notification_handler.h" |
| 10 #include "chrome/browser/extensions/extension_message_handler.h" | 10 #include "chrome/browser/extensions/extension_message_handler.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const Extension* installed_app = service->GetInstalledApp(url); | 46 const Extension* installed_app = service->GetInstalledApp(url); |
| 47 if (installed_app) { | 47 if (installed_app) { |
| 48 service->SetInstalledAppForRenderer( | 48 service->SetInstalledAppForRenderer( |
| 49 render_view_host->process()->id(), installed_app); | 49 render_view_host->process()->id(), installed_app); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( | 54 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( |
| 55 BrowserRenderProcessHost* host) { | 55 BrowserRenderProcessHost* host) { |
| 56 int id = host->id(); |
| 57 Profile* profile = host->profile(); |
| 56 host->channel()->AddFilter(new ChromeRenderMessageFilter( | 58 host->channel()->AddFilter(new ChromeRenderMessageFilter( |
| 57 host->id(), | 59 id, profile, profile->GetRequestContextForRenderProcess(id))); |
| 58 host->profile(), | |
| 59 host->profile()->GetRequestContextForRenderProcess(host->id()))); | |
| 60 host->channel()->AddFilter(new PrintingMessageFilter()); | 60 host->channel()->AddFilter(new PrintingMessageFilter()); |
| 61 host->channel()->AddFilter( | 61 host->channel()->AddFilter( |
| 62 new SearchProviderInstallStateMessageFilter(host->id(), host->profile())); | 62 new SearchProviderInstallStateMessageFilter(id, profile)); |
| 63 host->channel()->AddFilter(new SpellCheckMessageFilter()); | 63 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() { | 66 content::WebUIFactory* ChromeContentBrowserClient::GetWebUIFactory() { |
| 67 return ChromeWebUIFactory::GetInstance(); | 67 return ChromeWebUIFactory::GetInstance(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 GURL ChromeContentBrowserClient::GetEffectiveURL(Profile* profile, | 70 GURL ChromeContentBrowserClient::GetEffectiveURL(Profile* profile, |
| 71 const GURL& url) { | 71 const GURL& url) { |
| 72 // Get the effective URL for the given actual URL. If the URL is part of an | 72 // Get the effective URL for the given actual URL. If the URL is part of an |
| 73 // installed app, the effective URL is an extension URL with the ID of that | 73 // installed app, the effective URL is an extension URL with the ID of that |
| (...skipping 28 matching lines...) Expand all Loading... |
| 102 } | 102 } |
| 103 return url; | 103 return url; |
| 104 } | 104 } |
| 105 | 105 |
| 106 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( | 106 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( |
| 107 const std::string& alias_name) { | 107 const std::string& alias_name) { |
| 108 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); | 108 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace chrome | 111 } // namespace chrome |
| OLD | NEW |