| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 deletes_.push_back(node->value); | 222 deletes_.push_back(node->value); |
| 223 } | 223 } |
| 224 tree_model_->Remove(node->parent(), node); | 224 tree_model_->Remove(node->parent(), node); |
| 225 } else { | 225 } else { |
| 226 DCHECK_EQ(IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM, command_id); | 226 DCHECK_EQ(IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM, command_id); |
| 227 NewFolder(); | 227 NewFolder(); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 void BookmarkEditorView::Show(gfx::NativeWindow parent) { | 231 void BookmarkEditorView::Show(gfx::NativeWindow parent) { |
| 232 CreateBrowserModalDialogViews(this, parent); | 232 CreateWindowModalDialogViews(this, parent); |
| 233 UserInputChanged(); | 233 UserInputChanged(); |
| 234 if (show_tree_ && bb_model_->loaded()) | 234 if (show_tree_ && bb_model_->loaded()) |
| 235 ExpandAndSelect(); | 235 ExpandAndSelect(); |
| 236 GetWidget()->Show(); | 236 GetWidget()->Show(); |
| 237 // Select all the text in the name Textfield. | 237 // Select all the text in the name Textfield. |
| 238 title_tf_->SelectAll(true); | 238 title_tf_->SelectAll(true); |
| 239 // Give focus to the name Textfield. | 239 // Give focus to the name Textfield. |
| 240 title_tf_->RequestFocus(); | 240 title_tf_->RequestFocus(); |
| 241 } | 241 } |
| 242 | 242 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 } | 640 } |
| 641 return context_menu_model_.get(); | 641 return context_menu_model_.get(); |
| 642 } | 642 } |
| 643 | 643 |
| 644 void BookmarkEditorView::EditorTreeModel::SetTitle( | 644 void BookmarkEditorView::EditorTreeModel::SetTitle( |
| 645 ui::TreeModelNode* node, | 645 ui::TreeModelNode* node, |
| 646 const base::string16& title) { | 646 const base::string16& title) { |
| 647 if (!title.empty()) | 647 if (!title.empty()) |
| 648 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); | 648 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); |
| 649 } | 649 } |
| OLD | NEW |