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

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

Issue 889823002: Remove TRACE_EVENT indirection through blink::Platform (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/engine/v8_inspector/PageScriptDebugServer.cpp ('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 14 matching lines...) Expand all
25 25
26 // blink::Platform methods: 26 // blink::Platform methods:
27 virtual blink::WebString defaultLocale(); 27 virtual blink::WebString defaultLocale();
28 virtual void setSharedTimerFiredFunction(void (*func)()); 28 virtual void setSharedTimerFiredFunction(void (*func)());
29 virtual void setSharedTimerFireInterval(double interval_seconds); 29 virtual void setSharedTimerFireInterval(double interval_seconds);
30 virtual void stopSharedTimer(); 30 virtual void stopSharedTimer();
31 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner(); 31 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner();
32 virtual mojo::NetworkService* networkService(); 32 virtual mojo::NetworkService* networkService();
33 virtual blink::WebURLLoader* createURLLoader(); 33 virtual blink::WebURLLoader* createURLLoader();
34 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; 34 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const;
35 virtual const unsigned char* getTraceCategoryEnabledFlag(
36 const char* category_name);
37 virtual TraceEventHandle addTraceEvent(
38 char phase,
39 const unsigned char* category_group_enabled,
40 const char* name,
41 unsigned long long id,
42 int num_args,
43 const char** arg_names,
44 const unsigned char* arg_types,
45 const unsigned long long* arg_values,
46 unsigned char flags);
47 virtual TraceEventHandle addTraceEvent(
48 char phase,
49 const unsigned char* category_group_enabled,
50 const char* name,
51 unsigned long long id,
52 int num_args,
53 const char** arg_names,
54 const unsigned char* arg_types,
55 const unsigned long long* arg_values,
56 const blink::WebConvertableToTraceFormat* convertable_values,
57 unsigned char flags);
58 virtual void updateTraceEventDuration(
59 const unsigned char* category_group_enabled,
60 const char* name,
61 TraceEventHandle);
62 35
63 private: 36 private:
64 void SuspendSharedTimer(); 37 void SuspendSharedTimer();
65 void ResumeSharedTimer(); 38 void ResumeSharedTimer();
66 39
67 void DoTimeout() { 40 void DoTimeout() {
68 if (shared_timer_func_ && !shared_timer_suspended_) 41 if (shared_timer_func_ && !shared_timer_suspended_)
69 shared_timer_func_(); 42 shared_timer_func_();
70 } 43 }
71 44
72 mojo::NetworkServicePtr network_service_; 45 mojo::NetworkServicePtr network_service_;
73 base::MessageLoop* main_loop_; 46 base::MessageLoop* main_loop_;
74 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 47 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
75 base::OneShotTimer<PlatformImpl> shared_timer_; 48 base::OneShotTimer<PlatformImpl> shared_timer_;
76 void (*shared_timer_func_)(); 49 void (*shared_timer_func_)();
77 double shared_timer_fire_time_; 50 double shared_timer_fire_time_;
78 bool shared_timer_fire_time_was_set_while_suspended_; 51 bool shared_timer_fire_time_was_set_while_suspended_;
79 int shared_timer_suspended_; // counter 52 int shared_timer_suspended_; // counter
80 53
81 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); 54 DISALLOW_COPY_AND_ASSIGN(PlatformImpl);
82 }; 55 };
83 56
84 } // namespace sky 57 } // namespace sky
85 58
86 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ 59 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « sky/engine/v8_inspector/PageScriptDebugServer.cpp ('k') | sky/viewer/platform/platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698