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

Side by Side Diff: chrome/browser/cocoa/chrome_browser_window.mm

Issue 1630001: Theme delegate fixes for the 10.6 SDK folllowing r43708.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/cocoa/fullscreen_window.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/chrome_browser_window.h" 5 #import "chrome/browser/cocoa/chrome_browser_window.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_theme_provider.h" 8 #include "chrome/browser/browser_theme_provider.h"
9 #import "chrome/browser/cocoa/browser_frame_view.h" 9 #import "chrome/browser/cocoa/browser_frame_view.h"
10 #import "chrome/browser/cocoa/browser_window_controller.h" 10 #import "chrome/browser/cocoa/browser_window_controller.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // return the original (unconstrained) frame. 337 // return the original (unconstrained) frame.
338 id delegate = [self delegate]; 338 id delegate = [self delegate];
339 if ([delegate respondsToSelector:@selector(shouldConstrainFrameRect)] && 339 if ([delegate respondsToSelector:@selector(shouldConstrainFrameRect)] &&
340 ![delegate shouldConstrainFrameRect]) 340 ![delegate shouldConstrainFrameRect])
341 return frame; 341 return frame;
342 342
343 return [super constrainFrameRect:frame toScreen:screen]; 343 return [super constrainFrameRect:frame toScreen:screen];
344 } 344 }
345 345
346 - (ThemeProvider*)themeProvider { 346 - (ThemeProvider*)themeProvider {
347 return [[self delegate] themeProvider]; 347 id delegate = [self delegate];
348 if (![delegate respondsToSelector:@selector(themeProvider)])
349 return NULL;
350 return [delegate themeProvider];
348 } 351 }
349 352
350 - (ThemedWindowStyle)themedWindowStyle { 353 - (ThemedWindowStyle)themedWindowStyle {
351 return [[self delegate] themedWindowStyle]; 354 id delegate = [self delegate];
355 if (![delegate respondsToSelector:@selector(themedWindowStyle)])
356 return THEMED_NORMAL;
357 return [delegate themedWindowStyle];
352 } 358 }
353 359
354 - (NSPoint)themePatternPhase { 360 - (NSPoint)themePatternPhase {
355 return [[self delegate] themePatternPhase]; 361 id delegate = [self delegate];
362 if (![delegate respondsToSelector:@selector(themePatternPhase)])
363 return NSMakePoint(0, 0);
364 return [delegate themePatternPhase];
356 } 365 }
357 366
358 @end 367 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/fullscreen_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698