OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/keyword_editor_view.h" | 5 #include "chrome/browser/views/keyword_editor_view.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
| 9 #include "app/l10n_util.h" |
9 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
10 #include "base/gfx/png_decoder.h" | 11 #include "base/gfx/png_decoder.h" |
11 #include "base/stl_util-inl.h" | 12 #include "base/stl_util-inl.h" |
12 #include "base/string_util.h" | 13 #include "base/string_util.h" |
13 #include "chrome/browser/history/history.h" | 14 #include "chrome/browser/history/history.h" |
14 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
15 #include "chrome/browser/metrics/user_metrics.h" | 16 #include "chrome/browser/metrics/user_metrics.h" |
16 #include "chrome/browser/search_engines/template_url.h" | 17 #include "chrome/browser/search_engines/template_url.h" |
17 #include "chrome/browser/search_engines/template_url_model.h" | 18 #include "chrome/browser/search_engines/template_url_model.h" |
18 #include "chrome/browser/views/edit_keyword_controller.h" | 19 #include "chrome/browser/views/edit_keyword_controller.h" |
19 #include "chrome/browser/views/standard_layout.h" | 20 #include "chrome/browser/views/standard_layout.h" |
20 #include "chrome/common/l10n_util.h" | |
21 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
22 #include "chrome/common/pref_service.h" | 22 #include "chrome/common/pref_service.h" |
23 #include "chrome/views/background.h" | 23 #include "chrome/views/background.h" |
24 #include "chrome/views/grid_layout.h" | 24 #include "chrome/views/grid_layout.h" |
25 #include "chrome/views/controls/button/native_button.h" | 25 #include "chrome/views/controls/button/native_button.h" |
26 #include "chrome/views/controls/text_field.h" | 26 #include "chrome/views/controls/text_field.h" |
27 #include "chrome/views/widget/widget.h" | 27 #include "chrome/views/widget/widget.h" |
28 #include "chrome/views/window/dialog_delegate.h" | 28 #include "chrome/views/window/dialog_delegate.h" |
29 #include "chrome/views/window/window.h" | 29 #include "chrome/views/window/window.h" |
30 #include "googleurl/src/gurl.h" | 30 #include "googleurl/src/gurl.h" |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 634 } |
635 const int new_index = table_model_->IndexOfTemplateURL(keyword); | 635 const int new_index = table_model_->IndexOfTemplateURL(keyword); |
636 table_model_->NotifyChanged(new_index); | 636 table_model_->NotifyChanged(new_index); |
637 | 637 |
638 // Make sure the new default is in the main group. | 638 // Make sure the new default is in the main group. |
639 table_model_->MoveToMainGroup(index); | 639 table_model_->MoveToMainGroup(index); |
640 | 640 |
641 // And select it. | 641 // And select it. |
642 table_view_->Select(table_model_->IndexOfTemplateURL(keyword)); | 642 table_view_->Select(table_model_->IndexOfTemplateURL(keyword)); |
643 } | 643 } |
OLD | NEW |