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

Unified 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: new infobar text per UI review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/android/media/media_throttle_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/media/media_throttle_infobar_delegate.h
diff --git a/chrome/browser/android/media/media_throttle_infobar_delegate.h b/chrome/browser/android/media/media_throttle_infobar_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a717cb1261137583e4f7f7689723437e954fee7
--- /dev/null
+++ b/chrome/browser/android/media/media_throttle_infobar_delegate.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_
+#define CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "components/infobars/core/confirm_infobar_delegate.h"
+
+namespace content {
+class WebContents;
+}
+
+class MediaThrottleInfoBarDelegate : public ConfirmInfoBarDelegate {
+ public:
+ typedef base::Callback<void(bool)> DecodeRequestGrantedCallback;
+ ~MediaThrottleInfoBarDelegate() override;
+
+ // Static method to create the object
+ static void Create(
+ content::WebContents* web_contents,
+ const DecodeRequestGrantedCallback& callback);
+
+ private:
+ explicit MediaThrottleInfoBarDelegate(
+ const DecodeRequestGrantedCallback& callback);
+
+ // ConfirmInfoBarDelegate:
+ MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate() override;
+ base::string16 GetMessageText() const override;
+ base::string16 GetButtonLabel(InfoBarButton button) const override;
+ bool Accept() override;
+ bool Cancel() override;
+ void InfoBarDismissed() override;
+
+ DecodeRequestGrantedCallback decode_granted_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaThrottleInfoBarDelegate);
+};
+
+#endif // CHROME_BROWSER_ANDROID_MEDIA_MEDIA_THROTTLE_INFOBAR_DELEGATE_H_
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/android/media/media_throttle_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698