[content shell] hook up testRunner.dumpEditingCallbacks
[chromium-blink-merge.git] / content / common / webkitplatformsupport_impl.h
blob889fb753da73c7a6828c2cd6a6f5c007650c4594
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_CONTENT_WEBKITPLATFORMSUPPORT_IMPL_H_
6 #define CONTENT_COMMON_CONTENT_WEBKITPLATFORMSUPPORT_IMPL_H_
8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h"
10 #include "ui/base/layout.h"
11 #include "webkit/glue/webkitplatformsupport_impl.h"
13 namespace content {
14 class GpuChannelHostFactory;
16 // This is a specialization of WebKitPlatformSupportImpl that implements the
17 // embedder functions in terms of ContentClient.
18 class CONTENT_EXPORT WebKitPlatformSupportImpl
19 : NON_EXPORTED_BASE(public webkit_glue::WebKitPlatformSupportImpl) {
20 public:
21 typedef WebKit::WebGraphicsContext3D* (OffscreenContextFactory)();
23 WebKitPlatformSupportImpl();
24 virtual ~WebKitPlatformSupportImpl();
26 virtual string16 GetLocalizedString(int message_id) OVERRIDE;
27 virtual base::StringPiece GetDataResource(
28 int resource_id,
29 ui::ScaleFactor scale_factor) OVERRIDE;
30 virtual void GetPlugins(bool refresh,
31 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
32 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
33 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
34 OVERRIDE;
35 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
36 WebKit::WebSocketStreamHandle* handle,
37 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE;
38 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
39 const WebKit::WebGraphicsContext3D::Attributes& attributes);
41 static void SetOffscreenContextFactoryForTest(
42 OffscreenContextFactory factory);
44 protected:
45 virtual GpuChannelHostFactory* GetGpuChannelHostFactory();
48 } // namespace content
50 #endif // CONTENT_COMMON_CONTENT_WEBKITPLATFORMSUPPORT_IMPL_H_