| 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | package org.chromium.content.browser; |
| 6 | |
| 7 | import org.chromium.base.JNINamespace; |
| 8 | |
| 9 | /** |
| 10 | * Handler for tracing related intent. |
| 11 | */ |
| 12 | @JNINamespace("content") |
| 13 | public class TracingIntentHandler { |
| 14 | |
| 15 | /** |
| 16 | * Begin recording trace events. |
| 17 | * |
| 18 | * @param path Specifies where the trace data will be saved when tracing is stopped. |
| 19 | */ |
| 20 | public static void beginTracing(String path) { |
| 21 | nativeBeginTracing(path); |
| 22 | } |
| 23 | |
| 24 | /** |
| 25 | * Stop recording trace events, and dump the data to the file |
| 26 | */ |
| 27 | public static void endTracing() { |
| 28 | nativeEndTracing(); |
| 29 | } |
| 30 | |
| 31 | private static native void nativeBeginTracing(String path); |
| 32 | private static native void nativeEndTracing(); |
| 33 | } |