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

Side by Side Diff: components/html_viewer/blink_platform_impl.h

Issue 1078173002: Remove obsolete SharedTimer code in chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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 | components/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 COMPONENTS_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 6 #define COMPONENTS_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/threading/thread_local_storage.h" 9 #include "base/threading/thread_local_storage.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 virtual blink::WebCookieJar* cookieJar(); 45 virtual blink::WebCookieJar* cookieJar();
46 virtual blink::WebClipboard* clipboard(); 46 virtual blink::WebClipboard* clipboard();
47 virtual blink::WebMimeRegistry* mimeRegistry(); 47 virtual blink::WebMimeRegistry* mimeRegistry();
48 virtual blink::WebThemeEngine* themeEngine(); 48 virtual blink::WebThemeEngine* themeEngine();
49 virtual blink::WebString defaultLocale(); 49 virtual blink::WebString defaultLocale();
50 virtual blink::WebBlobRegistry* blobRegistry(); 50 virtual blink::WebBlobRegistry* blobRegistry();
51 virtual double currentTime(); 51 virtual double currentTime();
52 virtual double monotonicallyIncreasingTime(); 52 virtual double monotonicallyIncreasingTime();
53 virtual void cryptographicallyRandomValues(unsigned char* buffer, 53 virtual void cryptographicallyRandomValues(unsigned char* buffer,
54 size_t length); 54 size_t length);
55 virtual void setSharedTimerFiredFunction(void (*func)());
56 virtual void setSharedTimerFireInterval(double interval_seconds);
57 virtual void stopSharedTimer();
58 virtual bool isThreadedCompositingEnabled(); 55 virtual bool isThreadedCompositingEnabled();
59 virtual blink::WebCompositorSupport* compositorSupport(); 56 virtual blink::WebCompositorSupport* compositorSupport();
60 void createMessageChannel(blink::WebMessagePortChannel** channel1, 57 void createMessageChannel(blink::WebMessagePortChannel** channel1,
61 blink::WebMessagePortChannel** channel2) override; 58 blink::WebMessagePortChannel** channel2) override;
62 virtual blink::WebURLLoader* createURLLoader(); 59 virtual blink::WebURLLoader* createURLLoader();
63 virtual blink::WebSocketHandle* createWebSocketHandle(); 60 virtual blink::WebSocketHandle* createWebSocketHandle();
64 virtual blink::WebString userAgent(); 61 virtual blink::WebString userAgent();
65 virtual blink::WebData parseDataURL( 62 virtual blink::WebData parseDataURL(
66 const blink::WebURL& url, blink::WebString& mime_type, 63 const blink::WebURL& url, blink::WebString& mime_type,
67 blink::WebString& charset); 64 blink::WebString& charset);
(...skipping 10 matching lines...) Expand all
78 const char* category_name); 75 const char* category_name);
79 virtual blink::WebData loadResource(const char* name); 76 virtual blink::WebData loadResource(const char* name);
80 virtual blink::WebGestureCurve* createFlingAnimationCurve( 77 virtual blink::WebGestureCurve* createFlingAnimationCurve(
81 blink::WebGestureDevice device_source, 78 blink::WebGestureDevice device_source,
82 const blink::WebFloatPoint& velocity, 79 const blink::WebFloatPoint& velocity,
83 const blink::WebSize& cumulative_scroll); 80 const blink::WebSize& cumulative_scroll);
84 virtual blink::WebCrypto* crypto(); 81 virtual blink::WebCrypto* crypto();
85 virtual blink::WebNotificationManager* notificationManager(); 82 virtual blink::WebNotificationManager* notificationManager();
86 83
87 private: 84 private:
88 void SuspendSharedTimer();
89 void ResumeSharedTimer();
90 void UpdateWebThreadTLS(blink::WebThread* thread); 85 void UpdateWebThreadTLS(blink::WebThread* thread);
91 86
92 void DoTimeout() {
93 if (shared_timer_func_ && !shared_timer_suspended_)
94 shared_timer_func_();
95 }
96
97 static void DestroyCurrentThread(void*); 87 static void DestroyCurrentThread(void*);
98 88
99 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 89 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
100 scoped_ptr<scheduler::WebThreadImplForRendererScheduler> main_thread_; 90 scoped_ptr<scheduler::WebThreadImplForRendererScheduler> main_thread_;
101 base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
102 void (*shared_timer_func_)();
103 double shared_timer_fire_time_;
104 bool shared_timer_fire_time_was_set_while_suspended_;
105 int shared_timer_suspended_; // counter
106 base::ThreadLocalStorage::Slot current_thread_slot_; 91 base::ThreadLocalStorage::Slot current_thread_slot_;
107 cc_blink::WebCompositorSupportImpl compositor_support_; 92 cc_blink::WebCompositorSupportImpl compositor_support_;
108 WebThemeEngineImpl theme_engine_; 93 WebThemeEngineImpl theme_engine_;
109 WebMimeRegistryImpl mime_registry_; 94 WebMimeRegistryImpl mime_registry_;
110 webcrypto::WebCryptoImpl web_crypto_; 95 webcrypto::WebCryptoImpl web_crypto_;
111 WebNotificationManagerImpl web_notification_manager_; 96 WebNotificationManagerImpl web_notification_manager_;
112 blink::WebScrollbarBehavior scrollbar_behavior_; 97 blink::WebScrollbarBehavior scrollbar_behavior_;
113 BlinkResourceMap blink_resource_map_; 98 BlinkResourceMap blink_resource_map_;
114 mojo::NetworkServicePtr network_service_; 99 mojo::NetworkServicePtr network_service_;
115 mojo::URLLoaderFactoryPtr url_loader_factory_; 100 mojo::URLLoaderFactoryPtr url_loader_factory_;
116 MockWebBlobRegistryImpl blob_registry_; 101 MockWebBlobRegistryImpl blob_registry_;
117 scoped_ptr<WebCookieJarImpl> cookie_jar_; 102 scoped_ptr<WebCookieJarImpl> cookie_jar_;
118 scoped_ptr<WebClipboardImpl> clipboard_; 103 scoped_ptr<WebClipboardImpl> clipboard_;
119 104
120 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl); 105 DISALLOW_COPY_AND_ASSIGN(BlinkPlatformImpl);
121 }; 106 };
122 107
123 } // namespace html_viewer 108 } // namespace html_viewer
124 109
125 #endif // COMPONENTS_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_ 110 #endif // COMPONENTS_HTML_VIEWER_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698