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

Side by Side Diff: content/browser/media/audio_state_provider.cc

Issue 1215713021: Reverted the code for the non-interactive audible tab notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notification
Patch Set: Fixed indent Created 5 years, 3 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/media/audio_state_provider.h"
6
7 #include "base/logging.h"
8 #include "content/browser/media/audio_stream_monitor.h"
9 #include "content/public/browser/web_contents.h"
10
11 namespace content {
12
13 AudioStateProvider::AudioStateProvider(WebContents* contents)
14 : web_contents_(contents),
15 was_recently_audible_(false) {
16 DCHECK(web_contents_);
17 }
18
19 bool AudioStateProvider::WasRecentlyAudible() const {
20 return was_recently_audible_;
21 }
22
23 void AudioStateProvider::Notify(bool new_state) {
24 if (was_recently_audible_ != new_state) {
25 was_recently_audible_ = new_state;
26 web_contents_->NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB);
27 }
28 }
29
30 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/audio_state_provider.h ('k') | content/browser/media/audio_stream_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698