| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 20 matching lines...) Expand all Loading... |
| 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h" | 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h" |
| 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" | 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" |
| 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
| 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginListBuilder.
h" | 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginListBuilder.
h" |
| 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" | 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" |
| 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" |
| 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
| 39 #include "webkit/glue/media/audio_decoder.h" | 39 #include "webkit/glue/media/audio_decoder.h" |
| 40 #include "webkit/plugins/npapi/plugin_instance.h" | 40 #include "webkit/plugins/npapi/plugin_instance.h" |
| 41 #include "webkit/plugins/npapi/webplugininfo.h" | 41 #include "webkit/plugins/webplugininfo.h" |
| 42 #include "webkit/glue/webkit_glue.h" | 42 #include "webkit/glue/webkit_glue.h" |
| 43 #include "webkit/glue/websocketstreamhandle_impl.h" | 43 #include "webkit/glue/websocketstreamhandle_impl.h" |
| 44 #include "webkit/glue/weburlloader_impl.h" | 44 #include "webkit/glue/weburlloader_impl.h" |
| 45 | 45 |
| 46 #if defined(OS_LINUX) | 46 #if defined(OS_LINUX) |
| 47 #include "v8/include/v8.h" | 47 #include "v8/include/v8.h" |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 using WebKit::WebAudioBus; | 50 using WebKit::WebAudioBus; |
| 51 using WebKit::WebCookie; | 51 using WebKit::WebCookie; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() { | 226 WebSocketStreamHandle* WebKitClientImpl::createSocketStreamHandle() { |
| 227 return new WebSocketStreamHandleImpl(); | 227 return new WebSocketStreamHandleImpl(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 WebString WebKitClientImpl::userAgent(const WebURL& url) { | 230 WebString WebKitClientImpl::userAgent(const WebURL& url) { |
| 231 return WebString::fromUTF8(webkit_glue::GetUserAgent(url)); | 231 return WebString::fromUTF8(webkit_glue::GetUserAgent(url)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 void WebKitClientImpl::getPluginList(bool refresh, | 234 void WebKitClientImpl::getPluginList(bool refresh, |
| 235 WebPluginListBuilder* builder) { | 235 WebPluginListBuilder* builder) { |
| 236 std::vector<webkit::npapi::WebPluginInfo> plugins; | 236 std::vector<webkit::WebPluginInfo> plugins; |
| 237 GetPlugins(refresh, &plugins); | 237 GetPlugins(refresh, &plugins); |
| 238 | 238 |
| 239 for (size_t i = 0; i < plugins.size(); ++i) { | 239 for (size_t i = 0; i < plugins.size(); ++i) { |
| 240 const webkit::npapi::WebPluginInfo& plugin = plugins[i]; | 240 const webkit::WebPluginInfo& plugin = plugins[i]; |
| 241 | 241 |
| 242 builder->addPlugin( | 242 builder->addPlugin( |
| 243 plugin.name, plugin.desc, | 243 plugin.name, plugin.desc, |
| 244 FilePathStringToWebString(plugin.path.BaseName().value())); | 244 FilePathStringToWebString(plugin.path.BaseName().value())); |
| 245 | 245 |
| 246 for (size_t j = 0; j < plugin.mime_types.size(); ++j) { | 246 for (size_t j = 0; j < plugin.mime_types.size(); ++j) { |
| 247 const webkit::npapi::WebPluginMimeType& mime_type = plugin.mime_types[j]; | 247 const webkit::WebPluginMimeType& mime_type = plugin.mime_types[j]; |
| 248 | 248 |
| 249 builder->addMediaTypeToLastPlugin( | 249 builder->addMediaTypeToLastPlugin( |
| 250 WebString::fromUTF8(mime_type.mime_type), mime_type.description); | 250 WebString::fromUTF8(mime_type.mime_type), mime_type.description); |
| 251 | 251 |
| 252 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) { | 252 for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) { |
| 253 builder->addFileExtensionToLastMediaType( | 253 builder->addFileExtensionToLastMediaType( |
| 254 UTF8ToUTF16(mime_type.file_extensions[k])); | 254 UTF8ToUTF16(mime_type.file_extensions[k])); |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 } | 257 } |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 654 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
| 655 #ifdef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING | 655 #ifdef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING |
| 656 setSharedTimerFireInterval( | 656 setSharedTimerFireInterval( |
| 657 monotonicallyIncreasingTime() - shared_timer_fire_time_); | 657 monotonicallyIncreasingTime() - shared_timer_fire_time_); |
| 658 #else | 658 #else |
| 659 setSharedTimerFireTime(shared_timer_fire_time_); | 659 setSharedTimerFireTime(shared_timer_fire_time_); |
| 660 #endif | 660 #endif |
| 661 } | 661 } |
| 662 | 662 |
| 663 } // namespace webkit_glue | 663 } // namespace webkit_glue |
| OLD | NEW |