OLD | NEW |
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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1399 // Always send this notification to prevent new layer tree views from | 1399 // Always send this notification to prevent new layer tree views from |
1400 // being created, even if one hasn't been created yet. | 1400 // being created, even if one hasn't been created yet. |
1401 if (webwidget_) | 1401 if (webwidget_) |
1402 webwidget_->willCloseLayerTreeView(); | 1402 webwidget_->willCloseLayerTreeView(); |
1403 } | 1403 } |
1404 | 1404 |
1405 blink::WebLayerTreeView* RenderWidget::layerTreeView() { | 1405 blink::WebLayerTreeView* RenderWidget::layerTreeView() { |
1406 return compositor_.get(); | 1406 return compositor_.get(); |
1407 } | 1407 } |
1408 | 1408 |
| 1409 void RenderWidget::didFirstVisuallyNonEmptyLayout() { |
| 1410 // TODO(dglazkov): Remove this -- we should just pass background color |
| 1411 // in CompositorFrameMetadata. |
| 1412 #if defined(OS_ANDROID) |
| 1413 DidChangeBodyBackgroundColor(webwidget_->backgroundColor()); |
| 1414 #endif |
| 1415 |
| 1416 QueueMessage( |
| 1417 new ViewHostMsg_DidFirstVisuallyNonEmptyPaint(routing_id_), |
| 1418 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
| 1419 } |
| 1420 |
| 1421 void RenderWidget::didFirstLayoutAfterFinishedParsing() { |
| 1422 // TODO(dglazkov): Use this hook to drive CapturePageInfo. |
| 1423 } |
| 1424 |
1409 void RenderWidget::WillBeginCompositorFrame() { | 1425 void RenderWidget::WillBeginCompositorFrame() { |
1410 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); | 1426 TRACE_EVENT0("gpu", "RenderWidget::willBeginCompositorFrame"); |
1411 | 1427 |
1412 // The UpdateTextInputState can result in further layout and possibly | 1428 // The UpdateTextInputState can result in further layout and possibly |
1413 // enable GPU acceleration so they need to be called before any painting | 1429 // enable GPU acceleration so they need to be called before any painting |
1414 // is done. | 1430 // is done. |
1415 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); | 1431 UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME); |
1416 UpdateSelectionBounds(); | 1432 UpdateSelectionBounds(); |
1417 } | 1433 } |
1418 | 1434 |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { | 2458 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { |
2443 video_hole_frames_.AddObserver(frame); | 2459 video_hole_frames_.AddObserver(frame); |
2444 } | 2460 } |
2445 | 2461 |
2446 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { | 2462 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { |
2447 video_hole_frames_.RemoveObserver(frame); | 2463 video_hole_frames_.RemoveObserver(frame); |
2448 } | 2464 } |
2449 #endif // defined(VIDEO_HOLE) | 2465 #endif // defined(VIDEO_HOLE) |
2450 | 2466 |
2451 } // namespace content | 2467 } // namespace content |
OLD | NEW |