OLD | NEW |
---|---|
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 #include "ui/message_center/cocoa/tray_controller.h" | 5 #include "ui/message_center/cocoa/tray_controller.h" |
6 | 6 |
7 #include "ui/base/cocoa/window_size_constants.h" | 7 #include "ui/base/cocoa/window_size_constants.h" |
8 #include "ui/base/resource/resource_bundle.h" | 8 #include "ui/base/resource/resource_bundle.h" |
9 #import "ui/message_center/cocoa/popup_collection.h" | 9 #import "ui/message_center/cocoa/popup_collection.h" |
10 #import "ui/message_center/cocoa/tray_view_controller.h" | 10 #import "ui/message_center/cocoa/tray_view_controller.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 | 22 |
23 - (void)cancelOperation:(id)sender { | 23 - (void)cancelOperation:(id)sender { |
24 [self orderOut:self]; | 24 [self orderOut:self]; |
25 } | 25 } |
26 | 26 |
27 @end | 27 @end |
28 | 28 |
29 @implementation MCTrayController | 29 @implementation MCTrayController |
30 | 30 |
31 - (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray { | 31 - (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray { |
32 scoped_nsobject<MCTrayWindow> window( | 32 base::scoped_nsobject<MCTrayWindow> window( |
33 [[MCTrayWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater | 33 [[MCTrayWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater |
34 styleMask:NSBorderlessWindowMask | | 34 styleMask:NSBorderlessWindowMask | |
35 NSNonactivatingPanelMask | 35 NSNonactivatingPanelMask |
36 backing:NSBackingStoreBuffered | 36 backing:NSBackingStoreBuffered |
37 defer:NO]); | 37 defer:NO]); |
Nico
2013/06/25 01:09:50
This is http://llvm.org/PR15349 too.
| |
38 if ((self = [super initWithWindow:window])) { | 38 if ((self = [super initWithWindow:window])) { |
39 tray_ = tray; | 39 tray_ = tray; |
40 | 40 |
41 [window setDelegate:self]; | 41 [window setDelegate:self]; |
42 [window setHasShadow:YES]; | 42 [window setHasShadow:YES]; |
43 [window setHidesOnDeactivate:NO]; | 43 [window setHidesOnDeactivate:NO]; |
44 [window setLevel:NSFloatingWindowLevel]; | 44 [window setLevel:NSFloatingWindowLevel]; |
45 | 45 |
46 viewController_.reset([[MCTrayViewController alloc] initWithMessageCenter: | 46 viewController_.reset([[MCTrayViewController alloc] initWithMessageCenter: |
47 tray_->message_center()]); | 47 tray_->message_center()]); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 - (void)windowDidResignKey:(NSNotification*)notification { | 100 - (void)windowDidResignKey:(NSNotification*)notification { |
101 // The settings bubble data structures assume that the settings dialog is | 101 // The settings bubble data structures assume that the settings dialog is |
102 // visible only for short periods of time: There's a fixed list of permissions | 102 // visible only for short periods of time: There's a fixed list of permissions |
103 // for example. | 103 // for example. |
104 [viewController_ hideSettings:self]; | 104 [viewController_ hideSettings:self]; |
105 | 105 |
106 tray_->HideMessageCenterBubble(); | 106 tray_->HideMessageCenterBubble(); |
107 } | 107 } |
108 | 108 |
109 @end | 109 @end |
OLD | NEW |