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

Unified Diff: chrome/browser/chromeos/password_dialog_view.h

Issue 231014: Add wifi menu button in status bar. (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
« no previous file with comments | « chrome/browser/chromeos/network_menu_button.cc ('k') | chrome/browser/chromeos/password_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/password_dialog_view.h
===================================================================
--- chrome/browser/chromeos/password_dialog_view.h (revision 0)
+++ chrome/browser/chromeos/password_dialog_view.h (revision 0)
@@ -0,0 +1,66 @@
+// Copyright (c) 2006-2008 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_CHROMEOS_PASSWORD_DIALOG_VIEW_H_
+#define CHROME_BROWSER_CHROMEOS_PASSWORD_DIALOG_VIEW_H_
+
+#include "base/string16.h"
+#include "views/window/dialog_delegate.h"
+
+namespace views {
+class Textfield;
+class View;
+class Window;
+}
+
+// Delegate implemented by caller of PasswordDialogView to handle the user
+// interacting with the dialog box.
+class PasswordDialogDelegate {
+ public:
+ // Called when user clicks on cancel button.
+ // Return whether or not to allow password dialog to close.
+ virtual bool OnPasswordDialogCancel() = 0;
+
+ // Called when user clicks on ok with a password.
+ // Return whether or not to allow password dialog to close.
+ virtual bool OnPasswordDialogAccept(const string16& password) = 0;
+};
+
+// A dialog box for showing a password textfield.
+class PasswordDialogView : public views::View,
+ public views::DialogDelegate {
+ public:
+ explicit PasswordDialogView(PasswordDialogDelegate* delegate);
+ virtual ~PasswordDialogView() {}
+
+ // views::DialogDelegate methods.
+ virtual bool Cancel();
+ virtual bool Accept();
+ virtual std::wstring GetWindowTitle() const;
+
+ // views::WindowDelegate method.
+ virtual bool IsModal() const { return true; }
+ virtual views::View* GetContentsView() { return this; }
+
+ // views::View overrides.
+ virtual void Layout();
+ virtual gfx::Size GetPreferredSize();
+
+ protected:
+ virtual void ViewHierarchyChanged(bool is_add, views::View* parent,
+ views::View* child);
+
+ private:
+ void Init();
+
+ // Used for call back to delegate that password has been entered.
+ PasswordDialogDelegate* delegate_;
+
+ // Combobox and its corresponding model.
+ views::Textfield* password_textfield_;
+
+ DISALLOW_COPY_AND_ASSIGN(PasswordDialogView);
+};
+
+#endif // CHROME_BROWSER_CHROMEOS_PASSWORD_DIALOG_VIEW_H_
Property changes on: chrome/browser/chromeos/password_dialog_view.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/chromeos/network_menu_button.cc ('k') | chrome/browser/chromeos/password_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698