Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / content / browser / android / tracing_controller_android.h
blob98455eb30731fe35743e982d9b3dfc1f91898e6f
1 // Copyright 2013 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 CONTENT_BROWSER_ANDROID_TRACING_CONTROLLER_ANDROID_H_
6 #define CONTENT_BROWSER_ANDROID_TRACING_CONTROLLER_ANDROID_H_
8 #include "base/android/jni_weak_ref.h"
9 #include "base/files/file_path.h"
10 #include "base/memory/weak_ptr.h"
12 namespace content {
14 // This class implements the native methods of TracingControllerAndroid.java
15 class TracingControllerAndroid {
16 public:
17 TracingControllerAndroid(JNIEnv* env, jobject obj);
18 void Destroy(JNIEnv* env, jobject obj);
20 bool StartTracing(JNIEnv* env,
21 jobject obj,
22 jstring categories,
23 jboolean record_continuously);
24 void StopTracing(JNIEnv* env, jobject obj, jstring jfilepath);
25 static void GenerateTracingFilePath(base::FilePath* file_path);
27 private:
28 ~TracingControllerAndroid();
29 void OnTracingStopped(const base::FilePath& file_path);
31 JavaObjectWeakGlobalRef weak_java_object_;
32 base::WeakPtrFactory<TracingControllerAndroid> weak_factory_;
34 DISALLOW_COPY_AND_ASSIGN(TracingControllerAndroid);
37 // Register this class's native methods through jni.
38 bool RegisterTracingControllerAndroid(JNIEnv* env);
40 } // namespace content
42 #endif // CONTENT_BROWSER_ANDROID_TRACING_CONTROLLER_ANDROID_H_