| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ | 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ |
| 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ | 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "athena/athena_export.h" | 10 #include "athena/athena_export.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 static ActivityManager* Create(); | 26 static ActivityManager* Create(); |
| 27 static ActivityManager* Get(); | 27 static ActivityManager* Get(); |
| 28 static void Shutdown(); | 28 static void Shutdown(); |
| 29 | 29 |
| 30 virtual ~ActivityManager() {} | 30 virtual ~ActivityManager() {} |
| 31 | 31 |
| 32 // Adds/Removes an activity. ActivityManager owns the activities. | 32 // Adds/Removes an activity. ActivityManager owns the activities. |
| 33 virtual void AddActivity(Activity* activity) = 0; | 33 virtual void AddActivity(Activity* activity) = 0; |
| 34 virtual void RemoveActivity(Activity* activity) = 0; | 34 virtual void RemoveActivity(Activity* activity) = 0; |
| 35 | 35 |
| 36 // Updates the UI when the task color/title changes. | |
| 37 virtual void UpdateActivity(Activity* activity) = 0; | |
| 38 | |
| 39 // Returns a list of activities, sorted in their activation order (the most | 36 // Returns a list of activities, sorted in their activation order (the most |
| 40 // recently used activity is at the front of the returned list). | 37 // recently used activity is at the front of the returned list). |
| 41 virtual const ActivityList& GetActivityList() = 0; | 38 virtual const ActivityList& GetActivityList() = 0; |
| 42 | 39 |
| 43 // Returns the activity that has a |window| as toplevel window, or | 40 // Returns the activity that has a |window| as toplevel window, or |
| 44 // nullptr if such activity does not exist. | 41 // nullptr if such activity does not exist. |
| 45 virtual Activity* GetActivityForWindow(aura::Window* window) = 0; | 42 virtual Activity* GetActivityForWindow(aura::Window* window) = 0; |
| 46 | 43 |
| 47 virtual void AddObserver(ActivityManagerObserver* observer) = 0; | 44 virtual void AddObserver(ActivityManagerObserver* observer) = 0; |
| 48 virtual void RemoveObserver(ActivityManagerObserver* observer) = 0; | 45 virtual void RemoveObserver(ActivityManagerObserver* observer) = 0; |
| 49 }; | 46 }; |
| 50 | 47 |
| 51 } // namespace athena | 48 } // namespace athena |
| 52 | 49 |
| 53 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ | 50 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_MANAGER_H_ |
| OLD | NEW |