OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
6 | 6 |
7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
8 #include <malloc.h> | 8 #include <malloc.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "grit/webkit_resources.h" | 27 #include "grit/webkit_resources.h" |
28 #include "grit/webkit_strings.h" | 28 #include "grit/webkit_strings.h" |
29 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" | 29 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" |
30 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" | 30 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" |
31 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" | 31 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" |
32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h" | 32 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h" |
33 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" | 33 #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" |
34 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" | 34 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
35 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" | 35 #include "third_party/WebKit/WebKit/chromium/public/WebVector.h" |
36 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" | 36 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
37 #include "webkit/glue/plugins/plugin_instance.h" | 37 #include "webkit/plugins/npapi/plugin_instance.h" |
38 #include "webkit/glue/plugins/webplugininfo.h" | 38 #include "webkit/plugins/npapi/webplugininfo.h" |
39 #include "webkit/glue/webkit_glue.h" | 39 #include "webkit/glue/webkit_glue.h" |
40 #include "webkit/glue/websocketstreamhandle_impl.h" | 40 #include "webkit/glue/websocketstreamhandle_impl.h" |
41 #include "webkit/glue/weburlloader_impl.h" | 41 #include "webkit/glue/weburlloader_impl.h" |
42 | 42 |
43 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) |
44 #include "v8/include/v8.h" | 44 #include "v8/include/v8.h" |
45 #endif | 45 #endif |
46 | 46 |
47 using WebKit::WebCookie; | 47 using WebKit::WebCookie; |
48 using WebKit::WebData; | 48 using WebKit::WebData; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() { | 216 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() { |
217 return new WebSocketStreamHandleImpl(); | 217 return new WebSocketStreamHandleImpl(); |
218 } | 218 } |
219 | 219 |
220 WebString WebKitClientImpl::userAgent(const WebURL& url) { | 220 WebString WebKitClientImpl::userAgent(const WebURL& url) { |
221 return WebString::fromUTF8(webkit_glue::GetUserAgent(url)); | 221 return WebString::fromUTF8(webkit_glue::GetUserAgent(url)); |
222 } | 222 } |
223 | 223 |
224 void WebKitClientImpl::getPluginList(bool refresh, | 224 void WebKitClientImpl::getPluginList(bool refresh, |
225 WebPluginListBuilder* builder) { | 225 WebPluginListBuilder* builder) { |
226 std::vector<WebPluginInfo> plugins; | 226 std::vector<webkit::npapi::WebPluginInfo> plugins; |
227 GetPlugins(refresh, &plugins); | 227 GetPlugins(refresh, &plugins); |
228 | 228 |
229 for (size_t i = 0; i < plugins.size(); ++i) { | 229 for (size_t i = 0; i < plugins.size(); ++i) { |
230 const WebPluginInfo& plugin = plugins[i]; | 230 const webkit::npapi::WebPluginInfo& plugin = plugins[i]; |
231 | 231 |
232 builder->addPlugin( | 232 builder->addPlugin( |
233 plugin.name, plugin.desc, | 233 plugin.name, plugin.desc, |
234 FilePathStringToWebString(plugin.path.BaseName().value())); | 234 FilePathStringToWebString(plugin.path.BaseName().value())); |
235 | 235 |
236 for (size_t j = 0; j < plugin.mime_types.size(); ++j) { | 236 for (size_t j = 0; j < plugin.mime_types.size(); ++j) { |
237 const WebPluginMimeType& mime_type = plugin.mime_types[j]; | 237 const webkit::npapi::WebPluginMimeType& mime_type = plugin.mime_types[j]; |
238 | 238 |
239 builder->addMediaTypeToLastPlugin( | 239 builder->addMediaTypeToLastPlugin( |
240 WebString::fromUTF8(mime_type.mime_type), mime_type.description); | 240 WebString::fromUTF8(mime_type.mime_type), mime_type.description); |
241 | 241 |
242 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) { | 242 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) { |
243 builder->addFileExtensionToLastMediaType( | 243 builder->addFileExtensionToLastMediaType( |
244 UTF8ToUTF16(mime_type.file_extensions[k])); | 244 UTF8ToUTF16(mime_type.file_extensions[k])); |
245 } | 245 } |
246 } | 246 } |
247 } | 247 } |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 ++shared_timer_suspended_; | 528 ++shared_timer_suspended_; |
529 } | 529 } |
530 | 530 |
531 void WebKitClientImpl::ResumeSharedTimer() { | 531 void WebKitClientImpl::ResumeSharedTimer() { |
532 // The shared timer may have fired or been adjusted while we were suspended. | 532 // The shared timer may have fired or been adjusted while we were suspended. |
533 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 533 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
534 setSharedTimerFireTime(shared_timer_fire_time_); | 534 setSharedTimerFireTime(shared_timer_fire_time_); |
535 } | 535 } |
536 | 536 |
537 } // namespace webkit_glue | 537 } // namespace webkit_glue |
OLD | NEW |