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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc

Issue 17673004: Insert panel icons on the left of other panel icons. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add condition to per browser launcher controller as well. Created 7 years, 6 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_per_app_unittest.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/ash/launcher/chrome_launcher_controller_per_browser.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
index 1bc7d3543a16d575a4f7f770cf64bc10f59cbaa4..34bddec38112fa72f9479dfea68cce55b77dd888 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_browser.cc
@@ -383,8 +383,10 @@ ash::LauncherID ChromeLauncherControllerPerBrowser::CreateAppLauncherItem(
const std::string& app_id,
ash::LauncherItemStatus status) {
DCHECK(controller);
- return InsertAppLauncherItem(controller, app_id, status,
- model_->item_count());
+ // Panels are inserted on the left so as not to push all existing panels over.
+ int index = controller->GetLauncherItemType() == ash::TYPE_APP_PANEL ?
+ 0 : model_->item_count();
+ return InsertAppLauncherItem(controller, app_id, status, index);
}
void ChromeLauncherControllerPerBrowser::SetItemStatus(
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698