| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "app/table_model.h" | 13 #include "app/table_model.h" |
| 14 #include "base/compiler_specific.h" |
| 14 #include "chrome/browser/chromeos/options/language_config_model.h" | 15 #include "chrome/browser/chromeos/options/language_config_model.h" |
| 15 #include "chrome/browser/views/options/options_page_view.h" | 16 #include "chrome/browser/views/options/options_page_view.h" |
| 16 #include "views/controls/button/native_button.h" | 17 #include "views/controls/button/native_button.h" |
| 17 #include "views/controls/combobox/combobox.h" | 18 #include "views/controls/combobox/combobox.h" |
| 18 #include "views/controls/label.h" | 19 #include "views/controls/label.h" |
| 19 #include "views/controls/table/table_view2.h" | 20 #include "views/controls/table/table_view2.h" |
| 20 #include "views/controls/table/table_view_observer.h" | 21 #include "views/controls/table/table_view_observer.h" |
| 21 #include "views/grid_layout.h" | 22 #include "views/grid_layout.h" |
| 22 #include "views/window/dialog_delegate.h" | 23 #include "views/window/dialog_delegate.h" |
| 23 | 24 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual gfx::Size GetPreferredSize(); | 58 virtual gfx::Size GetPreferredSize(); |
| 58 | 59 |
| 59 // views::TableViewObserver overrides: | 60 // views::TableViewObserver overrides: |
| 60 virtual void OnSelectionChanged(); | 61 virtual void OnSelectionChanged(); |
| 61 | 62 |
| 62 // TableModel overrides: | 63 // TableModel overrides: |
| 63 // To workaround crbug.com/38266, implement TreeModel as part of | 64 // To workaround crbug.com/38266, implement TreeModel as part of |
| 64 // LanguageConfigView class, rather than a separate class. | 65 // LanguageConfigView class, rather than a separate class. |
| 65 // TODO(satorux): Implement TableModel as a separate class once the bug | 66 // TODO(satorux): Implement TableModel as a separate class once the bug |
| 66 // is fixed. | 67 // is fixed. |
| 67 virtual std::wstring GetText(int row, int column_id); | 68 virtual string16 GetText(int row, int column_id) OVERRIDE; |
| 68 virtual void SetObserver(TableModelObserver* observer); | 69 virtual void SetObserver(TableModelObserver* observer) OVERRIDE; |
| 69 virtual int RowCount(); | 70 virtual int RowCount() OVERRIDE; |
| 70 | 71 |
| 71 // views::Combobox::Listener overrides: | 72 // views::Combobox::Listener overrides: |
| 72 virtual void ItemChanged(views::Combobox* combobox, | 73 virtual void ItemChanged(views::Combobox* combobox, |
| 73 int prev_index, | 74 int prev_index, |
| 74 int new_index); | 75 int new_index); |
| 75 | 76 |
| 76 // OptionsPageView overrides. | 77 // OptionsPageView overrides. |
| 77 virtual void InitControlLayout(); | 78 virtual void InitControlLayout(); |
| 78 | 79 |
| 79 // Shows the language config dialog in a new window. | 80 // Shows the language config dialog in a new window. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 views::TableView2* preferred_language_table_; | 141 views::TableView2* preferred_language_table_; |
| 141 scoped_ptr<AddLanguageComboboxModel> add_language_combobox_model_; | 142 scoped_ptr<AddLanguageComboboxModel> add_language_combobox_model_; |
| 142 views::Combobox* add_language_combobox_; | 143 views::Combobox* add_language_combobox_; |
| 143 | 144 |
| 144 DISALLOW_COPY_AND_ASSIGN(LanguageConfigView); | 145 DISALLOW_COPY_AND_ASSIGN(LanguageConfigView); |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 } // namespace chromeos | 148 } // namespace chromeos |
| 148 | 149 |
| 149 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ | 150 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_LANGUAGE_CONFIG_VIEW_H_ |
| OLD | NEW |