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

Unified Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 1914093002: Refactors DockedWindowLayoutManager in terms of ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nuke_aura_window
Patch Set: comment 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
Index: chrome/browser/ui/ash/chrome_launcher_prefs.cc
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index c90b435fdbda5a30b5f36f31a2529324e675ba7f..555487d1287cfbd43c9527ff1f7a0bff6cb7fd10 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -115,24 +115,24 @@ void SetPerDisplayPref(PrefService* prefs,
pref_dictionary->SetStringWithoutPathExpansion(pref_key, value);
}
-ShelfAlignment AlignmentFromPref(const std::string& value) {
+wm::ShelfAlignment AlignmentFromPref(const std::string& value) {
if (value == kShelfAlignmentLeft)
- return SHELF_ALIGNMENT_LEFT;
+ return wm::SHELF_ALIGNMENT_LEFT;
else if (value == kShelfAlignmentRight)
- return SHELF_ALIGNMENT_RIGHT;
+ return wm::SHELF_ALIGNMENT_RIGHT;
// Default to bottom.
- return SHELF_ALIGNMENT_BOTTOM;
+ return wm::SHELF_ALIGNMENT_BOTTOM;
}
-const char* AlignmentToPref(ShelfAlignment alignment) {
+const char* AlignmentToPref(wm::ShelfAlignment alignment) {
switch (alignment) {
- case SHELF_ALIGNMENT_BOTTOM:
+ case wm::SHELF_ALIGNMENT_BOTTOM:
return kShelfAlignmentBottom;
- case SHELF_ALIGNMENT_LEFT:
+ case wm::SHELF_ALIGNMENT_LEFT:
return kShelfAlignmentLeft;
- case SHELF_ALIGNMENT_RIGHT:
+ case wm::SHELF_ALIGNMENT_RIGHT:
return kShelfAlignmentRight;
- case SHELF_ALIGNMENT_BOTTOM_LOCKED:
+ case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED:
// This should not be a valid preference option for now. We only want to
// lock the shelf during login or when adding a user.
return nullptr;
@@ -242,7 +242,8 @@ void SetShelfAutoHideBehaviorPref(PrefService* prefs,
}
}
-ShelfAlignment GetShelfAlignmentPref(PrefService* prefs, int64_t display_id) {
+wm::ShelfAlignment GetShelfAlignmentPref(PrefService* prefs,
+ int64_t display_id) {
DCHECK_GE(display_id, 0);
// See comment in |kShelfAlignment| as to why we consider two prefs.
@@ -252,7 +253,7 @@ ShelfAlignment GetShelfAlignmentPref(PrefService* prefs, int64_t display_id) {
void SetShelfAlignmentPref(PrefService* prefs,
int64_t display_id,
- ShelfAlignment alignment) {
+ wm::ShelfAlignment alignment) {
DCHECK_GE(display_id, 0);
const char* value = AlignmentToPref(alignment);
« no previous file with comments | « chrome/browser/ui/ash/chrome_launcher_prefs.h ('k') | chrome/browser/ui/ash/launcher/chrome_mash_shelf_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698