Chromium Code Reviews| 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/renderer/aw_content_renderer_client.h" | 5 #include "android_webview/renderer/aw_content_renderer_client.h" |
| 6 | 6 |
| 7 #include "android_webview/common/aw_resource.h" | 7 #include "android_webview/common/aw_resource.h" |
| 8 #include "android_webview/common/aw_switches.h" | |
| 9 #include "android_webview/common/graphic_buffer_factory_proxy.h" | |
| 8 #include "android_webview/common/url_constants.h" | 10 #include "android_webview/common/url_constants.h" |
| 9 #include "android_webview/renderer/aw_render_view_ext.h" | 11 #include "android_webview/renderer/aw_render_view_ext.h" |
| 10 #include "android_webview/renderer/view_renderer.h" | 12 #include "android_webview/renderer/view_renderer.h" |
| 13 #include "base/command_line.h" | |
| 11 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 12 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 13 #include "components/visitedlink/renderer/visitedlink_slave.h" | 16 #include "components/visitedlink/renderer/visitedlink_slave.h" |
| 14 #include "content/public/renderer/render_thread.h" | 17 #include "content/public/renderer/render_thread.h" |
| 15 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
| 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" | 21 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" |
| 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" | 22 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 } | 103 } |
| 101 | 104 |
| 102 MessageLoop* AwContentRendererClient::OverrideCompositorMessageLoop() const { | 105 MessageLoop* AwContentRendererClient::OverrideCompositorMessageLoop() const { |
| 103 return (*compositor_message_loop_getter_)(); | 106 return (*compositor_message_loop_getter_)(); |
| 104 } | 107 } |
| 105 | 108 |
| 106 bool AwContentRendererClient::ShouldCreateCompositorInputHandler() const { | 109 bool AwContentRendererClient::ShouldCreateCompositorInputHandler() const { |
| 107 return should_create_compositor_input_handler_; | 110 return should_create_compositor_input_handler_; |
| 108 } | 111 } |
| 109 | 112 |
| 113 cc::GraphicBuffer::Factory | |
| 114 AwContentRendererClient::GetGraphicBufferFactory() const { | |
| 115 return CommandLine::ForCurrentProcess()->HasSwitch( | |
| 116 switches::kUseZeroCopyBuffers) | |
|
joth
2013/04/02 19:12:11
rather than check the switch here, I'd do it once-
kaanb
2013/04/02 23:16:54
Done.
| |
| 117 ? GetGraphicBufferFactoryProxy() : cc::GraphicBuffer::Factory(); | |
| 118 } | |
| 119 | |
| 110 } // namespace android_webview | 120 } // namespace android_webview |
| OLD | NEW |