| 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_view.h" | |
| 9 #include "ash/common/shelf/wm_shelf.h" | 8 #include "ash/common/shelf/wm_shelf.h" |
| 10 #include "ash/common/wm_root_window_controller.h" | 9 #include "ash/common/wm_root_window_controller.h" |
| 11 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 12 #include "ash/common/wm_window.h" | 11 #include "ash/common/wm_window.h" |
| 13 | 12 |
| 14 namespace ash { | 13 namespace ash { |
| 15 | 14 |
| 16 Shelf::Shelf(WmShelf* wm_shelf, | 15 Shelf::Shelf(WmShelf* wm_shelf, |
| 17 ShelfView* shelf_view, | 16 ShelfView* shelf_view, |
| 18 ShelfWidget* shelf_widget) | 17 ShelfWidget* shelf_widget) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 // static | 30 // static |
| 32 Shelf* Shelf::ForPrimaryDisplay() { | 31 Shelf* Shelf::ForPrimaryDisplay() { |
| 33 return Shelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow()); | 32 return Shelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow()); |
| 34 } | 33 } |
| 35 | 34 |
| 36 // static | 35 // static |
| 37 Shelf* Shelf::ForWindow(WmWindow* window) { | 36 Shelf* Shelf::ForWindow(WmWindow* window) { |
| 38 return window->GetRootWindowController()->GetShelf()->shelf(); | 37 return window->GetRootWindowController()->GetShelf()->shelf(); |
| 39 } | 38 } |
| 40 | 39 |
| 41 AppListButton* Shelf::GetAppListButton() const { | |
| 42 return shelf_view_->GetAppListButton(); | |
| 43 } | |
| 44 | |
| 45 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | |
| 46 return shelf_view_; | |
| 47 } | |
| 48 | |
| 49 } // namespace ash | 40 } // namespace ash |
| OLD | NEW |