OLD | NEW |
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 virtual bool loadAudioResource( | 119 virtual bool loadAudioResource( |
120 blink::WebAudioBus* destination_bus, const char* audio_file_data, | 120 blink::WebAudioBus* destination_bus, const char* audio_file_data, |
121 size_t data_size); | 121 size_t data_size); |
122 | 122 |
123 virtual blink::WebContentDecryptionModule* createContentDecryptionModule( | 123 virtual blink::WebContentDecryptionModule* createContentDecryptionModule( |
124 const blink::WebString& key_system); | 124 const blink::WebString& key_system); |
125 virtual blink::WebMIDIAccessor* | 125 virtual blink::WebMIDIAccessor* |
126 createMIDIAccessor(blink::WebMIDIAccessorClient* client); | 126 createMIDIAccessor(blink::WebMIDIAccessorClient* client); |
127 | 127 |
128 virtual blink::WebBlobRegistry* blobRegistry(); | 128 virtual blink::WebBlobRegistry* blobRegistry(); |
129 virtual void sampleGamepads(blink::WebGamepads&); | 129 virtual void sampleGamepads(blink::WebGamepads&) OVERRIDE; |
| 130 virtual void setGamepadListener(blink::WebGamepadListener*) OVERRIDE; |
130 virtual blink::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( | 131 virtual blink::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( |
131 blink::WebRTCPeerConnectionHandlerClient* client); | 132 blink::WebRTCPeerConnectionHandlerClient* client); |
132 virtual blink::WebMediaStreamCenter* createMediaStreamCenter( | 133 virtual blink::WebMediaStreamCenter* createMediaStreamCenter( |
133 blink::WebMediaStreamCenterClient* client); | 134 blink::WebMediaStreamCenterClient* client); |
134 virtual bool processMemorySizesInBytes( | 135 virtual bool processMemorySizesInBytes( |
135 size_t* private_bytes, size_t* shared_bytes); | 136 size_t* private_bytes, size_t* shared_bytes); |
136 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( | 137 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
137 const blink::WebGraphicsContext3D::Attributes& attributes); | 138 const blink::WebGraphicsContext3D::Attributes& attributes); |
138 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( | 139 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
139 const blink::WebGraphicsContext3D::Attributes& attributes, | 140 const blink::WebGraphicsContext3D::Attributes& attributes, |
(...skipping 22 matching lines...) Expand all Loading... |
162 // Tests that do not set up a full sandbox environment should call | 163 // Tests that do not set up a full sandbox environment should call |
163 // SetSandboxEnabledForTesting(false) _before_ creating any instances | 164 // SetSandboxEnabledForTesting(false) _before_ creating any instances |
164 // of this class, to ensure that we don't attempt to use sandbox-related | 165 // of this class, to ensure that we don't attempt to use sandbox-related |
165 // file descriptors or other resources. | 166 // file descriptors or other resources. |
166 // | 167 // |
167 // Returns the previous |enable| value. | 168 // Returns the previous |enable| value. |
168 static bool SetSandboxEnabledForTesting(bool enable); | 169 static bool SetSandboxEnabledForTesting(bool enable); |
169 | 170 |
170 // Set WebGamepads to return when sampleGamepads() is invoked. | 171 // Set WebGamepads to return when sampleGamepads() is invoked. |
171 static void SetMockGamepadsForTesting(const blink::WebGamepads& pads); | 172 static void SetMockGamepadsForTesting(const blink::WebGamepads& pads); |
| 173 |
| 174 // Notifies blink::WebGamepadListener about a new gamepad if a listener |
| 175 // has been set via setGamepadListener. |
| 176 static void MockGamepadConnected(int index, const blink::WebGamepad& pad); |
| 177 |
| 178 // Notifies blink::WebGamepadListener that a gamepad has been disconnected if |
| 179 // a listener has been set via setGamepadListener. |
| 180 static void MockGamepadDisconnected(int index, const blink::WebGamepad& pad); |
| 181 |
172 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. | 182 // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. |
173 static void SetMockDeviceMotionDataForTesting( | 183 static void SetMockDeviceMotionDataForTesting( |
174 const blink::WebDeviceMotionData& data); | 184 const blink::WebDeviceMotionData& data); |
175 // Set WebDeviceOrientationData to return when setDeviceOrientationListener | 185 // Set WebDeviceOrientationData to return when setDeviceOrientationListener |
176 // is invoked. | 186 // is invoked. |
177 static void SetMockDeviceOrientationDataForTesting( | 187 static void SetMockDeviceOrientationDataForTesting( |
178 const blink::WebDeviceOrientationData& data); | 188 const blink::WebDeviceOrientationData& data); |
179 // Set WebScreenOrientation to return when setScreenOrientationListener is | 189 // Set WebScreenOrientation to return when setScreenOrientationListener is |
180 // invoked. | 190 // invoked. |
181 static void SetMockScreenOrientationForTesting(blink::WebScreenOrientation); | 191 static void SetMockScreenOrientationForTesting(blink::WebScreenOrientation); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 scoped_ptr<ScreenOrientationDispatcher> screen_orientation_dispatcher_; | 239 scoped_ptr<ScreenOrientationDispatcher> screen_orientation_dispatcher_; |
230 | 240 |
231 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; | 241 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; |
232 | 242 |
233 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); | 243 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); |
234 }; | 244 }; |
235 | 245 |
236 } // namespace content | 246 } // namespace content |
237 | 247 |
238 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 248 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
OLD | NEW |