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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 8438037: Change 'Add Page' to show a simple input dialog with --use-more-webui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comments Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/bookmarks/bookmark_editor.h" 10 #include "chrome/browser/bookmarks/bookmark_editor.h"
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 775 }
776 776
777 // May be called from the bar or from a folder button. 777 // May be called from the bar or from a folder button.
778 // If called from a button, that button becomes the parent. 778 // If called from a button, that button becomes the parent.
779 - (IBAction)addPage:(id)sender { 779 - (IBAction)addPage:(id)sender {
780 const BookmarkNode* parent = [self nodeFromMenuItem:sender]; 780 const BookmarkNode* parent = [self nodeFromMenuItem:sender];
781 if (!parent) 781 if (!parent)
782 parent = bookmarkModel_->bookmark_bar_node(); 782 parent = bookmarkModel_->bookmark_bar_node();
783 BookmarkEditor::Show([[self view] window], 783 BookmarkEditor::Show([[self view] window],
784 browser_->profile(), 784 browser_->profile(),
785 BookmarkEditor::EditDetails::AddNodeInFolder(parent), 785 BookmarkEditor::EditDetails::AddNodeInFolder(parent, -1),
786 BookmarkEditor::SHOW_TREE); 786 BookmarkEditor::SHOW_TREE);
787 } 787 }
788 788
789 // Might be called from the context menu over the bar OR over a 789 // Might be called from the context menu over the bar OR over a
790 // button. If called from a button, that button becomes a sibling of 790 // button. If called from a button, that button becomes a sibling of
791 // the new node. If called from the bar, add to the end of the bar. 791 // the new node. If called from the bar, add to the end of the bar.
792 - (IBAction)addFolder:(id)sender { 792 - (IBAction)addFolder:(id)sender {
793 const BookmarkNode* senderNode = [self nodeFromMenuItem:sender]; 793 const BookmarkNode* senderNode = [self nodeFromMenuItem:sender];
794 const BookmarkNode* parent = NULL; 794 const BookmarkNode* parent = NULL;
795 int newIndex = 0; 795 int newIndex = 0;
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after
2780 // to minimize touching the object passed in (likely a mock). 2780 // to minimize touching the object passed in (likely a mock).
2781 - (void)setButtonContextMenu:(id)menu { 2781 - (void)setButtonContextMenu:(id)menu {
2782 buttonContextMenu_ = menu; 2782 buttonContextMenu_ = menu;
2783 } 2783 }
2784 2784
2785 - (void)setIgnoreAnimations:(BOOL)ignore { 2785 - (void)setIgnoreAnimations:(BOOL)ignore {
2786 ignoreAnimations_ = ignore; 2786 ignoreAnimations_ = ignore;
2787 } 2787 }
2788 2788
2789 @end 2789 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698