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 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 bookmarkBubbleController_ = nil; | 1683 bookmarkBubbleController_ = nil; |
1684 } | 1684 } |
1685 | 1685 |
1686 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. | 1686 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. |
1687 - (void)editBookmarkNode:(id)sender { | 1687 - (void)editBookmarkNode:(id)sender { |
1688 BOOL responds = [sender respondsToSelector:@selector(node)]; | 1688 BOOL responds = [sender respondsToSelector:@selector(node)]; |
1689 DCHECK(responds); | 1689 DCHECK(responds); |
1690 if (responds) { | 1690 if (responds) { |
1691 const BookmarkNode* node = [sender node]; | 1691 const BookmarkNode* node = [sender node]; |
1692 if (node) { | 1692 if (node) { |
| 1693 #if defined(WEBUI_DIALOGS) |
| 1694 DCHECK(browser_); |
| 1695 browser_->OpenBookmarkManagerEditNode(node->id()); |
| 1696 #else |
1693 // A BookmarkEditorController is a sheet that owns itself, and | 1697 // A BookmarkEditorController is a sheet that owns itself, and |
1694 // deallocates itself when closed. | 1698 // deallocates itself when closed. |
1695 [[[BookmarkEditorController alloc] | 1699 [[[BookmarkEditorController alloc] |
1696 initWithParentWindow:[self window] | 1700 initWithParentWindow:[self window] |
1697 profile:browser_->profile() | 1701 profile:browser_->profile() |
1698 parent:node->parent() | 1702 parent:node->parent() |
1699 node:node | 1703 node:node |
1700 configuration:BookmarkEditor::SHOW_TREE] | 1704 configuration:BookmarkEditor::SHOW_TREE] |
1701 runAsModalSheet]; | 1705 runAsModalSheet]; |
| 1706 #endif |
1702 } | 1707 } |
1703 } | 1708 } |
1704 } | 1709 } |
1705 | 1710 |
1706 // If the browser is in incognito mode or has multi-profiles, install the image | 1711 // If the browser is in incognito mode or has multi-profiles, install the image |
1707 // view to decorate the window at the upper right. Use the same base y | 1712 // view to decorate the window at the upper right. Use the same base y |
1708 // coordinate as the tab strip. | 1713 // coordinate as the tab strip. |
1709 - (void)installAvatar { | 1714 - (void)installAvatar { |
1710 // Only install if this browser window is OTR and has a tab strip. | 1715 // Only install if this browser window is OTR and has a tab strip. |
1711 if (![self shouldShowAvatar]) | 1716 if (![self shouldShowAvatar]) |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 | 2298 |
2294 - (BOOL)supportsBookmarkBar { | 2299 - (BOOL)supportsBookmarkBar { |
2295 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2300 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2296 } | 2301 } |
2297 | 2302 |
2298 - (BOOL)isTabbedWindow { | 2303 - (BOOL)isTabbedWindow { |
2299 return browser_->is_type_tabbed(); | 2304 return browser_->is_type_tabbed(); |
2300 } | 2305 } |
2301 | 2306 |
2302 @end // @implementation BrowserWindowController(WindowType) | 2307 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |