OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "base/android/build_info.h" | 11 #include "base/android/build_info.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/metrics/histogram_macros.h" | 17 #include "base/metrics/histogram_macros.h" |
18 #include "base/single_thread_task_runner.h" | 18 #include "base/single_thread_task_runner.h" |
19 #include "base/strings/string_number_conversions.h" | 19 #include "base/strings/string_number_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/threading/thread_task_runner_handle.h" |
21 #include "cc/blink/web_layer_impl.h" | 22 #include "cc/blink/web_layer_impl.h" |
22 #include "cc/layers/video_layer.h" | 23 #include "cc/layers/video_layer.h" |
23 #include "content/public/common/content_client.h" | 24 #include "content/public/common/content_client.h" |
24 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
25 #include "content/public/common/renderer_preferences.h" | 26 #include "content/public/common/renderer_preferences.h" |
26 #include "content/public/renderer/render_frame.h" | 27 #include "content/public/renderer/render_frame.h" |
27 #include "content/renderer/media/android/renderer_media_player_manager.h" | 28 #include "content/renderer/media/android/renderer_media_player_manager.h" |
28 #include "content/renderer/render_frame_impl.h" | 29 #include "content/renderer/render_frame_impl.h" |
29 #include "content/renderer/render_thread_impl.h" | 30 #include "content/renderer/render_thread_impl.h" |
30 #include "content/renderer/render_view_impl.h" | 31 #include "content/renderer/render_view_impl.h" |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1319 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1319 switches::kDisableMediaSuspend)) { | 1320 switches::kDisableMediaSuspend)) { |
1320 return false; | 1321 return false; |
1321 } | 1322 } |
1322 | 1323 |
1323 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && | 1324 return base::FeatureList::IsEnabled(media::kResumeBackgroundVideo) && |
1324 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); | 1325 hasAudio() && !isRemote() && delegate_ && delegate_->IsHidden(); |
1325 } | 1326 } |
1326 | 1327 |
1327 } // namespace content | 1328 } // namespace content |
OLD | NEW |