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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 }; | 145 }; |
146 | 146 |
147 cc::CompositorFrame CreateDelegatedFrame(float scale_factor, | 147 cc::CompositorFrame CreateDelegatedFrame(float scale_factor, |
148 gfx::Size size, | 148 gfx::Size size, |
149 const gfx::Rect& damage) { | 149 const gfx::Rect& damage) { |
150 cc::CompositorFrame frame; | 150 cc::CompositorFrame frame; |
151 frame.metadata.device_scale_factor = scale_factor; | 151 frame.metadata.device_scale_factor = scale_factor; |
152 | 152 |
153 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); | 153 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); |
154 pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage, | 154 pass->SetNew(cc::RenderPassId(1, 1), gfx::Rect(size), damage, |
155 gfx::Transform()); | 155 gfx::Transform(), cc::FilterOperations(), |
| 156 cc::FilterOperations()); |
156 frame.render_pass_list.push_back(std::move(pass)); | 157 frame.render_pass_list.push_back(std::move(pass)); |
157 return frame; | 158 return frame; |
158 } | 159 } |
159 | 160 |
160 TEST_F(RenderWidgetHostViewChildFrameTest, VisibilityTest) { | 161 TEST_F(RenderWidgetHostViewChildFrameTest, VisibilityTest) { |
161 view_->Show(); | 162 view_->Show(); |
162 ASSERT_TRUE(view_->IsShowing()); | 163 ASSERT_TRUE(view_->IsShowing()); |
163 | 164 |
164 view_->Hide(); | 165 view_->Hide(); |
165 ASSERT_FALSE(view_->IsShowing()); | 166 ASSERT_FALSE(view_->IsShowing()); |
(...skipping 25 matching lines...) Expand all Loading... |
191 | 192 |
192 // Surface ID should have been passed to CrossProcessFrameConnector to | 193 // Surface ID should have been passed to CrossProcessFrameConnector to |
193 // be sent to the embedding renderer. | 194 // be sent to the embedding renderer. |
194 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_); | 195 EXPECT_EQ(id, test_frame_connector_->last_surface_id_received_); |
195 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); | 196 EXPECT_EQ(view_size, test_frame_connector_->last_frame_size_received_); |
196 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); | 197 EXPECT_EQ(scale_factor, test_frame_connector_->last_scale_factor_received_); |
197 } | 198 } |
198 } | 199 } |
199 | 200 |
200 } // namespace content | 201 } // namespace content |
OLD | NEW |