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

Side by Side Diff: chrome/browser/ui/cocoa/omnibox_icon_bubble_controller.mm

Issue 2511043002: [Mac] Omnibox icons active states (Closed)
Patch Set: Cleaned up Created 4 years, 1 month 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
OLDNEW
(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_icon_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 OmniboxIconBubbleController
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 {
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
32 NOTREACHED();
33 return nullptr;
34 }
35
36 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698