| 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..37f8d2e781391259eeb6c00eb8e8da17940c00db
|
| --- /dev/null
|
| +++ b/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
|
| @@ -0,0 +1,55 @@
|
| +// 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;
|
| +}
|
| +
|
| +// This class configures an infobar shown when a page requests access to a
|
| +// user's device screen. The user is shown a message asking whether they wish to
|
| +// share their screen with the current page, and buttons to give access to the
|
| +// screen to the page, or to deny access to it.
|
| +class ScreenCaptureInfoBarDelegateAndroid : public ConfirmInfoBarDelegate {
|
| + public:
|
| + typedef content::MediaResponseCallback ResponseCallback;
|
| +
|
| + // Static method to create the object
|
| + static void Create(content::WebContents* web_contents,
|
| + const content::MediaStreamRequest& request,
|
| + const ResponseCallback& callback);
|
| +
|
| + explicit ScreenCaptureInfoBarDelegateAndroid(
|
| + content::WebContents* web_contents,
|
| + const content::MediaStreamRequest& request,
|
| + const ResponseCallback& callback);
|
| + ~ScreenCaptureInfoBarDelegateAndroid() override;
|
| +
|
| + // ConfirmInfoBarDelegate:
|
| + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
|
| + ScreenCaptureInfoBarDelegateAndroid* AsScreenCaptureInfoBarDelegateAndroid()
|
| + 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;
|
| +
|
| + private:
|
| + void RunCallback(content::MediaStreamRequestResult result);
|
| +
|
| + content::WebContents* web_contents_;
|
| + const content::MediaStreamRequest request_;
|
| + ResponseCallback callback_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ScreenCaptureInfoBarDelegateAndroid);
|
| +};
|
| +
|
| +#endif // CHROME_BROWSER_MEDIA_WEBRTC_SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID_H_
|
|
|