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