| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return new TabContentsViewGtk(tab_contents); | 146 return new TabContentsViewGtk(tab_contents); |
| 147 #elif defined(OS_MACOSX) | 147 #elif defined(OS_MACOSX) |
| 148 return tab_contents_view_mac::CreateTabContentsView(tab_contents); | 148 return tab_contents_view_mac::CreateTabContentsView(tab_contents); |
| 149 #else | 149 #else |
| 150 #error Need to create your platform TabContentsView here. | 150 #error Need to create your platform TabContentsView here. |
| 151 #endif | 151 #endif |
| 152 } | 152 } |
| 153 | 153 |
| 154 void ChromeContentBrowserClient::RenderViewHostCreated( | 154 void ChromeContentBrowserClient::RenderViewHostCreated( |
| 155 RenderViewHost* render_view_host) { | 155 RenderViewHost* render_view_host) { |
| 156 new ChromeRenderViewHostObserver(render_view_host); | 156 |
| 157 SiteInstance* site_instance = render_view_host->site_instance(); |
| 158 Profile* profile = Profile::FromBrowserContext( |
| 159 site_instance->browsing_instance()->browser_context()); |
| 160 |
| 161 new ChromeRenderViewHostObserver(render_view_host, |
| 162 profile->GetNetworkPredictor()); |
| 157 new ExtensionMessageHandler(render_view_host); | 163 new ExtensionMessageHandler(render_view_host); |
| 158 } | 164 } |
| 159 | 165 |
| 160 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( | 166 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( |
| 161 BrowserRenderProcessHost* host) { | 167 BrowserRenderProcessHost* host) { |
| 162 int id = host->id(); | 168 int id = host->id(); |
| 163 Profile* profile = Profile::FromBrowserContext(host->browser_context()); | 169 Profile* profile = Profile::FromBrowserContext(host->browser_context()); |
| 164 host->channel()->AddFilter(new ChromeRenderMessageFilter( | 170 host->channel()->AddFilter(new ChromeRenderMessageFilter( |
| 165 id, profile, profile->GetRequestContextForRenderProcess(id))); | 171 id, profile, profile->GetRequestContextForRenderProcess(id))); |
| 166 host->channel()->AddFilter(new PrintingMessageFilter()); | 172 host->channel()->AddFilter(new PrintingMessageFilter()); |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 #if defined(USE_NSS) | 812 #if defined(USE_NSS) |
| 807 crypto::CryptoModuleBlockingPasswordDelegate* | 813 crypto::CryptoModuleBlockingPasswordDelegate* |
| 808 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 814 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 809 const GURL& url) { | 815 const GURL& url) { |
| 810 return browser::NewCryptoModuleBlockingDialogDelegate( | 816 return browser::NewCryptoModuleBlockingDialogDelegate( |
| 811 browser::kCryptoModulePasswordKeygen, url.host()); | 817 browser::kCryptoModulePasswordKeygen, url.host()); |
| 812 } | 818 } |
| 813 #endif | 819 #endif |
| 814 | 820 |
| 815 } // namespace chrome | 821 } // namespace chrome |
| OLD | NEW |