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

Side by Side Diff: content/renderer/render_widget.cc

Issue 361073002: Add switch to disable recording whole document (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 498
499 // If we are swapping out, we will call ReleaseProcess, allowing the process 499 // If we are swapping out, we will call ReleaseProcess, allowing the process
500 // to exit if all of its RenderViews are swapped out. We wait until the 500 // to exit if all of its RenderViews are swapped out. We wait until the
501 // WasSwappedOut call to do this, to avoid showing the sad tab. 501 // WasSwappedOut call to do this, to avoid showing the sad tab.
502 // If we are swapping in, we call AddRefProcess to prevent the process from 502 // If we are swapping in, we call AddRefProcess to prevent the process from
503 // exiting. 503 // exiting.
504 if (!is_swapped_out) 504 if (!is_swapped_out)
505 RenderProcess::current()->AddRefProcess(); 505 RenderProcess::current()->AddRefProcess();
506 } 506 }
507 507
508 bool RenderWidget::UsingSynchronousRendererCompositor() const {
509 #if defined(OS_ANDROID)
510 return SynchronousCompositorFactory::GetInstance() != NULL;
511 #else
512 return false;
513 #endif
514 }
515
516 void RenderWidget::EnableScreenMetricsEmulation( 508 void RenderWidget::EnableScreenMetricsEmulation(
517 const WebDeviceEmulationParams& params) { 509 const WebDeviceEmulationParams& params) {
518 if (!screen_metrics_emulator_) 510 if (!screen_metrics_emulator_)
519 screen_metrics_emulator_.reset(new ScreenMetricsEmulator(this, params)); 511 screen_metrics_emulator_.reset(new ScreenMetricsEmulator(this, params));
520 else 512 else
521 screen_metrics_emulator_->ChangeEmulationParams(params); 513 screen_metrics_emulator_->ChangeEmulationParams(params);
522 } 514 }
523 515
524 void RenderWidget::DisableScreenMetricsEmulation() { 516 void RenderWidget::DisableScreenMetricsEmulation() {
525 screen_metrics_emulator_.reset(); 517 screen_metrics_emulator_.reset();
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2057 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2066 video_hole_frames_.AddObserver(frame); 2058 video_hole_frames_.AddObserver(frame);
2067 } 2059 }
2068 2060
2069 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2061 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2070 video_hole_frames_.RemoveObserver(frame); 2062 video_hole_frames_.RemoveObserver(frame);
2071 } 2063 }
2072 #endif // defined(VIDEO_HOLE) 2064 #endif // defined(VIDEO_HOLE)
2073 2065
2074 } // namespace content 2066 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698