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

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.h

Issue 14682023: Add plumbing for testing API for MockWebDeviceMotionHandler injection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumbing without the WebDeviceMotionProvider Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 virtual bool processMemorySizesInBytes( 115 virtual bool processMemorySizesInBytes(
116 size_t* private_bytes, size_t* shared_bytes); 116 size_t* private_bytes, size_t* shared_bytes);
117 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( 117 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
118 const WebKit::WebGraphicsContext3D::Attributes& attributes); 118 const WebKit::WebGraphicsContext3D::Attributes& attributes);
119 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D(); 119 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D();
120 virtual GrContext* sharedOffscreenGrContext(); 120 virtual GrContext* sharedOffscreenGrContext();
121 virtual WebKit::WebGraphicsContext3DProvider* 121 virtual WebKit::WebGraphicsContext3DProvider*
122 createSharedOffscreenGraphicsContext3DProvider(); 122 createSharedOffscreenGraphicsContext3DProvider();
123 virtual WebKit::WebCompositorSupport* compositorSupport(); 123 virtual WebKit::WebCompositorSupport* compositorSupport();
124 124
125 virtual void setDeviceMotionListener(
126 WebKit::WebDeviceMotionListener*) OVERRIDE;
127
125 // Disables the WebSandboxSupport implementation for testing. 128 // Disables the WebSandboxSupport implementation for testing.
126 // Tests that do not set up a full sandbox environment should call 129 // Tests that do not set up a full sandbox environment should call
127 // SetSandboxEnabledForTesting(false) _before_ creating any instances 130 // SetSandboxEnabledForTesting(false) _before_ creating any instances
128 // of this class, to ensure that we don't attempt to use sandbox-related 131 // of this class, to ensure that we don't attempt to use sandbox-related
129 // file descriptors or other resources. 132 // file descriptors or other resources.
130 // 133 //
131 // Returns the previous |enable| value. 134 // Returns the previous |enable| value.
132 static bool SetSandboxEnabledForTesting(bool enable); 135 static bool SetSandboxEnabledForTesting(bool enable);
133 136
134 // Set WebGamepads to return when sampleGamepads() is invoked. 137 // Set WebGamepads to return when sampleGamepads() is invoked.
135 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); 138 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads);
136 139
140 // Set a mock listener to be used when setDeviceMotionListener is called.
141 static void SetMockDeviceMotionListenerForTesting(
142 WebKit::WebDeviceMotionListener*);
143
137 private: 144 private:
138 bool CheckPreparsedJsCachingEnabled() const; 145 bool CheckPreparsedJsCachingEnabled() const;
139 146
140 scoped_ptr<RendererClipboardClient> clipboard_client_; 147 scoped_ptr<RendererClipboardClient> clipboard_client_;
141 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; 148 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_;
142 149
143 class FileUtilities; 150 class FileUtilities;
144 scoped_ptr<FileUtilities> file_utilities_; 151 scoped_ptr<FileUtilities> file_utilities_;
145 152
146 class MimeRegistry; 153 class MimeRegistry;
(...skipping 29 matching lines...) Expand all
176 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 183 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
177 184
178 scoped_refptr<cc::ContextProvider> shared_offscreen_context_; 185 scoped_refptr<cc::ContextProvider> shared_offscreen_context_;
179 186
180 webkit::WebCompositorSupportImpl compositor_support_; 187 webkit::WebCompositorSupportImpl compositor_support_;
181 }; 188 };
182 189
183 } // namespace content 190 } // namespace content
184 191
185 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 192 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
OLDNEW
« no previous file with comments | « content/public/test/layouttest_support.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698