| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_INFOBAR_CONTAINER_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 JavaObjectWeakGlobalRef auto_login_delegate() const { | 30 JavaObjectWeakGlobalRef auto_login_delegate() const { |
| 31 return weak_java_auto_login_delegate_; | 31 return weak_java_auto_login_delegate_; |
| 32 } | 32 } |
| 33 | 33 |
| 34 JavaObjectWeakGlobalRef java_container() const { | 34 JavaObjectWeakGlobalRef java_container() const { |
| 35 return weak_java_infobar_container_; | 35 return weak_java_infobar_container_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 virtual ~InfoBarContainerAndroid() OVERRIDE; | 39 virtual ~InfoBarContainerAndroid() override; |
| 40 | 40 |
| 41 // InfobarContainer: | 41 // InfobarContainer: |
| 42 virtual void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar, | 42 virtual void PlatformSpecificAddInfoBar(infobars::InfoBar* infobar, |
| 43 size_t position) OVERRIDE; | 43 size_t position) override; |
| 44 virtual void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) | 44 virtual void PlatformSpecificRemoveInfoBar(infobars::InfoBar* infobar) |
| 45 OVERRIDE; | 45 override; |
| 46 virtual void PlatformSpecificReplaceInfoBar( | 46 virtual void PlatformSpecificReplaceInfoBar( |
| 47 infobars::InfoBar* old_infobar, | 47 infobars::InfoBar* old_infobar, |
| 48 infobars::InfoBar* new_infobar) OVERRIDE; | 48 infobars::InfoBar* new_infobar) override; |
| 49 | 49 |
| 50 // Create the Java equivalent of |android_bar| and add it to the java | 50 // Create the Java equivalent of |android_bar| and add it to the java |
| 51 // container. | 51 // container. |
| 52 void AttachJavaInfoBar(InfoBarAndroid* android_bar); | 52 void AttachJavaInfoBar(InfoBarAndroid* android_bar); |
| 53 | 53 |
| 54 // We're owned by the java infobar, need to use a weak ref so it can destroy | 54 // We're owned by the java infobar, need to use a weak ref so it can destroy |
| 55 // us. | 55 // us. |
| 56 JavaObjectWeakGlobalRef weak_java_infobar_container_; | 56 JavaObjectWeakGlobalRef weak_java_infobar_container_; |
| 57 JavaObjectWeakGlobalRef weak_java_auto_login_delegate_; | 57 JavaObjectWeakGlobalRef weak_java_auto_login_delegate_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerAndroid); | 59 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerAndroid); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 // Registers the InfoBarContainer's native methods through JNI. | 62 // Registers the InfoBarContainer's native methods through JNI. |
| 63 bool RegisterInfoBarContainer(JNIEnv* env); | 63 bool RegisterInfoBarContainer(JNIEnv* env); |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_ | 65 #endif // CHROME_BROWSER_UI_ANDROID_INFOBARS_INFOBAR_CONTAINER_ANDROID_H_ |
| OLD | NEW |