| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/l10n_util.h" |
| 10 #include "base/gfx/point.h" | 10 #include "base/gfx/point.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 bool KeywordEditorView::CanResize() const { | 107 bool KeywordEditorView::CanResize() const { |
| 108 return true; | 108 return true; |
| 109 } | 109 } |
| 110 | 110 |
| 111 std::wstring KeywordEditorView::GetWindowTitle() const { | 111 std::wstring KeywordEditorView::GetWindowTitle() const { |
| 112 return l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_WINDOW_TITLE); | 112 return l10n_util::GetString(IDS_SEARCH_ENGINES_EDITOR_WINDOW_TITLE); |
| 113 } | 113 } |
| 114 | 114 |
| 115 std::wstring KeywordEditorView::GetWindowName() const { |
| 116 return prefs::kKeywordEditorWindowPlacement; |
| 117 } |
| 118 |
| 115 int KeywordEditorView::GetDialogButtons() const { | 119 int KeywordEditorView::GetDialogButtons() const { |
| 116 return MessageBoxFlags::DIALOGBUTTON_CANCEL; | 120 return MessageBoxFlags::DIALOGBUTTON_CANCEL; |
| 117 } | 121 } |
| 118 | 122 |
| 119 bool KeywordEditorView::Accept() { | 123 bool KeywordEditorView::Accept() { |
| 120 open_window = NULL; | 124 open_window = NULL; |
| 121 return true; | 125 return true; |
| 122 } | 126 } |
| 123 | 127 |
| 124 bool KeywordEditorView::Cancel() { | 128 bool KeywordEditorView::Cancel() { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void KeywordEditorView::OnTemplateURLModelChanged() { | 263 void KeywordEditorView::OnTemplateURLModelChanged() { |
| 260 add_button_->SetEnabled(controller_->loaded()); | 264 add_button_->SetEnabled(controller_->loaded()); |
| 261 } | 265 } |
| 262 | 266 |
| 263 void KeywordEditorView::MakeDefaultTemplateURL() { | 267 void KeywordEditorView::MakeDefaultTemplateURL() { |
| 264 int new_index = | 268 int new_index = |
| 265 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow()); | 269 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow()); |
| 266 if (new_index >= 0) | 270 if (new_index >= 0) |
| 267 table_view_->Select(new_index); | 271 table_view_->Select(new_index); |
| 268 } | 272 } |
| OLD | NEW |