| 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_VIEWS_OPTIONS_EXCEPTIONS_PAGE_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_OPTIONS_EXCEPTIONS_PAGE_VIEW_H_ |
| 7 |
| 8 #include "chrome/browser/views/options/options_page_view.h" |
| 9 #include "chrome/browser/views/options/passwords_page_view.h" |
| 10 |
| 11 class Profile; |
| 12 |
| 13 /////////////////////////////////////////////////////////////////////////////// |
| 14 // ExceptionsTableModel |
| 15 class ExceptionsTableModel : public PasswordsTableModel { |
| 16 public: |
| 17 explicit ExceptionsTableModel(Profile* profile); |
| 18 virtual ~ExceptionsTableModel(); |
| 19 |
| 20 // TableModel methods. |
| 21 virtual std::wstring GetText(int row, int column); |
| 22 virtual int CompareValues(int row1, int row2, int col_id); |
| 23 |
| 24 // WebDataServiceConsumer implementation. |
| 25 virtual void OnWebDataServiceRequestDone(WebDataService::Handle h, |
| 26 const WDTypedResult* result); |
| 27 // Request all logins data. |
| 28 void GetAllExceptionsForProfile(); |
| 29 }; |
| 30 |
| 31 /////////////////////////////////////////////////////////////////////////////// |
| 32 // ExceptionsPageView |
| 33 class ExceptionsPageView : public OptionsPageView, |
| 34 public views::TableViewObserver, |
| 35 public views::ButtonListener, |
| 36 public PasswordsTableModelObserver { |
| 37 public: |
| 38 explicit ExceptionsPageView(Profile* profile); |
| 39 |
| 40 // views::TableViewObserverImplementation. |
| 41 virtual void OnSelectionChanged(); |
| 42 |
| 43 // views::ButtonListener implementation. |
| 44 virtual void ButtonPressed(views::Button* sender); |
| 45 |
| 46 // PasswordsTableModelObserver implementation. |
| 47 virtual void OnRowCountChanged(size_t rows); |
| 48 |
| 49 protected: |
| 50 virtual void InitControlLayout(); |
| 51 |
| 52 private: |
| 53 // Helper to configure our buttons and labels. |
| 54 void SetupButtons(); |
| 55 |
| 56 // Helper to configure our table view. |
| 57 void SetupTable(); |
| 58 |
| 59 ExceptionsTableModel table_model_; |
| 60 views::TableView* table_view_; |
| 61 |
| 62 // The buttons and labels. |
| 63 views::NativeButton remove_button_; |
| 64 views::NativeButton remove_all_button_; |
| 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(ExceptionsPageView); |
| 67 }; |
| 68 |
| 69 #endif // CHROME_BROWSER_VIEWS_OPTIONS_EXCEPTIONS_PAGE_VIEW_H_ |
| OLD | NEW |