| 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/lib/main/aw_main_delegate.h" | 5 #include "android_webview/lib/main/aw_main_delegate.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_content_browser_client.h" | 7 #include "android_webview/browser/aw_content_browser_client.h" |
| 8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" | 8 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h" |
| 9 #include "android_webview/browser/in_process_view_renderer.h" | 9 #include "android_webview/browser/in_process_view_renderer.h" |
| 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" | 10 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 AwMainDelegate::~AwMainDelegate() { | 46 AwMainDelegate::~AwMainDelegate() { |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { | 49 bool AwMainDelegate::BasicStartupComplete(int* exit_code) { |
| 50 content::SetContentClient(&content_client_); | 50 content::SetContentClient(&content_client_); |
| 51 | 51 |
| 52 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 52 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
| 53 gpu_memory_buffer_factory_.get()); | 53 gpu_memory_buffer_factory_.get()); |
| 54 gpu::InProcessCommandBuffer::EnableVirtualizedContext(); | |
| 55 | 54 |
| 56 InProcessViewRenderer::CalculateTileMemoryPolicy(); | 55 InProcessViewRenderer::CalculateTileMemoryPolicy(); |
| 57 | 56 |
| 58 CommandLine* cl = CommandLine::ForCurrentProcess(); | 57 CommandLine* cl = CommandLine::ForCurrentProcess(); |
| 59 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); | 58 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); |
| 60 cl->AppendSwitch(cc::switches::kEnableMapImage); | 59 cl->AppendSwitch(cc::switches::kEnableMapImage); |
| 61 | 60 |
| 62 // WebView uses the Android system's scrollbars and overscroll glow. | 61 // WebView uses the Android system's scrollbars and overscroll glow. |
| 63 cl->AppendSwitch(switches::kHideScrollbars); | 62 cl->AppendSwitch(switches::kHideScrollbars); |
| 64 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 63 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( | 145 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
| 147 content::WebContents* web_contents) { | 146 content::WebContents* web_contents) { |
| 148 return AwWebContentsViewDelegate::Create(web_contents); | 147 return AwWebContentsViewDelegate::Create(web_contents); |
| 149 } | 148 } |
| 150 | 149 |
| 151 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { | 150 AwWebPreferencesPopulater* AwMainDelegate::CreateWebPreferencesPopulater() { |
| 152 return new AwWebPreferencesPopulaterImpl(); | 151 return new AwWebPreferencesPopulaterImpl(); |
| 153 } | 152 } |
| 154 | 153 |
| 155 } // namespace android_webview | 154 } // namespace android_webview |
| OLD | NEW |