| 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 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #endif // defined(OS_LINUX) | 9 #endif // defined(OS_LINUX) |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "chrome/common/child_process_logging.h" | 24 #include "chrome/common/child_process_logging.h" |
| 25 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
| 26 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/crash_keys.h" | 28 #include "chrome/common/crash_keys.h" |
| 29 #include "chrome/common/pepper_flash.h" | 29 #include "chrome/common/pepper_flash.h" |
| 30 #include "chrome/common/secure_origin_whitelist.h" | 30 #include "chrome/common/secure_origin_whitelist.h" |
| 31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
| 32 #include "chrome/grit/common_resources.h" | 32 #include "chrome/grit/common_resources.h" |
| 33 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me
ssages.h" |
| 33 #include "components/dom_distiller/core/url_constants.h" | 34 #include "components/dom_distiller/core/url_constants.h" |
| 34 #include "components/version_info/version_info.h" | 35 #include "components/version_info/version_info.h" |
| 35 #include "content/public/common/content_constants.h" | 36 #include "content/public/common/content_constants.h" |
| 36 #include "content/public/common/content_switches.h" | 37 #include "content/public/common/content_switches.h" |
| 37 #include "content/public/common/url_constants.h" | 38 #include "content/public/common/url_constants.h" |
| 38 #include "content/public/common/user_agent.h" | 39 #include "content/public/common/user_agent.h" |
| 39 #include "extensions/common/constants.h" | 40 #include "extensions/common/constants.h" |
| 40 #include "gpu/config/gpu_info.h" | 41 #include "gpu/config/gpu_info.h" |
| 41 #include "net/http/http_util.h" | 42 #include "net/http/http_util.h" |
| 42 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 std::vector<std::string>* savable_schemes) { | 533 std::vector<std::string>* savable_schemes) { |
| 533 for (int i = 0; i < kNumChromeStandardURLSchemes; i++) | 534 for (int i = 0; i < kNumChromeStandardURLSchemes; i++) |
| 534 standard_schemes->push_back(kChromeStandardURLSchemes[i]); | 535 standard_schemes->push_back(kChromeStandardURLSchemes[i]); |
| 535 | 536 |
| 536 savable_schemes->push_back(extensions::kExtensionScheme); | 537 savable_schemes->push_back(extensions::kExtensionScheme); |
| 537 savable_schemes->push_back(extensions::kExtensionResourceScheme); | 538 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
| 538 savable_schemes->push_back(chrome::kChromeSearchScheme); | 539 savable_schemes->push_back(chrome::kChromeSearchScheme); |
| 539 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | 540 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 540 } | 541 } |
| 541 | 542 |
| 543 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { |
| 544 return message->type() == |
| 545 DataReductionProxyViewHostMsg_DataReductionProxyStatus::ID; |
| 546 } |
| 547 |
| 542 std::string ChromeContentClient::GetProduct() const { | 548 std::string ChromeContentClient::GetProduct() const { |
| 543 return ::GetProduct(); | 549 return ::GetProduct(); |
| 544 } | 550 } |
| 545 | 551 |
| 546 std::string ChromeContentClient::GetUserAgent() const { | 552 std::string ChromeContentClient::GetUserAgent() const { |
| 547 return ::GetUserAgent(); | 553 return ::GetUserAgent(); |
| 548 } | 554 } |
| 549 | 555 |
| 550 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 556 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
| 551 return l10n_util::GetStringUTF16(message_id); | 557 return l10n_util::GetStringUTF16(message_id); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 schemes->insert(content::kChromeUIScheme); | 609 schemes->insert(content::kChromeUIScheme); |
| 604 schemes->insert(extensions::kExtensionScheme); | 610 schemes->insert(extensions::kExtensionScheme); |
| 605 schemes->insert(extensions::kExtensionResourceScheme); | 611 schemes->insert(extensions::kExtensionResourceScheme); |
| 606 GetSecureOriginWhitelist(origins); | 612 GetSecureOriginWhitelist(origins); |
| 607 } | 613 } |
| 608 | 614 |
| 609 void ChromeContentClient::AddServiceWorkerSchemes( | 615 void ChromeContentClient::AddServiceWorkerSchemes( |
| 610 std::set<std::string>* schemes) { | 616 std::set<std::string>* schemes) { |
| 611 schemes->insert(extensions::kExtensionScheme); | 617 schemes->insert(extensions::kExtensionScheme); |
| 612 } | 618 } |
| OLD | NEW |