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

Side by Side Diff: mojo/services/html_viewer/blink_platform_impl.h

Issue 959873003: Add WebScheduler implementation to HTMLViewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review nits Created 5 years, 9 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 | « mojo/services/html_viewer/BUILD.gn ('k') | mojo/services/html_viewer/blink_platform_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 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 MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
6 #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 6 #define MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/threading/thread_local_storage.h" 10 #include "base/threading/thread_local_storage.h"
11 #include "base/timer/timer.h" 11 #include "base/timer/timer.h"
12 #include "cc/blink/web_compositor_support_impl.h" 12 #include "cc/blink/web_compositor_support_impl.h"
13 #include "mojo/services/html_viewer/blink_resource_map.h" 13 #include "mojo/services/html_viewer/blink_resource_map.h"
14 #include "mojo/services/html_viewer/webmimeregistry_impl.h" 14 #include "mojo/services/html_viewer/webmimeregistry_impl.h"
15 #include "mojo/services/html_viewer/webscheduler_impl.h"
15 #include "mojo/services/html_viewer/webthemeengine_impl.h" 16 #include "mojo/services/html_viewer/webthemeengine_impl.h"
16 #include "third_party/WebKit/public/platform/Platform.h" 17 #include "third_party/WebKit/public/platform/Platform.h"
17 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" 18 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h"
18 19
19 namespace html_viewer { 20 namespace html_viewer {
20 21
21 class BlinkPlatformImpl : public blink::Platform { 22 class BlinkPlatformImpl : public blink::Platform {
22 public: 23 public:
23 explicit BlinkPlatformImpl(); 24 explicit BlinkPlatformImpl();
24 virtual ~BlinkPlatformImpl(); 25 virtual ~BlinkPlatformImpl();
25 26
26 // blink::Platform methods: 27 // blink::Platform methods:
27 virtual blink::WebMimeRegistry* mimeRegistry(); 28 virtual blink::WebMimeRegistry* mimeRegistry();
28 virtual blink::WebThemeEngine* themeEngine(); 29 virtual blink::WebThemeEngine* themeEngine();
30 virtual blink::WebScheduler* scheduler();
29 virtual blink::WebString defaultLocale(); 31 virtual blink::WebString defaultLocale();
30 virtual double currentTime(); 32 virtual double currentTime();
31 virtual double monotonicallyIncreasingTime(); 33 virtual double monotonicallyIncreasingTime();
32 virtual void cryptographicallyRandomValues( 34 virtual void cryptographicallyRandomValues(
33 unsigned char* buffer, size_t length); 35 unsigned char* buffer, size_t length);
34 virtual void setSharedTimerFiredFunction(void (*func)()); 36 virtual void setSharedTimerFiredFunction(void (*func)());
35 virtual void setSharedTimerFireInterval(double interval_seconds); 37 virtual void setSharedTimerFireInterval(double interval_seconds);
36 virtual void stopSharedTimer(); 38 virtual void stopSharedTimer();
37 virtual void callOnMainThread(void (*func)(void*), void* context); 39 virtual void callOnMainThread(void (*func)(void*), void* context);
38 virtual bool isThreadedCompositingEnabled(); 40 virtual bool isThreadedCompositingEnabled();
(...skipping 30 matching lines...) Expand all
69 base::MessageLoop* main_loop_; 71 base::MessageLoop* main_loop_;
70 base::OneShotTimer<BlinkPlatformImpl> shared_timer_; 72 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
71 void (*shared_timer_func_)(); 73 void (*shared_timer_func_)();
72 double shared_timer_fire_time_; 74 double shared_timer_fire_time_;
73 bool shared_timer_fire_time_was_set_while_suspended_; 75 bool shared_timer_fire_time_was_set_while_suspended_;
74 int shared_timer_suspended_; // counter 76 int shared_timer_suspended_; // counter
75 base::ThreadLocalStorage::Slot current_thread_slot_; 77 base::ThreadLocalStorage::Slot current_thread_slot_;
76 cc_blink::WebCompositorSupportImpl compositor_support_; 78 cc_blink::WebCompositorSupportImpl compositor_support_;
77 WebThemeEngineImpl theme_engine_; 79 WebThemeEngineImpl theme_engine_;
78 WebMimeRegistryImpl mime_registry_; 80 WebMimeRegistryImpl mime_registry_;
81 WebSchedulerImpl scheduler_;
79 blink::WebScrollbarBehavior scrollbar_behavior_; 82 blink::WebScrollbarBehavior scrollbar_behavior_;
80 BlinkResourceMap blink_resource_map_; 83 BlinkResourceMap blink_resource_map_;
81 84
82 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl); 85 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl);
83 }; 86 };
84 87
85 } // namespace html_viewer 88 } // namespace html_viewer
86 89
87 #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 90 #endif // MOJO_SERVICES_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/BUILD.gn ('k') | mojo/services/html_viewer/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698