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

Unified Diff: chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc

Issue 1877543002: Revise the shelf alignment locking mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update and cleanup tests. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
index 2cfe4cbe66f265d2a9bbdbe979e5452cd79db040..03e50bc18cc5652c7a09226979d48485ee2f504e 100644
--- a/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/first_run/first_run_ui.cc
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/webui/chromeos/first_run/first_run_ui.h"
-#include "ash/shell.h"
+#include "ash/shelf/shelf.h"
#include "base/command_line.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
@@ -61,21 +61,9 @@ void SetLocalizedStrings(base::DictionaryValue* localized_strings) {
"transitionsEnabled",
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableFirstRunUITransitions));
- std::string shelf_alignment;
- ash::Shell* shell = ash::Shell::GetInstance();
- switch (shell->GetShelfAlignment(shell->GetPrimaryRootWindow())) {
- case ash::SHELF_ALIGNMENT_BOTTOM:
- shelf_alignment = kShelfAlignmentBottom;
- break;
- case ash::SHELF_ALIGNMENT_LEFT:
- shelf_alignment = kShelfAlignmentLeft;
- break;
- case ash::SHELF_ALIGNMENT_RIGHT:
- shelf_alignment = kShelfAlignmentRight;
- break;
- default:
- NOTREACHED() << "Unsupported shelf alignment";
- }
+ const std::string& shelf_alignment =
+ ash::Shelf::ForPrimaryDisplay()->SelectValueForShelfAlignment(
+ kShelfAlignmentBottom, kShelfAlignmentLeft, kShelfAlignmentRight);
localized_strings->SetString("shelfAlignment", shelf_alignment);
}
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698