| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2013 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_UI_SCREEN_CAPTURE_INFOBAR_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_SCREEN_CAPTURE_INFOBAR_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | |
| 10 #include "content/public/browser/web_contents_delegate.h" | |
| 11 #include "content/public/common/media_stream_request.h" | |
| 12 | |
| 13 class InfoBarService; | |
| 14 | |
| 15 class ScreenCaptureInfoBarDelegate : public ConfirmInfoBarDelegate { | |
| 16 public: | |
| 17 static void Create( | |
| 18 content::WebContents* web_contents, | |
| 19 const content::MediaStreamRequest& request, | |
| 20 const content::MediaResponseCallback& callback); | |
| 21 | |
| 22 virtual ~ScreenCaptureInfoBarDelegate(); | |
| 23 | |
| 24 private: | |
| 25 ScreenCaptureInfoBarDelegate( | |
| 26 InfoBarService* infobar_service, | |
| 27 const content::MediaStreamRequest& request, | |
| 28 const content::MediaResponseCallback& callback); | |
| 29 | |
| 30 // Base class: ConfirmInfoBarDelegate. | |
| 31 virtual bool EqualsDelegate(InfoBarDelegate* delegate) const OVERRIDE; | |
| 32 virtual void InfoBarDismissed() OVERRIDE; | |
| 33 virtual Type GetInfoBarType() const OVERRIDE; | |
| 34 virtual ScreenCaptureInfoBarDelegate* | |
| 35 AsScreenCaptureInfoBarDelegate() OVERRIDE; | |
| 36 virtual string16 GetMessageText() const OVERRIDE; | |
| 37 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | |
| 38 virtual bool Accept() OVERRIDE; | |
| 39 virtual bool Cancel() OVERRIDE; | |
| 40 | |
| 41 void Deny(); | |
| 42 | |
| 43 const content::MediaStreamRequest request_; | |
| 44 const content::MediaResponseCallback callback_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(ScreenCaptureInfoBarDelegate); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_UI_SCREEN_CAPTURE_INFOBAR_DELEGATE_H_ | |
| OLD | NEW |