| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // Static method to create the object | 33 // Static method to create the object |
| 34 static void Create( | 34 static void Create( |
| 35 content::WebContents* web_contents, | 35 content::WebContents* web_contents, |
| 36 const DecodeRequestGrantedCallback& callback); | 36 const DecodeRequestGrantedCallback& callback); |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 explicit MediaThrottleInfoBarDelegate( | 39 explicit MediaThrottleInfoBarDelegate( |
| 40 const DecodeRequestGrantedCallback& callback); | 40 const DecodeRequestGrantedCallback& callback); |
| 41 | 41 |
| 42 // ConfirmInfoBarDelegate: | 42 // ConfirmInfoBarDelegate: |
| 43 std::string GetIdentifier() const override; |
| 43 MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate() override; | 44 MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate() override; |
| 44 base::string16 GetMessageText() const override; | 45 base::string16 GetMessageText() const override; |
| 45 int GetIconId() const override; | 46 int GetIconId() const override; |
| 46 base::string16 GetButtonLabel(InfoBarButton button) const override; | 47 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 47 bool Accept() override; | 48 bool Accept() override; |
| 48 bool Cancel() override; | 49 bool Cancel() override; |
| 49 void InfoBarDismissed() override; | 50 void InfoBarDismissed() override; |
| 50 | 51 |
| 51 UMAThrottleInfobarResponse infobar_response_; | 52 UMAThrottleInfobarResponse infobar_response_; |
| 52 | 53 |
| 53 DecodeRequestGrantedCallback decode_granted_callback_; | 54 DecodeRequestGrantedCallback decode_granted_callback_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(MediaThrottleInfoBarDelegate); | 56 DISALLOW_COPY_AND_ASSIGN(MediaThrottleInfoBarDelegate); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 #endif // CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ | 59 #endif // CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |