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

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

Issue 389973005: Merge 280970 "Add switch to disable recording whole document" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 // If we are swapping out, we will call ReleaseProcess, allowing the process 498 // If we are swapping out, we will call ReleaseProcess, allowing the process
499 // to exit if all of its RenderViews are swapped out. We wait until the 499 // to exit if all of its RenderViews are swapped out. We wait until the
500 // WasSwappedOut call to do this, to avoid showing the sad tab. 500 // WasSwappedOut call to do this, to avoid showing the sad tab.
501 // If we are swapping in, we call AddRefProcess to prevent the process from 501 // If we are swapping in, we call AddRefProcess to prevent the process from
502 // exiting. 502 // exiting.
503 if (!is_swapped_out) 503 if (!is_swapped_out)
504 RenderProcess::current()->AddRefProcess(); 504 RenderProcess::current()->AddRefProcess();
505 } 505 }
506 506
507 bool RenderWidget::UsingSynchronousRendererCompositor() const {
508 #if defined(OS_ANDROID)
509 return SynchronousCompositorFactory::GetInstance() != NULL;
510 #else
511 return false;
512 #endif
513 }
514
515 void RenderWidget::EnableScreenMetricsEmulation( 507 void RenderWidget::EnableScreenMetricsEmulation(
516 const WebDeviceEmulationParams& params) { 508 const WebDeviceEmulationParams& params) {
517 if (!screen_metrics_emulator_) 509 if (!screen_metrics_emulator_)
518 screen_metrics_emulator_.reset(new ScreenMetricsEmulator(this, params)); 510 screen_metrics_emulator_.reset(new ScreenMetricsEmulator(this, params));
519 else 511 else
520 screen_metrics_emulator_->ChangeEmulationParams(params); 512 screen_metrics_emulator_->ChangeEmulationParams(params);
521 } 513 }
522 514
523 void RenderWidget::DisableScreenMetricsEmulation() { 515 void RenderWidget::DisableScreenMetricsEmulation() {
524 screen_metrics_emulator_.reset(); 516 screen_metrics_emulator_.reset();
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2052 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2061 video_hole_frames_.AddObserver(frame); 2053 video_hole_frames_.AddObserver(frame);
2062 } 2054 }
2063 2055
2064 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2056 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2065 video_hole_frames_.RemoveObserver(frame); 2057 video_hole_frames_.RemoveObserver(frame);
2066 } 2058 }
2067 #endif // defined(VIDEO_HOLE) 2059 #endif // defined(VIDEO_HOLE)
2068 2060
2069 } // namespace content 2061 } // 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