| OLD | NEW |
| 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/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
| 13 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h" | 13 #include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h" |
| 14 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h" | 14 #include "chrome/browser/ui/sync/bubble_sync_promo_delegate.h" |
| 15 #include "ui/views/bubble/bubble_delegate.h" | 15 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view
.h" |
| 16 #include "ui/views/controls/button/button.h" | 16 #include "ui/views/controls/button/button.h" |
| 17 #include "ui/views/controls/combobox/combobox_listener.h" | 17 #include "ui/views/controls/combobox/combobox_listener.h" |
| 18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 19 | 19 |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 namespace bookmarks { | 22 namespace bookmarks { |
| 23 class BookmarkBubbleObserver; | 23 class BookmarkBubbleObserver; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace views { | 26 namespace views { |
| 27 class LabelButton; | 27 class LabelButton; |
| 28 class Textfield; | 28 class Textfield; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // BookmarkBubbleView is a view intended to be used as the content of an | 31 // BookmarkBubbleView is a view intended to be used as the content of an |
| 32 // Bubble. BookmarkBubbleView provides views for unstarring and editing the | 32 // Bubble. BookmarkBubbleView provides views for unstarring and editing the |
| 33 // bookmark it is created with. Don't create a BookmarkBubbleView directly, | 33 // bookmark it is created with. Don't create a BookmarkBubbleView directly, |
| 34 // instead use the static Show method. | 34 // instead use the static Show method. |
| 35 class BookmarkBubbleView : public views::BubbleDelegateView, | 35 class BookmarkBubbleView : public LocationBarBubbleDelegateView, |
| 36 public views::ButtonListener, | 36 public views::ButtonListener, |
| 37 public views::ComboboxListener { | 37 public views::ComboboxListener { |
| 38 public: | 38 public: |
| 39 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble and | 39 // If |anchor_view| is null, |anchor_rect| is used to anchor the bubble and |
| 40 // |parent_window| is used to ensure the bubble closes if the parent closes. | 40 // |parent_window| is used to ensure the bubble closes if the parent closes. |
| 41 // Returns the newly created bubble's Widget or nullptr in case when the | 41 // Returns the newly created bubble's Widget or nullptr in case when the |
| 42 // bubble already exists. | 42 // bubble already exists. |
| 43 static views::Widget* ShowBubble(views::View* anchor_view, | 43 static views::Widget* ShowBubble(views::View* anchor_view, |
| 44 const gfx::Rect& anchor_rect, | 44 const gfx::Rect& anchor_rect, |
| 45 gfx::NativeView parent_window, | 45 gfx::NativeView parent_window, |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // When the destructor is invoked should the bookmark be removed? | 143 // When the destructor is invoked should the bookmark be removed? |
| 144 bool remove_bookmark_; | 144 bool remove_bookmark_; |
| 145 | 145 |
| 146 // When the destructor is invoked should edits be applied? | 146 // When the destructor is invoked should edits be applied? |
| 147 bool apply_edits_; | 147 bool apply_edits_; |
| 148 | 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView); | 149 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleView); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_ | 152 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BUBBLE_VIEW_H_ |
| OLD | NEW |