Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / views / bookmarks / bookmark_prompt_view.h
blob62b308ebaf795a5fd5b24c7d9812c78eb2432ec2
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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_PROMPT_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_PROMPT_VIEW_H_
8 #include "base/basictypes.h"
9 #include "ui/views/bubble/bubble_delegate.h"
10 #include "ui/views/controls/link_listener.h"
12 class PrefService;
14 // BookmarkPromptView is a view intended to be used as the content of an
15 // Bubble. BookmarkPromptView provides views for prompting user for action box
16 // or star icon. Don't create a BookmarkPromptView directly, instead use
17 // the static ShowPrompt() method.
18 class BookmarkPromptView : public views::BubbleDelegateView,
19 public views::LinkListener {
20 public:
21 // Show the prompt bubble.
22 static void ShowPrompt(views::View* anchor_view, PrefService* prefs);
24 private:
25 // Creates a BookmarkPromptView.
26 BookmarkPromptView(views::View* anchor_view, PrefService* prefs);
28 virtual ~BookmarkPromptView();
30 // views::BubbleDelegateView method.
31 virtual void Init() OVERRIDE;
33 // views::LinkListener method.
34 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
36 // views::WidgetDelegate method.
37 virtual void WindowClosing() OVERRIDE;
39 // The bookmark bubble, if we're showing one.
40 static BookmarkPromptView* bookmark_bubble_;
42 // Link for dismissing the prompt.
43 views::Link* dismiss_link_;
45 // The pref service to use disabling bookmark prompt feature.
46 PrefService* prefs_;
48 DISALLOW_COPY_AND_ASSIGN(BookmarkPromptView);
51 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_PROMPT_VIEW_H_