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

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

Issue 1398823004: Switch the page-capturing machinery to use the new hooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 (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/logging.h" 10 #include "base/logging.h"
(...skipping 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 // Always send this notification to prevent new layer tree views from 1358 // Always send this notification to prevent new layer tree views from
1359 // being created, even if one hasn't been created yet. 1359 // being created, even if one hasn't been created yet.
1360 if (webwidget_) 1360 if (webwidget_)
1361 webwidget_->willCloseLayerTreeView(); 1361 webwidget_->willCloseLayerTreeView();
1362 } 1362 }
1363 1363
1364 blink::WebLayerTreeView* RenderWidget::layerTreeView() { 1364 blink::WebLayerTreeView* RenderWidget::layerTreeView() {
1365 return compositor_.get(); 1365 return compositor_.get();
1366 } 1366 }
1367 1367
1368 void RenderWidget::didFirstVisuallyNonEmptyLayout() { 1368 void RenderWidget::didMeaningfulLayout(blink::WebMeaningfulLayout layout_type) {
1369 QueueMessage( 1369 if (layout_type == blink::WebMeaningfulLayout::VisuallyNonEmpty) {
1370 new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_), 1370 QueueMessage(new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_),
1371 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); 1371 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE);
1372 } 1372 }
1373 1373
1374 void RenderWidget::didFirstLayoutAfterFinishedParsing() { 1374 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_,
1375 // TODO(dglazkov): Use this hook to drive CapturePageInfo. 1375 DidMeaningfulLayout(layout_type));
1376 } 1376 }
1377 1377
1378 void RenderWidget::WillBeginCompositorFrame() { 1378 void RenderWidget::WillBeginCompositorFrame() {
1379 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); 1379 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame");
1380 1380
1381 // The UpdateTextInputState can result in further layout and possibly 1381 // The UpdateTextInputState can result in further layout and possibly
1382 // enable GPU acceleration so they need to be called before any painting 1382 // enable GPU acceleration so they need to be called before any painting
1383 // is done. 1383 // is done.
1384 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); 1384 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
1385 UpdateSelectionBounds(); 1385 UpdateSelectionBounds();
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2379 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2380 video_hole_frames_.AddObserver(frame); 2380 video_hole_frames_.AddObserver(frame);
2381 } 2381 }
2382 2382
2383 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2383 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2384 video_hole_frames_.RemoveObserver(frame); 2384 video_hole_frames_.RemoveObserver(frame);
2385 } 2385 }
2386 #endif // defined(VIDEO_HOLE) 2386 #endif // defined(VIDEO_HOLE)
2387 2387
2388 } // namespace content 2388 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698