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

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

Issue 10787037: browser/ui: Share BookmarkBarInstructions delegate between gtk and views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/bookmarks/bookmark_model_observer.h" 15 #include "chrome/browser/bookmarks/bookmark_model_observer.h"
16 #include "chrome/browser/bookmarks/bookmark_node_data.h" 16 #include "chrome/browser/bookmarks/bookmark_node_data.h"
17 #include "chrome/browser/ui/bookmarks/bookmark_bar.h" 17 #include "chrome/browser/ui/bookmarks/bookmark_bar.h"
18 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h" 18 #include "chrome/browser/ui/bookmarks/bookmark_bar_instructions_delegate.h"
19 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h" 19 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_controller_views.h"
20 #include "chrome/browser/ui/views/detachable_toolbar_view.h" 20 #include "chrome/browser/ui/views/detachable_toolbar_view.h"
21 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 #include "ui/base/animation/animation_delegate.h" 23 #include "ui/base/animation/animation_delegate.h"
24 #include "ui/views/context_menu_controller.h" 24 #include "ui/views/context_menu_controller.h"
25 #include "ui/views/controls/button/button.h" 25 #include "ui/views/controls/button/button.h"
26 #include "ui/views/controls/button/menu_button_listener.h" 26 #include "ui/views/controls/button/menu_button_listener.h"
27 #include "ui/views/drag_controller.h" 27 #include "ui/views/drag_controller.h"
28 28
(...skipping 25 matching lines...) Expand all
54 // creating the BookmarkModel. 54 // creating the BookmarkModel.
55 class BookmarkBarView : public DetachableToolbarView, 55 class BookmarkBarView : public DetachableToolbarView,
56 public BookmarkModelObserver, 56 public BookmarkModelObserver,
57 public views::MenuButtonListener, 57 public views::MenuButtonListener,
58 public views::ButtonListener, 58 public views::ButtonListener,
59 public content::NotificationObserver, 59 public content::NotificationObserver,
60 public views::ContextMenuController, 60 public views::ContextMenuController,
61 public views::DragController, 61 public views::DragController,
62 public ui::AnimationDelegate, 62 public ui::AnimationDelegate,
63 public BookmarkMenuController::Observer, 63 public BookmarkMenuController::Observer,
64 public BookmarkBarInstructionsView::Delegate { 64 public chrome::BookmarkBarInstructionsDelegate {
65 public: 65 public:
66 // The internal view class name. 66 // The internal view class name.
67 static const char kViewClassName[]; 67 static const char kViewClassName[];
68 68
69 // Constants used in Browser View, as well as here. 69 // Constants used in Browser View, as well as here.
70 // How inset the bookmarks bar is when displayed on the new tab page. 70 // How inset the bookmarks bar is when displayed on the new tab page.
71 static const int kNewtabHorizontalPadding; 71 static const int kNewtabHorizontalPadding;
72 static const int kNewtabVerticalPadding; 72 static const int kNewtabVerticalPadding;
73 73
74 // Maximum size of buttons on the bookmark bar. 74 // Maximum size of buttons on the bookmark bar.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; 172 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE;
173 virtual void OnDragEntered(const views::DropTargetEvent& event) OVERRIDE; 173 virtual void OnDragEntered(const views::DropTargetEvent& event) OVERRIDE;
174 virtual int OnDragUpdated(const views::DropTargetEvent& event) OVERRIDE; 174 virtual int OnDragUpdated(const views::DropTargetEvent& event) OVERRIDE;
175 virtual void OnDragExited() OVERRIDE; 175 virtual void OnDragExited() OVERRIDE;
176 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; 176 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE;
177 virtual void ShowContextMenu(const gfx::Point& p, 177 virtual void ShowContextMenu(const gfx::Point& p,
178 bool is_mouse_gesture) OVERRIDE; 178 bool is_mouse_gesture) OVERRIDE;
179 virtual void OnThemeChanged() OVERRIDE; 179 virtual void OnThemeChanged() OVERRIDE;
180 virtual std::string GetClassName() const OVERRIDE; 180 virtual std::string GetClassName() const OVERRIDE;
181 181
182 // AccessiblePaneView methods: 182 // AccessiblePaneView:
183 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 183 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
184 184
185 // SlideAnimationDelegate implementation. 185 // ui::AnimationDelegate:
186 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 186 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
187 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 187 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
188 188
189 // BookmarkMenuController::Observer 189 // BookmarkMenuController::Observer:
190 virtual void BookmarkMenuDeleted( 190 virtual void BookmarkMenuDeleted(
191 BookmarkMenuController* controller) OVERRIDE; 191 BookmarkMenuController* controller) OVERRIDE;
192 192
193 // BookmarkBarInstructionsView::Delegate. 193 // chrome::BookmarkBarInstructionsDelegate:
194 virtual void ShowImportDialog() OVERRIDE; 194 virtual void ShowImportDialog() OVERRIDE;
195 195
196 // BookmarkModelObserver: 196 // BookmarkModelObserver:
197 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE; 197 virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE;
198 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE; 198 virtual void BookmarkModelBeingDeleted(BookmarkModel* model) OVERRIDE;
199 virtual void BookmarkNodeMoved(BookmarkModel* model, 199 virtual void BookmarkNodeMoved(BookmarkModel* model,
200 const BookmarkNode* old_parent, 200 const BookmarkNode* old_parent,
201 int old_index, 201 int old_index,
202 const BookmarkNode* new_parent, 202 const BookmarkNode* new_parent,
203 int new_index) OVERRIDE; 203 int new_index) OVERRIDE;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 BookmarkBar::State bookmark_bar_state_; 408 BookmarkBar::State bookmark_bar_state_;
409 409
410 // Are we animating to or from the detached state? 410 // Are we animating to or from the detached state?
411 bool animating_detached_; 411 bool animating_detached_;
412 412
413 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); 413 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView);
414 }; 414 };
415 415
416 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ 416 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698