Index: chrome/browser/android/external_prerender_request_handler.h |
diff --git a/chrome/browser/android/external_prerender_request_handler.h b/chrome/browser/android/external_prerender_request_handler.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2cc79daf016d2299e40aafd370712e61688e2555 |
--- /dev/null |
+++ b/chrome/browser/android/external_prerender_request_handler.h |
@@ -0,0 +1,53 @@ |
+// Copyright 2013 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_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ |
+#define CHROME_BROWSER_ANDROID_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/android/scoped_java_ref.h" |
+#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
+ |
+class GURL; |
+class Profile; |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace prerender { |
+class PrerenderHandle; |
+ |
+// A class for handling external prerender requests from other applications. |
+class ExternalPrerenderRequestHandler { |
cbentzel
2013/10/30 14:40:33
Perhaps IntentTriggeredPrerenderRequestHandler? Ex
Yusuf
2013/10/30 17:28:55
One thing with mentioning intents is, the prerende
|
+ public: |
+ int AddPrerender(JNIEnv* env, |
cbentzel
2013/10/30 14:40:33
Please document these methods - what does the retu
Yusuf
2013/10/31 00:44:18
Done.
|
+ jobject obj, |
+ jobject profile, |
+ jstring url, |
+ jstring referrer, |
cbentzel
2013/10/30 14:40:33
referrer is probably OK for now but I could imagin
Yusuf
2013/10/31 00:44:18
Noted.
On 2013/10/30 14:40:33, cbentzel wrote:
|
+ jint width, |
+ jint height); |
+ |
+ void CancelCurrentPrerender(JNIEnv* env, jobject object); |
+ |
+ static bool HasPrerenderedUrl(Profile* profile, |
+ GURL url, |
+ content::WebContents* web_contents); |
+ |
+ static bool RegisterExternalPrerenderRequestHandler(JNIEnv* env); |
+ |
+ explicit ExternalPrerenderRequestHandler(); |
cbentzel
2013/10/30 14:40:33
Nit: this should be at the top of the methods.
Yusuf
2013/10/31 00:44:18
Done.
|
+ |
+ private: |
+ scoped_ptr<prerender::PrerenderHandle> prerender_handle_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderRequestHandler); |
+}; |
+ |
+} // namespace prerender |
cbentzel
2013/10/30 14:40:33
Not sure if this should be in the prerender namesp
Yusuf
2013/10/30 17:28:55
Would you prefer this to be in prerender/?
On 20
cbentzel
2013/10/30 18:45:59
I think it makes more sense there (and the ChromeO
|
+ |
+#endif // CHROME_BROWSER_ANDROID_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ |