Disable signin-to-Chrome when using Guest profile.
[chromium-blink-merge.git] / content / child / webkitplatformsupport_impl.cc
blob99b1632f3648a085209dfa7780a6c1f782c2bee6
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/webcrypto/webcrypto_impl.h"
9 #include "content/child/webkitplatformsupport_impl.h"
10 #include "content/child/websocket_bridge.h"
11 #include "content/public/common/content_client.h"
13 namespace content {
15 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
18 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
21 base::string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) {
22 return GetContentClient()->GetLocalizedString(message_id);
25 base::StringPiece WebKitPlatformSupportImpl::GetDataResource(
26 int resource_id,
27 ui::ScaleFactor scale_factor) {
28 return GetContentClient()->GetDataResource(resource_id, scale_factor);
31 webkit_glue::ResourceLoaderBridge*
32 WebKitPlatformSupportImpl::CreateResourceLoader(
33 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
34 return ChildThread::current()->CreateBridge(request_info);
37 WebSocketStreamHandleBridge*
38 WebKitPlatformSupportImpl::CreateWebSocketStreamBridge(
39 blink::WebSocketStreamHandle* handle,
40 WebSocketStreamHandleDelegate* delegate) {
41 SocketStreamDispatcher* dispatcher =
42 ChildThread::current()->socket_stream_dispatcher();
43 return dispatcher->CreateBridge(handle, delegate);
46 blink::WebSocketHandle* WebKitPlatformSupportImpl::createWebSocketHandle() {
47 return new WebSocketBridge;
50 blink::WebCrypto* WebKitPlatformSupportImpl::crypto() {
51 if (!web_crypto_)
52 web_crypto_.reset(new WebCryptoImpl());
53 return web_crypto_.get();
56 } // namespace content