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

Side by Side Diff: ash/root_window_controller.cc

Issue 1743493002: Cleanup ash shelf accessor functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert ash/shelf/shelf_widget.cc for browser_tests crash... Created 4 years, 9 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/root_window_controller.h ('k') | ash/shelf/overflow_bubble.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 controller->Init(RootWindowController::PRIMARY, 267 controller->Init(RootWindowController::PRIMARY,
268 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot()); 268 Shell::GetInstance()->delegate()->IsFirstRunAfterBoot());
269 } 269 }
270 270
271 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) { 271 void RootWindowController::CreateForSecondaryDisplay(AshWindowTreeHost* host) {
272 RootWindowController* controller = new RootWindowController(host); 272 RootWindowController* controller = new RootWindowController(host);
273 controller->Init(RootWindowController::SECONDARY, false /* first run */); 273 controller->Init(RootWindowController::SECONDARY, false /* first run */);
274 } 274 }
275 275
276 // static 276 // static
277 RootWindowController* RootWindowController::ForShelf(
278 const aura::Window* window) {
279 CHECK(Shell::HasInstance());
280 return GetRootWindowController(window->GetRootWindow());
281 }
282
283 // static
284 RootWindowController* RootWindowController::ForWindow( 277 RootWindowController* RootWindowController::ForWindow(
285 const aura::Window* window) { 278 const aura::Window* window) {
286 CHECK(Shell::HasInstance()); 279 CHECK(Shell::HasInstance());
287 return GetRootWindowController(window->GetRootWindow()); 280 return GetRootWindowController(window->GetRootWindow());
288 } 281 }
289 282
290 // static 283 // static
291 RootWindowController* RootWindowController::ForTargetRootWindow() { 284 RootWindowController* RootWindowController::ForTargetRootWindow() {
292 CHECK(Shell::HasInstance()); 285 CHECK(Shell::HasInstance());
293 return GetRootWindowController(Shell::GetTargetRootWindow()); 286 return GetRootWindowController(Shell::GetTargetRootWindow());
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 else 1049 else
1057 DisableTouchHudProjection(); 1050 DisableTouchHudProjection();
1058 } 1051 }
1059 1052
1060 RootWindowController* GetRootWindowController( 1053 RootWindowController* GetRootWindowController(
1061 const aura::Window* root_window) { 1054 const aura::Window* root_window) {
1062 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 1055 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
1063 } 1056 }
1064 1057
1065 } // namespace ash 1058 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shelf/overflow_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698