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

Unified Diff: ui/gfx/compositor/test/compositor_test_support.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/worker/worker_webkitplatformsupport_impl.h ('k') | webkit/glue/resource_loader_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/test/compositor_test_support.cc
diff --git a/ui/gfx/compositor/test/compositor_test_support.cc b/ui/gfx/compositor/test/compositor_test_support.cc
index 169957ac235252671fe4c3d1d27751c8e6719693..20b0f49c2f8f8b44544386e0145ba4c9560d5fb4 100644
--- a/ui/gfx/compositor/test/compositor_test_support.cc
+++ b/ui/gfx/compositor/test/compositor_test_support.cc
@@ -5,6 +5,7 @@
#include "ui/gfx/compositor/test/compositor_test_support.h"
#if defined(USE_WEBKIT_COMPOSITOR)
+#include "base/compiler_specific.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/webkitplatformsupport_impl.h"
#endif
@@ -12,13 +13,43 @@
namespace ui {
#if defined(USE_WEBKIT_COMPOSITOR)
-static webkit_glue::WebKitPlatformSupportImpl* g_webkit_support;
+class CompositorTestPlatformSupport:
+ public NON_EXPORTED_BASE(webkit_glue::WebKitPlatformSupportImpl) {
+ public:
+ virtual string16 GetLocalizedString(int message_id) OVERRIDE {
+ return string16();
+ }
+
+ virtual base::StringPiece GetDataResource(int resource_id) OVERRIDE {
+ return base::StringPiece();
+ }
+
+ virtual void GetPlugins(
+ bool refresh, std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE {
+ }
+
+ virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
+ const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
+ OVERRIDE {
+ NOTREACHED();
+ return NULL;
+ }
+
+ virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
+ WebKit::WebSocketStreamHandle* handle,
+ webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE {
+ NOTREACHED();
+ return NULL;
+ }
+};
+
+static CompositorTestPlatformSupport* g_webkit_support;
#endif
void CompositorTestSupport::Initialize() {
#if defined(USE_WEBKIT_COMPOSITOR)
DCHECK(!g_webkit_support);
- g_webkit_support = new webkit_glue::WebKitPlatformSupportImpl;
+ g_webkit_support = new CompositorTestPlatformSupport;
WebKit::initialize(g_webkit_support);
#endif
}
« no previous file with comments | « content/worker/worker_webkitplatformsupport_impl.h ('k') | webkit/glue/resource_loader_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698