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

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

Issue 2279533002: ash: Convert ShelfDelegate to use WmShelf* instead of Shelf* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: curlies Created 4 years, 4 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/common/shelf/shelf_delegate.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/common/shelf/shelf_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698