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