| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 float scale_factor, | 138 float scale_factor, |
| 139 const cc::SurfaceSequence& sequence) override { | 139 const cc::SurfaceSequence& sequence) override { |
| 140 last_surface_id_received_ = surface_id; | 140 last_surface_id_received_ = surface_id; |
| 141 last_frame_size_received_ = frame_size; | 141 last_frame_size_received_ = frame_size; |
| 142 last_scale_factor_received_ = scale_factor; | 142 last_scale_factor_received_ = scale_factor; |
| 143 } | 143 } |
| 144 | 144 |
| 145 cc::SurfaceId last_surface_id_received_; | 145 cc::SurfaceId last_surface_id_received_; |
| 146 gfx::Size last_frame_size_received_; | 146 gfx::Size last_frame_size_received_; |
| 147 float last_scale_factor_received_; | 147 float last_scale_factor_received_; |
| 148 float update_scale_factor_received_; | |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 // TODO(wjmaclean): we should restructure RenderWidgetHostViewChildFrameTest to | 150 // TODO(wjmaclean): we should restructure RenderWidgetHostViewChildFrameTest to |
| 152 // look more like this one, and then this one could be derived from it. Also, | 151 // look more like this one, and then this one could be derived from it. Also, |
| 153 // include CreateDelegatedFrame as part of the test class so we don't have to | 152 // include CreateDelegatedFrame as part of the test class so we don't have to |
| 154 // repeat it here. | 153 // repeat it here. |
| 155 class RenderWidgetHostViewGuestSurfaceTest | 154 class RenderWidgetHostViewGuestSurfaceTest |
| 156 : public testing::Test { | 155 : public testing::Test { |
| 157 public: | 156 public: |
| 158 RenderWidgetHostViewGuestSurfaceTest() | 157 RenderWidgetHostViewGuestSurfaceTest() |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 290 |
| 292 browser_plugin_guest_->set_attached(false); | 291 browser_plugin_guest_->set_attached(false); |
| 293 browser_plugin_guest_->ResetTestData(); | 292 browser_plugin_guest_->ResetTestData(); |
| 294 | 293 |
| 295 view_->OnSwapCompositorFrame( | 294 view_->OnSwapCompositorFrame( |
| 296 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); | 295 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); |
| 297 EXPECT_TRUE(surface_id().is_null()); | 296 EXPECT_TRUE(surface_id().is_null()); |
| 298 } | 297 } |
| 299 | 298 |
| 300 } // namespace content | 299 } // namespace content |
| OLD | NEW |