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 IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ | 5 #ifndef IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ |
6 #define IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ | 6 #define IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "components/infobars/core/infobar_delegate.h" | 10 #include "components/infobars/core/infobar_delegate.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 InfoBarIdentifier GetIdentifier() const override; | 57 InfoBarIdentifier GetIdentifier() const override; |
58 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; | 58 bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; |
59 net::URLRequestContextGetter* GetRequestContextGetter(); | 59 net::URLRequestContextGetter* GetRequestContextGetter(); |
60 void FetchSmallAppIcon(void (^block)(UIImage*)); | 60 void FetchSmallAppIcon(void (^block)(UIImage*)); |
61 // This function is made virtual for tests. | 61 // This function is made virtual for tests. |
62 virtual void UserPerformedAction(NativeAppActionType userAction); | 62 virtual void UserPerformedAction(NativeAppActionType userAction); |
63 NativeAppControllerType GetControllerType() const; | 63 NativeAppControllerType GetControllerType() const; |
64 | 64 |
65 private: | 65 private: |
66 bool ShouldExpire(const NavigationDetails& details) const override; | 66 bool ShouldExpire(const NavigationDetails& details) const override; |
67 id<NativeAppNavigationControllerProtocol> controller_; | 67 __weak id<NativeAppNavigationControllerProtocol> controller_; |
68 net::URLRequestContextGetter* requestContextGetter_; | 68 net::URLRequestContextGetter* requestContextGetter_; |
69 GURL page_url_; | 69 GURL page_url_; |
70 NativeAppControllerType type_; | 70 NativeAppControllerType type_; |
71 DISALLOW_COPY_AND_ASSIGN(NativeAppInfoBarDelegate); | 71 DISALLOW_COPY_AND_ASSIGN(NativeAppInfoBarDelegate); |
72 }; | 72 }; |
73 | 73 |
74 #endif // IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ | 74 #endif // IOS_CHROME_BROWSER_NATIVE_APP_LAUNCHER_NATIVE_APP_INFOBAR_DELEGATE_H_ |
OLD | NEW |