| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "gpu/ipc/common/gpu_messages.h" | 35 #include "gpu/ipc/common/gpu_messages.h" |
| 36 #include "third_party/WebKit/public/web/WebInputEvent.h" | 36 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 37 #include "ui/gfx/geometry/size_conversions.h" | 37 #include "ui/gfx/geometry/size_conversions.h" |
| 38 #include "ui/gfx/geometry/size_f.h" | 38 #include "ui/gfx/geometry/size_f.h" |
| 39 | 39 |
| 40 namespace content { | 40 namespace content { |
| 41 | 41 |
| 42 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( | 42 RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( |
| 43 RenderWidgetHost* widget_host) | 43 RenderWidgetHost* widget_host) |
| 44 : host_(RenderWidgetHostImpl::From(widget_host)), | 44 : host_(RenderWidgetHostImpl::From(widget_host)), |
| 45 frame_sink_id_(AllocateFrameSinkId()), | 45 frame_sink_id_( |
| 46 base::checked_cast<uint32_t>(widget_host->GetProcess()->GetID()), |
| 47 base::checked_cast<uint32_t>(widget_host->GetRoutingID())), |
| 46 next_surface_sequence_(1u), | 48 next_surface_sequence_(1u), |
| 47 last_compositor_frame_sink_id_(0), | 49 last_compositor_frame_sink_id_(0), |
| 48 current_surface_scale_factor_(1.f), | 50 current_surface_scale_factor_(1.f), |
| 49 ack_pending_count_(0), | 51 ack_pending_count_(0), |
| 50 frame_connector_(nullptr), | 52 frame_connector_(nullptr), |
| 51 begin_frame_source_(nullptr), | 53 begin_frame_source_(nullptr), |
| 52 weak_factory_(this) { | 54 weak_factory_(this) { |
| 53 id_allocator_.reset(new cc::SurfaceIdAllocator(frame_sink_id_)); | 55 id_allocator_.reset(new cc::SurfaceIdAllocator(frame_sink_id_)); |
| 54 GetSurfaceManager()->RegisterFrameSinkId(frame_sink_id_); | 56 GetSurfaceManager()->RegisterFrameSinkId(frame_sink_id_); |
| 55 RegisterFrameSinkId(); | 57 RegisterFrameSinkId(); |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 | 715 |
| 714 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 716 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 715 return true; | 717 return true; |
| 716 } | 718 } |
| 717 | 719 |
| 718 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 720 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 719 return surface_id_; | 721 return surface_id_; |
| 720 }; | 722 }; |
| 721 | 723 |
| 722 } // namespace content | 724 } // namespace content |
| OLD | NEW |