Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef ASH_SHELF_SHELF_H_ |
| 6 #define ASH_SHELF_SHELF_H_ | 6 #define ASH_SHELF_SHELF_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/shelf/shelf_constants.h" | 11 #include "ash/shelf/shelf_constants.h" |
| 12 #include "ash/shelf/shelf_locking_manager.h" | 12 #include "ash/shelf/shelf_locking_manager.h" |
| 13 #include "ash/shelf/shelf_types.h" | 13 #include "ash/shelf/shelf_types.h" |
| 14 #include "ash/shelf/shelf_view.h" | |
| 14 #include "ash/shelf/shelf_widget.h" | 15 #include "ash/shelf/shelf_widget.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 17 #include "ui/views/widget/widget_observer.h" | 18 #include "ui/views/widget/widget_observer.h" |
| 18 | 19 |
| 19 namespace app_list { | 20 namespace app_list { |
| 20 class ApplicationDragAndDropHost; | 21 class ApplicationDragAndDropHost; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace aura { | 24 namespace aura { |
| 24 class Window; | 25 class Window; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace gfx { | 28 namespace gfx { |
| 28 class Rect; | 29 class Rect; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace views { | 32 namespace views { |
| 32 class View; | 33 class View; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace ash { | 36 namespace ash { |
| 36 class FocusCycler; | 37 class FocusCycler; |
| 37 class ShelfDelegate; | 38 class ShelfDelegate; |
| 38 class ShelfIconObserver; | 39 class ShelfIconObserver; |
| 39 class ShelfModel; | 40 class ShelfModel; |
| 40 class ShelfView; | |
| 41 | 41 |
| 42 namespace wm { | 42 namespace wm { |
| 43 class WmShelfAura; | 43 class WmShelfAura; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace test { | 46 namespace test { |
| 47 class ShelfTestAPI; | 47 class ShelfTestAPI; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Controller for shelf state. All access to state (visibility, auto-hide, etc.) | 50 // Controller for shelf state. All access to state (visibility, auto-hide, etc.) |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 void SchedulePaint(); | 131 void SchedulePaint(); |
| 132 | 132 |
| 133 views::View* GetAppListButtonView() const; | 133 views::View* GetAppListButtonView() const; |
| 134 | 134 |
| 135 // Launch a 0-indexed shelf item in the shelf. | 135 // Launch a 0-indexed shelf item in the shelf. |
| 136 // A negative index launches the last shelf item in the shelf. | 136 // A negative index launches the last shelf item in the shelf. |
| 137 void LaunchAppIndexAt(int item_index); | 137 void LaunchAppIndexAt(int item_index); |
| 138 | 138 |
| 139 ShelfWidget* shelf_widget() { return shelf_widget_; } | 139 ShelfWidget* shelf_widget() { return shelf_widget_; } |
| 140 | 140 |
| 141 ShelfModel* shelf_model() { return shelf_view_->model(); } | |
|
James Cook
2016/06/04 04:47:58
I don't understand why you're exposing this here,
| |
| 142 | |
| 141 // TODO(msw): ShelfLayoutManager should not be accessed externally. | 143 // TODO(msw): ShelfLayoutManager should not be accessed externally. |
| 142 ShelfLayoutManager* shelf_layout_manager() { | 144 ShelfLayoutManager* shelf_layout_manager() { |
| 143 return shelf_widget_->shelf_layout_manager(); | 145 return shelf_widget_->shelf_layout_manager(); |
| 144 } | 146 } |
| 145 | 147 |
| 146 // Returns rectangle bounding all visible shelf items. Used screen coordinate | 148 // Returns rectangle bounding all visible shelf items. Used screen coordinate |
| 147 // system. | 149 // system. |
| 148 gfx::Rect GetVisibleItemsBoundsInScreen() const; | 150 gfx::Rect GetVisibleItemsBoundsInScreen() const; |
| 149 | 151 |
| 150 // Returns ApplicationDragAndDropHost for this shelf. | 152 // Returns ApplicationDragAndDropHost for this shelf. |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 163 | 165 |
| 164 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; | 166 wm::ShelfAlignment alignment_ = wm::SHELF_ALIGNMENT_BOTTOM; |
| 165 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; | 167 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; |
| 166 | 168 |
| 167 DISALLOW_COPY_AND_ASSIGN(Shelf); | 169 DISALLOW_COPY_AND_ASSIGN(Shelf); |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 } // namespace ash | 172 } // namespace ash |
| 171 | 173 |
| 172 #endif // ASH_SHELF_SHELF_H_ | 174 #endif // ASH_SHELF_SHELF_H_ |
| OLD | NEW |