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

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: Rebased Created 7 years, 4 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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.h ('k') | chrome/browser/ui/cocoa/browser_window_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698