Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: chrome/browser/custom_home_pages_table_model.h

Issue 7044136: Support drag&drop for startup pages (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed review issues Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/custom_home_pages_table_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Expects |index_list| to be ordered ascending.
39 void MoveURLs(int insert_before, const std::vector<int>& index_list);
40
36 // Adds an entry at the specified index. 41 // Adds an entry at the specified index.
37 void Add(int index, const GURL& url); 42 void Add(int index, const GURL& url);
38 43
39 // Removes the entry at the specified index. 44 // Removes the entry at the specified index.
40 void Remove(int index); 45 void Remove(int index);
41 46
42 // Clears any entries and fills the list with pages currently opened in the 47 // Clears any entries and fills the list with pages currently opened in the
43 // browser. 48 // browser.
44 void SetToCurrentlyOpenPages(); 49 void SetToCurrentlyOpenPages();
45 50
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 98
94 ui::TableModelObserver* observer_; 99 ui::TableModelObserver* observer_;
95 100
96 // Used in loading titles and favicons. 101 // Used in loading titles and favicons.
97 CancelableRequestConsumer query_consumer_; 102 CancelableRequestConsumer query_consumer_;
98 103
99 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel); 104 DISALLOW_COPY_AND_ASSIGN(CustomHomePagesTableModel);
100 }; 105 };
101 106
102 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_ 107 #endif // CHROME_BROWSER_CUSTOM_HOME_PAGES_TABLE_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/custom_home_pages_table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698