Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1224 (site_instance->GetSiteURL().host() == | 1224 (site_instance->GetSiteURL().host() == |
| 1225 chrome::kChromeSearchRemoteNtpHost || | 1225 chrome::kChromeSearchRemoteNtpHost || |
| 1226 site_instance->GetSiteURL().host() == | 1226 site_instance->GetSiteURL().host() == |
| 1227 chrome::kChromeSearchLocalNtpHost) && | 1227 chrome::kChromeSearchLocalNtpHost) && |
| 1228 ui::PageTransitionCoreTypeIs(params->transition, | 1228 ui::PageTransitionCoreTypeIs(params->transition, |
| 1229 ui::PAGE_TRANSITION_LINK)) { | 1229 ui::PAGE_TRANSITION_LINK)) { |
| 1230 // Use AUTO_BOOKMARK for clicks on tiles of the new tab page, consistently | 1230 // Use AUTO_BOOKMARK for clicks on tiles of the new tab page, consistently |
| 1231 // with native implementations like Android's. | 1231 // with native implementations like Android's. |
| 1232 params->transition = ui::PAGE_TRANSITION_AUTO_BOOKMARK; | 1232 params->transition = ui::PAGE_TRANSITION_AUTO_BOOKMARK; |
| 1233 params->is_renderer_initiated = false; | 1233 params->is_renderer_initiated = false; |
| 1234 params->referrer = content::Referrer(); | 1234 params->referrer = content::Referrer(); |
|
Charlie Reis
2016/11/04 23:31:59
It's a bit unfortunate that we have 4 copies of th
| |
| 1235 } | 1235 } |
| 1236 | |
| 1237 #if defined(ENABLE_EXTENSIONS) | |
| 1238 ChromeContentBrowserClientExtensionsPart::OverrideOpenURLParams(site_instance, | |
| 1239 params); | |
| 1240 #endif | |
| 1236 } | 1241 } |
| 1237 | 1242 |
| 1238 bool ChromeContentBrowserClient::IsSuitableHost( | 1243 bool ChromeContentBrowserClient::IsSuitableHost( |
| 1239 content::RenderProcessHost* process_host, | 1244 content::RenderProcessHost* process_host, |
| 1240 const GURL& site_url) { | 1245 const GURL& site_url) { |
| 1241 Profile* profile = | 1246 Profile* profile = |
| 1242 Profile::FromBrowserContext(process_host->GetBrowserContext()); | 1247 Profile::FromBrowserContext(process_host->GetBrowserContext()); |
| 1243 // This may be NULL during tests. In that case, just assume any site can | 1248 // This may be NULL during tests. In that case, just assume any site can |
| 1244 // share any host. | 1249 // share any host. |
| 1245 if (!profile) | 1250 if (!profile) |
| (...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3225 kWebRtcDevSwitchNames, | 3230 kWebRtcDevSwitchNames, |
| 3226 arraysize(kWebRtcDevSwitchNames)); | 3231 arraysize(kWebRtcDevSwitchNames)); |
| 3227 } | 3232 } |
| 3228 } | 3233 } |
| 3229 #endif // defined(ENABLE_WEBRTC) | 3234 #endif // defined(ENABLE_WEBRTC) |
| 3230 | 3235 |
| 3231 std::unique_ptr<content::MemoryCoordinatorDelegate> | 3236 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 3232 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { | 3237 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { |
| 3233 return memory::ChromeMemoryCoordinatorDelegate::Create(); | 3238 return memory::ChromeMemoryCoordinatorDelegate::Create(); |
| 3234 } | 3239 } |
| OLD | NEW |