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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_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
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 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" 5 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/mac/nsimage_cache.h" 8 #include "app/mac/nsimage_cache.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #import "base/mac/cocoa_protocols.h" 10 #import "base/mac/cocoa_protocols.h"
11 #include "base/mac_util.h" 11 #include "base/mac/mac_util.h"
12 #import "base/scoped_nsobject.h" 12 #import "base/scoped_nsobject.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/notifications/balloon.h" 14 #include "chrome/browser/notifications/balloon.h"
15 #include "chrome/browser/notifications/desktop_notification_service.h" 15 #include "chrome/browser/notifications/desktop_notification_service.h"
16 #include "chrome/browser/notifications/notification.h" 16 #include "chrome/browser/notifications/notification.h"
17 #include "chrome/browser/notifications/notification_options_menu_model.h" 17 #include "chrome/browser/notifications/notification_options_menu_model.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/renderer_host/render_view_host.h" 19 #include "chrome/browser/renderer_host/render_view_host.h"
20 #import "chrome/browser/ui/cocoa/hover_image_button.h" 20 #import "chrome/browser/ui/cocoa/hover_image_button.h"
21 #import "chrome/browser/ui/cocoa/menu_controller.h" 21 #import "chrome/browser/ui/cocoa/menu_controller.h"
(...skipping 14 matching lines...) Expand all
36 } // namespace 36 } // namespace
37 37
38 @interface BalloonController (Private) 38 @interface BalloonController (Private)
39 - (void)updateTrackingRect; 39 - (void)updateTrackingRect;
40 @end 40 @end
41 41
42 @implementation BalloonController 42 @implementation BalloonController
43 43
44 - (id)initWithBalloon:(Balloon*)balloon { 44 - (id)initWithBalloon:(Balloon*)balloon {
45 NSString* nibpath = 45 NSString* nibpath =
46 [mac_util::MainAppBundle() pathForResource:@"Notification" 46 [base::mac::MainAppBundle() pathForResource:@"Notification"
47 ofType:@"nib"]; 47 ofType:@"nib"];
48 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { 48 if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
49 balloon_ = balloon; 49 balloon_ = balloon;
50 [self initializeHost]; 50 [self initializeHost];
51 menuModel_.reset(new NotificationOptionsMenuModel(balloon)); 51 menuModel_.reset(new NotificationOptionsMenuModel(balloon));
52 menuController_.reset([[MenuController alloc] initWithModel:menuModel_.get() 52 menuController_.reset([[MenuController alloc] initWithModel:menuModel_.get()
53 useWithPopUpButtonCell:NO]); 53 useWithPopUpButtonCell:NO]);
54 } 54 }
55 return self; 55 return self;
56 } 56 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 htmlContents_.reset(new BalloonViewHost(balloon_)); 232 htmlContents_.reset(new BalloonViewHost(balloon_));
233 htmlContents_->Init(); 233 htmlContents_->Init();
234 } 234 }
235 235
236 // NSWindowDelegate notification. 236 // NSWindowDelegate notification.
237 - (void)windowWillClose:(NSNotification*)notif { 237 - (void)windowWillClose:(NSNotification*)notif {
238 [self autorelease]; 238 [self autorelease];
239 } 239 }
240 240
241 @end 241 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm ('k') | chrome/browser/ui/cocoa/nsimage_cache_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698