Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: content/common/content_webkitplatformsupport_impl.cc

Issue 8602002: Move some webkit_glue embedder functions into WebKitPlatformSupport virtual methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review nits Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698