OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 12 |
| 13 namespace content { |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 class MediaThrottleInfoBarDelegate : public ConfirmInfoBarDelegate { |
| 18 public: |
| 19 typedef base::Callback<void(bool)> DecodeRequestGrantedCallback; |
| 20 ~MediaThrottleInfoBarDelegate() override; |
| 21 |
| 22 // Static method to create the object |
| 23 static void Create( |
| 24 content::WebContents* web_contents, |
| 25 const DecodeRequestGrantedCallback& callback); |
| 26 |
| 27 private: |
| 28 explicit MediaThrottleInfoBarDelegate( |
| 29 const DecodeRequestGrantedCallback& callback); |
| 30 |
| 31 // ConfirmInfoBarDelegate: |
| 32 MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate() override; |
| 33 base::string16 GetMessageText() const override; |
| 34 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 35 bool Accept() override; |
| 36 bool Cancel() override; |
| 37 void InfoBarDismissed() override; |
| 38 |
| 39 DecodeRequestGrantedCallback decode_granted_callback_; |
| 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(MediaThrottleInfoBarDelegate); |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_ |
OLD | NEW |