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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 #else | 1069 #else |
1070 return true; | 1070 return true; |
1071 #endif | 1071 #endif |
1072 } | 1072 } |
1073 | 1073 |
1074 bool ChromeContentRendererClient:: | 1074 bool ChromeContentRendererClient:: |
1075 AllowTimerSuspensionWhenProcessBackgrounded() { | 1075 AllowTimerSuspensionWhenProcessBackgrounded() { |
1076 #if defined(OS_ANDROID) | 1076 #if defined(OS_ANDROID) |
1077 return true; | 1077 return true; |
1078 #else | 1078 #else |
1079 return false; | 1079 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1080 switches::kPauseBackgroundTabs); |
1080 #endif | 1081 #endif |
1081 } | 1082 } |
1082 | 1083 |
1083 bool ChromeContentRendererClient::AllowPopup() { | 1084 bool ChromeContentRendererClient::AllowPopup() { |
1084 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1085 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1085 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup(); | 1086 return ChromeExtensionsRendererClient::GetInstance()->AllowPopup(); |
1086 #else | 1087 #else |
1087 return false; | 1088 return false; |
1088 #endif | 1089 #endif |
1089 } | 1090 } |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 | 1518 |
1518 RecordYouTubeRewriteUMA(result); | 1519 RecordYouTubeRewriteUMA(result); |
1519 return corrected_url.ReplaceComponents(r); | 1520 return corrected_url.ReplaceComponents(r); |
1520 } | 1521 } |
1521 | 1522 |
1522 std::unique_ptr<base::TaskScheduler::InitParams> | 1523 std::unique_ptr<base::TaskScheduler::InitParams> |
1523 ChromeContentRendererClient::GetTaskSchedulerInitParams() { | 1524 ChromeContentRendererClient::GetTaskSchedulerInitParams() { |
1524 return task_scheduler_util:: | 1525 return task_scheduler_util:: |
1525 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1526 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
1526 } | 1527 } |
OLD | NEW |