| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bookmarks/bookmark_editor_view.h" | 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 if (details_.GetNodeType() != BookmarkNode::FOLDER) { | 385 if (details_.GetNodeType() != BookmarkNode::FOLDER) { |
| 386 url_label_ = new views::Label( | 386 url_label_ = new views::Label( |
| 387 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL)); | 387 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_URL_LABEL)); |
| 388 | 388 |
| 389 url_tf_ = new views::Textfield; | 389 url_tf_ = new views::Textfield; |
| 390 url_tf_->SetText(chrome::FormatBookmarkURLForDisplay(url)); | 390 url_tf_->SetText(chrome::FormatBookmarkURLForDisplay(url)); |
| 391 url_tf_->set_controller(this); | 391 url_tf_->set_controller(this); |
| 392 url_tf_->SetAccessibleName( | 392 url_tf_->SetAccessibleName( |
| 393 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_EDITOR_URL_LABEL)); | 393 l10n_util::GetStringUTF16(IDS_BOOKMARK_AX_EDITOR_URL_LABEL)); |
| 394 url_tf_->SetTextInputType(ui::TextInputType::TEXT_INPUT_TYPE_URL); |
| 394 | 395 |
| 395 layout->AddPaddingRow( | 396 layout->AddPaddingRow( |
| 396 0, | 397 0, |
| 397 delegate->GetMetric( | 398 delegate->GetMetric( |
| 398 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)); | 399 LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING)); |
| 399 | 400 |
| 400 layout->StartRow(0, labels_column_set_id); | 401 layout->StartRow(0, labels_column_set_id); |
| 401 layout->AddView(url_label_); | 402 layout->AddView(url_label_); |
| 402 layout->AddView(url_tf_); | 403 layout->AddView(url_tf_); |
| 403 } | 404 } |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 Profile* profile, | 676 Profile* profile, |
| 676 const BookmarkEditor::EditDetails& details, | 677 const BookmarkEditor::EditDetails& details, |
| 677 BookmarkEditor::Configuration configuration) { | 678 BookmarkEditor::Configuration configuration) { |
| 678 DCHECK(profile); | 679 DCHECK(profile); |
| 679 BookmarkEditorView* editor = new BookmarkEditorView( | 680 BookmarkEditorView* editor = new BookmarkEditorView( |
| 680 profile, details.parent_node, details, configuration); | 681 profile, details.parent_node, details, configuration); |
| 681 editor->Show(parent_window); | 682 editor->Show(parent_window); |
| 682 } | 683 } |
| 683 | 684 |
| 684 } // namespace chrome | 685 } // namespace chrome |
| OLD | NEW |