Chromium Code Reviews| Index: chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.mm b/chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..58c3c17f42615f16a3ecf30fd96da6d057d605c5 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.mm |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#import "chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.h" |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| +#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" |
| + |
| +// Base bubble controller class. |
| +@implementation OmniboxIconBubbleController |
| + |
| +- (void)showWindow:(id)sender { |
| + LocationBarDecoration* decoration = [self decorationForBubble]; |
| + if (decoration) |
| + decoration->SetActive(true); |
| + |
| + [super showWindow:sender]; |
| +} |
| + |
| +- (void)close { |
| + LocationBarDecoration* decoration = [self decorationForBubble]; |
| + if (decoration) |
| + decoration->SetActive(false); |
| + |
| + [super close]; |
| +} |
| + |
| +- (LocationBarDecoration*)decorationForBubble { |
|
Robert Sesek
2016/11/21 19:28:23
A lot of subclasses are now having to store this i
spqchan
2016/11/23 22:58:54
I agree, I wanted to put it in the initializer but
Robert Sesek
2016/11/28 22:46:59
Acknowledged. I figured that'd be the case. Hopefu
|
| + NOTREACHED(); |
| + return nullptr; |
| +} |
| + |
| +@end |