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