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 ASH_SHELF_SHELF_VIEW_H_ | 5 #ifndef ASH_SHELF_SHELF_VIEW_H_ |
6 #define ASH_SHELF_SHELF_VIEW_H_ | 6 #define ASH_SHELF_SHELF_VIEW_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // returns bounds from first item to last panel item. | 224 // returns bounds from first item to last panel item. |
225 // * In the overflow mode, returns only bubble's bounds. | 225 // * In the overflow mode, returns only bubble's bounds. |
226 gfx::Rect GetBoundsForDragInsertInScreen(); | 226 gfx::Rect GetBoundsForDragInsertInScreen(); |
227 | 227 |
228 // Common setup done for all children. | 228 // Common setup done for all children. |
229 void ConfigureChildView(views::View* view); | 229 void ConfigureChildView(views::View* view); |
230 | 230 |
231 // Toggles the overflow menu. | 231 // Toggles the overflow menu. |
232 void ToggleOverflowBubble(); | 232 void ToggleOverflowBubble(); |
233 | 233 |
234 // Update first launcher button's padding. This method adds padding to the | |
235 // first button to include the leading inset. It needs to be called once on | |
236 // button creation and every time when shelf alignment is changed. | |
237 void UpdateFirstButtonPadding(); | |
238 | |
239 // Invoked after the fading out animation for item deletion is ended. | 234 // Invoked after the fading out animation for item deletion is ended. |
240 void OnFadeOutAnimationEnded(); | 235 void OnFadeOutAnimationEnded(); |
241 | 236 |
242 // Fade in last visible item. | 237 // Fade in last visible item. |
243 void StartFadeInLastVisibleItem(); | 238 void StartFadeInLastVisibleItem(); |
244 | 239 |
245 // Updates the visible range of overflow items in |overflow_view|. | 240 // Updates the visible range of overflow items in |overflow_view|. |
246 void UpdateOverflowRange(ShelfView* overflow_view); | 241 void UpdateOverflowRange(ShelfView* overflow_view); |
247 | 242 |
248 // Returns the launcher button size. | |
249 int GetButtonSize() const; | |
250 | |
251 // Returns the button spacing. | |
252 int GetButtonSpacing() const; | |
253 | |
254 // Overridden from views::View: | 243 // Overridden from views::View: |
255 virtual gfx::Size GetPreferredSize() OVERRIDE; | 244 virtual gfx::Size GetPreferredSize() OVERRIDE; |
256 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 245 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
257 virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE; | 246 virtual FocusTraversable* GetPaneFocusTraversable() OVERRIDE; |
258 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 247 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
259 | 248 |
260 // Overridden from ui::EventHandler: | 249 // Overridden from ui::EventHandler: |
261 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 250 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
262 | 251 |
263 // Overridden from ShelfModelObserver: | 252 // Overridden from ShelfModelObserver: |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 433 |
445 // True when ripped item from overflow bubble is entered into Shelf. | 434 // True when ripped item from overflow bubble is entered into Shelf. |
446 bool dragged_off_from_overflow_to_shelf_; | 435 bool dragged_off_from_overflow_to_shelf_; |
447 | 436 |
448 DISALLOW_COPY_AND_ASSIGN(ShelfView); | 437 DISALLOW_COPY_AND_ASSIGN(ShelfView); |
449 }; | 438 }; |
450 | 439 |
451 } // namespace ash | 440 } // namespace ash |
452 | 441 |
453 #endif // ASH_SHELF_SHELF_VIEW_H_ | 442 #endif // ASH_SHELF_SHELF_VIEW_H_ |
OLD | NEW |