| 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 4192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4203 | 4203 |
| 4204 FOR_EACH_OBSERVER( | 4204 FOR_EACH_OBSERVER( |
| 4205 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); | 4205 RenderViewObserver, observers_, DidChangeScrollOffset(frame)); |
| 4206 | 4206 |
| 4207 #if defined(OS_ANDROID) | 4207 #if defined(OS_ANDROID) |
| 4208 if (webview()->mainFrame() == frame) | 4208 if (webview()->mainFrame() == frame) |
| 4209 ScheduleUpdateFrameInfo(); | 4209 ScheduleUpdateFrameInfo(); |
| 4210 #endif | 4210 #endif |
| 4211 } | 4211 } |
| 4212 | 4212 |
| 4213 void RenderViewImpl::willInsertBody(WebKit::WebFrame* frame) { | |
| 4214 if (!frame->parent()) { | |
| 4215 Send(new ViewHostMsg_WillInsertBody(routing_id())); | |
| 4216 } | |
| 4217 } | |
| 4218 | |
| 4219 #if defined(OS_ANDROID) | 4213 #if defined(OS_ANDROID) |
| 4220 void RenderViewImpl::didFirstVisuallyNonEmptyLayout(WebFrame* frame) { | 4214 void RenderViewImpl::didFirstVisuallyNonEmptyLayout(WebFrame* frame) { |
| 4221 if (frame != webview()->mainFrame()) | 4215 if (frame != webview()->mainFrame()) |
| 4222 return; | 4216 return; |
| 4223 | 4217 |
| 4224 // Update body background color if necessary. | 4218 // Update body background color if necessary. |
| 4225 SkColor bg_color = webwidget_->backgroundColor(); | 4219 SkColor bg_color = webwidget_->backgroundColor(); |
| 4226 | 4220 |
| 4227 // If not initialized, default to white. Note that 0 is different from black | 4221 // If not initialized, default to white. Note that 0 is different from black |
| 4228 // as black still has alpha 0xFF. | 4222 // as black still has alpha 0xFF. |
| (...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6671 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6665 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6672 RenderProcess::current()->ReleaseTransportDIB(dib); | 6666 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6673 } | 6667 } |
| 6674 | 6668 |
| 6675 void RenderViewImpl::DidCommitCompositorFrame() { | 6669 void RenderViewImpl::DidCommitCompositorFrame() { |
| 6676 RenderWidget::DidCommitCompositorFrame(); | 6670 RenderWidget::DidCommitCompositorFrame(); |
| 6677 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6671 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); |
| 6678 } | 6672 } |
| 6679 | 6673 |
| 6680 } // namespace content | 6674 } // namespace content |
| OLD | NEW |