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

Side by Side Diff: chrome/browser/ui/panels/panel_window_controller_cocoa.mm

Issue 10785047: Remove all the OS X 10.6 SDK forward declarations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm ('k') | chrome/chrome_browser.gypi » ('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) 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 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const int kMinimumWindowSize = 1; 47 const int kMinimumWindowSize = 1;
48 const double kBoundsAnimationSpeedPixelsPerSecond = 1000; 48 const double kBoundsAnimationSpeedPixelsPerSecond = 1000;
49 const double kBoundsAnimationMaxDurationSeconds = 0.18; 49 const double kBoundsAnimationMaxDurationSeconds = 0.18;
50 50
51 // Resize edge thickness, in screen pixels. 51 // Resize edge thickness, in screen pixels.
52 const double kWidthOfMouseResizeArea = 4.0; 52 const double kWidthOfMouseResizeArea = 4.0;
53 // The distance the user has to move the mouse while keeping the left button 53 // The distance the user has to move the mouse while keeping the left button
54 // down before panel resizing operation actually starts. 54 // down before panel resizing operation actually starts.
55 const double kDragThreshold = 3.0; 55 const double kDragThreshold = 3.0;
56 56
57 // Replicate specific 10.6 SDK declarations for building with prior SDKs.
58 #if !defined(MAC_OS_X_VERSION_10_6) || \
59 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
60
61 enum {
62 NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5
63 };
64
65 #endif // MAC_OS_X_VERSION_10_6
66
67 @interface PanelWindowControllerCocoa (PanelsCanBecomeKey) 57 @interface PanelWindowControllerCocoa (PanelsCanBecomeKey)
68 // Internal helper method for extracting the total number of panel windows 58 // Internal helper method for extracting the total number of panel windows
69 // from the panel manager. Used to decide if panel can become the key window. 59 // from the panel manager. Used to decide if panel can become the key window.
70 - (int)numPanels; 60 - (int)numPanels;
71 @end 61 @end
72 62
73 @implementation PanelWindowCocoaImpl 63 @implementation PanelWindowCocoaImpl
74 // The panels cannot be reduced to 3-px windows on the edge of the screen 64 // The panels cannot be reduced to 3-px windows on the edge of the screen
75 // active area (above Dock). Default constraining logic makes at least a height 65 // active area (above Dock). Default constraining logic makes at least a height
76 // of the titlebar visible, so the user could still grab it. We do 'restore' 66 // of the titlebar visible, so the user could still grab it. We do 'restore'
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 - (NSRect)contentRectForFrameRect:(NSRect)frameRect { 1035 - (NSRect)contentRectForFrameRect:(NSRect)frameRect {
1046 NSRect contentRect = [[[self window] contentView] convertRect:frameRect 1036 NSRect contentRect = [[[self window] contentView] convertRect:frameRect
1047 fromView:nil]; 1037 fromView:nil];
1048 contentRect.size.height -= panel::kTitlebarHeight; 1038 contentRect.size.height -= panel::kTitlebarHeight;
1049 if (contentRect.size.height < 0) 1039 if (contentRect.size.height < 0)
1050 contentRect.size.height = 0; 1040 contentRect.size.height = 0;
1051 return contentRect; 1041 return contentRect;
1052 } 1042 }
1053 1043
1054 @end 1044 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/shell_window_cocoa.mm ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698