Chromium Code Reviews| 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_guest.h" | 5 #include "content/browser/frame_host/render_widget_host_view_guest.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 } | 243 } |
| 244 | 244 |
| 245 gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { | 245 gfx::Size RenderWidgetHostViewGuest::GetPhysicalBackingSize() const { |
| 246 return RenderWidgetHostViewBase::GetPhysicalBackingSize(); | 246 return RenderWidgetHostViewBase::GetPhysicalBackingSize(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 base::string16 RenderWidgetHostViewGuest::GetSelectedText() { | 249 base::string16 RenderWidgetHostViewGuest::GetSelectedText() { |
| 250 return platform_view_->GetSelectedText(); | 250 return platform_view_->GetSelectedText(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void RenderWidgetHostViewGuest::SetNeedsBeginFrames( | |
| 254 bool needs_begin_frames) { | |
| 255 RenderWidgetHostViewChildFrame::SetNeedsBeginFrames(needs_begin_frames); | |
|
no sievers
2016/08/15 17:39:13
Is this an intentional change in behavior that now
enne (OOO)
2016/08/15 20:49:36
That's fair. Previously this would only go to the
| |
| 256 if (platform_view_) | |
| 257 platform_view_->SetNeedsBeginFrames(needs_begin_frames); | |
| 258 } | |
| 259 | |
| 253 void RenderWidgetHostViewGuest::SetTooltipText( | 260 void RenderWidgetHostViewGuest::SetTooltipText( |
| 254 const base::string16& tooltip_text) { | 261 const base::string16& tooltip_text) { |
| 255 if (guest_) | 262 if (guest_) |
| 256 guest_->SetTooltipText(tooltip_text); | 263 guest_->SetTooltipText(tooltip_text); |
| 257 } | 264 } |
| 258 | 265 |
| 259 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( | 266 void RenderWidgetHostViewGuest::OnSwapCompositorFrame( |
| 260 uint32_t output_surface_id, | 267 uint32_t output_surface_id, |
| 261 cc::CompositorFrame frame) { | 268 cc::CompositorFrame frame) { |
| 262 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); | 269 TRACE_EVENT0("content", "RenderWidgetHostViewGuest::OnSwapCompositorFrame"); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 315 | 322 |
| 316 ProcessFrameSwappedCallbacks(); | 323 ProcessFrameSwappedCallbacks(); |
| 317 | 324 |
| 318 // If after detaching we are sent a frame, we should finish processing it, and | 325 // If after detaching we are sent a frame, we should finish processing it, and |
| 319 // then we should clear the surface so that we are not holding resources we | 326 // then we should clear the surface so that we are not holding resources we |
| 320 // no longer need. | 327 // no longer need. |
| 321 if (!guest_ || !guest_->attached()) | 328 if (!guest_ || !guest_->attached()) |
| 322 ClearCompositorSurfaceIfNecessary(); | 329 ClearCompositorSurfaceIfNecessary(); |
| 323 } | 330 } |
| 324 | 331 |
| 325 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { | 332 bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) { |
|
no sievers
2016/08/15 17:39:13
Is this unused now?
And can it also be removed fro
enne (OOO)
2016/08/15 20:49:36
Can platform_view be a RenderWidgetHostViewMac? if
| |
| 326 if (!platform_view_) { | 333 if (!platform_view_) { |
| 327 // In theory, we can get here if there's a delay between Destroy() | 334 // In theory, we can get here if there's a delay between Destroy() |
| 328 // being called and when our destructor is invoked. | 335 // being called and when our destructor is invoked. |
| 329 return false; | 336 return false; |
| 330 } | 337 } |
| 331 | 338 |
| 332 return platform_view_->OnMessageReceived(msg); | 339 return platform_view_->OnMessageReceived(msg); |
| 333 } | 340 } |
| 334 | 341 |
| 335 void RenderWidgetHostViewGuest::InitAsChild( | 342 void RenderWidgetHostViewGuest::InitAsChild( |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 gesture_event.data.scrollUpdate.inertialPhase == | 666 gesture_event.data.scrollUpdate.inertialPhase == |
| 660 blink::WebGestureEvent::MomentumPhase) { | 667 blink::WebGestureEvent::MomentumPhase) { |
| 661 return; | 668 return; |
| 662 } | 669 } |
| 663 host_->ForwardGestureEvent(gesture_event); | 670 host_->ForwardGestureEvent(gesture_event); |
| 664 return; | 671 return; |
| 665 } | 672 } |
| 666 } | 673 } |
| 667 | 674 |
| 668 } // namespace content | 675 } // namespace content |
| OLD | NEW |