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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1621 object:[bookmarkBubbleController_ window]]; | 1621 object:[bookmarkBubbleController_ window]]; |
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) { |
flackr
2011/10/24 19:16:01
Remove {}
Rick Byers
2011/10/24 20:02:42
Done.
| |
1632 // A BookmarkEditorController is a sheet that owns itself, and | 1632 BookmarkEditor::Show([self window], browser_->profile(), |
flackr
2011/10/24 19:16:01
Should only be indented 6 spaces.
Rick Byers
2011/10/24 20:02:42
Done.
| |
1633 // deallocates itself when closed. | 1633 BookmarkEditor::EditDetails::EditNode(node), |
1634 [[[BookmarkEditorController alloc] | 1634 BookmarkEditor::SHOW_TREE); |
1635 initWithParentWindow:[self window] | |
1636 profile:browser_->profile() | |
1637 parent:node->parent() | |
1638 node:node | |
1639 configuration:BookmarkEditor::SHOW_TREE] | |
1640 runAsModalSheet]; | |
1641 } | 1635 } |
1642 } | 1636 } |
1643 } | 1637 } |
1644 | 1638 |
1645 // If the browser is in incognito mode or has multi-profiles, install the image | 1639 // 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 | 1640 // view to decorate the window at the upper right. Use the same base y |
1647 // coordinate as the tab strip. | 1641 // coordinate as the tab strip. |
1648 - (void)installAvatar { | 1642 - (void)installAvatar { |
1649 // Install the image into the badge view. Hide it for now; positioning and | 1643 // Install the image into the badge view. Hide it for now; positioning and |
1650 // sizing will be done by the layout code. The AvatarButton will choose which | 1644 // sizing will be done by the layout code. The AvatarButton will choose which |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2171 | 2165 |
2172 - (BOOL)supportsBookmarkBar { | 2166 - (BOOL)supportsBookmarkBar { |
2173 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2167 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2174 } | 2168 } |
2175 | 2169 |
2176 - (BOOL)isTabbedWindow { | 2170 - (BOOL)isTabbedWindow { |
2177 return browser_->is_type_tabbed(); | 2171 return browser_->is_type_tabbed(); |
2178 } | 2172 } |
2179 | 2173 |
2180 @end // @implementation BrowserWindowController(WindowType) | 2174 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |