OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "app/table_model.h" | 11 #include "app/table_model.h" |
12 #include "app/text_elider.h" | 12 #include "app/text_elider.h" |
| 13 #include "base/compiler_specific.h" |
13 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
14 #include "base/stl_util-inl.h" | 15 #include "base/stl_util-inl.h" |
15 #include "chrome/browser/password_manager/password_store.h" | 16 #include "chrome/browser/password_manager/password_store.h" |
16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/prefs/pref_member.h" | 18 #include "chrome/browser/prefs/pref_member.h" |
18 #include "chrome/browser/views/confirm_message_box_dialog.h" | 19 #include "chrome/browser/views/confirm_message_box_dialog.h" |
19 #include "chrome/browser/views/options/options_page_view.h" | 20 #include "chrome/browser/views/options/options_page_view.h" |
20 #include "views/controls/button/native_button.h" | 21 #include "views/controls/button/native_button.h" |
21 #include "views/controls/label.h" | 22 #include "views/controls/label.h" |
22 #include "views/controls/table/table_view.h" | 23 #include "views/controls/table/table_view.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 63 |
63 /////////////////////////////////////////////////////////////////////////////// | 64 /////////////////////////////////////////////////////////////////////////////// |
64 // PasswordsTableModel | 65 // PasswordsTableModel |
65 class PasswordsTableModel : public TableModel, | 66 class PasswordsTableModel : public TableModel, |
66 public PasswordStoreConsumer { | 67 public PasswordStoreConsumer { |
67 public: | 68 public: |
68 explicit PasswordsTableModel(Profile* profile); | 69 explicit PasswordsTableModel(Profile* profile); |
69 virtual ~PasswordsTableModel(); | 70 virtual ~PasswordsTableModel(); |
70 | 71 |
71 // TableModel methods. | 72 // TableModel methods. |
72 virtual int RowCount(); | 73 virtual int RowCount() OVERRIDE; |
73 virtual std::wstring GetText(int row, int column); | 74 virtual string16 GetText(int row, int column) OVERRIDE; |
74 virtual int CompareValues(int row1, int row2, int column_id); | 75 virtual int CompareValues(int row1, int row2, int column_id) OVERRIDE; |
75 virtual void SetObserver(TableModelObserver* observer); | 76 virtual void SetObserver(TableModelObserver* observer) OVERRIDE; |
76 | 77 |
77 // Delete the PasswordForm at specified row from the database (and remove | 78 // Delete the PasswordForm at specified row from the database (and remove |
78 // from view). | 79 // from view). |
79 void ForgetAndRemoveSignon(int row); | 80 void ForgetAndRemoveSignon(int row); |
80 | 81 |
81 // Delete all saved signons for the active profile (via web data service), | 82 // Delete all saved signons for the active profile (via web data service), |
82 // and clear the view. | 83 // and clear the view. |
83 void ForgetAndRemoveAllSignons(); | 84 void ForgetAndRemoveAllSignons(); |
84 | 85 |
85 // PasswordStoreConsumer implementation. | 86 // PasswordStoreConsumer implementation. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 views::Label password_label_; | 192 views::Label password_label_; |
192 webkit_glue::PasswordForm* current_selected_password_; | 193 webkit_glue::PasswordForm* current_selected_password_; |
193 | 194 |
194 // Tracks the preference that controls whether showing passwords is allowed. | 195 // Tracks the preference that controls whether showing passwords is allowed. |
195 BooleanPrefMember allow_show_passwords_; | 196 BooleanPrefMember allow_show_passwords_; |
196 | 197 |
197 DISALLOW_COPY_AND_ASSIGN(PasswordsPageView); | 198 DISALLOW_COPY_AND_ASSIGN(PasswordsPageView); |
198 }; | 199 }; |
199 | 200 |
200 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ | 201 #endif // CHROME_BROWSER_UI_VIEWS_OPTIONS_PASSWORDS_PAGE_VIEW_H_ |
OLD | NEW |