| 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/bookmarks/bookmark_context_menu_controller.h" | 5 #include "chrome/browser/bookmarks/bookmark_context_menu_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_editor.h" | 9 #include "chrome/browser/bookmarks/bookmark_editor.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_manager.h" | 10 #include "chrome/browser/bookmarks/bookmark_manager.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 NOTREACHED(); | 309 NOTREACHED(); |
| 310 return; | 310 return; |
| 311 } | 311 } |
| 312 | 312 |
| 313 if (selection_[0]->is_url()) { | 313 if (selection_[0]->is_url()) { |
| 314 BookmarkEditor::Configuration editor_config; | 314 BookmarkEditor::Configuration editor_config; |
| 315 if (configuration_ == BOOKMARK_BAR) | 315 if (configuration_ == BOOKMARK_BAR) |
| 316 editor_config = BookmarkEditor::SHOW_TREE; | 316 editor_config = BookmarkEditor::SHOW_TREE; |
| 317 else | 317 else |
| 318 editor_config = BookmarkEditor::NO_TREE; | 318 editor_config = BookmarkEditor::NO_TREE; |
| 319 BookmarkEditor::Show(parent_window_, profile_, NULL, selection_[0], | 319 BookmarkEditor::Show(parent_window_, profile_, parent_, selection_[0], |
| 320 editor_config, NULL); | 320 editor_config, NULL); |
| 321 } else { | 321 } else { |
| 322 EditFolderController::Show(profile_, parent_window_, selection_[0], | 322 EditFolderController::Show(profile_, parent_window_, selection_[0], |
| 323 false, false); | 323 false, false); |
| 324 } | 324 } |
| 325 break; | 325 break; |
| 326 | 326 |
| 327 case IDS_BOOKMARK_BAR_REMOVE: { | 327 case IDS_BOOKMARK_BAR_REMOVE: { |
| 328 UserMetrics::RecordAction(L"BookmarkBar_ContextMenu_Remove", profile_); | 328 UserMetrics::RecordAction(L"BookmarkBar_ContextMenu_Remove", profile_); |
| 329 BookmarkModel* model = RemoveModelObserver(); | 329 BookmarkModel* model = RemoveModelObserver(); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 return true; | 521 return true; |
| 522 } | 522 } |
| 523 return false; | 523 return false; |
| 524 } | 524 } |
| 525 | 525 |
| 526 const BookmarkNode* | 526 const BookmarkNode* |
| 527 BookmarkContextMenuController::GetParentForNewNodes() const { | 527 BookmarkContextMenuController::GetParentForNewNodes() const { |
| 528 return (selection_.size() == 1 && selection_[0]->is_folder()) ? | 528 return (selection_.size() == 1 && selection_[0]->is_folder()) ? |
| 529 selection_[0] : parent_; | 529 selection_[0] : parent_; |
| 530 } | 530 } |
| OLD | NEW |