OLD | NEW |
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 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 bookmarkBubbleController_ = nil; | 1655 bookmarkBubbleController_ = nil; |
1656 } | 1656 } |
1657 | 1657 |
1658 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. | 1658 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. |
1659 - (void)editBookmarkNode:(id)sender { | 1659 - (void)editBookmarkNode:(id)sender { |
1660 BOOL responds = [sender respondsToSelector:@selector(node)]; | 1660 BOOL responds = [sender respondsToSelector:@selector(node)]; |
1661 DCHECK(responds); | 1661 DCHECK(responds); |
1662 if (responds) { | 1662 if (responds) { |
1663 const BookmarkNode* node = [sender node]; | 1663 const BookmarkNode* node = [sender node]; |
1664 if (node) { | 1664 if (node) { |
| 1665 #if defined(WEBUI_DIALOGS) |
| 1666 DCHECK(browser_); |
| 1667 browser_->OpenBookmarkManagerEditNode(node->id()); |
| 1668 #else |
1665 // A BookmarkEditorController is a sheet that owns itself, and | 1669 // A BookmarkEditorController is a sheet that owns itself, and |
1666 // deallocates itself when closed. | 1670 // deallocates itself when closed. |
1667 [[[BookmarkEditorController alloc] | 1671 [[[BookmarkEditorController alloc] |
1668 initWithParentWindow:[self window] | 1672 initWithParentWindow:[self window] |
1669 profile:browser_->profile() | 1673 profile:browser_->profile() |
1670 parent:node->parent() | 1674 parent:node->parent() |
1671 node:node | 1675 node:node |
1672 configuration:BookmarkEditor::SHOW_TREE] | 1676 configuration:BookmarkEditor::SHOW_TREE] |
1673 runAsModalSheet]; | 1677 runAsModalSheet]; |
| 1678 #endif |
1674 } | 1679 } |
1675 } | 1680 } |
1676 } | 1681 } |
1677 | 1682 |
1678 // If the browser is in incognito mode or has multi-profiles, install the image | 1683 // If the browser is in incognito mode or has multi-profiles, install the image |
1679 // view to decorate the window at the upper right. Use the same base y | 1684 // view to decorate the window at the upper right. Use the same base y |
1680 // coordinate as the tab strip. | 1685 // coordinate as the tab strip. |
1681 - (void)installAvatar { | 1686 - (void)installAvatar { |
1682 // Only install if this browser window is OTR and has a tab strip. | 1687 // Only install if this browser window is OTR and has a tab strip. |
1683 if (![self shouldShowAvatar]) | 1688 if (![self shouldShowAvatar]) |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 | 2180 |
2176 - (BOOL)supportsBookmarkBar { | 2181 - (BOOL)supportsBookmarkBar { |
2177 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2182 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2178 } | 2183 } |
2179 | 2184 |
2180 - (BOOL)isTabbedWindow { | 2185 - (BOOL)isTabbedWindow { |
2181 return browser_->is_type_tabbed(); | 2186 return browser_->is_type_tabbed(); |
2182 } | 2187 } |
2183 | 2188 |
2184 @end // @implementation BrowserWindowController(WindowType) | 2189 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |