OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 compositor_.get(), compositor_.get(), animation_host.get(), | 1276 compositor_.get(), compositor_.get(), animation_host.get(), |
1277 compositor_deps_, device_scale_factor_, screen_info_); | 1277 compositor_deps_, device_scale_factor_, screen_info_); |
1278 compositor_->Initialize(std::move(layer_tree_host), | 1278 compositor_->Initialize(std::move(layer_tree_host), |
1279 std::move(animation_host)); | 1279 std::move(animation_host)); |
1280 | 1280 |
1281 compositor_->SetIsForOopif(for_oopif_); | 1281 compositor_->SetIsForOopif(for_oopif_); |
1282 compositor_->setViewportSize(physical_backing_size_); | 1282 compositor_->setViewportSize(physical_backing_size_); |
1283 OnDeviceScaleFactorChanged(); | 1283 OnDeviceScaleFactorChanged(); |
1284 compositor_->SetRasterColorSpace(screen_info_.icc_profile.GetColorSpace()); | 1284 compositor_->SetRasterColorSpace(screen_info_.icc_profile.GetColorSpace()); |
1285 compositor_->SetContentSourceId(current_content_source_id_); | 1285 compositor_->SetContentSourceId(current_content_source_id_); |
| 1286 #if defined(USE_AURA) |
| 1287 RendererWindowTreeClient* window_tree_client = |
| 1288 RendererWindowTreeClient::Get(routing_id_); |
| 1289 if (window_tree_client) |
| 1290 compositor_->SetLocalSurfaceId(window_tree_client->local_surface_id()); |
| 1291 #endif |
1286 // For background pages and certain tests, we don't want to trigger | 1292 // For background pages and certain tests, we don't want to trigger |
1287 // CompositorFrameSink creation. | 1293 // CompositorFrameSink creation. |
1288 if (compositor_never_visible_ || !RenderThreadImpl::current()) | 1294 if (compositor_never_visible_ || !RenderThreadImpl::current()) |
1289 compositor_->SetNeverVisible(); | 1295 compositor_->SetNeverVisible(); |
1290 | 1296 |
1291 StartCompositor(); | 1297 StartCompositor(); |
1292 DCHECK_NE(MSG_ROUTING_NONE, routing_id_); | 1298 DCHECK_NE(MSG_ROUTING_NONE, routing_id_); |
1293 compositor_->SetFrameSinkId( | 1299 compositor_->SetFrameSinkId( |
1294 cc::FrameSinkId(RenderThread::Get()->GetClientId(), routing_id_)); | 1300 cc::FrameSinkId(RenderThread::Get()->GetClientId(), routing_id_)); |
1295 | 1301 |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 // browser side (https://crbug.com/669219). | 2331 // browser side (https://crbug.com/669219). |
2326 // If there is no WebFrameWidget, then there will be no | 2332 // If there is no WebFrameWidget, then there will be no |
2327 // InputMethodControllers for a WebLocalFrame. | 2333 // InputMethodControllers for a WebLocalFrame. |
2328 return nullptr; | 2334 return nullptr; |
2329 } | 2335 } |
2330 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2336 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
2331 ->getActiveWebInputMethodController(); | 2337 ->getActiveWebInputMethodController(); |
2332 } | 2338 } |
2333 | 2339 |
2334 } // namespace content | 2340 } // namespace content |
OLD | NEW |