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

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

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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/base_bubble_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/mac/cocoa_protocols.h" 7 #import "base/mac/cocoa_protocols.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace BaseBubbleControllerInternal { 10 namespace BaseBubbleControllerInternal {
(...skipping 12 matching lines...) Expand all
23 // delegate. 23 // delegate.
24 // 2. Create a subclass of BaseBubbleController. 24 // 2. Create a subclass of BaseBubbleController.
25 // 3. Change the xib's File Owner to your subclass. 25 // 3. Change the xib's File Owner to your subclass.
26 // 4. Hook up the File Owner's |bubble_| to the InfoBubbleView in the xib. 26 // 4. Hook up the File Owner's |bubble_| to the InfoBubbleView in the xib.
27 @interface BaseBubbleController : NSWindowController<NSWindowDelegate> { 27 @interface BaseBubbleController : NSWindowController<NSWindowDelegate> {
28 @private 28 @private
29 NSWindow* parentWindow_; // weak 29 NSWindow* parentWindow_; // weak
30 NSPoint anchor_; 30 NSPoint anchor_;
31 IBOutlet InfoBubbleView* bubble_; // to set arrow position 31 IBOutlet InfoBubbleView* bubble_; // to set arrow position
32 // Bridge that listens for notifications. 32 // Bridge that listens for notifications.
33 scoped_ptr<BaseBubbleControllerInternal::Bridge> base_bridge_; 33 scoped_ptr<BaseBubbleControllerInternal::Bridge> baseBridge_;
34 } 34 }
35 35
36 @property(nonatomic, readonly) NSWindow* parentWindow; 36 @property(nonatomic, readonly) NSWindow* parentWindow;
37 @property(nonatomic, assign) NSPoint anchorPoint; 37 @property(nonatomic, assign) NSPoint anchorPoint;
38 @property(nonatomic, readonly) InfoBubbleView* bubble; 38 @property(nonatomic, readonly) InfoBubbleView* bubble;
39 39
40 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble". 40 // Creates a bubble. |nibPath| is just the basename, e.g. @"FirstRunBubble".
41 // |anchoredAt| is in screen space. You need to call -showWindow: to make the 41 // |anchoredAt| is in screen space. You need to call -showWindow: to make the
42 // bubble visible. It will autorelease itself when the user dismisses the 42 // bubble visible. It will autorelease itself when the user dismisses the
43 // bubble. 43 // bubble.
(...skipping 18 matching lines...) Expand all
62 // contentView with an instance of InfoBubbleView. 62 // contentView with an instance of InfoBubbleView.
63 - (id)initWithWindow:(NSWindow*)theWindow 63 - (id)initWithWindow:(NSWindow*)theWindow
64 parentWindow:(NSWindow*)parentWindow 64 parentWindow:(NSWindow*)parentWindow
65 anchoredAt:(NSPoint)anchoredAt; 65 anchoredAt:(NSPoint)anchoredAt;
66 66
67 // Creates an autoreleased separator view with a given frame. The height of the 67 // Creates an autoreleased separator view with a given frame. The height of the
68 // frame is ignored. 68 // frame is ignored.
69 - (NSBox*)separatorWithFrame:(NSRect)frame; 69 - (NSBox*)separatorWithFrame:(NSRect)frame;
70 70
71 @end 71 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/base_bubble_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698