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

Side by Side Diff: ui/compositor/test/compositor_test_support.cc

Issue 14744016: Remove unnecessary ui::CompositorTestSupport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add compositor_test_support dependency to ui/snapshot and ui/views test targets Created 7 years, 6 months 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
« no previous file with comments | « ui/compositor/test/compositor_test_support.h ('k') | ui/compositor/test/test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "ui/compositor/test/compositor_test_support.h"
6
7 #include "base/compiler_specific.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
9 #include "webkit/glue/webkitplatformsupport_impl.h"
10
11 namespace ui {
12
13 class CompositorTestPlatformSupport:
14 public NON_EXPORTED_BASE(webkit_glue::WebKitPlatformSupportImpl) {
15 public:
16 virtual string16 GetLocalizedString(int message_id) OVERRIDE {
17 return string16();
18 }
19
20 virtual base::StringPiece GetDataResource(
21 int resource_id,
22 ui::ScaleFactor scale_factor) OVERRIDE {
23 return base::StringPiece();
24 }
25
26 virtual void GetPlugins(
27 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE {
28 }
29
30 virtual webkit_glue::ResourceLoaderBridge* CreateResourceLoader(
31 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info)
32 OVERRIDE {
33 NOTREACHED();
34 return NULL;
35 }
36
37 virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketBridge(
38 WebKit::WebSocketStreamHandle* handle,
39 webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE {
40 NOTREACHED();
41 return NULL;
42 }
43 };
44
45 static CompositorTestPlatformSupport* g_webkit_support;
46
47 void CompositorTestSupport::Initialize() {
48 DCHECK(!g_webkit_support);
49 g_webkit_support = new CompositorTestPlatformSupport;
50 WebKit::initialize(g_webkit_support);
51 }
52
53 void CompositorTestSupport::Terminate() {
54 DCHECK(g_webkit_support);
55 WebKit::shutdown();
56 delete g_webkit_support;
57 g_webkit_support = NULL;
58 }
59
60 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/compositor_test_support.h ('k') | ui/compositor/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698