OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/framed_browser_window.h" | 5 #import "chrome/browser/ui/cocoa/framed_browser_window.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/sdk_forward_declarations.h" |
8 #include "chrome/browser/global_keyboard_shortcuts_mac.h" | 9 #include "chrome/browser/global_keyboard_shortcuts_mac.h" |
9 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 11 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
11 #import "chrome/browser/ui/cocoa/browser_window_utils.h" | 12 #import "chrome/browser/ui/cocoa/browser_window_utils.h" |
12 #import "chrome/browser/ui/cocoa/custom_frame_view.h" | 13 #import "chrome/browser/ui/cocoa/custom_frame_view.h" |
13 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 14 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
14 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" | 15 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" |
15 #import "chrome/browser/ui/cocoa/themed_window.h" | 16 #import "chrome/browser/ui/cocoa/themed_window.h" |
16 #include "chrome/browser/themes/theme_properties.h" | 17 #include "chrome/browser/themes/theme_properties.h" |
17 #include "chrome/browser/themes/theme_service.h" | 18 #include "chrome/browser/themes/theme_service.h" |
18 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
19 #include "ui/base/cocoa/nsgraphics_context_additions.h" | 20 #include "ui/base/cocoa/nsgraphics_context_additions.h" |
20 | 21 |
21 // Replicate specific 10.7 SDK declarations for building with prior SDKs. | |
22 #if !defined(MAC_OS_X_VERSION_10_7) || \ | |
23 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | |
24 | |
25 @interface NSWindow (LionSDKDeclarations) | |
26 - (void)toggleFullScreen:(id)sender; | |
27 @end | |
28 | |
29 enum { | |
30 NSWindowDocumentVersionsButton = 6, | |
31 NSWindowFullScreenButton | |
32 }; | |
33 | |
34 #endif // MAC_OS_X_VERSION_10_7 | |
35 | |
36 | |
37 // Implementer's note: Moving the window controls is tricky. When altering the | 22 // Implementer's note: Moving the window controls is tricky. When altering the |
38 // code, ensure that: | 23 // code, ensure that: |
39 // - accessibility hit testing works | 24 // - accessibility hit testing works |
40 // - the accessibility hierarchy is correct | 25 // - the accessibility hierarchy is correct |
41 // - close/min in the background don't bring the window forward | 26 // - close/min in the background don't bring the window forward |
42 // - rollover effects work correctly | 27 // - rollover effects work correctly |
43 | 28 |
44 namespace { | 29 namespace { |
45 | 30 |
46 const CGFloat kBrowserFrameViewPaintHeight = 60.0; | 31 const CGFloat kBrowserFrameViewPaintHeight = 60.0; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 ThemedWindowStyle windowStyle = [self themedWindowStyle]; | 487 ThemedWindowStyle windowStyle = [self themedWindowStyle]; |
503 BOOL incognito = windowStyle & THEMED_INCOGNITO; | 488 BOOL incognito = windowStyle & THEMED_INCOGNITO; |
504 | 489 |
505 if (incognito) | 490 if (incognito) |
506 return [NSColor whiteColor]; | 491 return [NSColor whiteColor]; |
507 else | 492 else |
508 return [NSColor windowFrameTextColor]; | 493 return [NSColor windowFrameTextColor]; |
509 } | 494 } |
510 | 495 |
511 @end | 496 @end |
OLD | NEW |