Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/android/media/media_throttle_infobar_delegate.h

Issue 1372203002: Throttle media decoding after excessive Android media server crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698