OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 SEL didEndSelector_; | 76 SEL didEndSelector_; |
77 }; | 77 }; |
78 | 78 |
79 // Subclass this for a dialog delegate that displays a custom sheet, e.g. loaded | 79 // Subclass this for a dialog delegate that displays a custom sheet, e.g. loaded |
80 // from a nib file. | 80 // from a nib file. |
81 class ConstrainedWindowMacDelegateCustomSheet | 81 class ConstrainedWindowMacDelegateCustomSheet |
82 : public ConstrainedWindowMacDelegate { | 82 : public ConstrainedWindowMacDelegate { |
83 public: | 83 public: |
84 ConstrainedWindowMacDelegateCustomSheet(); | 84 ConstrainedWindowMacDelegateCustomSheet(); |
85 ConstrainedWindowMacDelegateCustomSheet(id delegate, SEL didEndSelector); | 85 ConstrainedWindowMacDelegateCustomSheet(id delegate, SEL didEndSelector); |
86 ~ConstrainedWindowMacDelegateCustomSheet(); | 86 virtual ~ConstrainedWindowMacDelegateCustomSheet(); |
87 | 87 |
88 protected: | 88 protected: |
89 // For when you need to delay initalization after the constructor call. | 89 // For when you need to delay initalization after the constructor call. |
90 void init(NSWindow* sheet, id delegate, SEL didEndSelector); | 90 void init(NSWindow* sheet, id delegate, SEL didEndSelector); |
91 void set_sheet(NSWindow* sheet); | 91 void set_sheet(NSWindow* sheet); |
92 NSWindow* sheet() { return customSheet_; } | 92 NSWindow* sheet() { return customSheet_; } |
93 | 93 |
94 private: | 94 private: |
95 virtual void RunSheet(GTMWindowSheetController* sheetController, | 95 virtual void RunSheet(GTMWindowSheetController* sheetController, |
96 NSView* view); | 96 NSView* view); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // Controller of the window that contains this sheet. | 139 // Controller of the window that contains this sheet. |
140 BrowserWindowController* controller_; | 140 BrowserWindowController* controller_; |
141 | 141 |
142 // Stores if |ShowConstrainedWindow()| was called. | 142 // Stores if |ShowConstrainedWindow()| was called. |
143 bool should_be_visible_; | 143 bool should_be_visible_; |
144 | 144 |
145 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowMac); | 145 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowMac); |
146 }; | 146 }; |
147 | 147 |
148 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ | 148 #endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_MAC_H_ |
149 | |
OLD | NEW |