Chromium Code Reviews| Index: chrome/browser/android/logo_bridge.h |
| diff --git a/chrome/browser/android/logo_bridge.h b/chrome/browser/android/logo_bridge.h |
| index 37d30ee225ca32e80a6ba8b8781500bd41644879..ccefe492996f3744ccc4092da226f6e3aae732b2 100644 |
| --- a/chrome/browser/android/logo_bridge.h |
| +++ b/chrome/browser/android/logo_bridge.h |
| @@ -7,23 +7,50 @@ |
| #include <jni.h> |
| +#include "base/android/scoped_java_ref.h" |
| #include "base/macros.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "net/url_request/url_fetcher_delegate.h" |
| class LogoService; |
| +namespace net { |
| +class URLFetcher; |
| +class URLRequestContextGetter; |
| +} |
| + |
| // The C++ counterpart to LogoBridge.java. Enables Java code to access the |
| // default search provider's logo. |
| -class LogoBridge { |
| +class LogoBridge : public net::URLFetcherDelegate { |
| public: |
| explicit LogoBridge(jobject j_profile); |
| void Destroy(JNIEnv* env, jobject obj); |
| void GetCurrentLogo(JNIEnv* env, jobject obj, jobject j_logo_observer); |
| + jboolean GetAnimatedLogo(JNIEnv* env, |
| + jobject obj, |
|
newt (away)
2015/09/23 20:38:44
indentation
Ian Wen
2015/09/23 21:59:52
Done.
|
| + jobject j_callback, |
| + jstring j_url); |
| + |
| + // net::URLFetcherDelegate: |
| + void OnURLFetchComplete(const net::URLFetcher* source) override; |
| + |
| private: |
| - ~LogoBridge(); |
| + ~LogoBridge() override; |
| + |
| + // Clears and resets the URLFetcher for animated logo. |
| + void ClearFetcher(); |
| LogoService* logo_service_; |
| + |
| + // The URLFetcher currently fetching the logo. NULL when not fetching. |
|
newt (away)
2015/09/23 20:38:44
s/logo/animated logo/
Ian Wen
2015/09/23 21:59:52
Done.
|
| + scoped_ptr<net::URLFetcher> fetcher_; |
| + |
| + // The URLRequestContextGetter used for network requests. |
|
newt (away)
2015/09/23 20:38:43
"... used to download the animated logo."
Ian Wen
2015/09/23 21:59:52
Done.
|
| + scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
| + |
| + base::android::ScopedJavaGlobalRef<jobject> j_callback_; |
| + |
| base::WeakPtrFactory<LogoBridge> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(LogoBridge); |