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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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/screen_util.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/public/cpp/config.h" 7 #include "ash/public/cpp/config.h"
8 #include "ash/public/cpp/shelf_item_delegate.h" 8 #include "ash/public/cpp/shelf_item_delegate.h"
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // TODO: ShelfBezelEventHandler needs to work with mus too. 66 // TODO: ShelfBezelEventHandler needs to work with mus too.
67 // http://crbug.com/636647 67 // http://crbug.com/636647
68 if (Shell::GetAshConfig() != Config::MASH) 68 if (Shell::GetAshConfig() != Config::MASH)
69 bezel_event_handler_ = base::MakeUnique<ShelfBezelEventHandler>(this); 69 bezel_event_handler_ = base::MakeUnique<ShelfBezelEventHandler>(this);
70 } 70 }
71 71
72 Shelf::~Shelf() {} 72 Shelf::~Shelf() {}
73 73
74 // static 74 // static
75 Shelf* Shelf::ForWindow(aura::Window* window) { 75 Shelf* Shelf::ForWindow(aura::Window* window) {
76 return GetRootWindowController(window->GetRootWindow())->shelf(); 76 return RootWindowController::ForWindow(window)->shelf();
77 } 77 }
78 78
79 // static 79 // static
80 bool Shelf::CanChangeShelfAlignment() { 80 bool Shelf::CanChangeShelfAlignment() {
81 if (Shell::Get()->session_controller()->IsUserSupervised()) 81 if (Shell::Get()->session_controller()->IsUserSupervised())
82 return false; 82 return false;
83 83
84 const LoginStatus login_status = 84 const LoginStatus login_status =
85 Shell::Get()->session_controller()->login_status(); 85 Shell::Get()->session_controller()->login_status();
86 86
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type, 358 void Shelf::OnBackgroundUpdated(ShelfBackgroundType background_type,
359 AnimationChangeType change_type) { 359 AnimationChangeType change_type) {
360 if (background_type == GetBackgroundType()) 360 if (background_type == GetBackgroundType())
361 return; 361 return;
362 for (auto& observer : observers_) 362 for (auto& observer : observers_)
363 observer.OnBackgroundTypeChanged(background_type, change_type); 363 observer.OnBackgroundTypeChanged(background_type, change_type);
364 } 364 }
365 365
366 } // namespace ash 366 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_util.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698