summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_button.h
blob: 30341666900c47bb63afdb6fb3dcd25357861f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright (c) 2010 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 <Cocoa/Cocoa.h>

#import "chrome/browser/cocoa/draggable_button.h"

@protocol BookmarkButtonDelegate;

// Class for bookmark bar buttons that can be drag sources.
@interface BookmarkButton : DraggableButton {
 @private
  id<BookmarkButtonDelegate> delegate_;
}

@property(assign, nonatomic) id<BookmarkButtonDelegate> delegate;

@end  // @interface BookmarkButton

// Protocol for a |BookmarkButton|'s delegate, which is responsible for doing
// things which require information about the bookmark represented by this
// button.
@protocol BookmarkButtonDelegate

// Fill the given pasteboard with appropriate data when the given button is
// dragged. Since the delegate has no way of providing pasteboard data later,
// all data must actually be put into the pasteboard and not merely promised.
- (void)fillPasteboard:(NSPasteboard*)pboard
       forDragOfButton:(BookmarkButton*)button;

@end  // @protocol BookmarkButtonDelegate