| 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 "android_webview/browser/in_process_renderer/in_process_renderer_client
.h" | 5 #include "android_webview/browser/in_process_renderer/in_process_renderer_client
.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/in_process_renderer/in_process_view_renderer.h
" | 7 #include "android_webview/browser/in_process_renderer/in_process_view_renderer.h
" |
| 8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
| 9 #include "content/public/browser/render_process_host.h" | 9 #include "content/public/browser/render_process_host.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 | 23 |
| 24 int id = it.GetCurrentValue()->GetID(); | 24 int id = it.GetCurrentValue()->GetID(); |
| 25 it.Advance(); | 25 it.Advance(); |
| 26 DCHECK(it.IsAtEnd()); // Not multiprocess compatible. | 26 DCHECK(it.IsAtEnd()); // Not multiprocess compatible. |
| 27 return id; | 27 return id; |
| 28 } | 28 } |
| 29 | 29 |
| 30 } | 30 } |
| 31 | 31 |
| 32 MessageLoop* InProcessRendererClient::OverrideCompositorMessageLoop() const { | 32 base::MessageLoop* InProcessRendererClient::OverrideCompositorMessageLoop() |
| 33 MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( | 33 const { |
| 34 base::MessageLoop* rv = content::BrowserThread::UnsafeGetMessageLoopForThread( |
| 34 content::BrowserThread::UI); | 35 content::BrowserThread::UI); |
| 35 DCHECK(rv); | 36 DCHECK(rv); |
| 36 return rv; | 37 return rv; |
| 37 } | 38 } |
| 38 | 39 |
| 39 void InProcessRendererClient::DidCreateSynchronousCompositor( | 40 void InProcessRendererClient::DidCreateSynchronousCompositor( |
| 40 int render_view_id, | 41 int render_view_id, |
| 41 content::SynchronousCompositor* compositor) { | 42 content::SynchronousCompositor* compositor) { |
| 42 InProcessViewRenderer* view_renderer = | 43 InProcessViewRenderer* view_renderer = |
| 43 InProcessViewRenderer::FromId(GetInProcessRendererId(), render_view_id); | 44 InProcessViewRenderer::FromId(GetInProcessRendererId(), render_view_id); |
| 44 if (view_renderer) | 45 if (view_renderer) |
| 45 view_renderer->BindSynchronousCompositor(compositor); | 46 view_renderer->BindSynchronousCompositor(compositor); |
| 46 } | 47 } |
| 47 | 48 |
| 48 bool InProcessRendererClient::ShouldCreateCompositorInputHandler() const { | 49 bool InProcessRendererClient::ShouldCreateCompositorInputHandler() const { |
| 49 // Compositor input handling will be performed by the renderer host | 50 // Compositor input handling will be performed by the renderer host |
| 50 // when UI and compositor threads are merged, so we disable client compositor | 51 // when UI and compositor threads are merged, so we disable client compositor |
| 51 // input handling in this case. | 52 // input handling in this case. |
| 52 return false; | 53 return false; |
| 53 } | 54 } |
| 54 | 55 |
| 55 } // namespace android_webview | 56 } // namespace android_webview |
| OLD | NEW |