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

Side by Side Diff: android_webview/common/devtools_instrumentation.h

Issue 254313002: Add devtools trace events for Timeline EmbedderCallback notification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_ 5 #ifndef ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
6 #define ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_ 6 #define ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
7 7
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 9
10 namespace android_webview { 10 namespace android_webview {
11 namespace devtools_instrumentation { 11 namespace devtools_instrumentation {
12 12
13 namespace internal { 13 namespace internal {
14 const char kCategory[] = "Java,devtools"; 14 const char kCategory[] = "Java,devtools,disabled-by-default-devtools.timeline";
15 const char kEmbedderCallback[] = "EmbedderCallback"; 15 const char kEmbedderCallback[] = "EmbedderCallback";
16 const char kCallbackNameArgument[] = "callbackName"; 16 const char kCallbackNameArgument[] = "callbackName";
17 } // namespace internal 17 } // namespace internal
18 18
19 class ScopedEmbedderCallbackTask { 19 class ScopedEmbedderCallbackTask {
20 public: 20 public:
21 ScopedEmbedderCallbackTask(const char* callback_name) { 21 ScopedEmbedderCallbackTask(const char* callback_name) {
22 TRACE_EVENT_BEGIN1(internal::kCategory, 22 TRACE_EVENT_BEGIN1(internal::kCategory,
23 internal::kEmbedderCallback, 23 internal::kEmbedderCallback,
24 internal::kCallbackNameArgument, 24 internal::kCallbackNameArgument,
25 callback_name); 25 callback_name);
26 } 26 }
27 ~ScopedEmbedderCallbackTask() { 27 ~ScopedEmbedderCallbackTask() {
28 TRACE_EVENT_END0(internal::kCategory, 28 TRACE_EVENT_END0(internal::kCategory,
29 internal::kEmbedderCallback); 29 internal::kEmbedderCallback);
30 } 30 }
31 31
32 private: 32 private:
33 DISALLOW_COPY_AND_ASSIGN(ScopedEmbedderCallbackTask); 33 DISALLOW_COPY_AND_ASSIGN(ScopedEmbedderCallbackTask);
34 }; 34 };
35 35
36 } // namespace devtools_instrumentation 36 } // namespace devtools_instrumentation
37 } // namespace android_webview 37 } // namespace android_webview
38 38
39 #endif // ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_ 39 #endif // ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698