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

Side by Side Diff: content/renderer/renderer_glue.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: copyright year 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 // This file provides the embedder's side of random webkit glue functions.
6
7 #include "build/build_config.h"
8
9 #include <vector>
10
11 #include "base/string16.h"
12 #include "base/string_piece.h"
13 #include "content/common/socket_stream_dispatcher.h"
14 #include "content/common/view_messages.h"
15 #include "content/public/common/url_constants.h"
16 #include "content/public/renderer/content_renderer_client.h"
17 #include "content/renderer/render_thread_impl.h"
18 #include "googleurl/src/url_util.h"
19 #include "webkit/glue/webkit_glue.h"
20 #include "webkit/glue/websocketstreamhandle_bridge.h"
21
22 namespace webkit_glue {
23
24 void GetPlugins(bool refresh,
25 std::vector<webkit::WebPluginInfo>* plugins) {
26 if (!RenderThreadImpl::current()->plugin_refresh_allowed())
27 refresh = false;
28 RenderThreadImpl::current()->Send(
29 new ViewHostMsg_GetPlugins(refresh, plugins));
30 }
31
32 // static factory function
33 ResourceLoaderBridge* ResourceLoaderBridge::Create(
34 const ResourceLoaderBridge::RequestInfo& request_info) {
35 return ChildThread::current()->CreateBridge(request_info);
36 }
37
38 // static factory function
39 WebSocketStreamHandleBridge* WebSocketStreamHandleBridge::Create(
40 WebKit::WebSocketStreamHandle* handle,
41 WebSocketStreamHandleDelegate* delegate) {
42 SocketStreamDispatcher* dispatcher =
43 ChildThread::current()->socket_stream_dispatcher();
44 return dispatcher->CreateBridge(handle, delegate);
45 }
46
47 string16 GetLocalizedString(int message_id) {
48 return content::GetContentClient()->GetLocalizedString(message_id);
49 }
50
51 base::StringPiece GetDataResource(int resource_id) {
52 return content::GetContentClient()->GetDataResource(resource_id);
53 }
54
55 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698