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

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

Issue 2166043003: mash: Migrate ShelfLockingManager to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move ShelfLockingManager test access to Shelf. Created 4 years, 5 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
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/shelf/shelf.h" 5 #include "ash/shelf/shelf.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/aura/wm_window_aura.h" 10 #include "ash/aura/wm_window_aura.h"
(...skipping 29 matching lines...) Expand all
40 const char Shelf::kNativeViewName[] = "ShelfView"; 40 const char Shelf::kNativeViewName[] = "ShelfView";
41 41
42 Shelf::Shelf(ShelfModel* shelf_model, 42 Shelf::Shelf(ShelfModel* shelf_model,
43 ShelfDelegate* shelf_delegate, 43 ShelfDelegate* shelf_delegate,
44 WmShelf* wm_shelf, 44 WmShelf* wm_shelf,
45 ShelfWidget* shelf_widget) 45 ShelfWidget* shelf_widget)
46 : delegate_(shelf_delegate), 46 : delegate_(shelf_delegate),
47 wm_shelf_(wm_shelf), 47 wm_shelf_(wm_shelf),
48 shelf_widget_(shelf_widget), 48 shelf_widget_(shelf_widget),
49 shelf_view_(new ShelfView(shelf_model, delegate_, wm_shelf, this)), 49 shelf_view_(new ShelfView(shelf_model, delegate_, wm_shelf, this)),
50 shelf_locking_manager_(this) { 50 shelf_locking_manager_(wm_shelf) {
51 DCHECK(wm_shelf_); 51 DCHECK(wm_shelf_);
52 shelf_view_->Init(); 52 shelf_view_->Init();
53 shelf_widget_->GetContentsView()->AddChildView(shelf_view_); 53 shelf_widget_->GetContentsView()->AddChildView(shelf_view_);
54 shelf_widget_->GetNativeView()->SetName(kNativeViewName); 54 shelf_widget_->GetNativeView()->SetName(kNativeViewName);
55 } 55 }
56 56
57 Shelf::~Shelf() { 57 Shelf::~Shelf() {
58 delegate_->OnShelfDestroyed(this); 58 delegate_->OnShelfDestroyed(this);
59 } 59 }
60 60
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { 211 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const {
212 return shelf_view_->GetVisibleItemsBoundsInScreen(); 212 return shelf_view_->GetVisibleItemsBoundsInScreen();
213 } 213 }
214 214
215 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { 215 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() {
216 return shelf_view_; 216 return shelf_view_;
217 } 217 }
218 218
219 } // namespace ash 219 } // namespace ash
OLDNEW
« ash/common/wm_shell.h ('K') | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698