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_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 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // Returns the drop MenuItemView, or NULL if a menu isn't showing. | 136 // Returns the drop MenuItemView, or NULL if a menu isn't showing. |
137 views::MenuItemView* GetDropMenu(); | 137 views::MenuItemView* GetDropMenu(); |
138 | 138 |
139 // If a button is currently throbbing, it is stopped. If immediate is true | 139 // If a button is currently throbbing, it is stopped. If immediate is true |
140 // the throb stops immediately, otherwise it stops after a couple more | 140 // the throb stops immediately, otherwise it stops after a couple more |
141 // throbs. | 141 // throbs. |
142 void StopThrobbing(bool immediate); | 142 void StopThrobbing(bool immediate); |
143 | 143 |
144 // Returns the tooltip text for the specified url and title. The returned | 144 // Returns the tooltip text for the specified url and title. The returned |
145 // text is clipped to fit within the bounds of the monitor. | 145 // text is clipped to fit within the bounds of the monitor. |context| is |
| 146 // used to determine which gfx::Screen is used to retrieve bounds. |
146 // | 147 // |
147 // Note that we adjust the direction of both the URL and the title based on | 148 // Note that we adjust the direction of both the URL and the title based on |
148 // the locale so that pure LTR strings are displayed properly in RTL locales. | 149 // the locale so that pure LTR strings are displayed properly in RTL locales. |
149 static string16 CreateToolTipForURLAndTitle(const gfx::Point& screen_loc, | 150 static string16 CreateToolTipForURLAndTitle(const gfx::Point& screen_loc, |
150 const GURL& url, | 151 const GURL& url, |
151 const string16& title, | 152 const string16& title, |
152 Profile* profile); | 153 Profile* profile, |
| 154 gfx::NativeView context); |
153 | 155 |
154 // DetachableToolbarView methods: | 156 // DetachableToolbarView methods: |
155 virtual bool IsDetached() const OVERRIDE; | 157 virtual bool IsDetached() const OVERRIDE; |
156 virtual double GetAnimationValue() const OVERRIDE; | 158 virtual double GetAnimationValue() const OVERRIDE; |
157 virtual int GetToolbarOverlap() const OVERRIDE; | 159 virtual int GetToolbarOverlap() const OVERRIDE; |
158 | 160 |
159 // View methods: | 161 // View methods: |
160 virtual gfx::Size GetPreferredSize() OVERRIDE; | 162 virtual gfx::Size GetPreferredSize() OVERRIDE; |
161 virtual gfx::Size GetMinimumSize() OVERRIDE; | 163 virtual gfx::Size GetMinimumSize() OVERRIDE; |
162 virtual void Layout() OVERRIDE; | 164 virtual void Layout() OVERRIDE; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 409 |
408 BookmarkBar::State bookmark_bar_state_; | 410 BookmarkBar::State bookmark_bar_state_; |
409 | 411 |
410 // Are we animating to or from the detached state? | 412 // Are we animating to or from the detached state? |
411 bool animating_detached_; | 413 bool animating_detached_; |
412 | 414 |
413 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); | 415 DISALLOW_COPY_AND_ASSIGN(BookmarkBarView); |
414 }; | 416 }; |
415 | 417 |
416 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ | 418 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_BAR_VIEW_H_ |
OLD | NEW |