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

Side by Side Diff: ash/shelf/shelf_layout_manager.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/shelf/shelf_layout_manager.h ('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 (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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 bool ShelfLayoutManager::IsHorizontalAlignment() const { 537 bool ShelfLayoutManager::IsHorizontalAlignment() const {
538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || 538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM ||
539 GetAlignment() == SHELF_ALIGNMENT_TOP; 539 GetAlignment() == SHELF_ALIGNMENT_TOP;
540 } 540 }
541 541
542 void ShelfLayoutManager::SetChromeVoxPanelHeight(int height) { 542 void ShelfLayoutManager::SetChromeVoxPanelHeight(int height) {
543 chromevox_panel_height_ = height; 543 chromevox_panel_height_ = height;
544 LayoutShelf(); 544 LayoutShelf();
545 } 545 }
546 546
547 // static
548 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) {
549 ShelfWidget* shelf = RootWindowController::ForShelf(window)->shelf();
550 return shelf ? shelf->shelf_layout_manager() : NULL;
551 }
552
553 //////////////////////////////////////////////////////////////////////////////// 547 ////////////////////////////////////////////////////////////////////////////////
554 // ShelfLayoutManager, private: 548 // ShelfLayoutManager, private:
555 549
556 ShelfLayoutManager::TargetBounds::TargetBounds() 550 ShelfLayoutManager::TargetBounds::TargetBounds()
557 : opacity(0.0f), status_opacity(0.0f) {} 551 : opacity(0.0f), status_opacity(0.0f) {}
558 552
559 ShelfLayoutManager::TargetBounds::~TargetBounds() {} 553 ShelfLayoutManager::TargetBounds::~TargetBounds() {}
560 554
561 void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { 555 void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) {
562 if (!shelf_->GetNativeView()) 556 if (!shelf_->GetNativeView())
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 return false; 1178 return false;
1185 } 1179 }
1186 if (session_state_delegate->IsUserSessionBlocked() || 1180 if (session_state_delegate->IsUserSessionBlocked() ||
1187 state_.is_adding_user_screen) { 1181 state_.is_adding_user_screen) {
1188 return true; 1182 return true;
1189 } 1183 }
1190 return false; 1184 return false;
1191 } 1185 }
1192 1186
1193 } // namespace ash 1187 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698