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 #include "ash/common/shelf/shelf.h" | 5 #include "ash/common/shelf/shelf.h" |
6 | 6 |
7 #include "ash/common/shelf/shelf_delegate.h" | 7 #include "ash/common/shelf/shelf_delegate.h" |
8 #include "ash/common/shelf/shelf_item_delegate.h" | 8 #include "ash/common/shelf/shelf_item_delegate.h" |
9 #include "ash/common/shelf/shelf_model.h" | 9 #include "ash/common/shelf/shelf_model.h" |
10 #include "ash/common/shelf/shelf_navigator.h" | 10 #include "ash/common/shelf/shelf_navigator.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 ShelfWidget* shelf_widget) | 25 ShelfWidget* shelf_widget) |
26 : wm_shelf_(wm_shelf), | 26 : wm_shelf_(wm_shelf), |
27 shelf_widget_(shelf_widget), | 27 shelf_widget_(shelf_widget), |
28 shelf_view_(shelf_view) { | 28 shelf_view_(shelf_view) { |
29 DCHECK(wm_shelf_); | 29 DCHECK(wm_shelf_); |
30 DCHECK(shelf_view_); | 30 DCHECK(shelf_view_); |
31 DCHECK(shelf_widget_); | 31 DCHECK(shelf_widget_); |
32 } | 32 } |
33 | 33 |
34 Shelf::~Shelf() { | 34 Shelf::~Shelf() { |
35 WmShell::Get()->shelf_delegate()->OnShelfDestroyed(this); | 35 WmShell::Get()->shelf_delegate()->OnShelfDestroyed(wm_shelf_); |
36 } | 36 } |
37 | 37 |
38 // static | 38 // static |
39 Shelf* Shelf::ForPrimaryDisplay() { | 39 Shelf* Shelf::ForPrimaryDisplay() { |
40 return Shelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow()); | 40 return Shelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow()); |
41 } | 41 } |
42 | 42 |
43 // static | 43 // static |
44 Shelf* Shelf::ForWindow(WmWindow* window) { | 44 Shelf* Shelf::ForWindow(WmWindow* window) { |
45 return window->GetRootWindowController()->GetShelf()->shelf(); | 45 return window->GetRootWindowController()->GetShelf()->shelf(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | 119 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { |
120 return shelf_view_; | 120 return shelf_view_; |
121 } | 121 } |
122 | 122 |
123 void Shelf::UpdateShelfItemBackground(int alpha) { | 123 void Shelf::UpdateShelfItemBackground(int alpha) { |
124 shelf_view_->UpdateShelfItemBackground(alpha); | 124 shelf_view_->UpdateShelfItemBackground(alpha); |
125 } | 125 } |
126 | 126 |
127 } // namespace ash | 127 } // namespace ash |
OLD | NEW |