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

Side by Side Diff: ash/common/shelf/shelf.cc

Issue 2293183002: ash: Remove ash::Shelf in favor of ash::WmShelf (Closed)
Patch Set: rebase again Created 4 years, 3 months 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/common/shelf/shelf.h"
6
7 #include "ash/common/shelf/shelf_delegate.h"
8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/wm_root_window_controller.h"
10 #include "ash/common/wm_shell.h"
11 #include "ash/common/wm_window.h"
12
13 namespace ash {
14
15 Shelf::Shelf(WmShelf* wm_shelf,
16 ShelfView* shelf_view,
17 ShelfWidget* shelf_widget)
18 : wm_shelf_(wm_shelf),
19 shelf_widget_(shelf_widget),
20 shelf_view_(shelf_view) {
21 DCHECK(wm_shelf_);
22 DCHECK(shelf_view_);
23 DCHECK(shelf_widget_);
24 }
25
26 Shelf::~Shelf() {
27 WmShell::Get()->shelf_delegate()->OnShelfDestroyed(wm_shelf_);
28 }
29
30 // static
31 Shelf* Shelf::ForPrimaryDisplay() {
32 return Shelf::ForWindow(WmShell::Get()->GetPrimaryRootWindow());
33 }
34
35 // static
36 Shelf* Shelf::ForWindow(WmWindow* window) {
37 return window->GetRootWindowController()->GetShelf()->shelf();
38 }
39
40 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf.h ('k') | ash/common/shelf/shelf_button_pressed_metric_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698