| 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/gtk/bookmark_context_menu.h" | 5 #include "chrome/browser/gtk/bookmark_context_menu.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 return; | 330 return; |
| 331 } | 331 } |
| 332 | 332 |
| 333 if (selection_[0]->is_url()) { | 333 if (selection_[0]->is_url()) { |
| 334 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) | 334 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)) |
| 335 BookmarkEditor::Configuration editor_config; | 335 BookmarkEditor::Configuration editor_config; |
| 336 if (configuration_ == BOOKMARK_BAR) | 336 if (configuration_ == BOOKMARK_BAR) |
| 337 editor_config = BookmarkEditor::SHOW_TREE; | 337 editor_config = BookmarkEditor::SHOW_TREE; |
| 338 else | 338 else |
| 339 editor_config = BookmarkEditor::NO_TREE; | 339 editor_config = BookmarkEditor::NO_TREE; |
| 340 BookmarkEditor::Show(wnd_, profile_, NULL, selection_[0], | 340 BookmarkEditor::Show(wnd_, profile_, parent_, selection_[0], |
| 341 editor_config, NULL); | 341 editor_config, NULL); |
| 342 #else | 342 #else |
| 343 NOTIMPLEMENTED(); | 343 NOTIMPLEMENTED(); |
| 344 #endif | 344 #endif |
| 345 } else { | 345 } else { |
| 346 EditFolderController::Show(profile_, wnd_, selection_[0], false, | 346 EditFolderController::Show(profile_, wnd_, selection_[0], false, |
| 347 false); | 347 false); |
| 348 } | 348 } |
| 349 break; | 349 break; |
| 350 | 350 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 if (NodeHasURLs(selection_[i])) | 549 if (NodeHasURLs(selection_[i])) |
| 550 return true; | 550 return true; |
| 551 } | 551 } |
| 552 return false; | 552 return false; |
| 553 } | 553 } |
| 554 | 554 |
| 555 const BookmarkNode* BookmarkContextMenu::GetParentForNewNodes() const { | 555 const BookmarkNode* BookmarkContextMenu::GetParentForNewNodes() const { |
| 556 return (selection_.size() == 1 && selection_[0]->is_folder()) ? | 556 return (selection_.size() == 1 && selection_[0]->is_folder()) ? |
| 557 selection_[0] : parent_; | 557 selection_[0] : parent_; |
| 558 } | 558 } |
| OLD | NEW |