Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ANDROID_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/android/scoped_java_ref.h" | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 | |
| 14 class GURL; | |
| 15 class Profile; | |
| 16 | |
| 17 namespace content { | |
| 18 class WebContents; | |
| 19 } | |
| 20 | |
| 21 namespace prerender { | |
| 22 class PrerenderHandle; | |
| 23 | |
| 24 // A class for handling external prerender requests from other applications. | |
| 25 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
| |
| 26 public: | |
| 27 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.
| |
| 28 jobject obj, | |
| 29 jobject profile, | |
| 30 jstring url, | |
| 31 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:
| |
| 32 jint width, | |
| 33 jint height); | |
| 34 | |
| 35 void CancelCurrentPrerender(JNIEnv* env, jobject object); | |
| 36 | |
| 37 static bool HasPrerenderedUrl(Profile* profile, | |
| 38 GURL url, | |
| 39 content::WebContents* web_contents); | |
| 40 | |
| 41 static bool RegisterExternalPrerenderRequestHandler(JNIEnv* env); | |
| 42 | |
| 43 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.
| |
| 44 | |
| 45 private: | |
| 46 scoped_ptr<prerender::PrerenderHandle> prerender_handle_; | |
| 47 | |
| 48 DISALLOW_COPY_AND_ASSIGN(ExternalPrerenderRequestHandler); | |
| 49 }; | |
| 50 | |
| 51 } // 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
| |
| 52 | |
| 53 #endif // CHROME_BROWSER_ANDROID_EXTERNAL_PRERENDER_REQUEST_HANDLER_H_ | |
| OLD | NEW |