OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/common/child_thread.h" |
| 6 #include "content/common/socket_stream_dispatcher.h" |
| 7 #include "content/common/webkitplatformsupport_impl.h" |
| 8 #include "content/public/common/content_client.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() { |
| 13 } |
| 14 |
| 15 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() { |
| 16 } |
| 17 |
| 18 string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) { |
| 19 return content::GetContentClient()->GetLocalizedString(message_id); |
| 20 } |
| 21 |
| 22 base::StringPiece WebKitPlatformSupportImpl::GetDataResource( |
| 23 int resource_id) { |
| 24 return content::GetContentClient()->GetDataResource(resource_id); |
| 25 } |
| 26 |
| 27 void WebKitPlatformSupportImpl::GetPlugins( |
| 28 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { |
| 29 // This should not be called except in the renderer. |
| 30 // RendererWebKitPlatformSupportImpl overrides this. |
| 31 NOTREACHED(); |
| 32 } |
| 33 |
| 34 webkit_glue::ResourceLoaderBridge* |
| 35 WebKitPlatformSupportImpl::CreateResourceLoader( |
| 36 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { |
| 37 return ChildThread::current()->CreateBridge(request_info); |
| 38 } |
| 39 |
| 40 webkit_glue::WebSocketStreamHandleBridge* |
| 41 WebKitPlatformSupportImpl::CreateWebSocketBridge( |
| 42 WebKit::WebSocketStreamHandle* handle, |
| 43 webkit_glue::WebSocketStreamHandleDelegate* delegate) { |
| 44 SocketStreamDispatcher* dispatcher = |
| 45 ChildThread::current()->socket_stream_dispatcher(); |
| 46 return dispatcher->CreateBridge(handle, delegate); |
| 47 } |
| 48 |
| 49 } // namespace content |
OLD | NEW |