| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_SETTINGS_PAGE_VIEW_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_SETTINGS_PAGE_VIEW_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <gtk/gtk.h> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "chrome/browser/ui/views/options/options_page_view.h" | |
| 13 #include "views/layout/grid_layout.h" | |
| 14 | |
| 15 using views::ColumnSet; | |
| 16 using views::GridLayout; | |
| 17 | |
| 18 namespace chromeos { | |
| 19 | |
| 20 class SettingsContentsView; | |
| 21 | |
| 22 // Settings page for Chrome OS. | |
| 23 class SettingsPageView : public OptionsPageView { | |
| 24 public: | |
| 25 explicit SettingsPageView(Profile* profile); | |
| 26 | |
| 27 // Wraps the SettingsPageView in a GtkWidget and returns it. It's up to the | |
| 28 // caller to delete (unref) the returned widget, which in turn deletes this | |
| 29 // SettingsPageView. | |
| 30 GtkWidget* WrapInGtkWidget(); | |
| 31 | |
| 32 protected: | |
| 33 virtual void InitControlLayout() = 0; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(SettingsPageView); | |
| 36 }; | |
| 37 | |
| 38 // Base section class settings | |
| 39 class SettingsPageSection : public OptionsPageView { | |
| 40 public: | |
| 41 explicit SettingsPageSection(Profile* profile, int title_msg_id); | |
| 42 virtual ~SettingsPageSection() {} | |
| 43 | |
| 44 protected: | |
| 45 // OptionsPageView overrides: | |
| 46 virtual void InitControlLayout(); | |
| 47 virtual void InitContents(GridLayout* layout) = 0; | |
| 48 | |
| 49 int single_column_view_set_id() const { return single_column_view_set_id_; } | |
| 50 int double_column_view_set_id() const { return double_column_view_set_id_; } | |
| 51 | |
| 52 private: | |
| 53 // The message id for the title of this section. | |
| 54 int title_msg_id_; | |
| 55 | |
| 56 int single_column_view_set_id_; | |
| 57 int double_column_view_set_id_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(SettingsPageSection); | |
| 60 }; | |
| 61 | |
| 62 } // namespace chromeos | |
| 63 | |
| 64 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_SETTINGS_PAGE_VIEW_H_ | |
| OLD | NEW |