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

Unified Diff: chrome/browser/ui/screen_capture_confirmation_ui_infobar.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
Index: chrome/browser/ui/screen_capture_confirmation_ui_infobar.h
diff --git a/chrome/browser/ui/screen_capture_confirmation_ui_infobar.h b/chrome/browser/ui/screen_capture_confirmation_ui_infobar.h
new file mode 100644
index 0000000000000000000000000000000000000000..7563b73f07caa091d3cc703ce58ee83b2296d29b
--- /dev/null
+++ b/chrome/browser/ui/screen_capture_confirmation_ui_infobar.h
@@ -0,0 +1,42 @@
+// 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_INFOBAR_H_
+#define CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_INFOBAR_H_
+
+#include "base/basictypes.h"
+#include "chrome/browser/ui/screen_capture_confirmation_ui.h"
+#include "chrome/browser/ui/screen_capture_infobar_delegate.h"
+
+namespace content {
+class WebContents;
+}
+
+// Implements ScreenCaptureConfirmationUI using infobar.
+//
+// TODO(sergeyu): Replace this class with a confirmation prompt that doesn't use
+// infobars.
+class ScreenCaptureConfirmationUIInfobar
+ : public ScreenCaptureConfirmationUI {
+ public:
+ explicit ScreenCaptureConfirmationUIInfobar(
+ content::WebContents* web_contents);
+ virtual ~ScreenCaptureConfirmationUIInfobar();
+
+ // ScreenCaptureConfirmationUI interface.
+ virtual bool Show(const ResultCallback& result_callback,
+ const string16& title) OVERRIDE;
+
+ // Called by ScreenCaptureInfoBarDelegate.
+ void OnInfobarResult(bool allow);
+
+ private:
+ ResultCallback result_callback_;
+ InfoBarService* infobar_service_;
+ ScreenCaptureInfoBarDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScreenCaptureConfirmationUIInfobar);
+};
+
+#endif // CHROME_BROWSER_UI_SCREEN_CAPTURE_CONFIRMATION_UI_INFOBAR_H_

Powered by Google App Engine
This is Rietveld 408576698