OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // This file provides the embedder's side of random webkit glue functions. | 5 // This file provides the embedder's side of random webkit glue functions. |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <wininet.h> | 8 #include <wininet.h> |
9 | 9 |
10 #include "base/clipboard.h" | 10 #include "base/clipboard.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 129 } |
130 #endif | 130 #endif |
131 | 131 |
132 g_render_thread->Send( | 132 g_render_thread->Send( |
133 new ViewHostMsg_ClipboardWriteObjectsAsync(objects_)); | 133 new ViewHostMsg_ClipboardWriteObjectsAsync(objects_)); |
134 } | 134 } |
135 | 135 |
136 namespace webkit_glue { | 136 namespace webkit_glue { |
137 | 137 |
138 bool IsMediaPlayerAvailable() { | 138 bool IsMediaPlayerAvailable() { |
139 return CommandLine().HasSwitch(switches::kEnableVideo); | 139 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableVideo); |
140 } | 140 } |
141 | 141 |
142 void PrefetchDns(const std::string& hostname) { | 142 void PrefetchDns(const std::string& hostname) { |
143 if (!hostname.empty()) | 143 if (!hostname.empty()) |
144 DnsPrefetchCString(hostname.c_str(), hostname.length()); | 144 DnsPrefetchCString(hostname.c_str(), hostname.length()); |
145 } | 145 } |
146 | 146 |
147 void PrecacheUrl(const wchar_t* url, int url_length) { | 147 void PrecacheUrl(const wchar_t* url, int url_length) { |
148 // TBD: jar: Need implementation that loads the targetted URL into our cache. | 148 // TBD: jar: Need implementation that loads the targetted URL into our cache. |
149 // For now, at least prefetch DNS lookup | 149 // For now, at least prefetch DNS lookup |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // NOTE: Since this can be called from the plugin process, we might not have | 325 // NOTE: Since this can be called from the plugin process, we might not have |
326 // a RenderThread. Do nothing in that case. | 326 // a RenderThread. Do nothing in that case. |
327 if (g_render_thread) | 327 if (g_render_thread) |
328 g_render_thread->InformHostOfCacheStatsLater(); | 328 g_render_thread->InformHostOfCacheStatsLater(); |
329 } | 329 } |
330 | 330 |
331 #endif // !USING_SIMPLE_RESOURCE_LOADER_BRIDGE | 331 #endif // !USING_SIMPLE_RESOURCE_LOADER_BRIDGE |
332 | 332 |
333 } // namespace webkit_glue | 333 } // namespace webkit_glue |
334 | 334 |
OLD | NEW |