OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Sets whether the containing browser is showing an infobar. This affects | 106 // Sets whether the containing browser is showing an infobar. This affects |
107 // layout during animation. | 107 // layout during animation. |
108 void set_infobar_visible(bool infobar_visible) { | 108 void set_infobar_visible(bool infobar_visible) { |
109 infobar_visible_ = infobar_visible; | 109 infobar_visible_ = infobar_visible; |
110 } | 110 } |
111 | 111 |
112 // DetachableToolbarView methods: | 112 // DetachableToolbarView methods: |
113 virtual bool IsDetached() const; | 113 virtual bool IsDetached() const; |
114 virtual bool IsOnTop() const; | 114 virtual bool IsOnTop() const; |
115 virtual double GetAnimationValue() const; | 115 virtual double GetAnimationValue() const; |
116 virtual int GetToolbarOverlap() const { | 116 virtual int GetToolbarOverlap() const; |
117 return GetToolbarOverlap(false); | |
118 } | |
119 | 117 |
120 // View methods: | 118 // View methods: |
121 virtual gfx::Size GetPreferredSize(); | 119 virtual gfx::Size GetPreferredSize(); |
122 virtual gfx::Size GetMinimumSize(); | 120 virtual gfx::Size GetMinimumSize(); |
123 virtual void Layout(); | 121 virtual void Layout(); |
124 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); | 122 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); |
125 virtual void PaintChildren(gfx::Canvas* canvas); | 123 virtual void PaintChildren(gfx::Canvas* canvas); |
126 virtual bool GetDropFormats( | 124 virtual bool GetDropFormats( |
127 int* formats, | 125 int* formats, |
128 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); | 126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 bool OnNewTabPage() const; | 172 bool OnNewTabPage() const; |
175 | 173 |
176 // How much we want the bookmark bar to overlap the toolbar. If |return_max| | 174 // How much we want the bookmark bar to overlap the toolbar. If |return_max| |
177 // is true, we return the maximum overlap rather than the current overlap. | 175 // is true, we return the maximum overlap rather than the current overlap. |
178 int GetToolbarOverlap(bool return_max) const; | 176 int GetToolbarOverlap(bool return_max) const; |
179 | 177 |
180 // Whether or not we are animating. | 178 // Whether or not we are animating. |
181 bool is_animating(); | 179 bool is_animating(); |
182 | 180 |
183 // SlideAnimationDelegate implementation. | 181 // SlideAnimationDelegate implementation. |
184 void AnimationProgressed(const ui::Animation* animation); | 182 virtual void AnimationProgressed(const ui::Animation* animation); |
185 void AnimationEnded(const ui::Animation* animation); | 183 virtual void AnimationEnded(const ui::Animation* animation); |
186 | 184 |
187 // BookmarkMenuController::Observer | 185 // BookmarkMenuController::Observer |
188 virtual void BookmarkMenuDeleted(BookmarkMenuController* controller); | 186 virtual void BookmarkMenuDeleted(BookmarkMenuController* controller); |
189 | 187 |
190 // Returns the button at the specified index. | 188 // Returns the button at the specified index. |
191 views::TextButton* GetBookmarkButton(int index); | 189 views::TextButton* GetBookmarkButton(int index); |
192 | 190 |
193 // Returns the button responsible for showing bookmarks in the other bookmark | 191 // Returns the button responsible for showing bookmarks in the other bookmark |
194 // folder. | 192 // folder. |
195 views::MenuButton* other_bookmarked_button() const { | 193 views::MenuButton* other_bookmarked_button() const { |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // overflow_button_ or a button on the bar. | 512 // overflow_button_ or a button on the bar. |
515 views::CustomButton* throbbing_view_; | 513 views::CustomButton* throbbing_view_; |
516 | 514 |
517 // Background for extension toolstrips. | 515 // Background for extension toolstrips. |
518 SkBitmap toolstrip_background_; | 516 SkBitmap toolstrip_background_; |
519 | 517 |
520 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 518 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
521 }; | 519 }; |
522 | 520 |
523 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 521 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
OLD | NEW |