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

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

Issue 2399993003: [Mac] Don't unhide Chrome when a notification is displayed. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | 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) 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (isClosing_) 214 if (isClosing_)
215 [self close]; 215 [self close];
216 } 216 }
217 217
218 - (void)showWithAnimation:(NSRect)newBounds { 218 - (void)showWithAnimation:(NSRect)newBounds {
219 bounds_ = newBounds; 219 bounds_ = newBounds;
220 NSRect startBounds = newBounds; 220 NSRect startBounds = newBounds;
221 startBounds.origin.x += startBounds.size.width; 221 startBounds.origin.x += startBounds.size.width;
222 [[self window] setFrame:startBounds display:NO]; 222 [[self window] setFrame:startBounds display:NO];
223 [[self window] setAlphaValue:0]; 223 [[self window] setAlphaValue:0];
224 [[self window] setCanHide:NO];
224 [self showWindow:nil]; 225 [self showWindow:nil];
225 226
226 // Slide-in and fade-in simultaneously. 227 // Slide-in and fade-in simultaneously.
227 NSDictionary* animationDict = @{ 228 NSDictionary* animationDict = @{
228 NSViewAnimationTargetKey : [self window], 229 NSViewAnimationTargetKey : [self window],
229 NSViewAnimationEndFrameKey : [NSValue valueWithRect:newBounds], 230 NSViewAnimationEndFrameKey : [NSValue valueWithRect:newBounds],
230 NSViewAnimationEffectKey : NSViewAnimationFadeInEffect 231 NSViewAnimationEffectKey : NSViewAnimationFadeInEffect
231 }; 232 };
232 NSViewAnimation* animation = [self animationWithDictionary:animationDict]; 233 NSViewAnimation* animation = [self animationWithDictionary:animationDict];
233 [self setBoundsAnimation:animation]; 234 [self setBoundsAnimation:animation];
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 - (void)mouseEntered:(NSEvent*)event { 291 - (void)mouseEntered:(NSEvent*)event {
291 messageCenter_->PausePopupTimers(); 292 messageCenter_->PausePopupTimers();
292 } 293 }
293 294
294 - (void)mouseExited:(NSEvent*)event { 295 - (void)mouseExited:(NSEvent*)event {
295 messageCenter_->RestartPopupTimers(); 296 messageCenter_->RestartPopupTimers();
296 } 297 }
297 298
298 @end 299 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698