Chromium Code Reviews| 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> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/debug/crash_logging.h" | 13 #include "base/debug/crash_logging.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/json/json_reader.h" | 15 #include "base/json/json_reader.h" |
| 16 #include "base/memory/ptr_util.h" | |
|
Anand Mistry (off Chromium)
2016/06/24 07:12:28
Is this needed? I'm guessing the messages file bro
leonhsl(Using Gerrit)
2016/06/24 09:59:21
Actually it's not my codes need it ;-) https://cod
| |
| 16 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
| 17 #include "base/native_library.h" | 18 #include "base/native_library.h" |
| 18 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 19 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 20 #include "base/strings/string_number_conversions.h" | 21 #include "base/strings/string_number_conversions.h" |
| 21 #include "base/strings/string_split.h" | 22 #include "base/strings/string_split.h" |
| 22 #include "base/strings/string_util.h" | 23 #include "base/strings/string_util.h" |
| 23 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
| 24 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
| 25 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 26 #include "chrome/common/child_process_logging.h" | 27 #include "chrome/common/child_process_logging.h" |
| 27 #include "chrome/common/chrome_constants.h" | 28 #include "chrome/common/chrome_constants.h" |
| 28 #include "chrome/common/chrome_paths.h" | 29 #include "chrome/common/chrome_paths.h" |
| 29 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/crash_keys.h" | 31 #include "chrome/common/crash_keys.h" |
| 31 #include "chrome/common/pepper_flash.h" | 32 #include "chrome/common/pepper_flash.h" |
| 32 #include "chrome/common/secure_origin_whitelist.h" | 33 #include "chrome/common/secure_origin_whitelist.h" |
| 33 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/grit/common_resources.h" | 35 #include "chrome/grit/common_resources.h" |
| 35 #include "components/data_reduction_proxy/content/common/data_reduction_proxy_me ssages.h" | |
| 36 #include "components/dom_distiller/core/url_constants.h" | 36 #include "components/dom_distiller/core/url_constants.h" |
| 37 #include "components/version_info/version_info.h" | 37 #include "components/version_info/version_info.h" |
| 38 #include "content/public/common/cdm_info.h" | 38 #include "content/public/common/cdm_info.h" |
| 39 #include "content/public/common/content_constants.h" | 39 #include "content/public/common/content_constants.h" |
| 40 #include "content/public/common/content_switches.h" | 40 #include "content/public/common/content_switches.h" |
| 41 #include "content/public/common/url_constants.h" | 41 #include "content/public/common/url_constants.h" |
| 42 #include "content/public/common/user_agent.h" | 42 #include "content/public/common/user_agent.h" |
| 43 #include "extensions/common/constants.h" | 43 #include "extensions/common/constants.h" |
| 44 #include "gpu/config/gpu_info.h" | 44 #include "gpu/config/gpu_info.h" |
| 45 #include "net/http/http_util.h" | 45 #include "net/http/http_util.h" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 595 referrer_schemes->push_back( | 595 referrer_schemes->push_back( |
| 596 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); | 596 {chrome::kAndroidAppScheme, url::SCHEME_WITHOUT_PORT}); |
| 597 #endif | 597 #endif |
| 598 | 598 |
| 599 savable_schemes->push_back(extensions::kExtensionScheme); | 599 savable_schemes->push_back(extensions::kExtensionScheme); |
| 600 savable_schemes->push_back(extensions::kExtensionResourceScheme); | 600 savable_schemes->push_back(extensions::kExtensionResourceScheme); |
| 601 savable_schemes->push_back(chrome::kChromeSearchScheme); | 601 savable_schemes->push_back(chrome::kChromeSearchScheme); |
| 602 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); | 602 savable_schemes->push_back(dom_distiller::kDomDistillerScheme); |
| 603 } | 603 } |
| 604 | 604 |
| 605 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { | |
|
Anand Mistry (off Chromium)
2016/06/24 07:12:28
I honestly don't understand what's supposed to hap
leonhsl(Using Gerrit)
2016/06/24 09:59:21
From my understanding, under swapped-out status Re
leonhsl(Using Gerrit)
2016/06/24 15:33:47
Hi, tbansal@, megjablon@, I found that you have to
tbansal1
2016/06/24 15:57:08
leonhsi@, you are right. By default the IPCs are b
| |
| 606 return message->type() == | |
| 607 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; | |
| 608 } | |
| 609 | |
| 610 std::string ChromeContentClient::GetProduct() const { | 605 std::string ChromeContentClient::GetProduct() const { |
| 611 return ::GetProduct(); | 606 return ::GetProduct(); |
| 612 } | 607 } |
| 613 | 608 |
| 614 std::string ChromeContentClient::GetUserAgent() const { | 609 std::string ChromeContentClient::GetUserAgent() const { |
| 615 return ::GetUserAgent(); | 610 return ::GetUserAgent(); |
| 616 } | 611 } |
| 617 | 612 |
| 618 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 613 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
| 619 return l10n_util::GetStringUTF16(message_id); | 614 return l10n_util::GetStringUTF16(message_id); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 702 | 697 |
| 703 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { | 698 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { |
| 704 return origin_trial_key_manager_.GetPublicKey(); | 699 return origin_trial_key_manager_.GetPublicKey(); |
| 705 } | 700 } |
| 706 | 701 |
| 707 #if defined(OS_ANDROID) | 702 #if defined(OS_ANDROID) |
| 708 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 703 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
| 709 return new ChromeMediaClientAndroid(); | 704 return new ChromeMediaClientAndroid(); |
| 710 } | 705 } |
| 711 #endif // OS_ANDROID | 706 #endif // OS_ANDROID |
| OLD | NEW |