Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 19918002: Refactor [FramedBrowserWindow drawWindowThemeInDirtyRect:] to use themeImagePositionForAlignment: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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)themePatternPhaseForAlignment:(ThemePatternAlignment)alignment { 1663 - (NSPoint)themeImagePositionForAlignment:(ThemeImageAlignment)alignment {
1664 NSView* windowChromeView = [[[self window] contentView] superview]; 1664 NSView* windowChromeView = [[[self window] contentView] superview];
1665 NSView* tabStripView = nil; 1665 NSView* tabStripView = nil;
1666 if (alignment == THEME_PATTERN_ALIGN_WITH_TAB_STRIP && [self hasTabStrip]) 1666 if ([self hasTabStrip])
1667 tabStripView = [self tabStripView]; 1667 tabStripView = [self tabStripView];
1668 return [BrowserWindowUtils themePatternPhaseFor:windowChromeView 1668 return [BrowserWindowUtils themeImagePositionFor:windowChromeView
1669 withTabStrip:tabStripView]; 1669 withTabStrip:tabStripView
1670 alignment:alignment];
1670 } 1671 }
1671 1672
1672 - (NSPoint)bookmarkBubblePoint { 1673 - (NSPoint)bookmarkBubblePoint {
1673 return [toolbarController_ bookmarkBubblePoint]; 1674 return [toolbarController_ bookmarkBubblePoint];
1674 } 1675 }
1675 1676
1676 // Show the bookmark bubble (e.g. user just clicked on the STAR). 1677 // Show the bookmark bubble (e.g. user just clicked on the STAR).
1677 - (void)showBookmarkBubbleForURL:(const GURL&)url 1678 - (void)showBookmarkBubbleForURL:(const GURL&)url
1678 alreadyBookmarked:(BOOL)alreadyMarked { 1679 alreadyBookmarked:(BOOL)alreadyMarked {
1679 if (!bookmarkBubbleController_) { 1680 if (!bookmarkBubbleController_) {
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 2259
2259 - (BOOL)supportsBookmarkBar { 2260 - (BOOL)supportsBookmarkBar {
2260 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2261 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2261 } 2262 }
2262 2263
2263 - (BOOL)isTabbedWindow { 2264 - (BOOL)isTabbedWindow {
2264 return browser_->is_type_tabbed(); 2265 return browser_->is_type_tabbed();
2265 } 2266 }
2266 2267
2267 @end // @implementation BrowserWindowController(WindowType) 2268 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698