| OLD | NEW |
| (Empty) | |
| 1 // Copyright 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_CONFIRMATION_UI_H_ |
| 6 #define CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_H_ |
| 7 |
| 8 #include "base/callback.h" |
| 9 #include "base/string16.h" |
| 10 |
| 11 // Interface for screen capture confirmation UI to get user consent before |
| 12 // starting screen capturing. |
| 13 class ScreenCaptureConfirmationUI { |
| 14 public: |
| 15 enum Result { |
| 16 ALLOW, |
| 17 DENY, |
| 18 }; |
| 19 |
| 20 typedef base::Callback<void(Result result)> ResultCallback; |
| 21 |
| 22 virtual ~ScreenCaptureConfirmationUI() {} |
| 23 |
| 24 // Shows the screen capture confirmation prompt. |result_callback| will be |
| 25 // invoked when the user chooses to stop capturing. |title| specifies the |
| 26 // title of the application that requested screen capture. Returns false if |
| 27 // the prompt cannot be shown for any reason (|result_callback| is ignored in |
| 28 // that case). |
| 29 virtual bool Show(const ResultCallback& result_callback, |
| 30 const string16& title) = 0; |
| 31 }; |
| 32 |
| 33 #endif // CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_H_ |
| OLD | NEW |