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

Unified Diff: chrome/browser/ui/screen_capture_confirmation_ui.h

Issue 12843009: Replace screen capture confirmation infobar with a message box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/browser/ui/browser.cc ('k') | chrome/browser/ui/screen_capture_confirmation_ui_infobar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/screen_capture_confirmation_ui.h
diff --git a/chrome/browser/ui/screen_capture_confirmation_ui.h b/chrome/browser/ui/screen_capture_confirmation_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..fcd3eed43e1891380ae351a0053091e236e8b284
--- /dev/null
+++ b/chrome/browser/ui/screen_capture_confirmation_ui.h
@@ -0,0 +1,33 @@
+// Copyright 2013 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_UI_SCREEN_CAPTURE_CONFIRMATION_UI_H_
+#define CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_H_
+
+#include "base/callback.h"
+#include "base/string16.h"
+
+// Interface for screen capture confirmation UI to get user consent before
+// starting screen capturing.
+class ScreenCaptureConfirmationUI {
+ public:
+ enum Result {
+ ALLOW,
+ DENY,
+ };
+
+ typedef base::Callback<void(Result result)> ResultCallback;
+
+ virtual ~ScreenCaptureConfirmationUI() {}
+
+ // Shows the screen capture confirmation prompt. |result_callback| will be
+ // invoked when the user chooses to stop capturing. |title| specifies the
+ // title of the application that requested screen capture. Returns false if
+ // the prompt cannot be shown for any reason (|result_callback| is ignored in
+ // that case).
+ virtual bool Show(const ResultCallback& result_callback,
+ const string16& title) = 0;
Greg Spencer (Chromium) 2013/03/21 21:44:24 Maybe use "application_name" instead of title? If
Sergey Ulanov 2013/03/21 22:53:05 Done.
+};
+
+#endif // CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_H_
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/screen_capture_confirmation_ui_infobar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698