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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 style |= THEMED_INCOGNITO; | 1653 style |= THEMED_INCOGNITO; |
1654 | 1654 |
1655 if (browser_->is_devtools()) | 1655 if (browser_->is_devtools()) |
1656 style |= THEMED_DEVTOOLS; | 1656 style |= THEMED_DEVTOOLS; |
1657 if (browser_->is_type_popup()) | 1657 if (browser_->is_type_popup()) |
1658 style |= THEMED_POPUP; | 1658 style |= THEMED_POPUP; |
1659 | 1659 |
1660 return style; | 1660 return style; |
1661 } | 1661 } |
1662 | 1662 |
1663 - (NSPoint)themePatternPhase { | 1663 - (NSPoint)themePatternPhaseForAlignment:(ThemePatternAlignment)alignment { |
1664 NSView* windowChromeView = [[[self window] contentView] superview]; | 1664 NSView* windowChromeView = [[[self window] contentView] superview]; |
| 1665 NSView* tabStripView = nil; |
| 1666 if (alignment == THEME_PATTERN_ALIGN_WITH_TAB_STRIP && [self hasTabStrip]) |
| 1667 tabStripView = [self tabStripView]; |
1665 return [BrowserWindowUtils themePatternPhaseFor:windowChromeView | 1668 return [BrowserWindowUtils themePatternPhaseFor:windowChromeView |
1666 withTabStrip:[self tabStripView]]; | 1669 withTabStrip:tabStripView]; |
1667 } | 1670 } |
1668 | 1671 |
1669 - (NSPoint)bookmarkBubblePoint { | 1672 - (NSPoint)bookmarkBubblePoint { |
1670 return [toolbarController_ bookmarkBubblePoint]; | 1673 return [toolbarController_ bookmarkBubblePoint]; |
1671 } | 1674 } |
1672 | 1675 |
1673 // Show the bookmark bubble (e.g. user just clicked on the STAR). | 1676 // Show the bookmark bubble (e.g. user just clicked on the STAR). |
1674 - (void)showBookmarkBubbleForURL:(const GURL&)url | 1677 - (void)showBookmarkBubbleForURL:(const GURL&)url |
1675 alreadyBookmarked:(BOOL)alreadyMarked { | 1678 alreadyBookmarked:(BOOL)alreadyMarked { |
1676 if (!bookmarkBubbleController_) { | 1679 if (!bookmarkBubbleController_) { |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2261 | 2264 |
2262 - (BOOL)supportsBookmarkBar { | 2265 - (BOOL)supportsBookmarkBar { |
2263 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2266 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2264 } | 2267 } |
2265 | 2268 |
2266 - (BOOL)isTabbedWindow { | 2269 - (BOOL)isTabbedWindow { |
2267 return browser_->is_type_tabbed(); | 2270 return browser_->is_type_tabbed(); |
2268 } | 2271 } |
2269 | 2272 |
2270 @end // @implementation BrowserWindowController(WindowType) | 2273 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |