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

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: 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 2466 matching lines...) Expand 10 before | Expand all | Expand 10 after
2477 void WebContentsImpl::StopFinding(StopFindAction action) { 2477 void WebContentsImpl::StopFinding(StopFindAction action) {
2478 Send(new ViewMsg_StopFinding(GetRoutingID(), action)); 2478 Send(new ViewMsg_StopFinding(GetRoutingID(), action));
2479 } 2479 }
2480 2480
2481 void WebContentsImpl::InsertCSS(const std::string& css) { 2481 void WebContentsImpl::InsertCSS(const std::string& css) {
2482 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest( 2482 GetMainFrame()->Send(new FrameMsg_CSSInsertRequest(
2483 GetMainFrame()->GetRoutingID(), css)); 2483 GetMainFrame()->GetRoutingID(), css));
2484 } 2484 }
2485 2485
2486 bool WebContentsImpl::WasRecentlyAudible() { 2486 bool WebContentsImpl::WasRecentlyAudible() {
2487 #if defined(ENABLE_BROWSER_CDMS)
2488 return media_web_contents_observer_->IsAudible();
2489 #else
2487 return audio_stream_monitor_.WasRecentlyAudible(); 2490 return audio_stream_monitor_.WasRecentlyAudible();
2491 #endif
2488 } 2492 }
2489 2493
2490 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) { 2494 void WebContentsImpl::GetManifest(const GetManifestCallback& callback) {
2491 manifest_manager_host_->GetManifest(GetMainFrame(), callback); 2495 manifest_manager_host_->GetManifest(GetMainFrame(), callback);
2492 } 2496 }
2493 2497
2494 void WebContentsImpl::ExitFullscreen() { 2498 void WebContentsImpl::ExitFullscreen() {
2495 // Clean up related state and initiate the fullscreen exit. 2499 // Clean up related state and initiate the fullscreen exit.
2496 GetRenderViewHostImpl()->RejectMouseLockOrUnlockIfNecessary(); 2500 GetRenderViewHostImpl()->RejectMouseLockOrUnlockIfNecessary();
2497 ExitFullscreenMode(); 2501 ExitFullscreenMode();
(...skipping 1952 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 node->render_manager()->ResumeResponseDeferredAtStart(); 4454 node->render_manager()->ResumeResponseDeferredAtStart();
4451 } 4455 }
4452 4456
4453 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4457 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4454 force_disable_overscroll_content_ = force_disable; 4458 force_disable_overscroll_content_ = force_disable;
4455 if (view_) 4459 if (view_)
4456 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4460 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4457 } 4461 }
4458 4462
4459 } // namespace content 4463 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698