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

Side by Side Diff: sky/viewer/platform/platform_impl.h

Issue 673033002: Remove WebThread (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « sky/viewer/BUILD.gn ('k') | sky/viewer/platform/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 SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ 5 #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_
6 #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ 6 #define SKY_VIEWER_PLATFORM_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"
(...skipping 28 matching lines...) Expand all
39 virtual void setSharedTimerFireInterval(double interval_seconds); 39 virtual void setSharedTimerFireInterval(double interval_seconds);
40 virtual void stopSharedTimer(); 40 virtual void stopSharedTimer();
41 virtual void callOnMainThread(void (*func)(void*), void* context); 41 virtual void callOnMainThread(void (*func)(void*), void* context);
42 virtual bool isThreadedCompositingEnabled(); 42 virtual bool isThreadedCompositingEnabled();
43 virtual blink::WebCompositorSupport* compositorSupport(); 43 virtual blink::WebCompositorSupport* compositorSupport();
44 virtual blink::WebURLLoader* createURLLoader(); 44 virtual blink::WebURLLoader* createURLLoader();
45 virtual blink::WebData parseDataURL( 45 virtual blink::WebData parseDataURL(
46 const blink::WebURL& url, blink::WebString& mime_type, 46 const blink::WebURL& url, blink::WebString& mime_type,
47 blink::WebString& charset); 47 blink::WebString& charset);
48 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; 48 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const;
49 virtual blink::WebThread* currentThread();
50 virtual blink::WebWaitableEvent* createWaitableEvent(); 49 virtual blink::WebWaitableEvent* createWaitableEvent();
51 virtual blink::WebWaitableEvent* waitMultipleEvents( 50 virtual blink::WebWaitableEvent* waitMultipleEvents(
52 const blink::WebVector<blink::WebWaitableEvent*>& events); 51 const blink::WebVector<blink::WebWaitableEvent*>& events);
53 virtual blink::WebScrollbarBehavior* scrollbarBehavior(); 52 virtual blink::WebScrollbarBehavior* scrollbarBehavior();
54 virtual const unsigned char* getTraceCategoryEnabledFlag( 53 virtual const unsigned char* getTraceCategoryEnabledFlag(
55 const char* category_name); 54 const char* category_name);
56 virtual long* getTraceSamplingState(const unsigned thread_bucket); 55 virtual long* getTraceSamplingState(const unsigned thread_bucket);
57 virtual TraceEventHandle addTraceEvent( 56 virtual TraceEventHandle addTraceEvent(
58 char phase, 57 char phase,
59 const unsigned char* category_group_enabled, 58 const unsigned char* category_group_enabled,
(...skipping 22 matching lines...) Expand all
82 81
83 private: 82 private:
84 void SuspendSharedTimer(); 83 void SuspendSharedTimer();
85 void ResumeSharedTimer(); 84 void ResumeSharedTimer();
86 85
87 void DoTimeout() { 86 void DoTimeout() {
88 if (shared_timer_func_ && !shared_timer_suspended_) 87 if (shared_timer_func_ && !shared_timer_suspended_)
89 shared_timer_func_(); 88 shared_timer_func_();
90 } 89 }
91 90
92 static void DestroyCurrentThread(void*);
93
94 mojo::NetworkServicePtr network_service_; 91 mojo::NetworkServicePtr network_service_;
95 base::MessageLoop* main_loop_; 92 base::MessageLoop* main_loop_;
96 base::OneShotTimer<PlatformImpl> shared_timer_; 93 base::OneShotTimer<PlatformImpl> shared_timer_;
97 void (*shared_timer_func_)(); 94 void (*shared_timer_func_)();
98 double shared_timer_fire_time_; 95 double shared_timer_fire_time_;
99 bool shared_timer_fire_time_was_set_while_suspended_; 96 bool shared_timer_fire_time_was_set_while_suspended_;
100 int shared_timer_suspended_; // counter 97 int shared_timer_suspended_; // counter
101 base::ThreadLocalStorage::Slot current_thread_slot_;
102 sky_viewer_cc::WebCompositorSupportImpl compositor_support_; 98 sky_viewer_cc::WebCompositorSupportImpl compositor_support_;
103 WebThemeEngineImpl theme_engine_; 99 WebThemeEngineImpl theme_engine_;
104 WebMimeRegistryImpl mime_registry_; 100 WebMimeRegistryImpl mime_registry_;
105 blink::WebScrollbarBehavior scrollbar_behavior_; 101 blink::WebScrollbarBehavior scrollbar_behavior_;
106 102
107 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); 103 DISALLOW_COPY_AND_ASSIGN(PlatformImpl);
108 }; 104 };
109 105
110 } // namespace sky 106 } // namespace sky
111 107
112 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ 108 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « sky/viewer/BUILD.gn ('k') | sky/viewer/platform/platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698