OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 5 |
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
8 | 8 |
9 #include <stack> | 9 #include <stack> |
10 #include <string> | 10 #include <string> |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 // on-demand. | 495 // on-demand. |
496 class EnabledStateObserver { | 496 class EnabledStateObserver { |
497 public: | 497 public: |
498 // Called just after the tracing system becomes enabled, outside of the | 498 // Called just after the tracing system becomes enabled, outside of the |
499 // |lock_|. TraceLog::IsEnabled() is true at this point. | 499 // |lock_|. TraceLog::IsEnabled() is true at this point. |
500 virtual void OnTraceLogEnabled() = 0; | 500 virtual void OnTraceLogEnabled() = 0; |
501 | 501 |
502 // Called just after the tracing system disables, outside of the |lock_|. | 502 // Called just after the tracing system disables, outside of the |lock_|. |
503 // TraceLog::IsEnabled() is false at this point. | 503 // TraceLog::IsEnabled() is false at this point. |
504 virtual void OnTraceLogDisabled() = 0; | 504 virtual void OnTraceLogDisabled() = 0; |
| 505 |
| 506 // Called right before the tracing system disables, outside of the |lock_|. |
| 507 // TraceLog::IsEnabled() is true at this point. |
| 508 virtual void OnBeforeTraceLogDisabled() { } |
505 }; | 509 }; |
506 void AddEnabledStateObserver(EnabledStateObserver* listener); | 510 void AddEnabledStateObserver(EnabledStateObserver* listener); |
507 void RemoveEnabledStateObserver(EnabledStateObserver* listener); | 511 void RemoveEnabledStateObserver(EnabledStateObserver* listener); |
508 bool HasEnabledStateObserver(EnabledStateObserver* listener) const; | 512 bool HasEnabledStateObserver(EnabledStateObserver* listener) const; |
509 | 513 |
510 float GetBufferPercentFull() const; | 514 float GetBufferPercentFull() const; |
511 bool BufferIsFull() const; | 515 bool BufferIsFull() const; |
512 | 516 |
513 // Not using base::Callback because of its limited by 7 parameters. | 517 // Not using base::Callback because of its limited by 7 parameters. |
514 // Also, using primitive type allows directly passing callback from WebCore. | 518 // Also, using primitive type allows directly passing callback from WebCore. |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; | 815 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; |
812 subtle::AtomicWord generation_; | 816 subtle::AtomicWord generation_; |
813 | 817 |
814 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 818 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
815 }; | 819 }; |
816 | 820 |
817 } // namespace debug | 821 } // namespace debug |
818 } // namespace base | 822 } // namespace base |
819 | 823 |
820 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ | 824 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ |
OLD | NEW |