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/scoped_allow_wait_for_legacy_web_view_api.h" | 9 #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" |
10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" | 10 #include "android_webview/lib/aw_browser_dependency_factory_impl.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 gpu::GLInProcessContext::SetGpuMemoryBufferFactory( | 49 gpu::GLInProcessContext::SetGpuMemoryBufferFactory( |
50 gpu_memory_buffer_factory_.get()); | 50 gpu_memory_buffer_factory_.get()); |
51 gpu::InProcessCommandBuffer::EnableVirtualizedContext(); | 51 gpu::InProcessCommandBuffer::EnableVirtualizedContext(); |
52 | 52 |
53 CommandLine* cl = CommandLine::ForCurrentProcess(); | 53 CommandLine* cl = CommandLine::ForCurrentProcess(); |
54 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); | 54 cl->AppendSwitch(switches::kEnableBeginFrameScheduling); |
55 if (!cl->HasSwitch("disable-map-image")) | 55 if (!cl->HasSwitch("disable-map-image")) |
56 cl->AppendSwitch(cc::switches::kUseMapImage); | 56 cl->AppendSwitch(cc::switches::kUseMapImage); |
57 | 57 |
58 // WebView uses the Android system's scrollbars and overscroll glow. | 58 // WebView uses the Android system's scrollbars and overscroll glow. |
59 cl->AppendSwitch(switches::kHideScrollbars); | 59 string hide_scrollbar_switch(cc::switches::kSolidColorScrollbarColor); |
60 hide_scrollbar_switch.append("=0x00000000"); | |
61 cl->AppendSwitch(hide_scrollbar_switch.c_str()); | |
joth
2013/08/15 21:40:07
nit: c_str() not needed
wjmaclean
2013/08/16 13:34:16
Did not know that, thanks!
Done.
| |
60 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); | 62 cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); |
61 | 63 |
62 // Not yet secure in single-process mode. | 64 // Not yet secure in single-process mode. |
63 cl->AppendSwitch(switches::kDisableExperimentalWebGL); | 65 cl->AppendSwitch(switches::kDisableExperimentalWebGL); |
64 | 66 |
65 return false; | 67 return false; |
66 } | 68 } |
67 | 69 |
68 void AwMainDelegate::PreSandboxStartup() { | 70 void AwMainDelegate::PreSandboxStartup() { |
69 // TODO(torne): When we have a separate renderer process, we need to handle | 71 // TODO(torne): When we have a separate renderer process, we need to handle |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 AwBrowserContext* browser_context) { | 125 AwBrowserContext* browser_context) { |
124 return AwGeolocationPermissionContext::Create(browser_context); | 126 return AwGeolocationPermissionContext::Create(browser_context); |
125 } | 127 } |
126 | 128 |
127 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( | 129 content::WebContentsViewDelegate* AwMainDelegate::CreateViewDelegate( |
128 content::WebContents* web_contents) { | 130 content::WebContents* web_contents) { |
129 return AwWebContentsViewDelegate::Create(web_contents); | 131 return AwWebContentsViewDelegate::Create(web_contents); |
130 } | 132 } |
131 | 133 |
132 } // namespace android_webview | 134 } // namespace android_webview |
OLD | NEW |