| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 content::RenderFrameHost::FromID(render_process_id, | 167 content::RenderFrameHost::FromID(render_process_id, |
| 168 render_frame_id))); | 168 render_frame_id))); |
| 169 return aw_contents; | 169 return aw_contents; |
| 170 } | 170 } |
| 171 | 171 |
| 172 AwContents::AwContents(std::unique_ptr<WebContents> web_contents) | 172 AwContents::AwContents(std::unique_ptr<WebContents> web_contents) |
| 173 : content::WebContentsObserver(web_contents.get()), | 173 : content::WebContentsObserver(web_contents.get()), |
| 174 functor_(nullptr), | 174 functor_(nullptr), |
| 175 browser_view_renderer_( | 175 browser_view_renderer_( |
| 176 this, | 176 this, |
| 177 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), | 177 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)), |
| 178 web_contents_(std::move(web_contents)), | 178 web_contents_(std::move(web_contents)), |
| 179 renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) { | 179 renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) { |
| 180 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1); | 180 base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1); |
| 181 icon_helper_.reset(new IconHelper(web_contents_.get())); | 181 icon_helper_.reset(new IconHelper(web_contents_.get())); |
| 182 icon_helper_->SetListener(this); | 182 icon_helper_->SetListener(this); |
| 183 web_contents_->SetUserData(android_webview::kAwContentsUserDataKey, | 183 web_contents_->SetUserData(android_webview::kAwContentsUserDataKey, |
| 184 new AwContentsUserData(this)); | 184 new AwContentsUserData(this)); |
| 185 browser_view_renderer_.RegisterWithWebContents(web_contents_.get()); | 185 browser_view_renderer_.RegisterWithWebContents(web_contents_.get()); |
| 186 | 186 |
| 187 CompositorID compositor_id; | 187 CompositorID compositor_id; |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 int routing_id = new_host->GetRoutingID(); | 1304 int routing_id = new_host->GetRoutingID(); |
| 1305 // At this point, the current RVH may or may not contain a compositor. So | 1305 // At this point, the current RVH may or may not contain a compositor. So |
| 1306 // compositor_ may be nullptr, in which case | 1306 // compositor_ may be nullptr, in which case |
| 1307 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the | 1307 // BrowserViewRenderer::DidInitializeCompositor() callback is time when the |
| 1308 // new compositor is constructed. | 1308 // new compositor is constructed. |
| 1309 browser_view_renderer_.SetActiveCompositorID( | 1309 browser_view_renderer_.SetActiveCompositorID( |
| 1310 CompositorID(process_id, routing_id)); | 1310 CompositorID(process_id, routing_id)); |
| 1311 } | 1311 } |
| 1312 | 1312 |
| 1313 } // namespace android_webview | 1313 } // namespace android_webview |
| OLD | NEW |