1 // Copyright (c) 2012 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.
5 #include "base/command_line.h"
6 #include "content/child/child_thread.h"
7 #include "content/child/socket_stream_dispatcher.h"
8 #include "content/child/webkitplatformsupport_impl.h"
9 #include "content/public/common/content_client.h"
13 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
16 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
19 string16
WebKitPlatformSupportImpl::GetLocalizedString(int message_id
) {
20 return GetContentClient()->GetLocalizedString(message_id
);
23 base::StringPiece
WebKitPlatformSupportImpl::GetDataResource(
25 ui::ScaleFactor scale_factor
) {
26 return GetContentClient()->GetDataResource(resource_id
, scale_factor
);
29 webkit_glue::ResourceLoaderBridge
*
30 WebKitPlatformSupportImpl::CreateResourceLoader(
31 const webkit_glue::ResourceLoaderBridge::RequestInfo
& request_info
) {
32 return ChildThread::current()->CreateBridge(request_info
);
35 webkit_glue::WebSocketStreamHandleBridge
*
36 WebKitPlatformSupportImpl::CreateWebSocketBridge(
37 WebKit::WebSocketStreamHandle
* handle
,
38 webkit_glue::WebSocketStreamHandleDelegate
* delegate
) {
39 SocketStreamDispatcher
* dispatcher
=
40 ChildThread::current()->socket_stream_dispatcher();
41 return dispatcher
->CreateBridge(handle
, delegate
);
44 } // namespace content