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

Unified Diff: content/common/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: copyright year Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/webkitplatformsupport_impl.cc
diff --git a/content/common/webkitplatformsupport_impl.cc b/content/common/webkitplatformsupport_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3a32adf1f27cb7df91fc0a80c8eba418d020937c
--- /dev/null
+++ b/content/common/webkitplatformsupport_impl.cc
@@ -0,0 +1,49 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/child_thread.h"
+#include "content/common/socket_stream_dispatcher.h"
+#include "content/common/webkitplatformsupport_impl.h"
+#include "content/public/common/content_client.h"
+
+namespace content {
+
+WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
+}
+
+WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
+}
+
+string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) {
+ return content::GetContentClient()->GetLocalizedString(message_id);
+}
+
+base::StringPiece WebKitPlatformSupportImpl::GetDataResource(
+ int resource_id) {
+ return content::GetContentClient()->GetDataResource(resource_id);
+}
+
+void WebKitPlatformSupportImpl::GetPlugins(
+ bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
+ // This should not be called except in the renderer.
+ // RendererWebKitPlatformSupportImpl overrides this.
+ NOTREACHED();
+}
+
+webkit_glue::ResourceLoaderBridge*
+WebKitPlatformSupportImpl::CreateResourceLoader(
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
+ return ChildThread::current()->CreateBridge(request_info);
+}
+
+webkit_glue::WebSocketStreamHandleBridge*
+WebKitPlatformSupportImpl::CreateWebSocketBridge(
+ WebKit::WebSocketStreamHandle* handle,
+ webkit_glue::WebSocketStreamHandleDelegate* delegate) {
+ SocketStreamDispatcher* dispatcher =
+ ChildThread::current()->socket_stream_dispatcher();
+ return dispatcher->CreateBridge(handle, delegate);
+}
+
+} // namespace content
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698