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 29 matching lines...) Expand all Loading... | |
40 #include "content/public/common/content_constants.h" | 40 #include "content/public/common/content_constants.h" |
41 #include "content/public/common/content_switches.h" | 41 #include "content/public/common/content_switches.h" |
42 #include "content/public/common/url_constants.h" | 42 #include "content/public/common/url_constants.h" |
43 #include "content/public/common/user_agent.h" | 43 #include "content/public/common/user_agent.h" |
44 #include "extensions/common/constants.h" | 44 #include "extensions/common/constants.h" |
45 #include "gpu/config/gpu_info.h" | 45 #include "gpu/config/gpu_info.h" |
46 #include "net/http/http_util.h" | 46 #include "net/http/http_util.h" |
47 #include "ui/base/l10n/l10n_util.h" | 47 #include "ui/base/l10n/l10n_util.h" |
48 #include "ui/base/layout.h" | 48 #include "ui/base/layout.h" |
49 #include "ui/base/resource/resource_bundle.h" | 49 #include "ui/base/resource/resource_bundle.h" |
50 #include "v8/include/v8.h" | |
50 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 51 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
51 | 52 |
52 #if defined(OS_LINUX) | 53 #if defined(OS_LINUX) |
53 #include <fcntl.h> | 54 #include <fcntl.h> |
54 #include "chrome/common/component_flash_hint_file_linux.h" | 55 #include "chrome/common/component_flash_hint_file_linux.h" |
55 #endif // defined(OS_LINUX) | 56 #endif // defined(OS_LINUX) |
56 | 57 |
57 #if defined(OS_WIN) | 58 #if defined(OS_WIN) |
58 #include "base/win/windows_version.h" | 59 #include "base/win/windows_version.h" |
59 #endif | 60 #endif |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
611 | 612 |
612 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { | 613 bool ChromeContentClient::CanSendWhileSwappedOut(const IPC::Message* message) { |
613 return message->type() == | 614 return message->type() == |
614 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; | 615 DataReductionProxyViewHostMsg_IsDataReductionProxy::ID; |
615 } | 616 } |
616 | 617 |
617 std::string ChromeContentClient::GetProduct() const { | 618 std::string ChromeContentClient::GetProduct() const { |
618 return ::GetProduct(); | 619 return ::GetProduct(); |
619 } | 620 } |
620 | 621 |
622 std::string ChromeContentClient::GetV8Version() const { | |
623 return v8::V8::GetVersion(); | |
jam
2016/07/12 21:28:24
no need to create a new ContentClient method. cont
benjhayden
2016/07/15 01:22:08
content/DEPS had "-v8" in its include_rules, so I
| |
624 } | |
625 | |
621 std::string ChromeContentClient::GetUserAgent() const { | 626 std::string ChromeContentClient::GetUserAgent() const { |
622 return ::GetUserAgent(); | 627 return ::GetUserAgent(); |
623 } | 628 } |
624 | 629 |
625 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 630 base::string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
626 return l10n_util::GetStringUTF16(message_id); | 631 return l10n_util::GetStringUTF16(message_id); |
627 } | 632 } |
628 | 633 |
629 base::StringPiece ChromeContentClient::GetDataResource( | 634 base::StringPiece ChromeContentClient::GetDataResource( |
630 int resource_id, | 635 int resource_id, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
712 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); | 717 origin_trial_policy_ = base::WrapUnique(new ChromeOriginTrialPolicy()); |
713 } | 718 } |
714 return origin_trial_policy_.get(); | 719 return origin_trial_policy_.get(); |
715 } | 720 } |
716 | 721 |
717 #if defined(OS_ANDROID) | 722 #if defined(OS_ANDROID) |
718 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 723 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
719 return new ChromeMediaClientAndroid(); | 724 return new ChromeMediaClientAndroid(); |
720 } | 725 } |
721 #endif // OS_ANDROID | 726 #endif // OS_ANDROID |
OLD | NEW |