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 #include "chrome/browser/views/options/general_page_view.h" | 5 #include "chrome/browser/views/options/general_page_view.h" |
6 | 6 |
7 #include "app/combobox_model.h" | 7 #include "app/combobox_model.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 /////////////////////////////////////////////////////////////////////////////// | 316 /////////////////////////////////////////////////////////////////////////////// |
317 // GeneralPageView, views::Textfield::Controller implementation: | 317 // GeneralPageView, views::Textfield::Controller implementation: |
318 | 318 |
319 void GeneralPageView::ContentsChanged(views::Textfield* sender, | 319 void GeneralPageView::ContentsChanged(views::Textfield* sender, |
320 const std::wstring& new_contents) { | 320 const std::wstring& new_contents) { |
321 if (sender == homepage_use_url_textfield_) { | 321 if (sender == homepage_use_url_textfield_) { |
322 UpdateHomepagePrefs(); | 322 UpdateHomepagePrefs(); |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 bool GeneralPageView::HandleKeystroke(views::Textfield* sender, | 326 bool GeneralPageView::HandleKeyEvent(views::Textfield* sender, |
327 const views::Textfield::Keystroke&) { | 327 const views::KeyEvent& key_event) { |
328 return false; | 328 return false; |
329 } | 329 } |
330 | 330 |
331 /////////////////////////////////////////////////////////////////////////////// | 331 /////////////////////////////////////////////////////////////////////////////// |
332 // GeneralPageView, OptionsPageView implementation: | 332 // GeneralPageView, OptionsPageView implementation: |
333 | 333 |
334 void GeneralPageView::InitControlLayout() { | 334 void GeneralPageView::InitControlLayout() { |
335 using views::GridLayout; | 335 using views::GridLayout; |
336 using views::ColumnSet; | 336 using views::ColumnSet; |
337 | 337 |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 } | 874 } |
875 homepage_use_url_textfield_->SetEnabled(enabled); | 875 homepage_use_url_textfield_->SetEnabled(enabled); |
876 homepage_use_url_textfield_->SetReadOnly(!enabled); | 876 homepage_use_url_textfield_->SetReadOnly(!enabled); |
877 } | 877 } |
878 | 878 |
879 void GeneralPageView::SetDefaultSearchProvider() { | 879 void GeneralPageView::SetDefaultSearchProvider() { |
880 const int index = default_search_engine_combobox_->selected_item(); | 880 const int index = default_search_engine_combobox_->selected_item(); |
881 default_search_engines_model_->model()->SetDefaultSearchProvider( | 881 default_search_engines_model_->model()->SetDefaultSearchProvider( |
882 default_search_engines_model_->GetTemplateURLAt(index)); | 882 default_search_engines_model_->GetTemplateURLAt(index)); |
883 } | 883 } |
OLD | NEW |