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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 896673003: Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed MediaSourcePlayerTest compilation. Created 5 years, 10 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
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 "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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 void WebContentsImpl::StopFinding(StopFindAction action) { 2523 void WebContentsImpl::StopFinding(StopFindAction action) {
2524 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); 2524 Send(new ViewMsg_StopFinding(GetRoutingID(), action));
2525 } 2525 }
2526 2526
2527 void WebContentsImpl::InsertCSS(const std::string& css) { 2527 void WebContentsImpl::InsertCSS(const std::string& css) {
2528 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( 2528 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest(
2529 GetMainFrame()->GetRoutingID(), css)); 2529 GetMainFrame()->GetRoutingID(), css));
2530 } 2530 }
2531 2531
2532 bool WebContentsImpl::WasRecentlyAudible() { 2532 bool WebContentsImpl::WasRecentlyAudible() {
2533 #if defined(ENABLE_BROWSER_CDMS)
Ted C 2015/02/07 00:07:15 or if we don't want to make the method ifdef'd to
Tima Vaisburd 2015/02/07 03:00:23 Yes, I put it under #if defined(ENABLE_BROWSER_
2534 return media_web_contents_observer_->IsAudible();
2535 #else
2533 return audio_stream_monitor_.WasRecentlyAudible(); 2536 return audio_stream_monitor_.WasRecentlyAudible();
2537 #endif
2534 } 2538 }
2535 2539
2536 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { 2540 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) {
2537 manifest_manager_host_->GetManifest(GetMainFrame(), callback); 2541 manifest_manager_host_->GetManifest(GetMainFrame(), callback);
2538 } 2542 }
2539 2543
2540 void WebContentsImpl::ExitFullscreen() { 2544 void WebContentsImpl::ExitFullscreen() {
2541 // Clean up related state and initiate the fullscreen exit. 2545 // Clean up related state and initiate the fullscreen exit.
2542 GetRenderViewHostImpl()->RejectMouseLockOrUnlockIfNecessary(); 2546 GetRenderViewHostImpl()->RejectMouseLockOrUnlockIfNecessary();
2543 ExitFullscreenMode(); 2547 ExitFullscreenMode();
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4542 node->render_manager()->ResumeResponseDeferredAtStart(); 4546 node->render_manager()->ResumeResponseDeferredAtStart();
4543 } 4547 }
4544 4548
4545 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4549 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4546 force_disable_overscroll_content_ = force_disable; 4550 force_disable_overscroll_content_ = force_disable;
4547 if (view_) 4551 if (view_)
4548 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4552 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4549 } 4553 }
4550 4554
4551 } // namespace content 4555 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698