| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_AUTOFILL_PROFILES_VIEW_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "app/combobox_model.h" | 13 #include "app/combobox_model.h" |
| 14 #include "app/table_model.h" | 14 #include "app/table_model.h" |
| 15 #include "base/compiler_specific.h" |
| 15 #include "base/string16.h" | 16 #include "base/string16.h" |
| 16 #include "chrome/browser/autofill/autofill_dialog.h" | 17 #include "chrome/browser/autofill/autofill_dialog.h" |
| 17 #include "chrome/browser/autofill/autofill_profile.h" | 18 #include "chrome/browser/autofill/autofill_profile.h" |
| 18 #include "chrome/browser/autofill/personal_data_manager.h" | 19 #include "chrome/browser/autofill/personal_data_manager.h" |
| 19 #include "chrome/browser/prefs/pref_member.h" | 20 #include "chrome/browser/prefs/pref_member.h" |
| 20 #include "chrome/common/notification_observer.h" | 21 #include "chrome/common/notification_observer.h" |
| 21 #include "views/controls/combobox/combobox.h" | 22 #include "views/controls/combobox/combobox.h" |
| 22 #include "views/controls/link.h" | 23 #include "views/controls/link.h" |
| 23 #include "views/controls/table/table_view_observer.h" | 24 #include "views/controls/table/table_view_observer.h" |
| 24 #include "views/controls/textfield/textfield.h" | 25 #include "views/controls/textfield/textfield.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 // button. | 392 // button. |
| 392 static const int kAddressGroup = 1; | 393 static const int kAddressGroup = 1; |
| 393 static const int kCreditCardGroup = 2; | 394 static const int kCreditCardGroup = 2; |
| 394 | 395 |
| 395 void Refresh(); | 396 void Refresh(); |
| 396 void AddItem(int index); | 397 void AddItem(int index); |
| 397 void RemoveItem(int index); | 398 void RemoveItem(int index); |
| 398 void UpdateItem(int index); | 399 void UpdateItem(int index); |
| 399 | 400 |
| 400 // TableModel members: | 401 // TableModel members: |
| 401 virtual int RowCount(); | 402 virtual int RowCount() OVERRIDE; |
| 402 virtual std::wstring GetText(int row, int column_id); | 403 virtual string16 GetText(int row, int column_id) OVERRIDE; |
| 403 virtual bool HasGroups() { return true; } | 404 virtual bool HasGroups() OVERRIDE { return true; } |
| 404 virtual TableModel::Groups GetGroups(); | 405 virtual TableModel::Groups GetGroups() OVERRIDE; |
| 405 virtual int GetGroupID(int row); | 406 virtual int GetGroupID(int row) OVERRIDE; |
| 406 virtual void SetObserver(TableModelObserver* observer); | 407 virtual void SetObserver(TableModelObserver* observer) OVERRIDE; |
| 407 | 408 |
| 408 private: | 409 private: |
| 409 std::vector<EditableSetInfo>* profiles_; | 410 std::vector<EditableSetInfo>* profiles_; |
| 410 std::vector<EditableSetInfo>* credit_cards_; | 411 std::vector<EditableSetInfo>* credit_cards_; |
| 411 TableModelObserver* observer_; | 412 TableModelObserver* observer_; |
| 412 | 413 |
| 413 DISALLOW_COPY_AND_ASSIGN(ContentListTableModel); | 414 DISALLOW_COPY_AND_ASSIGN(ContentListTableModel); |
| 414 }; | 415 }; |
| 415 | 416 |
| 416 AutoFillDialogObserver* observer_; | 417 AutoFillDialogObserver* observer_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 431 scoped_ptr<ContentListTableModel> table_model_; | 432 scoped_ptr<ContentListTableModel> table_model_; |
| 432 views::FocusManager* focus_manager_; | 433 views::FocusManager* focus_manager_; |
| 433 bool child_dialog_opened_; | 434 bool child_dialog_opened_; |
| 434 | 435 |
| 435 static AutoFillProfilesView* instance_; | 436 static AutoFillProfilesView* instance_; |
| 436 | 437 |
| 437 DISALLOW_COPY_AND_ASSIGN(AutoFillProfilesView); | 438 DISALLOW_COPY_AND_ASSIGN(AutoFillProfilesView); |
| 438 }; | 439 }; |
| 439 | 440 |
| 440 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ | 441 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_PROFILES_VIEW_WIN_H_ |
| OLD | NEW |