1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
7 
8 #include <memory>
9 
10 #include "base/macros.h"
11 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h"
12 
13 class GURL;
14 class Profile;
15 
16 namespace bookmarks {
17 class BookmarkBubbleObserver;
18 }
19 
20 namespace views {
21 class BubbleDialogDelegate;
22 class Button;
23 class View;
24 }
25 
26 // BookmarkBubbleView provides a dialog for unstarring and editing the bookmark
27 // it is created with. The dialog is created using the static ShowBubble method.
28 class BookmarkBubbleView {
29  public:
30   static void ShowBubble(views::View* anchor_view,
31                          views::Button* highlighted_button,
32                          bookmarks::BookmarkBubbleObserver* observer,
33                          std::unique_ptr<BubbleSyncPromoDelegate> delegate,
34                          Profile* profile,
35                          const GURL& url,
36                          bool already_bookmarked);
37 
38   static void Hide();
39 
bookmark_bubble()40   static views::BubbleDialogDelegate* bookmark_bubble() {
41     return bookmark_bubble_;
42   }
43 
44  private:
45   class BookmarkBubbleDelegate;
46   // The bookmark bubble, if we're showing one.
47   static views::BubbleDialogDelegate* bookmark_bubble_;
48 
49   DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView);
50 };
51 
52 #endif  // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
53