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

Unified Diff: chrome/browser/views/blacklist_error_dialog.h

Issue 173357: Error diagnostics for Blacklist IO... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/views/blacklist_error_dialog.h
===================================================================
--- chrome/browser/views/blacklist_error_dialog.h (revision 0)
+++ chrome/browser/views/blacklist_error_dialog.h (revision 0)
@@ -0,0 +1,60 @@
+// Copyright (c) 2009 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.
+//
+// A dialog box that tells the user that we can't write to the specified user
+// data directory. Provides the user a chance to pick a different directory.
+
+#ifndef CHROME_BROWSER_BLACKLIST_ERROR_DIALOG_H_
+#define CHROME_BROWSER_BLACKLIST_ERROR_DIALOG_H_
+
+#include "base/message_loop.h"
+#include "views/window/dialog_delegate.h"
+
+class MessageBoxView;
+
+namespace views {
+class Window;
+} // namespace views
+
+class BlacklistErrorDialog : public views::DialogDelegate,
+ public MessageLoopForUI::Dispatcher {
+ public:
+ // Creates and runs a blacklist error dialog which is displayed modally
+ // to the user so that they know and acknowledge that their privacy is
+ // not protected.
+ static bool RunBlacklistErrorDialog();
+
+ virtual ~BlacklistErrorDialog();
+ bool accepted() const { return accepted_; }
+
+ // views::DialogDelegate Methods:
+ virtual std::wstring GetDialogButtonLabel(
+ MessageBoxFlags::DialogButton button) const;
+ virtual std::wstring GetWindowTitle() const;
+ virtual void DeleteDelegate();
+ virtual bool Accept();
+ virtual bool Cancel();
+
+ // views::WindowDelegate Methods:
+ virtual bool IsAlwaysOnTop() const { return false; }
+ virtual bool IsModal() const { return false; }
+ virtual views::View* GetContentsView();
+
+ // MessageLoop::Dispatcher Method:
+ virtual bool Dispatch(const MSG& msg);
+
+ private:
+ BlacklistErrorDialog();
+
+ MessageBoxView* box_view_;
+
+ // Used to keep track of whether or not to block the message loop (still
+ // waiting for the user to dismiss the dialog).
+ bool is_blocking_;
+ bool accepted_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlacklistErrorDialog);
+};
+
+#endif // CHROME_BROWSER_BLACKLIST_ERROR_DIALOG_H_
Property changes on: chrome\browser\views\blacklist_error_dialog.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698