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_H_ | 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ |
6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ | 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "athena/athena_export.h" | 10 #include "athena/athena_export.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // This enum declares the media state the activity is in. | 53 // This enum declares the media state the activity is in. |
54 // TODO(skuhne): Move the |TabMediaState| out of chrome and combine it in a | 54 // TODO(skuhne): Move the |TabMediaState| out of chrome and combine it in a |
55 // media library within content and then use that enum instead. | 55 // media library within content and then use that enum instead. |
56 enum ActivityMediaState { | 56 enum ActivityMediaState { |
57 ACTIVITY_MEDIA_STATE_NONE, | 57 ACTIVITY_MEDIA_STATE_NONE, |
58 ACTIVITY_MEDIA_STATE_RECORDING, // Audio/Video being recorded by activity. | 58 ACTIVITY_MEDIA_STATE_RECORDING, // Audio/Video being recorded by activity. |
59 ACTIVITY_MEDIA_STATE_CAPTURING, // Activity is being captured. | 59 ACTIVITY_MEDIA_STATE_CAPTURING, // Activity is being captured. |
60 ACTIVITY_MEDIA_STATE_AUDIO_PLAYING // Audible audio is playing in activity. | 60 ACTIVITY_MEDIA_STATE_AUDIO_PLAYING // Audible audio is playing in activity. |
61 }; | 61 }; |
62 | 62 |
63 virtual ~Activity(); | 63 // Close an activity. |
| 64 static void CloseActivity(Activity* activity); |
64 | 65 |
65 // The Activity retains ownership of the returned view-model. | 66 // The Activity retains ownership of the returned view-model. |
66 virtual ActivityViewModel* GetActivityViewModel() = 0; | 67 virtual ActivityViewModel* GetActivityViewModel() = 0; |
67 | 68 |
68 // Transition the activity into a new state. | 69 // Transition the activity into a new state. |
69 virtual void SetCurrentState(ActivityState state) = 0; | 70 virtual void SetCurrentState(ActivityState state) = 0; |
70 | 71 |
71 // Returns the current state of the activity. | 72 // Returns the current state of the activity. |
72 virtual ActivityState GetCurrentState() = 0; | 73 virtual ActivityState GetCurrentState() = 0; |
73 | 74 |
74 // Returns if the activity is visible or not. | 75 // Returns if the activity is visible or not. |
75 virtual bool IsVisible() = 0; | 76 virtual bool IsVisible() = 0; |
76 | 77 |
77 // Returns the current media state. | 78 // Returns the current media state. |
78 virtual ActivityMediaState GetMediaState() = 0; | 79 virtual ActivityMediaState GetMediaState() = 0; |
79 | 80 |
80 // Returns the window for the activity. This can be used to determine the | 81 // Returns the window for the activity. This can be used to determine the |
81 // stacking order of this activity against others. | 82 // stacking order of this activity against others. |
82 virtual aura::Window* GetWindow() = 0; | 83 virtual aura::Window* GetWindow() = 0; |
| 84 |
| 85 protected: |
| 86 virtual ~Activity() {} |
83 }; | 87 }; |
84 | 88 |
85 } // namespace athena | 89 } // namespace athena |
86 | 90 |
87 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ | 91 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ |
OLD | NEW |