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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2383473002: [scheduler] Teach scheduler about audio state (Closed)
Patch Set: Created 4 years, 2 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 if (visible_widgets_ == 0) { 1509 if (visible_widgets_ == 0) {
1510 DCHECK(!is_process_backgrounded_); 1510 DCHECK(!is_process_backgrounded_);
1511 UpdateProcessPriority(); 1511 UpdateProcessPriority();
1512 } 1512 }
1513 } 1513 }
1514 1514
1515 int RenderProcessHostImpl::VisibleWidgetCount() const { 1515 int RenderProcessHostImpl::VisibleWidgetCount() const {
1516 return visible_widgets_; 1516 return visible_widgets_;
1517 } 1517 }
1518 1518
1519 void RenderProcessHostImpl::AudioStateChanged() { 1519 void RenderProcessHostImpl::AudioStateChanged(bool is_audio_active) {
1520 UpdateProcessPriority(); 1520 UpdateProcessPriority();
1521
1522 // Notify the child process of audio state.
1523 Send(new ChildProcessMsg_SetAudioPlaying(is_audio_active));
1521 } 1524 }
1522 1525
1523 bool RenderProcessHostImpl::IsForGuestsOnly() const { 1526 bool RenderProcessHostImpl::IsForGuestsOnly() const {
1524 return is_for_guests_only_; 1527 return is_for_guests_only_;
1525 } 1528 }
1526 1529
1527 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const { 1530 StoragePartition* RenderProcessHostImpl::GetStoragePartition() const {
1528 return storage_partition_impl_; 1531 return storage_partition_impl_;
1529 } 1532 }
1530 1533
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3049 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3047 3050
3048 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias 3051 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias
3049 // enough information here so that we can determine what the bad message was. 3052 // enough information here so that we can determine what the bad message was.
3050 base::debug::Alias(&error); 3053 base::debug::Alias(&error);
3051 bad_message::ReceivedBadMessage(process.get(), 3054 bad_message::ReceivedBadMessage(process.get(),
3052 bad_message::RPH_MOJO_PROCESS_ERROR); 3055 bad_message::RPH_MOJO_PROCESS_ERROR);
3053 } 3056 }
3054 3057
3055 } // namespace content 3058 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698