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

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

Issue 421293010: Update RendererWebPlatformSupportImpl to use {start,stop}Listening(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 6 years, 4 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
« no previous file with comments | « no previous file | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/child/blink_platform_impl.h" 10 #include "content/child/blink_platform_impl.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 virtual bool loadAudioResource( 114 virtual bool loadAudioResource(
115 blink::WebAudioBus* destination_bus, const char* audio_file_data, 115 blink::WebAudioBus* destination_bus, const char* audio_file_data,
116 size_t data_size); 116 size_t data_size);
117 117
118 virtual blink::WebMIDIAccessor* 118 virtual blink::WebMIDIAccessor*
119 createMIDIAccessor(blink::WebMIDIAccessorClient* client); 119 createMIDIAccessor(blink::WebMIDIAccessorClient* client);
120 120
121 virtual blink::WebBlobRegistry* blobRegistry(); 121 virtual blink::WebBlobRegistry* blobRegistry();
122 virtual void sampleGamepads(blink::WebGamepads&); 122 virtual void sampleGamepads(blink::WebGamepads&);
123 virtual void setGamepadListener(blink::WebGamepadListener*);
124 virtual blink::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( 123 virtual blink::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(
125 blink::WebRTCPeerConnectionHandlerClient* client); 124 blink::WebRTCPeerConnectionHandlerClient* client);
126 virtual blink::WebMediaStreamCenter* createMediaStreamCenter( 125 virtual blink::WebMediaStreamCenter* createMediaStreamCenter(
127 blink::WebMediaStreamCenterClient* client); 126 blink::WebMediaStreamCenterClient* client);
128 virtual bool processMemorySizesInBytes( 127 virtual bool processMemorySizesInBytes(
129 size_t* private_bytes, size_t* shared_bytes); 128 size_t* private_bytes, size_t* shared_bytes);
130 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( 129 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
131 const blink::WebGraphicsContext3D::Attributes& attributes); 130 const blink::WebGraphicsContext3D::Attributes& attributes);
132 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( 131 virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
133 const blink::WebGraphicsContext3D::Attributes& attributes, 132 const blink::WebGraphicsContext3D::Attributes& attributes,
134 blink::WebGraphicsContext3D* share_context); 133 blink::WebGraphicsContext3D* share_context);
135 virtual blink::WebGraphicsContext3DProvider* 134 virtual blink::WebGraphicsContext3DProvider*
136 createSharedOffscreenGraphicsContext3DProvider(); 135 createSharedOffscreenGraphicsContext3DProvider();
137 virtual blink::WebCompositorSupport* compositorSupport(); 136 virtual blink::WebCompositorSupport* compositorSupport();
138 virtual blink::WebString convertIDNToUnicode( 137 virtual blink::WebString convertIDNToUnicode(
139 const blink::WebString& host, const blink::WebString& languages); 138 const blink::WebString& host, const blink::WebString& languages);
140 virtual void setDeviceLightListener(blink::WebDeviceLightListener* listener); 139 virtual void startListening(blink::WebPlatformEventType,
141 virtual void setDeviceMotionListener( 140 blink::WebPlatformEventListener*);
142 blink::WebDeviceMotionListener* listener); 141 virtual void stopListening(blink::WebPlatformEventType);
143 virtual void setDeviceOrientationListener(
144 blink::WebDeviceOrientationListener* listener);
145 virtual void queryStorageUsageAndQuota( 142 virtual void queryStorageUsageAndQuota(
146 const blink::WebURL& storage_partition, 143 const blink::WebURL& storage_partition,
147 blink::WebStorageQuotaType, 144 blink::WebStorageQuotaType,
148 blink::WebStorageQuotaCallbacks); 145 blink::WebStorageQuotaCallbacks);
149 virtual void vibrate(unsigned int milliseconds); 146 virtual void vibrate(unsigned int milliseconds);
150 virtual void cancelVibration(); 147 virtual void cancelVibration();
151 virtual void setBatteryStatusListener(
152 blink::WebBatteryStatusListener* listener);
153 148
154 void set_gamepad_provider(RendererGamepadProvider* provider) { 149 void set_gamepad_provider(RendererGamepadProvider* provider) {
155 gamepad_provider_ = provider; 150 gamepad_provider_ = provider;
156 } 151 }
157 152
158 // Disables the WebSandboxSupport implementation for testing. 153 // Disables the WebSandboxSupport implementation for testing.
159 // Tests that do not set up a full sandbox environment should call 154 // Tests that do not set up a full sandbox environment should call
160 // SetSandboxEnabledForTesting(false) _before_ creating any instances 155 // SetSandboxEnabledForTesting(false) _before_ creating any instances
161 // of this class, to ensure that we don't attempt to use sandbox-related 156 // of this class, to ensure that we don't attempt to use sandbox-related
162 // file descriptors or other resources. 157 // file descriptors or other resources.
(...skipping 15 matching lines...) Expand all
178 static void MockBatteryStatusChangedForTesting( 173 static void MockBatteryStatusChangedForTesting(
179 const blink::WebBatteryStatus& status); 174 const blink::WebBatteryStatus& status);
180 175
181 WebDatabaseObserverImpl* web_database_observer_impl() { 176 WebDatabaseObserverImpl* web_database_observer_impl() {
182 return web_database_observer_impl_.get(); 177 return web_database_observer_impl_.get();
183 } 178 }
184 179
185 private: 180 private:
186 bool CheckPreparsedJsCachingEnabled() const; 181 bool CheckPreparsedJsCachingEnabled() const;
187 182
183 // Implement those methods internally so startListening() and stopListening()
184 // are being used and Blink can change its interface.
185 void SetDeviceMotionListener(blink::WebDeviceMotionListener*);
186 void SetDeviceOrientationListener(blink::WebDeviceOrientationListener*);
187 void SetDeviceLightListener(blink::WebDeviceLightListener*);
188 void SetBatteryStatusListener(blink::WebBatteryStatusListener*);
189 void SetGamepadListener(blink::WebGamepadListener*);
190
191
188 scoped_ptr<RendererClipboardClient> clipboard_client_; 192 scoped_ptr<RendererClipboardClient> clipboard_client_;
189 scoped_ptr<WebClipboardImpl> clipboard_; 193 scoped_ptr<WebClipboardImpl> clipboard_;
190 194
191 class FileUtilities; 195 class FileUtilities;
192 scoped_ptr<FileUtilities> file_utilities_; 196 scoped_ptr<FileUtilities> file_utilities_;
193 197
194 class MimeRegistry; 198 class MimeRegistry;
195 scoped_ptr<MimeRegistry> mime_registry_; 199 scoped_ptr<MimeRegistry> mime_registry_;
196 200
197 class SandboxSupport; 201 class SandboxSupport;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; 234 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
231 235
232 RendererGamepadProvider* gamepad_provider_; 236 RendererGamepadProvider* gamepad_provider_;
233 237
234 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl); 238 DISALLOW_COPY_AND_ASSIGN(RendererWebKitPlatformSupportImpl);
235 }; 239 };
236 240
237 } // namespace content 241 } // namespace content
238 242
239 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 243 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698