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

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

Issue 2496173003: Communicate audio state to renderer process on Android. (Closed)
Patch Set: Make power_level_monitoring_available private Created 4 years, 1 month 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 media_web_contents_observer_->MaybeUpdateAudibleState(); 1311 media_web_contents_observer_->MaybeUpdateAudibleState();
1312 } 1312 }
1313 1313
1314 if (delegate_) 1314 if (delegate_)
1315 delegate_->NavigationStateChanged(this, changed_flags); 1315 delegate_->NavigationStateChanged(this, changed_flags);
1316 1316
1317 if (GetOuterWebContents()) 1317 if (GetOuterWebContents())
1318 GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags); 1318 GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags);
1319 } 1319 }
1320 1320
1321 void WebContentsImpl::OnAudioStateChanged(bool is_audio_playing) { 1321 void WebContentsImpl::OnAudioStateChanged(bool is_audible) {
1322 SendPageMessage( 1322 SendPageMessage(new PageMsg_AudioStateChanged(MSG_ROUTING_NONE, is_audible));
1323 new PageMsg_AudioStateChanged(MSG_ROUTING_NONE, is_audio_playing));
1324 1323
1325 // Notification for UI updates in response to the changed muting state. 1324 // Notification for UI updates in response to the changed audio state.
1326 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); 1325 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB);
1327 } 1326 }
1328 1327
1329 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { 1328 base::TimeTicks WebContentsImpl::GetLastActiveTime() const {
1330 return last_active_time_; 1329 return last_active_time_;
1331 } 1330 }
1332 1331
1333 void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) { 1332 void WebContentsImpl::SetLastActiveTime(base::TimeTicks last_active_time) {
1334 last_active_time_ = last_active_time; 1333 last_active_time_ = last_active_time;
1335 } 1334 }
(...skipping 3878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5214 dialog_manager_ = dialog_manager; 5213 dialog_manager_ = dialog_manager;
5215 } 5214 }
5216 5215
5217 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5216 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5218 auto it = binding_sets_.find(interface_name); 5217 auto it = binding_sets_.find(interface_name);
5219 if (it != binding_sets_.end()) 5218 if (it != binding_sets_.end())
5220 binding_sets_.erase(it); 5219 binding_sets_.erase(it);
5221 } 5220 }
5222 5221
5223 } // namespace content 5222 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698