Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2805683003: Allow for pausing background tabs on desktop via about:flags. (Closed)
Patch Set: Fix android build Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/common/pause_tabs_field_trial.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 #else 1084 #else
1084 return true; 1085 return true;
1085 #endif 1086 #endif
1086 } 1087 }
1087 1088
1088 bool ChromeContentRendererClient:: 1089 bool ChromeContentRendererClient::
1089 AllowTimerSuspensionWhenProcessBackgrounded() { 1090 AllowTimerSuspensionWhenProcessBackgrounded() {
1090 #if defined(OS_ANDROID) 1091 #if defined(OS_ANDROID)
1091 return true; 1092 return true;
1092 #else 1093 #else
1093 return false; 1094 // TODO(ojan): Plumb the engagement values for this feature to WebViewImpl.
1095 return base::FeatureList::IsEnabled(pausetabs::kFeature);
1094 #endif 1096 #endif
1095 } 1097 }
1096 1098
1097 bool ChromeContentRendererClient::AllowPopup() { 1099 bool ChromeContentRendererClient::AllowPopup() {
1098 #if BUILDFLAG(ENABLE_EXTENSIONS) 1100 #if BUILDFLAG(ENABLE_EXTENSIONS)
1099 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup(); 1101 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup();
1100 #else 1102 #else
1101 return false; 1103 return false;
1102 #endif 1104 #endif
1103 } 1105 }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 1537
1536 RecordYouTubeRewriteUMA(result); 1538 RecordYouTubeRewriteUMA(result);
1537 return corrected_url.ReplaceComponents(r); 1539 return corrected_url.ReplaceComponents(r);
1538 } 1540 }
1539 1541
1540 std::unique_ptr<base::TaskScheduler::InitParams> 1542 std::unique_ptr<base::TaskScheduler::InitParams>
1541 ChromeContentRendererClient::GetTaskSchedulerInitParams() { 1543 ChromeContentRendererClient::GetTaskSchedulerInitParams() {
1542 return task_scheduler_util:: 1544 return task_scheduler_util::
1543 GetRendererTaskSchedulerInitParamsFromCommandLine(); 1545 GetRendererTaskSchedulerInitParamsFromCommandLine();
1544 } 1546 }
OLDNEW
« no previous file with comments | « chrome/common/pause_tabs_field_trial.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698