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

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

Issue 699843003: bluetooth: Impl uses new WebBluetoothDevice in content/browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: fix compile failure on android. Created 6 years 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_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 28 matching lines...) Expand all
39 class BatteryStatusDispatcher; 39 class BatteryStatusDispatcher;
40 class DeviceLightEventPump; 40 class DeviceLightEventPump;
41 class DeviceMotionEventPump; 41 class DeviceMotionEventPump;
42 class DeviceOrientationEventPump; 42 class DeviceOrientationEventPump;
43 class PlatformEventObserverBase; 43 class PlatformEventObserverBase;
44 class QuotaMessageFilter; 44 class QuotaMessageFilter;
45 class RendererClipboardDelegate; 45 class RendererClipboardDelegate;
46 class RendererScheduler; 46 class RendererScheduler;
47 class RenderView; 47 class RenderView;
48 class ThreadSafeSender; 48 class ThreadSafeSender;
49 class WebBluetoothImpl;
50 class WebClipboardImpl; 49 class WebClipboardImpl;
51 class WebDatabaseObserverImpl; 50 class WebDatabaseObserverImpl;
52 class WebFileSystemImpl; 51 class WebFileSystemImpl;
53 class WebSchedulerImpl; 52 class WebSchedulerImpl;
54 53
55 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { 54 class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
56 public: 55 public:
57 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler); 56 explicit RendererBlinkPlatformImpl(RendererScheduler* renderer_scheduler);
58 virtual ~RendererBlinkPlatformImpl(); 57 virtual ~RendererBlinkPlatformImpl();
59 58
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 virtual blink::WebCompositorSupport* compositorSupport(); 142 virtual blink::WebCompositorSupport* compositorSupport();
144 virtual blink::WebString convertIDNToUnicode( 143 virtual blink::WebString convertIDNToUnicode(
145 const blink::WebString& host, const blink::WebString& languages); 144 const blink::WebString& host, const blink::WebString& languages);
146 virtual void startListening(blink::WebPlatformEventType, 145 virtual void startListening(blink::WebPlatformEventType,
147 blink::WebPlatformEventListener*); 146 blink::WebPlatformEventListener*);
148 virtual void stopListening(blink::WebPlatformEventType); 147 virtual void stopListening(blink::WebPlatformEventType);
149 virtual void queryStorageUsageAndQuota( 148 virtual void queryStorageUsageAndQuota(
150 const blink::WebURL& storage_partition, 149 const blink::WebURL& storage_partition,
151 blink::WebStorageQuotaType, 150 blink::WebStorageQuotaType,
152 blink::WebStorageQuotaCallbacks); 151 blink::WebStorageQuotaCallbacks);
153 virtual blink::WebBluetooth* bluetooth();
154 virtual void vibrate(unsigned int milliseconds); 152 virtual void vibrate(unsigned int milliseconds);
155 virtual void cancelVibration(); 153 virtual void cancelVibration();
156 virtual blink::WebScheduler* scheduler(); 154 virtual blink::WebScheduler* scheduler();
157 155
158 // Set the PlatformEventObserverBase in |platform_event_observers_| associated 156 // Set the PlatformEventObserverBase in |platform_event_observers_| associated
159 // with |type| to |observer|. If there was already an observer associated to 157 // with |type| to |observer|. If there was already an observer associated to
160 // the given |type|, it will be replaced. 158 // the given |type|, it will be replaced.
161 // Note that |observer| will be owned by this object after the call. 159 // Note that |observer| will be owned by this object after the call.
162 void SetPlatformEventObserverForTesting( 160 void SetPlatformEventObserverForTesting(
163 blink::WebPlatformEventType type, 161 blink::WebPlatformEventType type,
(...skipping 19 matching lines...) Expand all
183 const blink::WebDeviceOrientationData& data); 181 const blink::WebDeviceOrientationData& data);
184 182
185 // Notifies blink::WebBatteryStatusListener that battery status has changed. 183 // Notifies blink::WebBatteryStatusListener that battery status has changed.
186 void MockBatteryStatusChangedForTesting( 184 void MockBatteryStatusChangedForTesting(
187 const blink::WebBatteryStatus& status); 185 const blink::WebBatteryStatus& status);
188 186
189 WebDatabaseObserverImpl* web_database_observer_impl() { 187 WebDatabaseObserverImpl* web_database_observer_impl() {
190 return web_database_observer_impl_.get(); 188 return web_database_observer_impl_.get();
191 } 189 }
192 190
193 WebBluetoothImpl* BluetoothImplForTesting() { return bluetooth_.get(); }
194
195 private: 191 private:
196 bool CheckPreparsedJsCachingEnabled() const; 192 bool CheckPreparsedJsCachingEnabled() const;
197 193
198 // Factory that takes a type and return PlatformEventObserverBase that matches 194 // Factory that takes a type and return PlatformEventObserverBase that matches
199 // it. 195 // it.
200 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( 196 static PlatformEventObserverBase* CreatePlatformEventObserverFromType(
201 blink::WebPlatformEventType type); 197 blink::WebPlatformEventType type);
202 198
203 // Use the data previously set via SetMockDevice...DataForTesting() and send 199 // Use the data previously set via SetMockDevice...DataForTesting() and send
204 // them to the registered listener. 200 // them to the registered listener.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 239 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
244 240
245 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; 241 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
246 242
247 cc_blink::WebCompositorSupportImpl compositor_support_; 243 cc_blink::WebCompositorSupportImpl compositor_support_;
248 244
249 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; 245 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
250 246
251 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; 247 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
252 248
253 scoped_ptr<WebBluetoothImpl> bluetooth_;
254
255 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; 249 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_;
256 250
257 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); 251 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
258 }; 252 };
259 253
260 } // namespace content 254 } // namespace content
261 255
262 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 256 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698