| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 #else | 200 #else |
| 201 ui::ContextProviderFactory::SetInstance(nullptr); | 201 ui::ContextProviderFactory::SetInstance(nullptr); |
| 202 ContextProviderFactoryImpl::Terminate(); | 202 ContextProviderFactoryImpl::Terminate(); |
| 203 #endif | 203 #endif |
| 204 } | 204 } |
| 205 | 205 |
| 206 cc::SurfaceId GetSurfaceId() const { | 206 cc::SurfaceId GetSurfaceId() const { |
| 207 DCHECK(view_); | 207 DCHECK(view_); |
| 208 RenderWidgetHostViewChildFrame* rwhvcf = | 208 RenderWidgetHostViewChildFrame* rwhvcf = |
| 209 static_cast<RenderWidgetHostViewChildFrame*>(view_); | 209 static_cast<RenderWidgetHostViewChildFrame*>(view_); |
| 210 if (!rwhvcf->local_frame_id_.is_valid()) | 210 if (!rwhvcf->local_surface_id_.is_valid()) |
| 211 return cc::SurfaceId(); | 211 return cc::SurfaceId(); |
| 212 return cc::SurfaceId(rwhvcf->frame_sink_id_, rwhvcf->local_frame_id_); | 212 return cc::SurfaceId(rwhvcf->frame_sink_id_, rwhvcf->local_surface_id_); |
| 213 } | 213 } |
| 214 | 214 |
| 215 protected: | 215 protected: |
| 216 TestBrowserThreadBundle thread_bundle_; | 216 TestBrowserThreadBundle thread_bundle_; |
| 217 std::unique_ptr<BrowserContext> browser_context_; | 217 std::unique_ptr<BrowserContext> browser_context_; |
| 218 MockRenderWidgetHostDelegate delegate_; | 218 MockRenderWidgetHostDelegate delegate_; |
| 219 BrowserPluginGuestDelegate browser_plugin_guest_delegate_; | 219 BrowserPluginGuestDelegate browser_plugin_guest_delegate_; |
| 220 std::unique_ptr<TestWebContents> web_contents_; | 220 std::unique_ptr<TestWebContents> web_contents_; |
| 221 TestBrowserPluginGuest* browser_plugin_guest_; | 221 TestBrowserPluginGuest* browser_plugin_guest_; |
| 222 | 222 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 303 |
| 304 browser_plugin_guest_->set_attached(false); | 304 browser_plugin_guest_->set_attached(false); |
| 305 browser_plugin_guest_->ResetTestData(); | 305 browser_plugin_guest_->ResetTestData(); |
| 306 | 306 |
| 307 view_->OnSwapCompositorFrame( | 307 view_->OnSwapCompositorFrame( |
| 308 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); | 308 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); |
| 309 EXPECT_FALSE(GetSurfaceId().is_valid()); | 309 EXPECT_FALSE(GetSurfaceId().is_valid()); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace content | 312 } // namespace content |
| OLD | NEW |