| 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/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const EditDetails& details, | 57 const EditDetails& details, |
| 58 BookmarkEditor::Configuration configuration) | 58 BookmarkEditor::Configuration configuration) |
| 59 : profile_(profile), | 59 : profile_(profile), |
| 60 tree_view_(NULL), | 60 tree_view_(NULL), |
| 61 url_label_(NULL), | 61 url_label_(NULL), |
| 62 url_tf_(NULL), | 62 url_tf_(NULL), |
| 63 title_label_(NULL), | 63 title_label_(NULL), |
| 64 title_tf_(NULL), | 64 title_tf_(NULL), |
| 65 parent_(parent), | 65 parent_(parent), |
| 66 details_(details), | 66 details_(details), |
| 67 bb_model_(BookmarkModelFactory::GetForProfile(profile)), | 67 bb_model_(BookmarkModelFactory::GetForBrowserContext(profile)), |
| 68 running_menu_for_root_(false), | 68 running_menu_for_root_(false), |
| 69 show_tree_(configuration == SHOW_TREE) { | 69 show_tree_(configuration == SHOW_TREE) { |
| 70 DCHECK(profile); | 70 DCHECK(profile); |
| 71 DCHECK(bb_model_); | 71 DCHECK(bb_model_); |
| 72 DCHECK(bb_model_->client()->CanBeEditedByUser(parent)); | 72 DCHECK(bb_model_->client()->CanBeEditedByUser(parent)); |
| 73 Init(); | 73 Init(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 BookmarkEditorView::~BookmarkEditorView() { | 76 BookmarkEditorView::~BookmarkEditorView() { |
| 77 // The tree model is deleted before the view. Reset the model otherwise the | 77 // The tree model is deleted before the view. Reset the model otherwise the |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 Profile* profile, | 650 Profile* profile, |
| 651 const BookmarkEditor::EditDetails& details, | 651 const BookmarkEditor::EditDetails& details, |
| 652 BookmarkEditor::Configuration configuration) { | 652 BookmarkEditor::Configuration configuration) { |
| 653 DCHECK(profile); | 653 DCHECK(profile); |
| 654 BookmarkEditorView* editor = new BookmarkEditorView( | 654 BookmarkEditorView* editor = new BookmarkEditorView( |
| 655 profile, details.parent_node, details, configuration); | 655 profile, details.parent_node, details, configuration); |
| 656 editor->Show(parent_window); | 656 editor->Show(parent_window); |
| 657 } | 657 } |
| 658 | 658 |
| 659 } // namespace chrome | 659 } // namespace chrome |
| OLD | NEW |