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

Unified Diff: chrome/browser/android/precache/precache_launcher.h

Issue 1031003003: precache: Move the java files into //components/precache/android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/precache/precache_launcher.h
diff --git a/chrome/browser/android/precache/precache_launcher.h b/chrome/browser/android/precache/precache_launcher.h
new file mode 100644
index 0000000000000000000000000000000000000000..7f80669ff4bb891f725b92b2f53c4f07a4d54082
--- /dev/null
+++ b/chrome/browser/android/precache/precache_launcher.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
+#define CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
+
+#include <jni.h>
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_weak_ref.h"
+#include "base/memory/weak_ptr.h"
+
+class PrecacheLauncher {
+ public:
+ PrecacheLauncher(JNIEnv* env, jobject obj);
+ void Destroy(JNIEnv* env, jobject obj);
+ void Start(JNIEnv* env, jobject obj);
+ void Cancel(JNIEnv* env, jobject obj);
+
+ private:
+ ~PrecacheLauncher();
+ // Called when precaching completes.
+ void OnPrecacheCompleted();
+
+ JavaObjectWeakGlobalRef weak_java_precache_launcher_;
+
+ // This must be the last member field in the class.
+ base::WeakPtrFactory<PrecacheLauncher> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrecacheLauncher);
+};
+
+// Registers the native methods to be called from Java.
+bool RegisterPrecacheLauncher(JNIEnv* env);
+
+#endif // CHROME_BROWSER_ANDROID_PRECACHE_PRECACHE_LAUNCHER_H_
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/precache/precache_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698