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

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

Issue 1032703002: Trace background/visibility events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renderer_host Created 5 years, 9 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 // 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 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 2216
2217 void RenderProcessHostImpl::SuddenTerminationChanged(bool enabled) { 2217 void RenderProcessHostImpl::SuddenTerminationChanged(bool enabled) {
2218 SetSuddenTerminationAllowed(enabled); 2218 SetSuddenTerminationAllowed(enabled);
2219 } 2219 }
2220 2220
2221 void RenderProcessHostImpl::OnDumpHandlesDone() { 2221 void RenderProcessHostImpl::OnDumpHandlesDone() {
2222 Cleanup(); 2222 Cleanup();
2223 } 2223 }
2224 2224
2225 void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) { 2225 void RenderProcessHostImpl::SetBackgrounded(bool backgrounded) {
2226 TRACE_EVENT1("renderer_host", "RenderProcessHostImpl::SetBackgrounded",
2227 "backgrounded", backgrounded);
2226 // Note: we always set the backgrounded_ value. If the process is NULL 2228 // Note: we always set the backgrounded_ value. If the process is NULL
2227 // (and hence hasn't been created yet), we will set the process priority 2229 // (and hence hasn't been created yet), we will set the process priority
2228 // later when we create the process. 2230 // later when we create the process.
2229 backgrounded_ = backgrounded; 2231 backgrounded_ = backgrounded;
2230 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) 2232 if (!child_process_launcher_.get() || child_process_launcher_->IsStarting())
2231 return; 2233 return;
2232 2234
2233 // Don't background processes which have active audio streams. 2235 // Don't background processes which have active audio streams.
2234 if (backgrounded_ && audio_renderer_host_->HasActiveAudio()) 2236 if (backgrounded_ && audio_renderer_host_->HasActiveAudio())
2235 return; 2237 return;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 if (worker_ref_count_ == 0) 2491 if (worker_ref_count_ == 0)
2490 Cleanup(); 2492 Cleanup();
2491 } 2493 }
2492 2494
2493 void RenderProcessHostImpl::GetAudioOutputControllers( 2495 void RenderProcessHostImpl::GetAudioOutputControllers(
2494 const GetAudioOutputControllersCallback& callback) const { 2496 const GetAudioOutputControllersCallback& callback) const {
2495 audio_renderer_host()->GetOutputControllers(callback); 2497 audio_renderer_host()->GetOutputControllers(callback);
2496 } 2498 }
2497 2499
2498 } // namespace content 2500 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698