| 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 15 matching lines...) Expand all Loading... |
| 26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 27 #include "chrome/common/child_process_logging.h" | 27 #include "chrome/common/child_process_logging.h" |
| 28 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
| 29 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 30 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 31 #include "chrome/common/crash_keys.h" | 31 #include "chrome/common/crash_keys.h" |
| 32 #include "chrome/common/pepper_flash.h" | 32 #include "chrome/common/pepper_flash.h" |
| 33 #include "chrome/common/secure_origin_whitelist.h" | 33 #include "chrome/common/secure_origin_whitelist.h" |
| 34 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
| 35 #include "chrome/grit/common_resources.h" | 35 #include "chrome/grit/common_resources.h" |
| 36 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me
ssages.h" | |
| 37 #include "components/dom_distiller/core/url_constants.h" | 36 #include "components/dom_distiller/core/url_constants.h" |
| 38 #include "components/version_info/version_info.h" | 37 #include "components/version_info/version_info.h" |
| 39 #include "content/public/common/cdm_info.h" | 38 #include "content/public/common/cdm_info.h" |
| 40 #include "content/public/common/content_constants.h" | 39 #include "content/public/common/content_constants.h" |
| 41 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
| 42 #include "content/public/common/url_constants.h" | 41 #include "content/public/common/url_constants.h" |
| 43 #include "content/public/common/user_agent.h" | 42 #include "content/public/common/user_agent.h" |
| 44 #include "extensions/common/constants.h" | 43 #include "extensions/common/constants.h" |
| 45 #include "gpu/config/gpu_info.h" | 44 #include "gpu/config/gpu_info.h" |
| 46 #include "net/http/http_util.h" | 45 #include "net/http/http_util.h" |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 referrer_schemes->push_back( | 601 referrer_schemes->push_back( |
| 603 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); | 602 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); |
| 604 #endif | 603 #endif |
| 605 | 604 |
| 606 savable_schemes->push_back(extensions::kExtensionScheme); | 605 savable_schemes->push_back(extensions::kExtensionScheme); |
| 607 savable_schemes->push_back(extensions::kExtensionResourceScheme); | 606 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
| 608 savable_schemes->push_back(chrome::kChromeSearchScheme); | 607 savable_schemes->push_back(chrome::kChromeSearchScheme); |
| 609 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | 608 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 610 } | 609 } |
| 611 | 610 |
| 612 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { | |
| 613 return message->type() == | |
| 614 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; | |
| 615 } | |
| 616 | |
| 617 std::string ChromeContentClient::GetProduct() const { | 611 std::string ChromeContentClient::GetProduct() const { |
| 618 return ::GetProduct(); | 612 return ::GetProduct(); |
| 619 } | 613 } |
| 620 | 614 |
| 621 std::string ChromeContentClient::GetUserAgent() const { | 615 std::string ChromeContentClient::GetUserAgent() const { |
| 622 return ::GetUserAgent(); | 616 return ::GetUserAgent(); |
| 623 } | 617 } |
| 624 | 618 |
| 625 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 619 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
| 626 return l10n_util::GetStringUTF16(message_id); | 620 return l10n_util::GetStringUTF16(message_id); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); | 706 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); |
| 713 } | 707 } |
| 714 return origin_trial_policy_.get(); | 708 return origin_trial_policy_.get(); |
| 715 } | 709 } |
| 716 | 710 |
| 717 #if defined(OS_ANDROID) | 711 #if defined(OS_ANDROID) |
| 718 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 712 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 719 return new ChromeMediaClientAndroid(); | 713 return new ChromeMediaClientAndroid(); |
| 720 } | 714 } |
| 721 #endif // OS_ANDROID | 715 #endif // OS_ANDROID |
| OLD | NEW |