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/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 423 } |
424 | 424 |
425 std::string product = GetProduct(); | 425 std::string product = GetProduct(); |
426 #if defined(OS_ANDROID) | 426 #if defined(OS_ANDROID) |
427 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) | 427 if (command_line->HasSwitch(switches::kUseMobileUserAgent)) |
428 product += " Mobile"; | 428 product += " Mobile"; |
429 #endif | 429 #endif |
430 return content::BuildUserAgentFromProduct(product); | 430 return content::BuildUserAgentFromProduct(product); |
431 } | 431 } |
432 | 432 |
| 433 ChromeContentClient::ChromeContentClient() { |
| 434 } |
| 435 |
| 436 ChromeContentClient::~ChromeContentClient() { |
| 437 } |
| 438 |
433 #if !defined(DISABLE_NACL) | 439 #if !defined(DISABLE_NACL) |
434 void ChromeContentClient::SetNaClEntryFunctions( | 440 void ChromeContentClient::SetNaClEntryFunctions( |
435 content::PepperPluginInfo::GetInterfaceFunc get_interface, | 441 content::PepperPluginInfo::GetInterfaceFunc get_interface, |
436 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, | 442 content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, |
437 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module) { | 443 content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module) { |
438 g_nacl_get_interface = get_interface; | 444 g_nacl_get_interface = get_interface; |
439 g_nacl_initialize_module = initialize_module; | 445 g_nacl_initialize_module = initialize_module; |
440 g_nacl_shutdown_module = shutdown_module; | 446 g_nacl_shutdown_module = shutdown_module; |
441 } | 447 } |
442 #endif | 448 #endif |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 } | 699 } |
694 | 700 |
695 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { | 701 bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() { |
696 #if defined(ENABLE_EXTENSIONS) | 702 #if defined(ENABLE_EXTENSIONS) |
697 return extensions::IsIsolateExtensionsEnabled(); | 703 return extensions::IsIsolateExtensionsEnabled(); |
698 #else | 704 #else |
699 return false; | 705 return false; |
700 #endif | 706 #endif |
701 } | 707 } |
702 | 708 |
703 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { | 709 content::OriginTrialPolicy* ChromeContentClient::GetOriginTrialPolicy() { |
704 return origin_trial_key_manager_.GetPublicKey(); | 710 if (!origin_trial_policy_) { |
| 711 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); |
| 712 } |
| 713 return origin_trial_policy_.get(); |
705 } | 714 } |
706 | 715 |
707 #if defined(OS_ANDROID) | 716 #if defined(OS_ANDROID) |
708 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 717 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
709 return new ChromeMediaClientAndroid(); | 718 return new ChromeMediaClientAndroid(); |
710 } | 719 } |
711 #endif // OS_ANDROID | 720 #endif // OS_ANDROID |
OLD | NEW |