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 "base/mac_util.h" | 5 #include "base/mac_util.h" |
6 #include "base/sys_string_conversions.h" | 6 #include "base/sys_string_conversions.h" |
7 #include "chrome/browser/bookmarks/bookmark_editor.h" | 7 #include "chrome/browser/bookmarks/bookmark_editor.h" |
8 #include "chrome/browser/bookmarks/bookmark_model.h" | 8 #include "chrome/browser/bookmarks/bookmark_model.h" |
9 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 | 392 |
393 // Might be from the context menu over the bar OR over a button. | 393 // Might be from the context menu over the bar OR over a button. |
394 - (IBAction)addOrRenameFolder:(id)sender { | 394 - (IBAction)addOrRenameFolder:(id)sender { |
395 // node is NULL if we were invoked from the bar, and that's fine. | 395 // node is NULL if we were invoked from the bar, and that's fine. |
396 BookmarkNode* node = [self nodeFromMenuItem:sender]; | 396 BookmarkNode* node = [self nodeFromMenuItem:sender]; |
397 BookmarkNameFolderController* controller = | 397 BookmarkNameFolderController* controller = |
398 [[BookmarkNameFolderController alloc] | 398 [[BookmarkNameFolderController alloc] |
399 initWithParentWindow:[[self view] window] | 399 initWithParentWindow:[[self view] window] |
400 profile:profile_ | 400 profile:profile_ |
401 node:node]; | 401 node:node]; |
402 [controller runModal]; | 402 [controller runAsModalSheet]; |
403 | 403 |
404 // runModal will run the window as a sheet. The | 404 // runAsModalSheet will run the window as a sheet. The |
405 // BookmarkNameFolderController will release itself when the sheet | 405 // BookmarkNameFolderController will release itself when the sheet |
406 // ends. | 406 // ends. |
407 } | 407 } |
408 | 408 |
409 - (NSView*)buttonView { | 409 - (NSView*)buttonView { |
410 return buttonView_; | 410 return buttonView_; |
411 } | 411 } |
412 | 412 |
413 // Delete all bookmarks from the bookmark bar, and reset knowledge of | 413 // Delete all bookmarks from the bookmark bar, and reset knowledge of |
414 // bookmarks. | 414 // bookmarks. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 | 633 |
634 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate { | 634 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate { |
635 urlDelegate_ = urlDelegate; | 635 urlDelegate_ = urlDelegate; |
636 } | 636 } |
637 | 637 |
638 - (NSArray*)buttons { | 638 - (NSArray*)buttons { |
639 return buttons_.get(); | 639 return buttons_.get(); |
640 } | 640 } |
641 | 641 |
642 @end | 642 @end |
OLD | NEW |