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

Side by Side Diff: chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 #import <QuartzCore/QuartzCore.h> 6 #import <QuartzCore/QuartzCore.h>
7 7
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
11 #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h" 11 #import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
12 12
13 @interface ConfirmQuitPanelController (Private) 13 @interface ConfirmQuitPanelController (Private)
14 - (id)initInternal; 14 - (id)initInternal;
15 - (void)animateFadeOut; 15 - (void)animateFadeOut;
16 @end 16 @end
17 17
18 ConfirmQuitPanelController* g_confirmQuitPanelController = nil; 18 ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
19 19
20 @implementation ConfirmQuitPanelController 20 @implementation ConfirmQuitPanelController
21 21
22 + (ConfirmQuitPanelController*)sharedController { 22 + (ConfirmQuitPanelController*)sharedController {
23 if (!g_confirmQuitPanelController) { 23 if (!g_confirmQuitPanelController) {
24 g_confirmQuitPanelController = 24 g_confirmQuitPanelController =
25 [[ConfirmQuitPanelController alloc] initInternal]; 25 [[ConfirmQuitPanelController alloc] initInternal];
26 } 26 }
27 return g_confirmQuitPanelController; 27 return g_confirmQuitPanelController;
28 } 28 }
29 29
30 - (id)initInternal { 30 - (id)initInternal {
31 NSString* nibPath = 31 NSString* nibPath =
32 [mac_util::MainAppBundle() pathForResource:@"ConfirmQuitPanel" 32 [base::mac::MainAppBundle() pathForResource:@"ConfirmQuitPanel"
33 ofType:@"nib"]; 33 ofType:@"nib"];
34 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { 34 if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
35 } 35 }
36 return self; 36 return self;
37 } 37 }
38 38
39 - (void)awakeFromNib { 39 - (void)awakeFromNib {
40 DCHECK([self window]); 40 DCHECK([self window]);
41 DCHECK_EQ(self, [[self window] delegate]); 41 DCHECK_EQ(self, [[self window] delegate]);
42 } 42 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 [dictionary setObject:animation forKey:@"alphaValue"]; 76 [dictionary setObject:animation forKey:@"alphaValue"];
77 [window setAnimations:dictionary]; 77 [window setAnimations:dictionary];
78 [[window animator] setAlphaValue:0.0]; 78 [[window animator] setAlphaValue:0.0];
79 } 79 }
80 80
81 - (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished { 81 - (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished {
82 [self close]; 82 [self close];
83 } 83 }
84 84
85 @end 85 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/collected_cookies_mac.mm ('k') | chrome/browser/ui/cocoa/content_exceptions_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698