| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "chrome/browser/ui/cocoa/omnibox_decoration_bubble_controller.h" |
| 6 |
| 7 #import <Cocoa/Cocoa.h> |
| 8 |
| 9 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 10 #import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h" |
| 11 |
| 12 // Base bubble controller class. |
| 13 @implementation OmniboxDecorationBubbleController |
| 14 |
| 15 - (void)showWindow:(id)sender { |
| 16 LocationBarDecoration* decoration = [self decorationForBubble]; |
| 17 if (decoration) |
| 18 decoration->SetActive(true); |
| 19 |
| 20 [super showWindow:sender]; |
| 21 } |
| 22 |
| 23 - (void)close { |
| 24 LocationBarDecoration* decoration = [self decorationForBubble]; |
| 25 if (decoration) |
| 26 decoration->SetActive(false); |
| 27 |
| 28 [super close]; |
| 29 } |
| 30 |
| 31 - (LocationBarDecoration*)decorationForBubble { |
| 32 NOTREACHED(); |
| 33 return nullptr; |
| 34 } |
| 35 |
| 36 @end |
| OLD | NEW |