| 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_CONTENT_APP_ACTIVITY_REGISTRY_H_ | 5 #ifndef ATHENA_CONTENT_APP_ACTIVITY_REGISTRY_H_ |
| 6 #define ATHENA_CONTENT_APP_ACTIVITY_REGISTRY_H_ | 6 #define ATHENA_CONTENT_APP_ACTIVITY_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "athena/activity/public/activity_view_model.h" | 10 #include "athena/activity/public/activity_view_model.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class AppActivity; | 24 class AppActivity; |
| 25 | 25 |
| 26 // This class keeps track of all existing |AppActivity|s and shuts down all of | 26 // This class keeps track of all existing |AppActivity|s and shuts down all of |
| 27 // them when the application gets unloaded to save memory. It will then replace | 27 // them when the application gets unloaded to save memory. It will then replace |
| 28 // the |AppActivity| in the Activity list as proxy to allow restarting of the | 28 // the |AppActivity| in the Activity list as proxy to allow restarting of the |
| 29 // application. | 29 // application. |
| 30 class ATHENA_EXPORT AppActivityRegistry { | 30 class ATHENA_EXPORT AppActivityRegistry { |
| 31 public: | 31 public: |
| 32 AppActivityRegistry(const std::string& app_id, | 32 AppActivityRegistry(const std::string& app_id, |
| 33 content::BrowserContext* browser_context); | 33 content::BrowserContext* browser_context); |
| 34 virtual ~AppActivityRegistry(); | 34 ~AppActivityRegistry(); |
| 35 | 35 |
| 36 // Register an |AppActivity| with this application. | 36 // Register an |AppActivity| with this application. |
| 37 void RegisterAppActivity(AppActivity* app_activity); | 37 void RegisterAppActivity(AppActivity* app_activity); |
| 38 | 38 |
| 39 // Unregister a previously attached |AppActivity|. | 39 // Unregister a previously attached |AppActivity|. |
| 40 // Note that detaching the last |AppActivity| will delete this object - unless | 40 // Note that detaching the last |AppActivity| will delete this object - unless |
| 41 // the resource manager was trying to unload the application. | 41 // the resource manager was trying to unload the application. |
| 42 // Note furthermore that Detach can be called without ever being registered. | 42 // Note furthermore that Detach can be called without ever being registered. |
| 43 void UnregisterAppActivity(AppActivity* app_activity); | 43 void UnregisterAppActivity(AppActivity* app_activity); |
| 44 | 44 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 SkColor color_; | 99 SkColor color_; |
| 100 base::string16 title_; | 100 base::string16 title_; |
| 101 gfx::ImageSkia image_; | 101 gfx::ImageSkia image_; |
| 102 | 102 |
| 103 DISALLOW_COPY_AND_ASSIGN(AppActivityRegistry); | 103 DISALLOW_COPY_AND_ASSIGN(AppActivityRegistry); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace athena | 106 } // namespace athena |
| 107 | 107 |
| 108 #endif // ATHENA_CONTENT_APP_ACTIVITY_REGISTRY_H_ | 108 #endif // ATHENA_CONTENT_APP_ACTIVITY_REGISTRY_H_ |
| OLD | NEW |