OLD | NEW |
| (Empty) |
1 // Copyright (c) 2009 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_VIEWS_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_VIEW_H_ | |
7 #pragma once | |
8 | |
9 #include "views/view.h" | |
10 #include "views/window/dialog_delegate.h" | |
11 | |
12 class Profile; | |
13 class PasswordsPageView; | |
14 class ExceptionsPageView; | |
15 | |
16 namespace views { | |
17 class TabbedPane; | |
18 } | |
19 | |
20 /////////////////////////////////////////////////////////////////////////////// | |
21 // PasswordsExceptionsWindowView | |
22 // | |
23 // The contents of the "Save passwords and exceptions" dialog window. | |
24 // | |
25 class PasswordsExceptionsWindowView : public views::View, | |
26 public views::DialogDelegate { | |
27 public: | |
28 explicit PasswordsExceptionsWindowView(Profile* profile); | |
29 virtual ~PasswordsExceptionsWindowView() {} | |
30 | |
31 // Show the PasswordManagerExceptionsView for the given profile. | |
32 static void Show(Profile* profile); | |
33 | |
34 // views::View methods. | |
35 virtual void Layout(); | |
36 virtual gfx::Size GetPreferredSize(); | |
37 virtual void ViewHierarchyChanged(bool is_add, views::View* parent, | |
38 views::View* child); | |
39 | |
40 // views::DialogDelegate methods: | |
41 virtual int GetDialogButtons() const; | |
42 virtual bool CanResize() const { return true; } | |
43 virtual bool CanMaximize() const { return false; } | |
44 virtual bool IsAlwaysOnTop() const { return false; } | |
45 virtual bool HasAlwaysOnTopMenu() const { return false; } | |
46 virtual std::wstring GetWindowTitle() const; | |
47 virtual void WindowClosing(); | |
48 virtual views::View* GetContentsView(); | |
49 | |
50 private: | |
51 void Init(); | |
52 | |
53 // The Tab view that contains all of the options pages. | |
54 views::TabbedPane* tabs_; | |
55 | |
56 PasswordsPageView* passwords_page_view_; | |
57 | |
58 ExceptionsPageView* exceptions_page_view_; | |
59 | |
60 Profile* profile_; | |
61 | |
62 static PasswordsExceptionsWindowView* instance_; | |
63 | |
64 DISALLOW_COPY_AND_ASSIGN(PasswordsExceptionsWindowView); | |
65 }; | |
66 | |
67 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_EXCEPTIONS_WINDOW_VIEW_H_ | |
OLD | NEW |