| 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/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 title_tf_->SetAccessibleName(title_label_->text()); | 312 title_tf_->SetAccessibleName(title_label_->text()); |
| 313 | 313 |
| 314 if (show_tree_) { | 314 if (show_tree_) { |
| 315 tree_view_ = new views::TreeView; | 315 tree_view_ = new views::TreeView; |
| 316 tree_view_->SetRootShown(false); | 316 tree_view_->SetRootShown(false); |
| 317 tree_view_->set_lines_at_root(true); | 317 tree_view_->set_lines_at_root(true); |
| 318 tree_view_->set_context_menu_controller(this); | 318 tree_view_->set_context_menu_controller(this); |
| 319 | 319 |
| 320 new_folder_button_.reset(new views::NativeTextButton(this, | 320 new_folder_button_.reset(new views::NativeTextButton(this, |
| 321 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON))); | 321 l10n_util::GetStringUTF16(IDS_BOOKMARK_EDITOR_NEW_FOLDER_BUTTON))); |
| 322 new_folder_button_->set_parent_owned(false); | 322 new_folder_button_->set_owned_by_client(); |
| 323 new_folder_button_->SetEnabled(false); | 323 new_folder_button_->SetEnabled(false); |
| 324 } | 324 } |
| 325 | 325 |
| 326 // Yummy layout code. | 326 // Yummy layout code. |
| 327 GridLayout* layout = GridLayout::CreatePanel(this); | 327 GridLayout* layout = GridLayout::CreatePanel(this); |
| 328 SetLayoutManager(layout); | 328 SetLayoutManager(layout); |
| 329 | 329 |
| 330 const int labels_column_set_id = 0; | 330 const int labels_column_set_id = 0; |
| 331 const int single_column_view_set_id = 1; | 331 const int single_column_view_set_id = 1; |
| 332 const int buttons_column_set_id = 2; | 332 const int buttons_column_set_id = 2; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM); | 654 IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM); |
| 655 } | 655 } |
| 656 return context_menu_model_.get(); | 656 return context_menu_model_.get(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node, | 659 void BookmarkEditorView::EditorTreeModel::SetTitle(ui::TreeModelNode* node, |
| 660 const string16& title) { | 660 const string16& title) { |
| 661 if (!title.empty()) | 661 if (!title.empty()) |
| 662 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); | 662 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); |
| 663 } | 663 } |
| OLD | NEW |