| Index: chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
|
| diff --git a/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h b/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..9d187c0960c3568de01da73dea7d3d1ff3b20842
|
| --- /dev/null
|
| +++ b/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2016 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_MEDIA_WEBRTC_SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID_H_
|
| +#define CHROME_BROWSER_MEDIA_WEBRTC_SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID_H_
|
| +
|
| +#include "chrome/browser/media/media_access_handler.h"
|
| +#include "components/infobars/core/confirm_infobar_delegate.h"
|
| +
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| +// An infobar that allows the user to share their screen with the current page.
|
| +class ScreenCaptureInfoBarDelegateAndroid : public ConfirmInfoBarDelegate {
|
| + public:
|
| + // Creates a screen capture infobar and delegate and adds the infobar to the
|
| + // InfoBarService associated with |web_contents|.
|
| + static void Create(content::WebContents* web_contents,
|
| + const content::MediaStreamRequest& request,
|
| + const content::MediaResponseCallback& callback);
|
| +
|
| + private:
|
| + ScreenCaptureInfoBarDelegateAndroid(
|
| + content::WebContents* web_contents,
|
| + const content::MediaStreamRequest& request,
|
| + const content::MediaResponseCallback& callback);
|
| + ~ScreenCaptureInfoBarDelegateAndroid() override;
|
| +
|
| + // ConfirmInfoBarDelegate:
|
| + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
|
| + base::string16 GetMessageText() const override;
|
| + int GetIconId() const override;
|
| + base::string16 GetButtonLabel(InfoBarButton button) const override;
|
| + bool Accept() override;
|
| + bool Cancel() override;
|
| + void InfoBarDismissed() override;
|
| +
|
| + // Runs |callback_|, passing it the |result|, and (if permission was granted)
|
| + // the appropriate stream device and UI object for video capture.
|
| + void RunCallback(content::MediaStreamRequestResult result);
|
| +
|
| + content::WebContents* web_contents_;
|
| + const content::MediaStreamRequest request_;
|
| + content::MediaResponseCallback callback_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScreenCaptureInfoBarDelegateAndroid);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_MEDIA_WEBRTC_SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID_H_
|
|
|