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/keyword_editor_view.h" | 5 #include "chrome/browser/ui/views/keyword_editor_view.h" |
6 | 6 |
| 7 #include <string> |
7 #include <vector> | 8 #include <vector> |
8 | 9 |
9 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
10 #include "base/stl_util-inl.h" | 11 #include "base/stl_util-inl.h" |
11 #include "base/string_util.h" | 12 #include "base/string_util.h" |
12 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/prefs/pref_service.h" | |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/search_engines/template_url.h" | 15 #include "chrome/browser/search_engines/template_url.h" |
16 #include "chrome/browser/search_engines/template_url_model.h" | 16 #include "chrome/browser/search_engines/template_url_model.h" |
17 #include "chrome/browser/search_engines/template_url_table_model.h" | 17 #include "chrome/browser/search_engines/template_url_table_model.h" |
18 #include "chrome/browser/ui/views/browser_dialogs.h" | 18 #include "chrome/browser/ui/views/browser_dialogs.h" |
19 #include "chrome/browser/ui/views/first_run_search_engine_view.h" | 19 #include "chrome/browser/ui/views/first_run_search_engine_view.h" |
20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
21 #include "gfx/point.h" | 21 #include "gfx/point.h" |
22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 add_button_->SetEnabled(controller_->loaded()); | 299 add_button_->SetEnabled(controller_->loaded()); |
300 } | 300 } |
301 | 301 |
302 void KeywordEditorView::MakeDefaultTemplateURL() { | 302 void KeywordEditorView::MakeDefaultTemplateURL() { |
303 int new_index = | 303 int new_index = |
304 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow()); | 304 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow()); |
305 if (new_index >= 0) | 305 if (new_index >= 0) |
306 table_view_->Select(new_index); | 306 table_view_->Select(new_index); |
307 default_chosen_ = true; | 307 default_chosen_ = true; |
308 } | 308 } |
OLD | NEW |