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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3309 #if defined(OS_ANDROID) | 3309 #if defined(OS_ANDROID) |
3310 | 3310 |
3311 void WebContentsImpl::OnMediaSessionStateChanged() { | 3311 void WebContentsImpl::OnMediaSessionStateChanged() { |
3312 MediaSession* session = MediaSession::Get(this); | 3312 MediaSession* session = MediaSession::Get(this); |
3313 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3313 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3314 MediaSessionStateChanged(session->IsControllable(), | 3314 MediaSessionStateChanged(session->IsControllable(), |
3315 session->IsSuspended())); | 3315 session->IsSuspended())); |
3316 } | 3316 } |
3317 | 3317 |
3318 void WebContentsImpl::ResumeMediaSession() { | 3318 void WebContentsImpl::ResumeMediaSession() { |
3319 MediaSession::Get(this)->Resume(); | 3319 MediaSession::Get(this)->Resume(MediaSession::SuspendType::UI); |
whywhat
2015/07/21 19:21:28
Perhaps you could pass the SuspendType::UI from Re
| |
3320 } | 3320 } |
3321 | 3321 |
3322 void WebContentsImpl::SuspendMediaSession() { | 3322 void WebContentsImpl::SuspendMediaSession() { |
3323 MediaSession::Get(this)->Suspend(); | 3323 MediaSession::Get(this)->Suspend(MediaSession::SuspendType::UI); |
3324 } | 3324 } |
3325 | 3325 |
3326 #endif // defined(OS_ANDROID) | 3326 #endif // defined(OS_ANDROID) |
3327 | 3327 |
3328 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { | 3328 void WebContentsImpl::OnFirstVisuallyNonEmptyPaint() { |
3329 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 3329 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
3330 DidFirstVisuallyNonEmptyPaint()); | 3330 DidFirstVisuallyNonEmptyPaint()); |
3331 | 3331 |
3332 did_first_visually_non_empty_paint_ = true; | 3332 did_first_visually_non_empty_paint_ = true; |
3333 | 3333 |
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4523 player_map->erase(it); | 4523 player_map->erase(it); |
4524 } | 4524 } |
4525 | 4525 |
4526 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4526 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4527 force_disable_overscroll_content_ = force_disable; | 4527 force_disable_overscroll_content_ = force_disable; |
4528 if (view_) | 4528 if (view_) |
4529 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4529 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4530 } | 4530 } |
4531 | 4531 |
4532 } // namespace content | 4532 } // namespace content |
OLD | NEW |