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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
22 #include "base/values.h" | 22 #include "base/values.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "chrome/common/channel_info.h" | 24 #include "chrome/common/channel_info.h" |
25 #include "chrome/common/chrome_features.h" | 25 #include "chrome/common/chrome_features.h" |
26 #include "chrome/common/chrome_isolated_world_ids.h" | 26 #include "chrome/common/chrome_isolated_world_ids.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/features.h" | 30 #include "chrome/common/features.h" |
| 31 #include "chrome/common/pause_tabs_field_trial.h" |
31 #include "chrome/common/pepper_permission_util.h" | 32 #include "chrome/common/pepper_permission_util.h" |
32 #include "chrome/common/prerender_types.h" | 33 #include "chrome/common/prerender_types.h" |
33 #include "chrome/common/render_messages.h" | 34 #include "chrome/common/render_messages.h" |
34 #include "chrome/common/secure_origin_whitelist.h" | 35 #include "chrome/common/secure_origin_whitelist.h" |
35 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
36 #include "chrome/grit/chromium_strings.h" | 37 #include "chrome/grit/chromium_strings.h" |
37 #include "chrome/grit/generated_resources.h" | 38 #include "chrome/grit/generated_resources.h" |
38 #include "chrome/grit/locale_settings.h" | 39 #include "chrome/grit/locale_settings.h" |
39 #include "chrome/grit/renderer_resources.h" | 40 #include "chrome/grit/renderer_resources.h" |
40 #include "chrome/renderer/app_categorizer.h" | 41 #include "chrome/renderer/app_categorizer.h" |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 #else | 1070 #else |
1070 return true; | 1071 return true; |
1071 #endif | 1072 #endif |
1072 } | 1073 } |
1073 | 1074 |
1074 bool ChromeContentRendererClient:: | 1075 bool ChromeContentRendererClient:: |
1075 AllowTimerSuspensionWhenProcessBackgrounded() { | 1076 AllowTimerSuspensionWhenProcessBackgrounded() { |
1076 #if defined(OS_ANDROID) | 1077 #if defined(OS_ANDROID) |
1077 return true; | 1078 return true; |
1078 #else | 1079 #else |
1079 return false; | 1080 // TODO(ojan): Plumb the engagement values for this feature to WebViewImpl. |
| 1081 return base::FeatureList::IsEnabled(pausetabs::kPauseBackgroundTabsFeature); |
1080 #endif | 1082 #endif |
1081 } | 1083 } |
1082 | 1084 |
1083 bool ChromeContentRendererClient::AllowPopup() { | 1085 bool ChromeContentRendererClient::AllowPopup() { |
1084 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1086 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1085 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup(); | 1087 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup(); |
1086 #else | 1088 #else |
1087 return false; | 1089 return false; |
1088 #endif | 1090 #endif |
1089 } | 1091 } |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 | 1519 |
1518 RecordYouTubeRewriteUMA(result); | 1520 RecordYouTubeRewriteUMA(result); |
1519 return corrected_url.ReplaceComponents(r); | 1521 return corrected_url.ReplaceComponents(r); |
1520 } | 1522 } |
1521 | 1523 |
1522 std::unique_ptr<base::TaskScheduler::InitParams> | 1524 std::unique_ptr<base::TaskScheduler::InitParams> |
1523 ChromeContentRendererClient::GetTaskSchedulerInitParams() { | 1525 ChromeContentRendererClient::GetTaskSchedulerInitParams() { |
1524 return task_scheduler_util:: | 1526 return task_scheduler_util:: |
1525 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1527 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
1526 } | 1528 } |
OLD | NEW |