Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chrome/browser/ui/views/options/general_page_view.cc

Issue 6628037: views: Moves TextfieldController/TextRange into their own headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 void GeneralPageView::ItemChanged(views::Combobox* combobox, 310 void GeneralPageView::ItemChanged(views::Combobox* combobox,
311 int prev_index, int new_index) { 311 int prev_index, int new_index) {
312 if (combobox == default_search_engine_combobox_) { 312 if (combobox == default_search_engine_combobox_) {
313 SetDefaultSearchProvider(); 313 SetDefaultSearchProvider();
314 UserMetricsRecordAction(UserMetricsAction("Options_SearchEngineChanged"), 314 UserMetricsRecordAction(UserMetricsAction("Options_SearchEngineChanged"),
315 NULL); 315 NULL);
316 } 316 }
317 } 317 }
318 318
319 /////////////////////////////////////////////////////////////////////////////// 319 ///////////////////////////////////////////////////////////////////////////////
320 // GeneralPageView, views::Textfield::Controller implementation: 320 // GeneralPageView, views::Textfield:Controller implementation:
321 321
322 void GeneralPageView::ContentsChanged(views::Textfield* sender, 322 void GeneralPageView::ContentsChanged(views::Textfield* sender,
323 const std::wstring& new_contents) { 323 const std::wstring& new_contents) {
324 if (sender == homepage_use_url_textfield_) { 324 if (sender == homepage_use_url_textfield_) {
325 UpdateHomepagePrefs(); 325 UpdateHomepagePrefs();
326 } 326 }
327 } 327 }
328 328
329 bool GeneralPageView::HandleKeyEvent(views::Textfield* sender, 329 bool GeneralPageView::HandleKeyEvent(views::Textfield* sender,
330 const views::KeyEvent& key_event) { 330 const views::KeyEvent& key_event) {
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 } 904 }
905 homepage_use_url_textfield_->SetEnabled(enabled); 905 homepage_use_url_textfield_->SetEnabled(enabled);
906 homepage_use_url_textfield_->SetReadOnly(!enabled); 906 homepage_use_url_textfield_->SetReadOnly(!enabled);
907 } 907 }
908 908
909 void GeneralPageView::SetDefaultSearchProvider() { 909 void GeneralPageView::SetDefaultSearchProvider() {
910 const int index = default_search_engine_combobox_->selected_item(); 910 const int index = default_search_engine_combobox_->selected_item();
911 default_search_engines_model_->model()->SetDefaultSearchProvider( 911 default_search_engines_model_->model()->SetDefaultSearchProvider(
912 default_search_engines_model_->GetTemplateURLAt(index)); 912 default_search_engines_model_->GetTemplateURLAt(index));
913 } 913 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/options/general_page_view.h ('k') | chrome/browser/ui/views/url_picker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698