Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/fullscreen_window.h" | 5 #import "chrome/browser/cocoa/fullscreen_window.h" |
| 6 | 6 |
| 7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
| 8 #import "chrome/browser/cocoa/themed_window.h" | 8 #import "chrome/browser/cocoa/themed_window.h" |
| 9 #include "chrome/browser/themes/browser_theme_provider.h" | 9 #include "chrome/browser/themes/browser_theme_provider.h" |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 return [delegate themedWindowStyle]; | 96 return [delegate themedWindowStyle]; |
| 97 } | 97 } |
| 98 | 98 |
| 99 - (NSPoint)themePatternPhase { | 99 - (NSPoint)themePatternPhase { |
| 100 id delegate = [self delegate]; | 100 id delegate = [self delegate]; |
| 101 if (![delegate respondsToSelector:@selector(themePatternPhase)]) | 101 if (![delegate respondsToSelector:@selector(themePatternPhase)]) |
| 102 return NSMakePoint(0, 0); | 102 return NSMakePoint(0, 0); |
| 103 return [delegate themePatternPhase]; | 103 return [delegate themePatternPhase]; |
| 104 } | 104 } |
| 105 | 105 |
| 106 - (void)underlaySurfaceAdded { | |
|
viettrungluu
2010/08/26 03:12:53
That's some pretty bad cutting-and-pasting going o
| |
| 107 DCHECK_GE(underlaySurfaceCount_, 0); | |
| 108 ++underlaySurfaceCount_; | |
| 109 | |
| 110 // We're having the OpenGL surface render under the window, so the window | |
| 111 // needs to be not opaque. | |
| 112 if (underlaySurfaceCount_ == 1) | |
| 113 [self setOpaque:NO]; | |
| 114 } | |
| 115 | |
| 116 - (void)underlaySurfaceRemoved { | |
| 117 --underlaySurfaceCount_; | |
| 118 DCHECK_GE(underlaySurfaceCount_, 0); | |
| 119 | |
| 120 if (underlaySurfaceCount_ == 0) | |
| 121 [self setOpaque:YES]; | |
| 122 } | |
| 123 | |
| 106 @end | 124 @end |
| OLD | NEW |