OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 style |= THEMED_INCOGNITO; | 1651 style |= THEMED_INCOGNITO; |
1652 | 1652 |
1653 if (browser_->is_devtools()) | 1653 if (browser_->is_devtools()) |
1654 style |= THEMED_DEVTOOLS; | 1654 style |= THEMED_DEVTOOLS; |
1655 if (browser_->is_type_popup()) | 1655 if (browser_->is_type_popup()) |
1656 style |= THEMED_POPUP; | 1656 style |= THEMED_POPUP; |
1657 | 1657 |
1658 return style; | 1658 return style; |
1659 } | 1659 } |
1660 | 1660 |
1661 - (NSPoint)themePatternPhaseForAlignment:(ThemePatternAlignment)alignment { | 1661 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment { |
1662 NSView* windowChromeView = [[[self window] contentView] superview]; | 1662 NSView* windowChromeView = [[[self window] contentView] superview]; |
1663 NSView* tabStripView = nil; | 1663 NSView* tabStripView = nil; |
1664 if (alignment == THEME_PATTERN_ALIGN_WITH_TAB_STRIP && [self hasTabStrip]) | 1664 if ([self hasTabStrip]) |
1665 tabStripView = [self tabStripView]; | 1665 tabStripView = [self tabStripView]; |
1666 return [BrowserWindowUtils themePatternPhaseFor:windowChromeView | 1666 return [BrowserWindowUtils themeImagePositionFor:windowChromeView |
1667 withTabStrip:tabStripView]; | 1667 withTabStrip:tabStripView |
| 1668 alignment:alignment]; |
1668 } | 1669 } |
1669 | 1670 |
1670 - (NSPoint)bookmarkBubblePoint { | 1671 - (NSPoint)bookmarkBubblePoint { |
1671 return [toolbarController_ bookmarkBubblePoint]; | 1672 return [toolbarController_ bookmarkBubblePoint]; |
1672 } | 1673 } |
1673 | 1674 |
1674 // Show the bookmark bubble (e.g. user just clicked on the STAR). | 1675 // Show the bookmark bubble (e.g. user just clicked on the STAR). |
1675 - (void)showBookmarkBubbleForURL:(const GURL&)url | 1676 - (void)showBookmarkBubbleForURL:(const GURL&)url |
1676 alreadyBookmarked:(BOOL)alreadyMarked { | 1677 alreadyBookmarked:(BOOL)alreadyMarked { |
1677 if (!bookmarkBubbleController_) { | 1678 if (!bookmarkBubbleController_) { |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2235 | 2236 |
2236 - (BOOL)supportsBookmarkBar { | 2237 - (BOOL)supportsBookmarkBar { |
2237 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2238 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2238 } | 2239 } |
2239 | 2240 |
2240 - (BOOL)isTabbedWindow { | 2241 - (BOOL)isTabbedWindow { |
2241 return browser_->is_type_tabbed(); | 2242 return browser_->is_type_tabbed(); |
2242 } | 2243 } |
2243 | 2244 |
2244 @end // @implementation BrowserWindowController(WindowType) | 2245 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |