OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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_LANGUAGE_ORDER_TABLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_LANGUAGE_ORDER_TABLE_MODEL_H_ |
6 #define CHROME_BROWSER_LANGUAGE_ORDER_TABLE_MODEL_H_ | 6 #define CHROME_BROWSER_LANGUAGE_ORDER_TABLE_MODEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "app/table_model.h" | 12 #include "app/table_model.h" |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" |
14 | 15 |
15 class TableModelObserver; | 16 class TableModelObserver; |
16 | 17 |
17 class LanguageOrderTableModel : public TableModel { | 18 class LanguageOrderTableModel : public TableModel { |
18 public: | 19 public: |
19 LanguageOrderTableModel(); | 20 LanguageOrderTableModel(); |
20 | 21 |
21 virtual ~LanguageOrderTableModel(); | 22 virtual ~LanguageOrderTableModel(); |
22 | 23 |
23 // Set Language List. | 24 // Set Language List. |
(...skipping 12 matching lines...) Expand all Loading... |
36 // Move down the entry at the specified index. | 37 // Move down the entry at the specified index. |
37 void MoveDown(int index); | 38 void MoveDown(int index); |
38 | 39 |
39 // Move up the entry at the specified index. | 40 // Move up the entry at the specified index. |
40 void MoveUp(int index); | 41 void MoveUp(int index); |
41 | 42 |
42 // Returns the set of languagess this model contains. | 43 // Returns the set of languagess this model contains. |
43 std::string GetLanguageList(); | 44 std::string GetLanguageList(); |
44 | 45 |
45 // TableModel overrides: | 46 // TableModel overrides: |
46 virtual int RowCount(); | 47 virtual int RowCount() OVERRIDE; |
47 virtual std::wstring GetText(int row, int column_id); | 48 virtual string16 GetText(int row, int column_id) OVERRIDE; |
48 virtual void SetObserver(TableModelObserver* observer); | 49 virtual void SetObserver(TableModelObserver* observer) OVERRIDE; |
49 | 50 |
50 private: | 51 private: |
51 // Set of entries we're showing. | 52 // Set of entries we're showing. |
52 std::vector<std::string> languages_; | 53 std::vector<std::string> languages_; |
53 std::string comma_separated_language_list_; | 54 std::string comma_separated_language_list_; |
54 | 55 |
55 TableModelObserver* observer_; | 56 TableModelObserver* observer_; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(LanguageOrderTableModel); | 58 DISALLOW_COPY_AND_ASSIGN(LanguageOrderTableModel); |
58 }; | 59 }; |
59 | 60 |
60 #endif // CHROME_BROWSER_LANGUAGE_ORDER_TABLE_MODEL_H_ | 61 #endif // CHROME_BROWSER_LANGUAGE_ORDER_TABLE_MODEL_H_ |
OLD | NEW |