| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
| 9 #include "chrome/browser/browser_about_handler.h" | 9 #include "chrome/browser/browser_about_handler.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 return true; | 96 return true; |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace | 99 } // namespace |
| 100 | 100 |
| 101 namespace chrome { | 101 namespace chrome { |
| 102 | 102 |
| 103 void ChromeContentBrowserClient::RenderViewHostCreated( | 103 void ChromeContentBrowserClient::RenderViewHostCreated( |
| 104 RenderViewHost* render_view_host) { | 104 RenderViewHost* render_view_host) { |
| 105 | 105 new ChromeRenderViewHostObserver(render_view_host); |
| 106 SiteInstance* site_instance = render_view_host->site_instance(); | |
| 107 Profile* profile = Profile::FromBrowserContext( | |
| 108 site_instance->browsing_instance()->browser_context()); | |
| 109 | |
| 110 new ChromeRenderViewHostObserver(render_view_host, | |
| 111 profile->GetNetworkPredictor()); | |
| 112 new DevToolsHandler(render_view_host); | 106 new DevToolsHandler(render_view_host); |
| 113 new ExtensionMessageHandler(render_view_host); | 107 new ExtensionMessageHandler(render_view_host); |
| 114 } | 108 } |
| 115 | 109 |
| 116 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( | 110 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( |
| 117 BrowserRenderProcessHost* host) { | 111 BrowserRenderProcessHost* host) { |
| 118 int id = host->id(); | 112 int id = host->id(); |
| 119 Profile* profile = Profile::FromBrowserContext(host->browser_context()); | 113 Profile* profile = Profile::FromBrowserContext(host->browser_context()); |
| 120 host->channel()->AddFilter(new ChromeRenderMessageFilter( | 114 host->channel()->AddFilter(new ChromeRenderMessageFilter( |
| 121 id, profile, profile->GetRequestContextForRenderProcess(id))); | 115 id, profile, profile->GetRequestContextForRenderProcess(id))); |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 #if defined(USE_NSS) | 718 #if defined(USE_NSS) |
| 725 crypto::CryptoModuleBlockingPasswordDelegate* | 719 crypto::CryptoModuleBlockingPasswordDelegate* |
| 726 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 720 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 727 const GURL& url) { | 721 const GURL& url) { |
| 728 return browser::NewCryptoModuleBlockingDialogDelegate( | 722 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 729 browser::kCryptoModulePasswordKeygen, url.host()); | 723 browser::kCryptoModulePasswordKeygen, url.host()); |
| 730 } | 724 } |
| 731 #endif | 725 #endif |
| 732 | 726 |
| 733 } // namespace chrome | 727 } // namespace chrome |
| OLD | NEW |