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 13 matching lines...) Expand all Loading... |
24 #include "build/build_config.h" | 24 #include "build/build_config.h" |
25 #include "chrome/common/child_process_logging.h" | 25 #include "chrome/common/child_process_logging.h" |
26 #include "chrome/common/chrome_constants.h" | 26 #include "chrome/common/chrome_constants.h" |
27 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
28 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
29 #include "chrome/common/crash_keys.h" | 29 #include "chrome/common/crash_keys.h" |
30 #include "chrome/common/pepper_flash.h" | 30 #include "chrome/common/pepper_flash.h" |
31 #include "chrome/common/secure_origin_whitelist.h" | 31 #include "chrome/common/secure_origin_whitelist.h" |
32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
33 #include "chrome/grit/common_resources.h" | 33 #include "chrome/grit/common_resources.h" |
34 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me
ssages.h" | |
35 #include "components/dom_distiller/core/url_constants.h" | 34 #include "components/dom_distiller/core/url_constants.h" |
36 #include "components/version_info/version_info.h" | 35 #include "components/version_info/version_info.h" |
37 #include "content/public/common/cdm_info.h" | 36 #include "content/public/common/cdm_info.h" |
38 #include "content/public/common/content_constants.h" | 37 #include "content/public/common/content_constants.h" |
39 #include "content/public/common/content_switches.h" | 38 #include "content/public/common/content_switches.h" |
40 #include "content/public/common/url_constants.h" | 39 #include "content/public/common/url_constants.h" |
41 #include "content/public/common/user_agent.h" | 40 #include "content/public/common/user_agent.h" |
42 #include "extensions/common/constants.h" | 41 #include "extensions/common/constants.h" |
43 #include "gpu/config/gpu_info.h" | 42 #include "gpu/config/gpu_info.h" |
44 #include "net/http/http_util.h" | 43 #include "net/http/http_util.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 referrer_schemes->push_back( | 592 referrer_schemes->push_back( |
594 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); | 593 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); |
595 #endif | 594 #endif |
596 | 595 |
597 savable_schemes->push_back(extensions::kExtensionScheme); | 596 savable_schemes->push_back(extensions::kExtensionScheme); |
598 savable_schemes->push_back(extensions::kExtensionResourceScheme); | 597 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
599 savable_schemes->push_back(chrome::kChromeSearchScheme); | 598 savable_schemes->push_back(chrome::kChromeSearchScheme); |
600 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | 599 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
601 } | 600 } |
602 | 601 |
603 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { | |
604 return message->type() == | |
605 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; | |
606 } | |
607 | |
608 std::string ChromeContentClient::GetProduct() const { | 602 std::string ChromeContentClient::GetProduct() const { |
609 return ::GetProduct(); | 603 return ::GetProduct(); |
610 } | 604 } |
611 | 605 |
612 std::string ChromeContentClient::GetUserAgent() const { | 606 std::string ChromeContentClient::GetUserAgent() const { |
613 return ::GetUserAgent(); | 607 return ::GetUserAgent(); |
614 } | 608 } |
615 | 609 |
616 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 610 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
617 return l10n_util::GetStringUTF16(message_id); | 611 return l10n_util::GetStringUTF16(message_id); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 | 694 |
701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { | 695 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { |
702 return origin_trial_key_manager_.GetPublicKey(); | 696 return origin_trial_key_manager_.GetPublicKey(); |
703 } | 697 } |
704 | 698 |
705 #if defined(OS_ANDROID) | 699 #if defined(OS_ANDROID) |
706 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 700 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
707 return new ChromeMediaClientAndroid(); | 701 return new ChromeMediaClientAndroid(); |
708 } | 702 } |
709 #endif // OS_ANDROID | 703 #endif // OS_ANDROID |
OLD | NEW |