Chromium Code Reviews| 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" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/single_thread_task_runner.h" | |
| 13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 14 #include "cc/surfaces/surface.h" | 15 #include "cc/surfaces/surface.h" |
| 15 #include "cc/surfaces/surface_factory.h" | 16 #include "cc/surfaces/surface_factory.h" |
| 16 #include "cc/surfaces/surface_manager.h" | 17 #include "cc/surfaces/surface_manager.h" |
| 17 #include "cc/surfaces/surface_sequence.h" | 18 #include "cc/surfaces/surface_sequence.h" |
| 18 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 19 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 19 #include "content/browser/compositor/test/no_transport_image_transport_factory.h " | 20 #include "content/browser/compositor/test/no_transport_image_transport_factory.h " |
| 20 #include "content/browser/gpu/compositor_util.h" | 21 #include "content/browser/gpu/compositor_util.h" |
| 21 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 22 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 22 #include "content/browser/renderer_host/render_widget_host_impl.h" | 23 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 (new TestRenderWidgetHostView(widget_host_))->GetWeakPtr()); | 66 (new TestRenderWidgetHostView(widget_host_))->GetWeakPtr()); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void TearDown() override { | 69 void TearDown() override { |
| 69 if (view_) | 70 if (view_) |
| 70 view_->Destroy(); | 71 view_->Destroy(); |
| 71 delete widget_host_; | 72 delete widget_host_; |
| 72 | 73 |
| 73 browser_context_.reset(); | 74 browser_context_.reset(); |
| 74 | 75 |
| 75 message_loop_.DeleteSoon(FROM_HERE, browser_context_.release()); | 76 message_loop_.task_runner()->DeleteSoon(FROM_HERE, |
| 77 browser_context_.release()); | |
| 76 message_loop_.RunUntilIdle(); | 78 message_loop_.RunUntilIdle(); |
|
ncarter (slow)
2016/06/22 20:51:09
Same question here.
| |
| 77 #if !defined(OS_ANDROID) | 79 #if !defined(OS_ANDROID) |
| 78 ImageTransportFactory::Terminate(); | 80 ImageTransportFactory::Terminate(); |
| 79 #endif | 81 #endif |
| 80 } | 82 } |
| 81 | 83 |
| 82 protected: | 84 protected: |
| 83 base::MessageLoopForUI message_loop_; | 85 base::MessageLoopForUI message_loop_; |
| 84 std::unique_ptr<BrowserContext> browser_context_; | 86 std::unique_ptr<BrowserContext> browser_context_; |
| 85 MockRenderWidgetHostDelegate delegate_; | 87 MockRenderWidgetHostDelegate delegate_; |
| 86 | 88 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 | 285 |
| 284 browser_plugin_guest_->set_attached(false); | 286 browser_plugin_guest_->set_attached(false); |
| 285 browser_plugin_guest_->ResetTestData(); | 287 browser_plugin_guest_->ResetTestData(); |
| 286 | 288 |
| 287 view_->OnSwapCompositorFrame( | 289 view_->OnSwapCompositorFrame( |
| 288 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); | 290 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); |
| 289 EXPECT_TRUE(surface_id().is_null()); | 291 EXPECT_TRUE(surface_id().is_null()); |
| 290 } | 292 } |
| 291 | 293 |
| 292 } // namespace content | 294 } // namespace content |
| OLD | NEW |