Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: chrome/browser/bookmarks/bookmark_context_menu_controller.cc

Issue 192079: Bookmark context menu: pass the correct parent to the bookmark editor.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698