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/renderer/child_frame_compositing_helper.h" | 5 #include "content/renderer/child_frame_compositing_helper.h" |
| 6 | 6 |
| 7 #include "cc/blink/web_layer_impl.h" | 7 #include "cc/blink/web_layer_impl.h" |
| 8 #include "cc/layers/delegated_frame_provider.h" | 8 #include "cc/layers/delegated_frame_provider.h" |
| 9 #include "cc/layers/delegated_frame_resource_collection.h" | 9 #include "cc/layers/delegated_frame_resource_collection.h" |
| 10 #include "cc/layers/delegated_renderer_layer.h" | 10 #include "cc/layers/delegated_renderer_layer.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 : host_routing_id_(host_routing_id), | 54 : host_routing_id_(host_routing_id), |
| 55 last_route_id_(0), | 55 last_route_id_(0), |
| 56 last_output_surface_id_(0), | 56 last_output_surface_id_(0), |
| 57 last_host_id_(0), | 57 last_host_id_(0), |
| 58 ack_pending_(true), | 58 ack_pending_(true), |
| 59 opaque_(true), | 59 opaque_(true), |
| 60 browser_plugin_(browser_plugin), | 60 browser_plugin_(browser_plugin), |
| 61 render_frame_proxy_(render_frame_proxy), | 61 render_frame_proxy_(render_frame_proxy), |
| 62 frame_(frame) {} | 62 frame_(frame) {} |
| 63 | 63 |
| 64 ChildFrameCompositingHelper::~ChildFrameCompositingHelper() {} | 64 ChildFrameCompositingHelper::~ChildFrameCompositingHelper() { |
| 65 if (resource_collection_.get()) | |
| 66 resource_collection_->SetClient(NULL); | |
|
danakj
2015/02/03 20:07:42
Destruction implies the child compositor is shutti
lfg
2015/02/03 20:26:22
The child compositor is shutting down. I'm not sur
danakj
2015/02/03 20:40:10
Right. But if you just drop the client, you'll lea
| |
| 67 } | |
| 65 | 68 |
| 66 BrowserPluginManager* ChildFrameCompositingHelper::GetBrowserPluginManager() { | 69 BrowserPluginManager* ChildFrameCompositingHelper::GetBrowserPluginManager() { |
| 67 if (!browser_plugin_) | 70 if (!browser_plugin_) |
| 68 return NULL; | 71 return NULL; |
| 69 | 72 |
| 70 return BrowserPluginManager::Get(); | 73 return BrowserPluginManager::Get(); |
| 71 } | 74 } |
| 72 | 75 |
| 73 blink::WebPluginContainer* ChildFrameCompositingHelper::GetContainer() { | 76 blink::WebPluginContainer* ChildFrameCompositingHelper::GetContainer() { |
| 74 if (!browser_plugin_) | 77 if (!browser_plugin_) |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 SendReclaimCompositorResourcesToBrowser(params); | 283 SendReclaimCompositorResourcesToBrowser(params); |
| 281 } | 284 } |
| 282 | 285 |
| 283 void ChildFrameCompositingHelper::SetContentsOpaque(bool opaque) { | 286 void ChildFrameCompositingHelper::SetContentsOpaque(bool opaque) { |
| 284 opaque_ = opaque; | 287 opaque_ = opaque; |
| 285 if (delegated_layer_.get()) | 288 if (delegated_layer_.get()) |
| 286 delegated_layer_->SetContentsOpaque(opaque_); | 289 delegated_layer_->SetContentsOpaque(opaque_); |
| 287 } | 290 } |
| 288 | 291 |
| 289 } // namespace content | 292 } // namespace content |
| OLD | NEW |