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

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

Issue 2540433002: Reland "Propagate information about how ARC apps are launched" (Closed)
Patch Set: Propagate flag from deferred launcher Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 14 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
14 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h" 15 #include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
15 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 16 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
16 17
17 class ArcAppDeferredLauncherItemController; 18 class ArcAppDeferredLauncherItemController;
18 class ChromeLauncherControllerImpl; 19 class ChromeLauncherControllerImpl;
19 20
20 class ArcAppDeferredLauncherController 21 class ArcAppDeferredLauncherController
21 : public ArcAppListPrefs::Observer, 22 : public ArcAppListPrefs::Observer,
22 public arc::ArcSessionManager::Observer { 23 public arc::ArcSessionManager::Observer {
23 public: 24 public:
24 explicit ArcAppDeferredLauncherController( 25 explicit ArcAppDeferredLauncherController(
25 ChromeLauncherControllerImpl* owner); 26 ChromeLauncherControllerImpl* owner);
26 ~ArcAppDeferredLauncherController() override; 27 ~ArcAppDeferredLauncherController() override;
27 28
28 bool HasApp(const std::string& app_id) const; 29 bool HasApp(const std::string& app_id) const;
29 30
30 base::TimeDelta GetActiveTime(const std::string& app_id) const; 31 base::TimeDelta GetActiveTime(const std::string& app_id) const;
31 32
32 // Registers deferred Arc app launch. 33 // Registers deferred Arc app launch.
33 void RegisterDeferredLaunch(const std::string& app_id); 34 void RegisterDeferredLaunch(const std::string& app_id, int event_flags);
34 35
35 // Applies spinning effect if requested app is handled by deferred controller. 36 // Applies spinning effect if requested app is handled by deferred controller.
36 void MaybeApplySpinningEffect(const std::string& app_id, 37 void MaybeApplySpinningEffect(const std::string& app_id,
37 gfx::ImageSkia* image); 38 gfx::ImageSkia* image);
38 39
39 // ArcAppListPrefs::Observer: 40 // ArcAppListPrefs::Observer:
40 void OnAppReadyChanged(const std::string& app_id, bool ready) override; 41 void OnAppReadyChanged(const std::string& app_id, bool ready) override;
41 void OnAppRemoved(const std::string& app_id) override; 42 void OnAppRemoved(const std::string& app_id) override;
42 43
43 // arc::ArcSessionManager::Observer: 44 // arc::ArcSessionManager::Observer:
(...skipping 21 matching lines...) Expand all
65 66
66 AppControllerMap app_controller_map_; 67 AppControllerMap app_controller_map_;
67 68
68 // Always keep this the last member of this class. 69 // Always keep this the last member of this class.
69 base::WeakPtrFactory<ArcAppDeferredLauncherController> weak_ptr_factory_; 70 base::WeakPtrFactory<ArcAppDeferredLauncherController> weak_ptr_factory_;
70 71
71 DISALLOW_COPY_AND_ASSIGN(ArcAppDeferredLauncherController); 72 DISALLOW_COPY_AND_ASSIGN(ArcAppDeferredLauncherController);
72 }; 73 };
73 74
74 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H _ 75 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_ARC_APP_DEFERRED_LAUNCHER_CONTROLLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698