OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
6 | 6 |
7 #include "content/browser/frame_host/cross_process_frame_connector.h" | 7 #include "content/browser/frame_host/cross_process_frame_connector.h" |
8 #include "content/browser/renderer_host/render_widget_host_impl.h" | 8 #include "content/browser/renderer_host/render_widget_host_impl.h" |
9 #include "content/common/gpu/gpu_messages.h" | 9 #include "content/common/gpu/gpu_messages.h" |
10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 void RenderWidgetHostViewChildFrame::Hide() { | 58 void RenderWidgetHostViewChildFrame::Hide() { |
59 WasHidden(); | 59 WasHidden(); |
60 } | 60 } |
61 | 61 |
62 bool RenderWidgetHostViewChildFrame::IsShowing() { | 62 bool RenderWidgetHostViewChildFrame::IsShowing() { |
63 return !host_->is_hidden(); | 63 return !host_->is_hidden(); |
64 } | 64 } |
65 | 65 |
66 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { | 66 gfx::Rect RenderWidgetHostViewChildFrame::GetViewBounds() const { |
| 67 LOG(ERROR) << "RWHVCF[" << this << "]::GetViewBounds:"; |
67 gfx::Rect rect; | 68 gfx::Rect rect; |
68 if (frame_connector_) | 69 if (frame_connector_) |
69 rect = frame_connector_->ChildFrameRect(); | 70 rect = frame_connector_->ChildFrameRect(); |
70 return rect; | 71 return rect; |
71 } | 72 } |
72 | 73 |
73 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { | 74 gfx::NativeView RenderWidgetHostViewChildFrame::GetNativeView() const { |
74 NOTREACHED(); | 75 NOTREACHED(); |
75 return NULL; | 76 return NULL; |
76 } | 77 } |
77 | 78 |
78 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { | 79 gfx::NativeViewId RenderWidgetHostViewChildFrame::GetNativeViewId() const { |
79 NOTREACHED(); | 80 NOTREACHED(); |
80 return 0; | 81 return 0; |
81 } | 82 } |
82 | 83 |
83 gfx::NativeViewAccessible | 84 gfx::NativeViewAccessible |
84 RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { | 85 RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { |
85 NOTREACHED(); | 86 NOTREACHED(); |
86 return NULL; | 87 return NULL; |
87 } | 88 } |
88 | 89 |
89 void RenderWidgetHostViewChildFrame::SetBackgroundOpaque(bool opaque) { | 90 void RenderWidgetHostViewChildFrame::SetBackgroundOpaque(bool opaque) { |
90 } | 91 } |
91 | 92 |
92 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { | 93 gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { |
| 94 LOG(ERROR) << "RWHVCF[" << this << "]::GetPhysicalBackingSize:"; |
93 gfx::Size size; | 95 gfx::Size size; |
94 if (frame_connector_) | 96 if (frame_connector_) |
95 size = frame_connector_->ChildFrameRect().size(); | 97 size = frame_connector_->ChildFrameRect().size(); |
96 return size; | 98 return size; |
97 } | 99 } |
98 | 100 |
99 void RenderWidgetHostViewChildFrame::InitAsPopup( | 101 void RenderWidgetHostViewChildFrame::InitAsPopup( |
100 RenderWidgetHostView* parent_host_view, | 102 RenderWidgetHostView* parent_host_view, |
101 const gfx::Rect& pos) { | 103 const gfx::Rect& pos) { |
102 NOTREACHED(); | 104 NOTREACHED(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 NOTREACHED(); | 147 NOTREACHED(); |
146 } | 148 } |
147 | 149 |
148 void RenderWidgetHostViewChildFrame::TextInputStateChanged( | 150 void RenderWidgetHostViewChildFrame::TextInputStateChanged( |
149 const ViewHostMsg_TextInputState_Params& params) { | 151 const ViewHostMsg_TextInputState_Params& params) { |
150 } | 152 } |
151 | 153 |
152 void RenderWidgetHostViewChildFrame::RenderProcessGone( | 154 void RenderWidgetHostViewChildFrame::RenderProcessGone( |
153 base::TerminationStatus status, | 155 base::TerminationStatus status, |
154 int error_code) { | 156 int error_code) { |
| 157 LOG(ERROR) << "RWHVCF[" << this << "]::RenderProcessGone:"; |
155 if (frame_connector_) | 158 if (frame_connector_) |
156 frame_connector_->RenderProcessGone(); | 159 frame_connector_->RenderProcessGone(); |
157 Destroy(); | 160 Destroy(); |
158 } | 161 } |
159 | 162 |
160 void RenderWidgetHostViewChildFrame::Destroy() { | 163 void RenderWidgetHostViewChildFrame::Destroy() { |
| 164 LOG(ERROR) << "RWHVCF[" << this << "]::Destroy:"; |
161 if (frame_connector_) { | 165 if (frame_connector_) { |
162 frame_connector_->set_view(NULL); | 166 frame_connector_->set_view(NULL); |
163 frame_connector_ = NULL; | 167 frame_connector_ = NULL; |
164 } | 168 } |
165 | 169 |
166 host_->SetView(NULL); | 170 host_->SetView(NULL); |
167 host_ = NULL; | 171 host_ = NULL; |
168 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 172 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
169 } | 173 } |
170 | 174 |
(...skipping 27 matching lines...) Expand all Loading... |
198 void RenderWidgetHostViewChildFrame::ScrollOffsetChanged() { | 202 void RenderWidgetHostViewChildFrame::ScrollOffsetChanged() { |
199 } | 203 } |
200 | 204 |
201 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id, | 205 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceInitialized(int host_id, |
202 int route_id) { | 206 int route_id) { |
203 } | 207 } |
204 | 208 |
205 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped( | 209 void RenderWidgetHostViewChildFrame::AcceleratedSurfaceBuffersSwapped( |
206 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, | 210 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, |
207 int gpu_host_id) { | 211 int gpu_host_id) { |
| 212 LOG(ERROR) << "RWHVCF[" << this << "]::AcceleratedSurfaceBuffersSwapped:"; |
208 if (frame_connector_) | 213 if (frame_connector_) |
209 frame_connector_->ChildFrameBuffersSwapped(params, gpu_host_id); | 214 frame_connector_->ChildFrameBuffersSwapped(params, gpu_host_id); |
210 } | 215 } |
211 | 216 |
212 void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( | 217 void RenderWidgetHostViewChildFrame::AcceleratedSurfacePostSubBuffer( |
213 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, | 218 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, |
214 int gpu_host_id) { | 219 int gpu_host_id) { |
215 } | 220 } |
216 | 221 |
217 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( | 222 void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame( |
218 uint32 output_surface_id, | 223 uint32 output_surface_id, |
219 scoped_ptr<cc::CompositorFrame> frame) { | 224 scoped_ptr<cc::CompositorFrame> frame) { |
| 225 LOG(ERROR) << "RWHVCF[" << this << "]::OnSwapCompositorFrame:"; |
220 if (frame_connector_) { | 226 if (frame_connector_) { |
221 frame_connector_->ChildFrameCompositorFrameSwapped( | 227 frame_connector_->ChildFrameCompositorFrameSwapped( |
222 output_surface_id, | 228 output_surface_id, |
223 host_->GetProcess()->GetID(), | 229 host_->GetProcess()->GetID(), |
224 host_->GetRoutingID(), | 230 host_->GetRoutingID(), |
225 frame.Pass()); | 231 frame.Pass()); |
226 } | 232 } |
227 } | 233 } |
228 | 234 |
229 void RenderWidgetHostViewChildFrame::GetScreenInfo( | 235 void RenderWidgetHostViewChildFrame::GetScreenInfo( |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 const { | 336 const { |
331 return NULL; | 337 return NULL; |
332 } | 338 } |
333 #endif // defined(OS_WIN) | 339 #endif // defined(OS_WIN) |
334 | 340 |
335 SkBitmap::Config RenderWidgetHostViewChildFrame::PreferredReadbackFormat() { | 341 SkBitmap::Config RenderWidgetHostViewChildFrame::PreferredReadbackFormat() { |
336 return SkBitmap::kARGB_8888_Config; | 342 return SkBitmap::kARGB_8888_Config; |
337 } | 343 } |
338 | 344 |
339 } // namespace content | 345 } // namespace content |
OLD | NEW |