OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "android_webview/native/aw_contents.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "android_webview/browser/aw_browser_context.h" | 10 #include "android_webview/browser/aw_browser_context.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 icon_helper_.reset(new IconHelper(web_contents_.get())); | 189 icon_helper_.reset(new IconHelper(web_contents_.get())); |
190 icon_helper_->SetListener(this); | 190 icon_helper_->SetListener(this); |
191 web_contents_->SetUserData(android_webview::kAwContentsUserDataKey, | 191 web_contents_->SetUserData(android_webview::kAwContentsUserDataKey, |
192 new AwContentsUserData(this)); | 192 new AwContentsUserData(this)); |
193 browser_view_renderer_.RegisterWithWebContents(web_contents_.get()); | 193 browser_view_renderer_.RegisterWithWebContents(web_contents_.get()); |
194 | 194 |
195 CompositorID compositor_id; | 195 CompositorID compositor_id; |
196 if (web_contents_->GetRenderProcessHost() && | 196 if (web_contents_->GetRenderProcessHost() && |
197 web_contents_->GetRenderViewHost()) { | 197 web_contents_->GetRenderViewHost()) { |
198 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID(); | 198 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID(); |
199 compositor_id.routing_id = web_contents_->GetRoutingID(); | 199 compositor_id.routing_id = |
| 200 web_contents_->GetRenderViewHost()->GetRoutingID(); |
200 } | 201 } |
201 | 202 |
202 browser_view_renderer_.SetActiveCompositorID(compositor_id); | 203 browser_view_renderer_.SetActiveCompositorID(compositor_id); |
203 render_view_host_ext_.reset( | 204 render_view_host_ext_.reset( |
204 new AwRenderViewHostExt(this, web_contents_.get())); | 205 new AwRenderViewHostExt(this, web_contents_.get())); |
205 | 206 |
206 permission_request_handler_.reset( | 207 permission_request_handler_.reset( |
207 new PermissionRequestHandler(this, web_contents_.get())); | 208 new PermissionRequestHandler(this, web_contents_.get())); |
208 | 209 |
209 AwAutofillClient* autofill_manager_delegate = | 210 AwAutofillClient* autofill_manager_delegate = |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 int routing_id = new_host->GetRoutingID(); | 1271 int routing_id = new_host->GetRoutingID(); |
1271 // At this point, the current RVH may or may not contain a compositor. So | 1272 // At this point, the current RVH may or may not contain a compositor. So |
1272 // compositor_ may be nullptr, in which case | 1273 // compositor_ may be nullptr, in which case |
1273 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1274 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
1274 // new compositor is constructed. | 1275 // new compositor is constructed. |
1275 browser_view_renderer_.SetActiveCompositorID( | 1276 browser_view_renderer_.SetActiveCompositorID( |
1276 CompositorID(process_id, routing_id)); | 1277 CompositorID(process_id, routing_id)); |
1277 } | 1278 } |
1278 | 1279 |
1279 } // namespace android_webview | 1280 } // namespace android_webview |
OLD | NEW |