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

Side by Side Diff: content/child/blink_platform_impl.h

Issue 476293002: Pass through geofencing API calls to the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and add region_id sanity check Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CHILD_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/threading/thread_local_storage.h" 10 #include "base/threading/thread_local_storage.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/child/webthemeengine_impl_android.h" 27 #include "content/child/webthemeengine_impl_android.h"
28 #endif 28 #endif
29 29
30 namespace base { 30 namespace base {
31 class MessageLoop; 31 class MessageLoop;
32 } 32 }
33 33
34 namespace content { 34 namespace content {
35 class FlingCurveConfiguration; 35 class FlingCurveConfiguration;
36 class WebCryptoImpl; 36 class WebCryptoImpl;
37 class WebGeofencingProviderImpl;
37 38
38 class CONTENT_EXPORT BlinkPlatformImpl 39 class CONTENT_EXPORT BlinkPlatformImpl
39 : NON_EXPORTED_BASE(public blink::Platform) { 40 : NON_EXPORTED_BASE(public blink::Platform) {
40 public: 41 public:
41 BlinkPlatformImpl(); 42 BlinkPlatformImpl();
42 virtual ~BlinkPlatformImpl(); 43 virtual ~BlinkPlatformImpl();
43 44
44 // Platform methods (partial implementation): 45 // Platform methods (partial implementation):
45 virtual blink::WebThemeEngine* themeEngine(); 46 virtual blink::WebThemeEngine* themeEngine();
46 virtual blink::WebFallbackThemeEngine* fallbackThemeEngine(); 47 virtual blink::WebFallbackThemeEngine* fallbackThemeEngine();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 virtual void callOnMainThread(void (*func)(void*), void* context); 147 virtual void callOnMainThread(void (*func)(void*), void* context);
147 virtual blink::WebGestureCurve* createFlingAnimationCurve( 148 virtual blink::WebGestureCurve* createFlingAnimationCurve(
148 blink::WebGestureDevice device_source, 149 blink::WebGestureDevice device_source,
149 const blink::WebFloatPoint& velocity, 150 const blink::WebFloatPoint& velocity,
150 const blink::WebSize& cumulative_scroll) OVERRIDE; 151 const blink::WebSize& cumulative_scroll) OVERRIDE;
151 virtual void didStartWorkerRunLoop( 152 virtual void didStartWorkerRunLoop(
152 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; 153 const blink::WebWorkerRunLoop& runLoop) OVERRIDE;
153 virtual void didStopWorkerRunLoop( 154 virtual void didStopWorkerRunLoop(
154 const blink::WebWorkerRunLoop& runLoop) OVERRIDE; 155 const blink::WebWorkerRunLoop& runLoop) OVERRIDE;
155 virtual blink::WebCrypto* crypto() OVERRIDE; 156 virtual blink::WebCrypto* crypto() OVERRIDE;
157 virtual blink::WebGeofencingProvider* geofencingProvider() OVERRIDE;
156 158
157 void SuspendSharedTimer(); 159 void SuspendSharedTimer();
158 void ResumeSharedTimer(); 160 void ResumeSharedTimer();
159 virtual void OnStartSharedTimer(base::TimeDelta delay) {} 161 virtual void OnStartSharedTimer(base::TimeDelta delay) {}
160 162
161 private: 163 private:
162 static void DestroyCurrentThread(void*); 164 static void DestroyCurrentThread(void*);
163 165
164 void DoTimeout() { 166 void DoTimeout() {
165 if (shared_timer_func_ && !shared_timer_suspended_) 167 if (shared_timer_func_ && !shared_timer_suspended_)
166 shared_timer_func_(); 168 shared_timer_func_();
167 } 169 }
168 170
169 WebThemeEngineImpl native_theme_engine_; 171 WebThemeEngineImpl native_theme_engine_;
170 WebFallbackThemeEngineImpl fallback_theme_engine_; 172 WebFallbackThemeEngineImpl fallback_theme_engine_;
171 base::MessageLoop* main_loop_; 173 base::MessageLoop* main_loop_;
172 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; 174 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
173 void (*shared_timer_func_)(); 175 void (*shared_timer_func_)();
174 double shared_timer_fire_time_; 176 double shared_timer_fire_time_;
175 bool shared_timer_fire_time_was_set_while_suspended_; 177 bool shared_timer_fire_time_was_set_while_suspended_;
176 int shared_timer_suspended_; // counter 178 int shared_timer_suspended_; // counter
177 base::ThreadLocalStorage::Slot current_thread_slot_; 179 base::ThreadLocalStorage::Slot current_thread_slot_;
178 WebCryptoImpl web_crypto_; 180 WebCryptoImpl web_crypto_;
181 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_;
179 }; 182 };
180 183
181 } // namespace content 184 } // namespace content
182 185
183 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 186 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698