| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ | 6 #define CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 void Remove(int index); | 48 void Remove(int index); |
| 49 | 49 |
| 50 // Clears any entries and fills the list with pages currently opened in the | 50 // Clears any entries and fills the list with pages currently opened in the |
| 51 // browser. | 51 // browser. |
| 52 void SetToCurrentlyOpenPages(); | 52 void SetToCurrentlyOpenPages(); |
| 53 | 53 |
| 54 // Returns the set of urls this model contains. | 54 // Returns the set of urls this model contains. |
| 55 std::vector<GURL> GetURLs(); | 55 std::vector<GURL> GetURLs(); |
| 56 | 56 |
| 57 // TableModel overrides: | 57 // TableModel overrides: |
| 58 virtual int RowCount() OVERRIDE; | 58 virtual int RowCount() override; |
| 59 virtual base::string16 GetText(int row, int column_id) OVERRIDE; | 59 virtual base::string16 GetText(int row, int column_id) override; |
| 60 virtual base::string16 GetTooltip(int row) OVERRIDE; | 60 virtual base::string16 GetTooltip(int row) override; |
| 61 virtual void SetObserver(ui::TableModelObserver* observer) OVERRIDE; | 61 virtual void SetObserver(ui::TableModelObserver* observer) override; |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Each item in the model is represented as an Entry. Entry stores the URL | 64 // Each item in the model is represented as an Entry. Entry stores the URL |
| 65 // and title of the page. | 65 // and title of the page. |
| 66 struct Entry; | 66 struct Entry; |
| 67 | 67 |
| 68 // Loads the title for the specified entry. | 68 // Loads the title for the specified entry. |
| 69 void LoadTitle(Entry* entry); | 69 void LoadTitle(Entry* entry); |
| 70 | 70 |
| 71 // Callback from history service. Updates the title of the Entry whose | 71 // Callback from history service. Updates the title of the Entry whose |
| (...skipping 14 matching lines...) Expand all Loading... |
| 86 | 86 |
| 87 ui::TableModelObserver* observer_; | 87 ui::TableModelObserver* observer_; |
| 88 | 88 |
| 89 // Used in loading titles. | 89 // Used in loading titles. |
| 90 base::CancelableTaskTracker task_tracker_; | 90 base::CancelableTaskTracker task_tracker_; |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); | 92 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ | 95 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ |
| OLD | NEW |