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

Side by Side Diff: ui/message_center/cocoa/popup_controller.mm

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/message_center/cocoa/popup_controller.h" 5 #import "ui/message_center/cocoa/popup_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 @end 91 @end
92 92
93 //////////////////////////////////////////////////////////////////////////////// 93 ////////////////////////////////////////////////////////////////////////////////
94 94
95 @implementation MCPopupController 95 @implementation MCPopupController
96 96
97 - (id)initWithNotification:(const message_center::Notification*)notification 97 - (id)initWithNotification:(const message_center::Notification*)notification
98 messageCenter:(message_center::MessageCenter*)messageCenter 98 messageCenter:(message_center::MessageCenter*)messageCenter
99 popupCollection:(MCPopupCollection*)popupCollection { 99 popupCollection:(MCPopupCollection*)popupCollection {
100 scoped_nsobject<MCPopupWindow> window( 100 base::scoped_nsobject<MCPopupWindow> window(
101 [[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater 101 [[MCPopupWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
102 styleMask:NSBorderlessWindowMask | 102 styleMask:NSBorderlessWindowMask |
103 NSNonactivatingPanelMask 103 NSNonactivatingPanelMask
104 backing:NSBackingStoreBuffered 104 backing:NSBackingStoreBuffered
105 defer:YES]); 105 defer:YES]);
Nico 2013/06/25 01:09:50 I think this is http://llvm.org/PR15349.
106 if ((self = [super initWithWindow:window])) { 106 if ((self = [super initWithWindow:window])) {
107 messageCenter_ = messageCenter; 107 messageCenter_ = messageCenter;
108 popupCollection_ = popupCollection; 108 popupCollection_ = popupCollection;
109 notificationController_.reset( 109 notificationController_.reset(
110 [[MCNotificationController alloc] initWithNotification:notification 110 [[MCNotificationController alloc] initWithNotification:notification
111 messageCenter:messageCenter_]); 111 messageCenter:messageCenter_]);
112 isClosing_ = NO; 112 isClosing_ = NO;
113 bounds_ = [[notificationController_ view] frame]; 113 bounds_ = [[notificationController_ view] frame];
114 114
115 [window setReleasedWhenClosed:NO]; 115 [window setReleasedWhenClosed:NO];
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 - (void)mouseEntered:(NSEvent*)event { 274 - (void)mouseEntered:(NSEvent*)event {
275 messageCenter_->PausePopupTimers(); 275 messageCenter_->PausePopupTimers();
276 } 276 }
277 277
278 - (void)mouseExited:(NSEvent*)event { 278 - (void)mouseExited:(NSEvent*)event {
279 messageCenter_->RestartPopupTimers(); 279 messageCenter_->RestartPopupTimers();
280 } 280 }
281 281
282 @end 282 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698