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

Side by Side Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 2498613003: Add ARC++ kiosk menu items and ability to start kiosk session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 "chrome/browser/ui/ash/chrome_launcher_prefs.h" 5 #include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 auto app_value = base::MakeUnique<base::DictionaryValue>(); 338 auto app_value = base::MakeUnique<base::DictionaryValue>();
339 app_value->SetString(kPinnedAppsPrefAppIDPath, app_launcher_id.ToString()); 339 app_value->SetString(kPinnedAppsPrefAppIDPath, app_launcher_id.ToString());
340 return app_value; 340 return app_value;
341 } 341 }
342 342
343 ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(PrefService* prefs, 343 ShelfAutoHideBehavior GetShelfAutoHideBehaviorPref(PrefService* prefs,
344 int64_t display_id) { 344 int64_t display_id) {
345 DCHECK_NE(display_id, display::Display::kInvalidDisplayID); 345 DCHECK_NE(display_id, display::Display::kInvalidDisplayID);
346 346
347 // Don't show the shelf in app mode. 347 // Don't show the shelf in app mode.
348 if (chrome::IsRunningInAppMode()) 348 if (chrome::IsRunningInAppMode() || chrome::IsRunningInAndroidAppMode())
349 return SHELF_AUTO_HIDE_ALWAYS_HIDDEN; 349 return SHELF_AUTO_HIDE_ALWAYS_HIDDEN;
350 350
351 // See comment in |kShelfAlignment| as to why we consider two prefs. 351 // See comment in |kShelfAlignment| as to why we consider two prefs.
352 return AutoHideBehaviorFromPref( 352 return AutoHideBehaviorFromPref(
353 GetPerDisplayPref(prefs, display_id, prefs::kShelfAutoHideBehaviorLocal, 353 GetPerDisplayPref(prefs, display_id, prefs::kShelfAutoHideBehaviorLocal,
354 prefs::kShelfAutoHideBehavior)); 354 prefs::kShelfAutoHideBehavior));
355 } 355 }
356 356
357 void SetShelfAutoHideBehaviorPref(PrefService* prefs, 357 void SetShelfAutoHideBehaviorPref(PrefService* prefs,
358 int64_t display_id, 358 int64_t display_id,
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 pin_position = position_before.CreateAfter(); 739 pin_position = position_before.CreateAfter();
740 else if (position_after.IsValid()) 740 else if (position_after.IsValid())
741 pin_position = position_after.CreateBefore(); 741 pin_position = position_after.CreateBefore();
742 else 742 else
743 pin_position = syncer::StringOrdinal::CreateInitialOrdinal(); 743 pin_position = syncer::StringOrdinal::CreateInitialOrdinal();
744 app_service->SetPinPosition(app_launcher_id_str, pin_position); 744 app_service->SetPinPosition(app_launcher_id_str, pin_position);
745 } 745 }
746 746
747 } // namespace launcher 747 } // namespace launcher
748 } // namespace ash 748 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698