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

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

Issue 1919593003: arc: Prevent showing Opt-in UI when it is not expected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: TODO added Created 4 years, 7 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
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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "ash/display/window_tree_host_manager.h" 14 #include "ash/display/window_tree_host_manager.h"
15 #include "ash/shelf/shelf_delegate.h" 15 #include "ash/shelf/shelf_delegate.h"
16 #include "ash/shelf/shelf_item_delegate.h" 16 #include "ash/shelf/shelf_item_delegate.h"
17 #include "ash/shelf/shelf_item_delegate_manager.h" 17 #include "ash/shelf/shelf_item_delegate_manager.h"
18 #include "ash/shelf/shelf_item_types.h" 18 #include "ash/shelf/shelf_item_types.h"
19 #include "ash/shelf/shelf_model_observer.h" 19 #include "ash/shelf/shelf_model_observer.h"
20 #include "ash/shelf/shelf_types.h" 20 #include "ash/shelf/shelf_types.h"
21 #include "base/compiler_specific.h" 21 #include "base/compiler_specific.h"
22 #include "base/macros.h" 22 #include "base/macros.h"
23 #include "base/memory/scoped_vector.h" 23 #include "base/memory/scoped_vector.h"
24 #include "build/build_config.h" 24 #include "build/build_config.h"
25 #include "chrome/browser/ui/app_icon_loader.h" 25 #include "chrome/browser/ui/app_icon_loader.h"
26 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
26 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h" 27 #include "chrome/browser/ui/ash/app_sync_ui_state_observer.h"
27 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" 28 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
28 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" 29 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h"
29 #include "chrome/browser/ui/ash/launcher/launcher_app_updater.h" 30 #include "chrome/browser/ui/ash/launcher/launcher_app_updater.h"
30 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h" 31 #include "chrome/browser/ui/extensions/extension_enable_flow_delegate.h"
31 #include "components/prefs/pref_change_registrar.h" 32 #include "components/prefs/pref_change_registrar.h"
32 #include "components/syncable_prefs/pref_service_syncable_observer.h" 33 #include "components/syncable_prefs/pref_service_syncable_observer.h"
33 #include "extensions/common/constants.h" 34 #include "extensions/common/constants.h"
34 #include "ui/aura/window_observer.h" 35 #include "ui/aura/window_observer.h"
35 36
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Access to the BrowserStatusMonitor for tests. 375 // Access to the BrowserStatusMonitor for tests.
375 BrowserStatusMonitor* browser_status_monitor_for_test() { 376 BrowserStatusMonitor* browser_status_monitor_for_test() {
376 return browser_status_monitor_.get(); 377 return browser_status_monitor_.get();
377 } 378 }
378 379
379 // Access to the AppWindowLauncherController for tests. 380 // Access to the AppWindowLauncherController for tests.
380 AppWindowLauncherController* app_window_controller_for_test() { 381 AppWindowLauncherController* app_window_controller_for_test() {
381 return app_window_controllers_[0].get(); 382 return app_window_controllers_[0].get();
382 } 383 }
383 384
384 bool CanPin(const std::string& app_id); 385 // TODO(khmel): Find better home for Pinnable enum.
386 AppListControllerDelegate::Pinnable GetPinnable(const std::string& app_id);
385 387
386 protected: 388 protected:
387 // Creates a new app shortcut item and controller on the shelf at |index|. 389 // Creates a new app shortcut item and controller on the shelf at |index|.
388 // Use kInsertItemAtEnd to add a shortcut as the last item. 390 // Use kInsertItemAtEnd to add a shortcut as the last item.
389 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id, 391 ash::ShelfID CreateAppShortcutLauncherItem(const std::string& app_id,
390 int index); 392 int index);
391 393
392 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class. 394 // Sets the AppTabHelper/AppIconLoader, taking ownership of the helper class.
393 // These are intended for testing. 395 // These are intended for testing.
394 void SetAppTabHelperForTest(AppTabHelper* helper); 396 void SetAppTabHelperForTest(AppTabHelper* helper);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 // The list of running & un-pinned applications for different users on hidden 578 // The list of running & un-pinned applications for different users on hidden
577 // desktops. 579 // desktops.
578 typedef std::vector<std::string> RunningAppListIds; 580 typedef std::vector<std::string> RunningAppListIds;
579 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; 581 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap;
580 RunningAppListIdMap last_used_running_application_order_; 582 RunningAppListIdMap last_used_running_application_order_;
581 583
582 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController); 584 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherController);
583 }; 585 };
584 586
585 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_ 587 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698