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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 : host_(RenderWidgetHostImpl::From(widget_host)), | 43 : host_(RenderWidgetHostImpl::From(widget_host)), |
44 next_surface_sequence_(1u), | 44 next_surface_sequence_(1u), |
45 last_output_surface_id_(0), | 45 last_output_surface_id_(0), |
46 current_surface_scale_factor_(1.f), | 46 current_surface_scale_factor_(1.f), |
47 ack_pending_count_(0), | 47 ack_pending_count_(0), |
48 frame_connector_(nullptr), | 48 frame_connector_(nullptr), |
49 begin_frame_source_(nullptr), | 49 begin_frame_source_(nullptr), |
50 observing_begin_frame_source_(false), | 50 observing_begin_frame_source_(false), |
51 parent_surface_client_id_(0), | 51 parent_surface_client_id_(0), |
52 weak_factory_(this) { | 52 weak_factory_(this) { |
53 id_allocator_ = CreateSurfaceIdAllocator(); | 53 id_allocator_.reset(new cc::SurfaceIdAllocator(AllocateSurfaceClientId())); |
54 RegisterSurfaceNamespaceId(); | 54 RegisterSurfaceNamespaceId(); |
55 | 55 |
56 host_->SetView(this); | 56 host_->SetView(this); |
57 } | 57 } |
58 | 58 |
59 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { | 59 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { |
60 if (!surface_id_.is_null()) | 60 if (!surface_id_.is_null()) |
61 surface_factory_->Destroy(surface_id_); | 61 surface_factory_->Destroy(surface_id_); |
62 } | 62 } |
63 | 63 |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 677 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
678 return true; | 678 return true; |
679 } | 679 } |
680 | 680 |
681 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 681 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
682 return surface_id_; | 682 return surface_id_; |
683 }; | 683 }; |
684 | 684 |
685 } // namespace content | 685 } // namespace content |
OLD | NEW |