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