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

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

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/webkitplatformsupport_impl.h" 12 #include "content/common/webkitplatformsupport_impl.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi tory.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi tory.h"
16 16
17 namespace cc { 17 namespace cc {
18 class ContextProvider; 18 class ContextProvider;
19 } 19 }
20 20
21 namespace webkit_glue { 21 namespace webkit_glue {
22 class WebClipboardImpl; 22 class WebClipboardImpl;
23 } 23 }
24 24
25 namespace content { 25 namespace content {
26 class DeviceMotionEventPump;
26 class GamepadSharedMemoryReader; 27 class GamepadSharedMemoryReader;
27 class RendererClipboardClient; 28 class RendererClipboardClient;
28 class ThreadSafeSender; 29 class ThreadSafeSender;
29 class WebFileSystemImpl; 30 class WebFileSystemImpl;
30 class WebSharedWorkerRepositoryImpl; 31 class WebSharedWorkerRepositoryImpl;
31 32
32 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl 33 class CONTENT_EXPORT RendererWebKitPlatformSupportImpl
33 : public WebKitPlatformSupportImpl { 34 : public WebKitPlatformSupportImpl {
34 public: 35 public:
35 RendererWebKitPlatformSupportImpl(); 36 RendererWebKitPlatformSupportImpl();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // SetSandboxEnabledForTesting(false) _before_ creating any instances 118 // SetSandboxEnabledForTesting(false) _before_ creating any instances
118 // of this class, to ensure that we don't attempt to use sandbox-related 119 // of this class, to ensure that we don't attempt to use sandbox-related
119 // file descriptors or other resources. 120 // file descriptors or other resources.
120 // 121 //
121 // Returns the previous |enable| value. 122 // Returns the previous |enable| value.
122 static bool SetSandboxEnabledForTesting(bool enable); 123 static bool SetSandboxEnabledForTesting(bool enable);
123 124
124 // Set WebGamepads to return when sampleGamepads() is invoked. 125 // Set WebGamepads to return when sampleGamepads() is invoked.
125 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); 126 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads);
126 127
128 virtual WebKit::WebDeviceMotionHandler* deviceMotionHandler() OVERRIDE;
129
127 private: 130 private:
128 bool CheckPreparsedJsCachingEnabled() const; 131 bool CheckPreparsedJsCachingEnabled() const;
129 132
130 scoped_ptr<RendererClipboardClient> clipboard_client_; 133 scoped_ptr<RendererClipboardClient> clipboard_client_;
131 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; 134 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_;
132 135
133 class FileUtilities; 136 class FileUtilities;
134 scoped_ptr<FileUtilities> file_utilities_; 137 scoped_ptr<FileUtilities> file_utilities_;
135 138
136 class MimeRegistry; 139 class MimeRegistry;
(...skipping 19 matching lines...) Expand all
156 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; 159 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_;
157 160
158 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; 161 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_;
159 162
160 scoped_ptr<WebFileSystemImpl> web_file_system_; 163 scoped_ptr<WebFileSystemImpl> web_file_system_;
161 164
162 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; 165 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_;
163 166
164 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 167 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
165 168
169 scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_;
170
166 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 171 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
167 172
168 scoped_refptr<cc::ContextProvider> shared_offscreen_context_; 173 scoped_refptr<cc::ContextProvider> shared_offscreen_context_;
169 }; 174 };
170 175
171 } // namespace content 176 } // namespace content
172 177
173 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 178 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698