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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 7572022: Use bookmark manager to add/edit bookmark pages with webui_dialogs=1. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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
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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <numeric> 10 #include <numeric>
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 bookmarkBubbleController_ = nil; 1646 bookmarkBubbleController_ = nil;
1647 } 1647 }
1648 1648
1649 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. 1649 // Handle the editBookmarkNode: action sent from bookmark bubble controllers.
1650 - (void)editBookmarkNode:(id)sender { 1650 - (void)editBookmarkNode:(id)sender {
1651 BOOL responds = [sender respondsToSelector:@selector(node)]; 1651 BOOL responds = [sender respondsToSelector:@selector(node)];
1652 DCHECK(responds); 1652 DCHECK(responds);
1653 if (responds) { 1653 if (responds) {
1654 const BookmarkNode* node = [sender node]; 1654 const BookmarkNode* node = [sender node];
1655 if (node) { 1655 if (node) {
1656 #if defined(WEBUI_BOOKMARK_EDITOR)
1657 DCHECK(browser_);
1658 browser_->OpenBookmarkManagerEditNode(node->id());
1659 #else
1656 // A BookmarkEditorController is a sheet that owns itself, and 1660 // A BookmarkEditorController is a sheet that owns itself, and
1657 // deallocates itself when closed. 1661 // deallocates itself when closed.
1658 [[[BookmarkEditorController alloc] 1662 [[[BookmarkEditorController alloc]
1659 initWithParentWindow:[self window] 1663 initWithParentWindow:[self window]
1660 profile:browser_->profile() 1664 profile:browser_->profile()
1661 parent:node->parent() 1665 parent:node->parent()
1662 node:node 1666 node:node
1663 configuration:BookmarkEditor::SHOW_TREE] 1667 configuration:BookmarkEditor::SHOW_TREE]
1664 runAsModalSheet]; 1668 runAsModalSheet];
1669 #endif
1665 } 1670 }
1666 } 1671 }
1667 } 1672 }
1668 1673
1669 // If the browser is in incognito mode or has multi-profiles, install the image 1674 // If the browser is in incognito mode or has multi-profiles, install the image
1670 // view to decorate the window at the upper right. Use the same base y 1675 // view to decorate the window at the upper right. Use the same base y
1671 // coordinate as the tab strip. 1676 // coordinate as the tab strip.
1672 - (void)installAvatar { 1677 - (void)installAvatar {
1673 // Only install if this browser window is OTR and has a tab strip. 1678 // Only install if this browser window is OTR and has a tab strip.
1674 if (![self shouldShowAvatar]) 1679 if (![self shouldShowAvatar])
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 2324
2320 - (BOOL)supportsBookmarkBar { 2325 - (BOOL)supportsBookmarkBar {
2321 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2326 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2322 } 2327 }
2323 2328
2324 - (BOOL)isTabbedWindow { 2329 - (BOOL)isTabbedWindow {
2325 return browser_->is_type_tabbed(); 2330 return browser_->is_type_tabbed();
2326 } 2331 }
2327 2332
2328 @end // @implementation BrowserWindowController(WindowType) 2333 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698