Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / android_webview / common / devtools_instrumentation.h
blobfbe6f636ee576e44f701db42c6b9bff39495d893
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
3 // found in the LICENSE file.
5 #ifndef ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
6 #define ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_
8 #include "base/trace_event/trace_event.h"
10 namespace android_webview {
11 namespace devtools_instrumentation {
13 namespace internal {
14 const char kCategory[] = "Java,devtools,disabled-by-default-devtools.timeline";
15 const char kEmbedderCallback[] = "EmbedderCallback";
16 const char kCallbackNameArgument[] = "callbackName";
17 } // namespace internal
19 class ScopedEmbedderCallbackTask {
20 public:
21 ScopedEmbedderCallbackTask(const char* callback_name) {
22 TRACE_EVENT_BEGIN1(internal::kCategory,
23 internal::kEmbedderCallback,
24 internal::kCallbackNameArgument,
25 callback_name);
27 ~ScopedEmbedderCallbackTask() {
28 TRACE_EVENT_END0(internal::kCategory,
29 internal::kEmbedderCallback);
32 private:
33 DISALLOW_COPY_AND_ASSIGN(ScopedEmbedderCallbackTask);
36 } // namespace devtools_instrumentation
37 } // namespace android_webview
39 #endif // ANDROID_WEBVIEW_COMMON_DEVTOOLS_INSTRUMENTATION_H_