OLD | NEW |
---|---|
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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | |
10 | 11 |
11 #include "ash/common/shelf/shelf_delegate.h" | 12 #include "ash/common/shelf/shelf_delegate.h" |
12 #include "ash/common/shelf/shelf_model_observer.h" | 13 #include "ash/common/shelf/shelf_model_observer.h" |
13 #include "ash/display/window_tree_host_manager.h" | 14 #include "ash/display/window_tree_host_manager.h" |
14 #include "ash/public/cpp/shelf_types.h" | 15 #include "ash/public/cpp/shelf_types.h" |
15 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
19 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 20 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 bool IsAppPinned(const std::string& app_id) override; | 136 bool IsAppPinned(const std::string& app_id) override; |
136 void UnpinAppWithID(const std::string& app_id) override; | 137 void UnpinAppWithID(const std::string& app_id) override; |
137 | 138 |
138 // LauncherAppUpdater::Delegate: | 139 // LauncherAppUpdater::Delegate: |
139 void OnAppInstalled(content::BrowserContext* browser_context, | 140 void OnAppInstalled(content::BrowserContext* browser_context, |
140 const std::string& app_id) override; | 141 const std::string& app_id) override; |
141 void OnAppUpdated(content::BrowserContext* browser_context, | 142 void OnAppUpdated(content::BrowserContext* browser_context, |
142 const std::string& app_id) override; | 143 const std::string& app_id) override; |
143 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, | 144 void OnAppUninstalledPrepared(content::BrowserContext* browser_context, |
144 const std::string& app_id) override; | 145 const std::string& app_id) override; |
146 void OnAppDisabling(const std::string& app_id) override; | |
147 void OnAppDisabled(const std::string& app_id) override; | |
145 | 148 |
146 protected: | 149 protected: |
147 // ChromeLauncherController: | 150 // ChromeLauncherController: |
148 void OnInit() override; | 151 void OnInit() override; |
149 | 152 |
150 // Creates a new app shortcut item and controller on the shelf at |index|. | 153 // Creates a new app shortcut item and controller on the shelf at |index|. |
151 // Use kInsertItemAtEnd to add a shortcut as the last item. | 154 // Use kInsertItemAtEnd to add a shortcut as the last item. |
152 ash::ShelfID CreateAppShortcutLauncherItem( | 155 ash::ShelfID CreateAppShortcutLauncherItem( |
153 const ash::AppLaunchId& app_launch_id, | 156 const ash::AppLaunchId& app_launch_id, |
154 int index); | 157 int index); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
302 | 305 |
303 // If true, incoming pinned state changes should be ignored. | 306 // If true, incoming pinned state changes should be ignored. |
304 bool ignore_persist_pinned_state_change_ = false; | 307 bool ignore_persist_pinned_state_change_ = false; |
305 | 308 |
306 // The list of running & un-pinned applications for different users on hidden | 309 // The list of running & un-pinned applications for different users on hidden |
307 // desktops. | 310 // desktops. |
308 typedef std::vector<std::string> RunningAppListIds; | 311 typedef std::vector<std::string> RunningAppListIds; |
309 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; | 312 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; |
310 RunningAppListIdMap last_used_running_application_order_; | 313 RunningAppListIdMap last_used_running_application_order_; |
311 | 314 |
315 // Ids of apps being disabled; do not remove pin positions on item removal. | |
316 std::set<std::string> keep_pin_positions_; | |
James Cook
2017/03/29 14:28:02
Could this be handled with ignore_persistent_pinne
khmel
2017/03/29 15:28:53
It seems that based on logic we don't have situati
msw
2017/03/29 21:34:17
I switched to using a refactored sync flag, which
| |
317 | |
312 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; | 318 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; |
313 | 319 |
314 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); | 320 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); |
315 }; | 321 }; |
316 | 322 |
317 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ | 323 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ |
OLD | NEW |