| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h" | 5 #import "chrome/browser/ui/cocoa/extensions/toolbar_actions_bar_bubble_mac.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 @implementation ToolbarActionsBarBubbleMac | 57 @implementation ToolbarActionsBarBubbleMac |
| 58 | 58 |
| 59 @synthesize actionButton = actionButton_; | 59 @synthesize actionButton = actionButton_; |
| 60 @synthesize itemList = itemList_; | 60 @synthesize itemList = itemList_; |
| 61 @synthesize dismissButton = dismissButton_; | 61 @synthesize dismissButton = dismissButton_; |
| 62 @synthesize learnMoreButton = learnMoreButton_; | 62 @synthesize learnMoreButton = learnMoreButton_; |
| 63 | 63 |
| 64 - (id)initWithParentWindow:(NSWindow*)parentWindow | 64 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 65 anchorPoint:(NSPoint)anchorPoint | 65 anchorPoint:(NSPoint)anchorPoint |
| 66 delegate:(scoped_ptr<ToolbarActionsBarBubbleDelegate>) | 66 delegate:(std::unique_ptr<ToolbarActionsBarBubbleDelegate>) |
| 67 delegate { | 67 delegate { |
| 68 base::scoped_nsobject<InfoBubbleWindow> window( | 68 base::scoped_nsobject<InfoBubbleWindow> window( |
| 69 [[InfoBubbleWindow alloc] | 69 [[InfoBubbleWindow alloc] |
| 70 initWithContentRect:ui::kWindowSizeDeterminedLater | 70 initWithContentRect:ui::kWindowSizeDeterminedLater |
| 71 styleMask:NSBorderlessWindowMask | 71 styleMask:NSBorderlessWindowMask |
| 72 backing:NSBackingStoreBuffered | 72 backing:NSBackingStoreBuffered |
| 73 defer:NO]); | 73 defer:NO]); |
| 74 if ((self = [super initWithWindow:window | 74 if ((self = [super initWithWindow:window |
| 75 parentWindow:parentWindow | 75 parentWindow:parentWindow |
| 76 anchoredAt:anchorPoint])) { | 76 anchoredAt:anchorPoint])) { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } else { | 334 } else { |
| 335 DCHECK_EQ(sender, actionButton_); | 335 DCHECK_EQ(sender, actionButton_); |
| 336 action = ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE; | 336 action = ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE; |
| 337 } | 337 } |
| 338 acknowledged_ = YES; | 338 acknowledged_ = YES; |
| 339 delegate_->OnBubbleClosed(action); | 339 delegate_->OnBubbleClosed(action); |
| 340 [self close]; | 340 [self close]; |
| 341 } | 341 } |
| 342 | 342 |
| 343 @end | 343 @end |
| OLD | NEW |