| 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 #include "chrome/browser/ui/views/options/general_page_view.h" | 5 #include "chrome/browser/ui/views/options/general_page_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "chrome/common/url_constants.h" | 33 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/installer/util/browser_distribution.h" | 34 #include "chrome/installer/util/browser_distribution.h" |
| 35 #include "grit/chromium_strings.h" | 35 #include "grit/chromium_strings.h" |
| 36 #include "grit/generated_resources.h" | 36 #include "grit/generated_resources.h" |
| 37 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 38 #include "ui/base/models/combobox_model.h" | 38 #include "ui/base/models/combobox_model.h" |
| 39 #include "views/controls/button/radio_button.h" | 39 #include "views/controls/button/radio_button.h" |
| 40 #include "views/controls/label.h" | 40 #include "views/controls/label.h" |
| 41 #include "views/controls/table/table_view.h" | 41 #include "views/controls/table/table_view.h" |
| 42 #include "views/controls/textfield/textfield.h" | 42 #include "views/controls/textfield/textfield.h" |
| 43 #include "views/grid_layout.h" | 43 #include "views/layout/grid_layout.h" |
| 44 #include "views/layout/layout_constants.h" | 44 #include "views/layout/layout_constants.h" |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 // All the options pages are in the same view hierarchy. This means we need to | 48 // All the options pages are in the same view hierarchy. This means we need to |
| 49 // make sure group identifiers don't collide across different pages. | 49 // make sure group identifiers don't collide across different pages. |
| 50 const int kStartupRadioGroup = 101; | 50 const int kStartupRadioGroup = 101; |
| 51 const int kHomePageRadioGroup = 102; | 51 const int kHomePageRadioGroup = 102; |
| 52 const SkColor kDefaultBrowserLabelColor = SkColorSetRGB(0, 135, 0); | 52 const SkColor kDefaultBrowserLabelColor = SkColorSetRGB(0, 135, 0); |
| 53 const SkColor kNotDefaultBrowserLabelColor = SkColorSetRGB(135, 0, 0); | 53 const SkColor kNotDefaultBrowserLabelColor = SkColorSetRGB(135, 0, 0); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 } | 889 } |
| 890 homepage_use_url_textfield_->SetEnabled(enabled); | 890 homepage_use_url_textfield_->SetEnabled(enabled); |
| 891 homepage_use_url_textfield_->SetReadOnly(!enabled); | 891 homepage_use_url_textfield_->SetReadOnly(!enabled); |
| 892 } | 892 } |
| 893 | 893 |
| 894 void GeneralPageView::SetDefaultSearchProvider() { | 894 void GeneralPageView::SetDefaultSearchProvider() { |
| 895 const int index = default_search_engine_combobox_->selected_item(); | 895 const int index = default_search_engine_combobox_->selected_item(); |
| 896 default_search_engines_model_->model()->SetDefaultSearchProvider( | 896 default_search_engines_model_->model()->SetDefaultSearchProvider( |
| 897 default_search_engines_model_->GetTemplateURLAt(index)); | 897 default_search_engines_model_->GetTemplateURLAt(index)); |
| 898 } | 898 } |
| OLD | NEW |