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

Side by Side Diff: ash/shelf/shelf_view.h

Issue 71653003: ash: Rename LauncherModel to ShelfModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chrome changes Created 7 years, 1 month 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
« no previous file with comments | « ash/shelf/shelf_tooltip_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 17 matching lines...) Expand all
28 28
29 namespace ash { 29 namespace ash {
30 30
31 namespace test { 31 namespace test {
32 class ShelfViewTestAPI; 32 class ShelfViewTestAPI;
33 } 33 }
34 34
35 class LauncherDelegate; 35 class LauncherDelegate;
36 struct LauncherItem; 36 struct LauncherItem;
37 class LauncherItemDelegateManager; 37 class LauncherItemDelegateManager;
38 class LauncherModel;
39 class ShelfIconObserver; 38 class ShelfIconObserver;
39 class ShelfModel;
40 40
41 namespace internal { 41 namespace internal {
42 42
43 class DragImageView; 43 class DragImageView;
44 class LauncherButton; 44 class LauncherButton;
45 class OverflowBubble; 45 class OverflowBubble;
46 class OverflowButton; 46 class OverflowButton;
47 class ShelfLayoutManager; 47 class ShelfLayoutManager;
48 class ShelfTooltipManager; 48 class ShelfTooltipManager;
49 49
50 class ASH_EXPORT ShelfView : public views::View, 50 class ASH_EXPORT ShelfView : public views::View,
51 public ShelfModelObserver, 51 public ShelfModelObserver,
52 public views::ButtonListener, 52 public views::ButtonListener,
53 public ShelfButtonHost, 53 public ShelfButtonHost,
54 public views::ContextMenuController, 54 public views::ContextMenuController,
55 public views::FocusTraversable, 55 public views::FocusTraversable,
56 public views::BoundsAnimatorObserver, 56 public views::BoundsAnimatorObserver,
57 public app_list::ApplicationDragAndDropHost { 57 public app_list::ApplicationDragAndDropHost {
58 public: 58 public:
59 ShelfView(LauncherModel* model, 59 ShelfView(ShelfModel* model,
60 LauncherDelegate* delegate, 60 LauncherDelegate* delegate,
61 ShelfLayoutManager* shelf_layout_manager); 61 ShelfLayoutManager* shelf_layout_manager);
62 virtual ~ShelfView(); 62 virtual ~ShelfView();
63 63
64 ShelfTooltipManager* tooltip_manager() { return tooltip_.get(); } 64 ShelfTooltipManager* tooltip_manager() { return tooltip_.get(); }
65 65
66 ShelfLayoutManager* shelf_layout_manager() { return layout_manager_; } 66 ShelfLayoutManager* shelf_layout_manager() { return layout_manager_; }
67 67
68 LauncherModel* model() { return model_; } 68 ShelfModel* model() { return model_; }
69 69
70 void Init(); 70 void Init();
71 71
72 void OnShelfAlignmentChanged(); 72 void OnShelfAlignmentChanged();
73 void SchedulePaintForAllButtons(); 73 void SchedulePaintForAllButtons();
74 74
75 // Returns the ideal bounds of the specified item, or an empty rect if id 75 // Returns the ideal bounds of the specified item, or an empty rect if id
76 // isn't know. 76 // isn't know.
77 gfx::Rect GetIdealBoundsOfItemIcon(LauncherID id); 77 gfx::Rect GetIdealBoundsOfItemIcon(LauncherID id);
78 78
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 const LauncherItem* LauncherItemForView(const views::View* view) const; 311 const LauncherItem* LauncherItemForView(const views::View* view) const;
312 312
313 // Returns true if a tooltip should be shown for |view|. 313 // Returns true if a tooltip should be shown for |view|.
314 bool ShouldShowTooltipForView(const views::View* view) const; 314 bool ShouldShowTooltipForView(const views::View* view) const;
315 315
316 // Get the distance from the given |coordinate| to the closest point on this 316 // Get the distance from the given |coordinate| to the closest point on this
317 // launcher/shelf. 317 // launcher/shelf.
318 int CalculateShelfDistance(const gfx::Point& coordinate) const; 318 int CalculateShelfDistance(const gfx::Point& coordinate) const;
319 319
320 // The model; owned by Launcher. 320 // The model; owned by Launcher.
321 LauncherModel* model_; 321 ShelfModel* model_;
322 322
323 // Delegate; owned by Launcher. 323 // Delegate; owned by Launcher.
324 LauncherDelegate* delegate_; 324 LauncherDelegate* delegate_;
325 325
326 // Used to manage the set of active launcher buttons. There is a view per 326 // Used to manage the set of active launcher buttons. There is a view per
327 // item in |model_|. 327 // item in |model_|.
328 scoped_ptr<views::ViewModel> view_model_; 328 scoped_ptr<views::ViewModel> view_model_;
329 329
330 // Index of first visible launcher item. 330 // Index of first visible launcher item.
331 int first_visible_index_; 331 int first_visible_index_;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // True when this ShelfView is used for Overflow Bubble. 426 // True when this ShelfView is used for Overflow Bubble.
427 bool overflow_mode_; 427 bool overflow_mode_;
428 428
429 DISALLOW_COPY_AND_ASSIGN(ShelfView); 429 DISALLOW_COPY_AND_ASSIGN(ShelfView);
430 }; 430 };
431 431
432 } // namespace internal 432 } // namespace internal
433 } // namespace ash 433 } // namespace ash
434 434
435 #endif // ASH_SHELF_SHELF_VIEW_H_ 435 #endif // ASH_SHELF_SHELF_VIEW_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_tooltip_manager.cc ('k') | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698