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

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

Issue 9699045: [Mac] Make ExtensionPopupController is-a BaseBubbleController to unify code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 8 years, 9 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/base_bubble_controller.h" 5 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/mac/mac_util.h" 9 #include "base/mac/mac_util.h"
10 #include "base/memory/scoped_nsobject.h" 10 #include "base/memory/scoped_nsobject.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 return self; 113 return self;
114 } 114 }
115 115
116 - (void)awakeFromNib { 116 - (void)awakeFromNib {
117 // Check all connections have been made in Interface Builder. 117 // Check all connections have been made in Interface Builder.
118 DCHECK([self window]); 118 DCHECK([self window]);
119 DCHECK(bubble_); 119 DCHECK(bubble_);
120 DCHECK_EQ(self, [[self window] delegate]); 120 DCHECK_EQ(self, [[self window] delegate]);
121 121
122 base_bridge_.reset(new BaseBubbleControllerInternal::Bridge(self)); 122 baseBridge_.reset(new BaseBubbleControllerInternal::Bridge(self));
123 123
124 [bubble_ setArrowLocation:info_bubble::kTopRight]; 124 [bubble_ setArrowLocation:info_bubble::kTopRight];
125 } 125 }
126 126
127 - (void)dealloc { 127 - (void)dealloc {
128 [[NSNotificationCenter defaultCenter] removeObserver:self]; 128 [[NSNotificationCenter defaultCenter] removeObserver:self];
129 [super dealloc]; 129 [super dealloc];
130 } 130 }
131 131
132 - (void)setAnchorPoint:(NSPoint)anchor { 132 - (void)setAnchorPoint:(NSPoint)anchor {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 default: 223 default:
224 NOTREACHED(); 224 NOTREACHED();
225 } 225 }
226 226
227 origin.y -= NSHeight([window frame]); 227 origin.y -= NSHeight([window frame]);
228 [window setFrameOrigin:origin]; 228 [window setFrameOrigin:origin];
229 } 229 }
230 230
231 @end // BaseBubbleController 231 @end // BaseBubbleController
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/base_bubble_controller.h ('k') | chrome/browser/ui/cocoa/extensions/extension_popup_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698