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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved style Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h"
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h" 12 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h"
12 #include "ui/views/bubble/bubble_delegate.h" 13 #include "ui/views/bubble/bubble_delegate.h"
13 #include "ui/views/controls/button/button.h" 14 #include "ui/views/controls/button/button.h"
14 #include "ui/views/controls/combobox/combobox_listener.h" 15 #include "ui/views/controls/combobox/combobox_listener.h"
15 #include "url/gurl.h" 16 #include "url/gurl.h"
16 17
17 class BookmarkBubbleViewObserver; 18 class BookmarkBubbleViewObserver;
19 class BookmarkSyncPromoView;
18 class Profile; 20 class Profile;
19 21
20 namespace views { 22 namespace views {
21 class LabelButton; 23 class LabelButton;
22 class Textfield; 24 class Textfield;
23 } 25 }
24 26
25 // BookmarkBubbleView is a view intended to be used as the content of an 27 // BookmarkBubbleView is a view intended to be used as the content of an
26 // Bubble. BookmarkBubbleView provides views for unstarring and editing the 28 // Bubble. BookmarkBubbleView provides views for unstarring and editing the
27 // bookmark it is created with. Don't create a BookmarkBubbleView directly, 29 // bookmark it is created with. Don't create a BookmarkBubbleView directly,
(...skipping 21 matching lines...) Expand all
49 virtual void WindowClosing() OVERRIDE; 51 virtual void WindowClosing() OVERRIDE;
50 52
51 // views::View method. 53 // views::View method.
52 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 54 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
53 55
54 protected: 56 protected:
55 // views::BubbleDelegateView method. 57 // views::BubbleDelegateView method.
56 virtual void Init() OVERRIDE; 58 virtual void Init() OVERRIDE;
57 59
58 private: 60 private:
61 friend class BookmarkBubbleViewTest;
62 FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoSignedIn);
63 FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoNotSignedIn);
64
59 // Creates a BookmarkBubbleView. 65 // Creates a BookmarkBubbleView.
60 BookmarkBubbleView(views::View* anchor_view, 66 BookmarkBubbleView(views::View* anchor_view,
61 BookmarkBubbleViewObserver* observer, 67 BookmarkBubbleViewObserver* observer,
62 Profile* profile, 68 Profile* profile,
63 const GURL& url, 69 const GURL& url,
64 bool newly_bookmarked); 70 bool newly_bookmarked);
65 71
66 // Returns the title to display. 72 // Returns the title to display.
67 string16 GetTitle(); 73 string16 GetTitle();
68 74
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Button to close the window. 118 // Button to close the window.
113 views::LabelButton* close_button_; 119 views::LabelButton* close_button_;
114 120
115 // Textfield showing the title of the bookmark. 121 // Textfield showing the title of the bookmark.
116 views::Textfield* title_tf_; 122 views::Textfield* title_tf_;
117 123
118 // Combobox showing a handful of folders the user can choose from, including 124 // Combobox showing a handful of folders the user can choose from, including
119 // the current parent. 125 // the current parent.
120 views::Combobox* parent_combobox_; 126 views::Combobox* parent_combobox_;
121 127
128 // Bookmark sync promo view, if displayed.
129 BookmarkSyncPromoView* sync_promo_view_;
130
122 // When the destructor is invoked should the bookmark be removed? 131 // When the destructor is invoked should the bookmark be removed?
123 bool remove_bookmark_; 132 bool remove_bookmark_;
124 133
125 // When the destructor is invoked should edits be applied? 134 // When the destructor is invoked should edits be applied?
126 bool apply_edits_; 135 bool apply_edits_;
127 136
128 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView); 137 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView);
129 }; 138 };
130 139
131 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_ 140 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698