| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 void ChromeContentBrowserClient::OverrideOpenURLParams( | 1216 void ChromeContentBrowserClient::OverrideOpenURLParams( |
| 1217 content::SiteInstance* site_instance, | 1217 content::SiteInstance* site_instance, |
| 1218 content::OpenURLParams* params) { | 1218 content::OpenURLParams* params) { |
| 1219 DCHECK(params); | 1219 DCHECK(params); |
| 1220 // TODO(crbug.com/624410): Factor the predicate to identify a URL as an NTP | 1220 // TODO(crbug.com/624410): Factor the predicate to identify a URL as an NTP |
| 1221 // to a shared library. | 1221 // to a shared library. |
| 1222 if (site_instance && | 1222 if (site_instance && |
| 1223 site_instance->GetSiteURL().SchemeIs(chrome::kChromeSearchScheme) && | 1223 site_instance->GetSiteURL().SchemeIs(chrome::kChromeSearchScheme) && |
| 1224 (site_instance->GetSiteURL().host() == | 1224 (site_instance->GetSiteURL().host_piece() == |
| 1225 chrome::kChromeSearchRemoteNtpHost || | 1225 chrome::kChromeSearchRemoteNtpHost || |
| 1226 site_instance->GetSiteURL().host() == | 1226 site_instance->GetSiteURL().host_piece() == |
| 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(); |
| 1235 } | 1235 } |
| 1236 } | 1236 } |
| (...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3225 kWebRtcDevSwitchNames, | 3225 kWebRtcDevSwitchNames, |
| 3226 arraysize(kWebRtcDevSwitchNames)); | 3226 arraysize(kWebRtcDevSwitchNames)); |
| 3227 } | 3227 } |
| 3228 } | 3228 } |
| 3229 #endif // defined(ENABLE_WEBRTC) | 3229 #endif // defined(ENABLE_WEBRTC) |
| 3230 | 3230 |
| 3231 std::unique_ptr<content::MemoryCoordinatorDelegate> | 3231 std::unique_ptr<content::MemoryCoordinatorDelegate> |
| 3232 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { | 3232 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { |
| 3233 return memory::ChromeMemoryCoordinatorDelegate::Create(); | 3233 return memory::ChromeMemoryCoordinatorDelegate::Create(); |
| 3234 } | 3234 } |
| OLD | NEW |