| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.h" | 10 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate.h" |
| 11 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" | 11 #include "chrome/browser/ui/android/infobars/confirm_infobar.h" |
| 12 | 12 |
| 13 namespace infobars { |
| 14 class InfoBarManager; |
| 15 } |
| 16 |
| 13 class DataReductionProxyInfoBar : public ConfirmInfoBar { | 17 class DataReductionProxyInfoBar : public ConfirmInfoBar { |
| 14 public: | 18 public: |
| 15 static void Launch(JNIEnv* env, | 19 static void Launch(JNIEnv* env, |
| 16 jclass, | 20 jclass, |
| 17 jobject jweb_contents, | 21 jobject jweb_contents, |
| 18 jstring jlink_url); | 22 jstring jlink_url); |
| 19 | 23 |
| 20 static bool Register(JNIEnv* env); | 24 static bool Register(JNIEnv* env); |
| 21 | 25 |
| 22 explicit DataReductionProxyInfoBar( | 26 explicit DataReductionProxyInfoBar( |
| 27 infobars::InfoBarManager* infobar_manager, |
| 23 scoped_ptr<DataReductionProxyInfoBarDelegate> delegate); | 28 scoped_ptr<DataReductionProxyInfoBarDelegate> delegate); |
| 24 | 29 |
| 25 virtual ~DataReductionProxyInfoBar(); | 30 virtual ~DataReductionProxyInfoBar(); |
| 26 | 31 |
| 27 private: | 32 private: |
| 28 // ConfirmInfoBar: | 33 // ConfirmInfoBar: |
| 29 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( | 34 virtual base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( |
| 30 JNIEnv* env) override; | 35 JNIEnv* env) override; |
| 31 | 36 |
| 32 DataReductionProxyInfoBarDelegate* GetDelegate(); | 37 DataReductionProxyInfoBarDelegate* GetDelegate(); |
| 33 | 38 |
| 34 base::android::ScopedJavaGlobalRef<jobject> | 39 base::android::ScopedJavaGlobalRef<jobject> |
| 35 java_data_reduction_proxy_delegate_; | 40 java_data_reduction_proxy_delegate_; |
| 36 | 41 |
| 37 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyInfoBar); | 42 DISALLOW_COPY_AND_ASSIGN(DataReductionProxyInfoBar); |
| 38 }; | 43 }; |
| 39 | 44 |
| 40 bool RegisterDataReductionProxyInfoBar(JNIEnv* env); | 45 bool RegisterDataReductionProxyInfoBar(JNIEnv* env); |
| 41 | 46 |
| 42 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ | 47 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_DATA_REDUCTION_PROXY_INFOBAR_H_ |
| OLD | NEW |