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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 referrer_schemes->push_back( | 607 referrer_schemes->push_back( |
609 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); | 608 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); |
610 #endif | 609 #endif |
611 | 610 |
612 savable_schemes->push_back(extensions::kExtensionScheme); | 611 savable_schemes->push_back(extensions::kExtensionScheme); |
613 savable_schemes->push_back(extensions::kExtensionResourceScheme); | 612 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
614 savable_schemes->push_back(chrome::kChromeSearchScheme); | 613 savable_schemes->push_back(chrome::kChromeSearchScheme); |
615 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | 614 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
616 } | 615 } |
617 | 616 |
618 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { | |
619 return message->type() == | |
620 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; | |
621 } | |
622 | |
623 std::string ChromeContentClient::GetProduct() const { | 617 std::string ChromeContentClient::GetProduct() const { |
624 return ::GetProduct(); | 618 return ::GetProduct(); |
625 } | 619 } |
626 | 620 |
627 std::string ChromeContentClient::GetUserAgent() const { | 621 std::string ChromeContentClient::GetUserAgent() const { |
628 return ::GetUserAgent(); | 622 return ::GetUserAgent(); |
629 } | 623 } |
630 | 624 |
631 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 625 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
632 return l10n_util::GetStringUTF16(message_id); | 626 return l10n_util::GetStringUTF16(message_id); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); | 712 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); |
719 } | 713 } |
720 return origin_trial_policy_.get(); | 714 return origin_trial_policy_.get(); |
721 } | 715 } |
722 | 716 |
723 #if defined(OS_ANDROID) | 717 #if defined(OS_ANDROID) |
724 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 718 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
725 return new ChromeMediaClientAndroid(); | 719 return new ChromeMediaClientAndroid(); |
726 } | 720 } |
727 #endif // OS_ANDROID | 721 #endif // OS_ANDROID |
OLD | NEW |