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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc

Issue 64933002: Eliminate Shell::RootWindowList in favor of aura::Window::Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | Annotate | Revision Log
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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 profile_->GetPrefs(), root_window, prefs::kShelfAutoHideBehavior, value); 1651 profile_->GetPrefs(), root_window, prefs::kShelfAutoHideBehavior, value);
1652 1652
1653 if (root_window == ash::Shell::GetPrimaryRootWindow()) { 1653 if (root_window == ash::Shell::GetPrimaryRootWindow()) {
1654 // See comment in |kShelfAlignment| about why we have two prefs here. 1654 // See comment in |kShelfAlignment| about why we have two prefs here.
1655 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value); 1655 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehaviorLocal, value);
1656 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehavior, value); 1656 profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehavior, value);
1657 } 1657 }
1658 } 1658 }
1659 1659
1660 void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() { 1660 void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() {
1661 ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); 1661 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
1662 1662
1663 for (ash::Shell::RootWindowList::const_iterator iter = root_windows.begin(); 1663 for (aura::Window::Windows::const_iterator iter = root_windows.begin();
1664 iter != root_windows.end(); ++iter) { 1664 iter != root_windows.end(); ++iter) {
1665 ash::Shell::GetInstance()->SetShelfAutoHideBehavior( 1665 ash::Shell::GetInstance()->SetShelfAutoHideBehavior(
1666 GetShelfAutoHideBehavior(*iter), *iter); 1666 GetShelfAutoHideBehavior(*iter), *iter);
1667 } 1667 }
1668 } 1668 }
1669 1669
1670 void ChromeLauncherController::SetShelfAlignmentFromPrefs() { 1670 void ChromeLauncherController::SetShelfAlignmentFromPrefs() {
1671 if (!ash::ShelfWidget::ShelfAlignmentAllowed()) 1671 if (!ash::ShelfWidget::ShelfAlignmentAllowed())
1672 return; 1672 return;
1673 1673
1674 ash::Shell::RootWindowList root_windows = ash::Shell::GetAllRootWindows(); 1674 aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows();
1675 1675
1676 for (ash::Shell::RootWindowList::const_iterator iter = root_windows.begin(); 1676 for (aura::Window::Windows::const_iterator iter = root_windows.begin();
1677 iter != root_windows.end(); ++iter) { 1677 iter != root_windows.end(); ++iter) {
1678 // See comment in |kShelfAlignment| as to why we consider two prefs. 1678 // See comment in |kShelfAlignment| as to why we consider two prefs.
1679 const std::string alignment_value( 1679 const std::string alignment_value(
1680 GetPrefForRootWindow(profile_->GetPrefs(), 1680 GetPrefForRootWindow(profile_->GetPrefs(),
1681 *iter, 1681 *iter,
1682 prefs::kShelfAlignmentLocal, 1682 prefs::kShelfAlignmentLocal,
1683 prefs::kShelfAlignment)); 1683 prefs::kShelfAlignment));
1684 ash::ShelfAlignment alignment = ash::SHELF_ALIGNMENT_BOTTOM; 1684 ash::ShelfAlignment alignment = ash::SHELF_ALIGNMENT_BOTTOM;
1685 if (alignment_value == ash::kShelfAlignmentLeft) 1685 if (alignment_value == ash::kShelfAlignmentLeft)
1686 alignment = ash::SHELF_ALIGNMENT_LEFT; 1686 alignment = ash::SHELF_ALIGNMENT_LEFT;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 } 2058 }
2059 } 2059 }
2060 } 2060 }
2061 } 2061 }
2062 2062
2063 // Finally we update the browser state itself. 2063 // Finally we update the browser state itself.
2064 browser_status_monitor_->UpdateBrowserItemState(); 2064 browser_status_monitor_->UpdateBrowserItemState();
2065 #endif 2065 #endif
2066 } 2066 }
2067 2067
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698