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

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

Issue 215693004: Fixing icon ordering problem between browser and running windowed applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 // TODO(skuhne): With the removal of the legacy shelf layout we should remove 1874 // TODO(skuhne): With the removal of the legacy shelf layout we should remove
1875 // the ability to move the app list item since this was never used. We should 1875 // the ability to move the app list item since this was never used. We should
1876 // instead ask the ShelfModel::ValidateInsertionIndex or similir for an index. 1876 // instead ask the ShelfModel::ValidateInsertionIndex or similir for an index.
1877 if (is_app_list && alternate) 1877 if (is_app_list && alternate)
1878 return 0; 1878 return 0;
1879 1879
1880 for (int i = model_->item_count() - 1; i > 0; --i) { 1880 for (int i = model_->item_count() - 1; i > 0; --i) {
1881 ash::ShelfItemType type = model_->items()[i].type; 1881 ash::ShelfItemType type = model_->items()[i].type;
1882 if (type == ash::TYPE_APP_SHORTCUT || 1882 if (type == ash::TYPE_APP_SHORTCUT ||
1883 ((is_app_list || alternate) && type == ash::TYPE_APP_LIST) || 1883 ((is_app_list || alternate) && type == ash::TYPE_APP_LIST) ||
1884 type == ash::TYPE_BROWSER_SHORTCUT || 1884 type == ash::TYPE_BROWSER_SHORTCUT)
flackr 2014/03/27 23:21:12 nit: This should have braces.
Mr4D (OOO till 08-26) 2014/03/27 23:24:51 Done.
1885 type == ash::TYPE_WINDOWED_APP)
1886 return i; 1885 return i;
1887 } 1886 }
1888 return 0; 1887 return 0;
1889 } 1888 }
1890 1889
1891 int ChromeLauncherController::GetChromeIconIndexForCreation() { 1890 int ChromeLauncherController::GetChromeIconIndexForCreation() {
1892 // We get the list of pinned apps as they currently would get pinned. 1891 // We get the list of pinned apps as they currently would get pinned.
1893 // Within this list the chrome icon will be the correct location. 1892 // Within this list the chrome icon will be the correct location.
1894 std::vector<std::string> pinned_apps = GetListOfPinnedAppsAndBrowser(); 1893 std::vector<std::string> pinned_apps = GetListOfPinnedAppsAndBrowser();
1895 1894
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 } 2057 }
2059 2058
2060 void ChromeLauncherController::ReleaseProfile() { 2059 void ChromeLauncherController::ReleaseProfile() {
2061 if (app_sync_ui_state_) 2060 if (app_sync_ui_state_)
2062 app_sync_ui_state_->RemoveObserver(this); 2061 app_sync_ui_state_->RemoveObserver(this);
2063 2062
2064 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this); 2063 PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this);
2065 2064
2066 pref_change_registrar_.RemoveAll(); 2065 pref_change_registrar_.RemoveAll();
2067 } 2066 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698