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 <cmath> | 7 #include <cmath> |
8 #include <numeric> | 8 #include <numeric> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 bookmarkBubbleController_ = nil; | 1622 bookmarkBubbleController_ = nil; |
1623 } | 1623 } |
1624 | 1624 |
1625 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. | 1625 // Handle the editBookmarkNode: action sent from bookmark bubble controllers. |
1626 - (void)editBookmarkNode:(id)sender { | 1626 - (void)editBookmarkNode:(id)sender { |
1627 BOOL responds = [sender respondsToSelector:@selector(node)]; | 1627 BOOL responds = [sender respondsToSelector:@selector(node)]; |
1628 DCHECK(responds); | 1628 DCHECK(responds); |
1629 if (responds) { | 1629 if (responds) { |
1630 const BookmarkNode* node = [sender node]; | 1630 const BookmarkNode* node = [sender node]; |
1631 if (node) { | 1631 if (node) { |
| 1632 #if defined(WEBUI_DIALOGS) |
| 1633 DCHECK(browser_); |
| 1634 browser_->OpenBookmarkManagerEditNode(node->id()); |
| 1635 #else |
1632 // A BookmarkEditorController is a sheet that owns itself, and | 1636 // A BookmarkEditorController is a sheet that owns itself, and |
1633 // deallocates itself when closed. | 1637 // deallocates itself when closed. |
1634 [[[BookmarkEditorController alloc] | 1638 [[[BookmarkEditorController alloc] |
1635 initWithParentWindow:[self window] | 1639 initWithParentWindow:[self window] |
1636 profile:browser_->profile() | 1640 profile:browser_->profile() |
1637 parent:node->parent() | 1641 parent:node->parent() |
1638 node:node | 1642 node:node |
1639 configuration:BookmarkEditor::SHOW_TREE] | 1643 configuration:BookmarkEditor::SHOW_TREE] |
1640 runAsModalSheet]; | 1644 runAsModalSheet]; |
| 1645 #endif |
1641 } | 1646 } |
1642 } | 1647 } |
1643 } | 1648 } |
1644 | 1649 |
1645 // If the browser is in incognito mode or has multi-profiles, install the image | 1650 // If the browser is in incognito mode or has multi-profiles, install the image |
1646 // view to decorate the window at the upper right. Use the same base y | 1651 // view to decorate the window at the upper right. Use the same base y |
1647 // coordinate as the tab strip. | 1652 // coordinate as the tab strip. |
1648 - (void)installAvatar { | 1653 - (void)installAvatar { |
1649 // Only install if this browser window is OTR and has a tab strip. | 1654 // Only install if this browser window is OTR and has a tab strip. |
1650 if (![self shouldShowAvatar]) | 1655 if (![self shouldShowAvatar]) |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2146 | 2151 |
2147 - (BOOL)supportsBookmarkBar { | 2152 - (BOOL)supportsBookmarkBar { |
2148 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2153 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2149 } | 2154 } |
2150 | 2155 |
2151 - (BOOL)isTabbedWindow { | 2156 - (BOOL)isTabbedWindow { |
2152 return browser_->is_type_tabbed(); | 2157 return browser_->is_type_tabbed(); |
2153 } | 2158 } |
2154 | 2159 |
2155 @end // @implementation BrowserWindowController(WindowType) | 2160 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |