OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 15 matching lines...) Expand all Loading... |
26 // of pages the user wants opened on startup. | 26 // of pages the user wants opened on startup. |
27 | 27 |
28 class CustomHomePagesTableModel : public ui::TableModel { | 28 class CustomHomePagesTableModel : public ui::TableModel { |
29 public: | 29 public: |
30 explicit CustomHomePagesTableModel(Profile* profile); | 30 explicit CustomHomePagesTableModel(Profile* profile); |
31 virtual ~CustomHomePagesTableModel(); | 31 virtual ~CustomHomePagesTableModel(); |
32 | 32 |
33 // Sets the set of urls that this model contains. | 33 // Sets the set of urls that this model contains. |
34 void SetURLs(const std::vector<GURL>& urls); | 34 void SetURLs(const std::vector<GURL>& urls); |
35 | 35 |
| 36 // Collect all entries indexed by |index_list|, and moves them to be right |
| 37 // before the element addressed by |insert_before|. Used by Drag&Drop. |
| 38 void MoveURLs(int insert_before, const std::vector<int>& index_list); |
| 39 |
36 // Adds an entry at the specified index. | 40 // Adds an entry at the specified index. |
37 void Add(int index, const GURL& url); | 41 void Add(int index, const GURL& url); |
38 | 42 |
39 // Removes the entry at the specified index. | 43 // Removes the entry at the specified index. |
40 void Remove(int index); | 44 void Remove(int index); |
41 | 45 |
42 // Clears any entries and fills the list with pages currently opened in the | 46 // Clears any entries and fills the list with pages currently opened in the |
43 // browser. | 47 // browser. |
44 void SetToCurrentlyOpenPages(); | 48 void SetToCurrentlyOpenPages(); |
45 | 49 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 97 |
94 ui::TableModelObserver* observer_; | 98 ui::TableModelObserver* observer_; |
95 | 99 |
96 // Used in loading titles and favicons. | 100 // Used in loading titles and favicons. |
97 CancelableRequestConsumer query_consumer_; | 101 CancelableRequestConsumer query_consumer_; |
98 | 102 |
99 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); | 103 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); |
100 }; | 104 }; |
101 | 105 |
102 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ | 106 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ |
OLD | NEW |