| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // This enum declares the media state the activity is in. | 55 // This enum declares the media state the activity is in. |
| 56 // TODO(skuhne): Move the |TabMediaState| out of chrome and combine it in a | 56 // TODO(skuhne): Move the |TabMediaState| out of chrome and combine it in a |
| 57 // media library within content and then use that enum instead. | 57 // media library within content and then use that enum instead. |
| 58 enum ActivityMediaState { | 58 enum ActivityMediaState { |
| 59 ACTIVITY_MEDIA_STATE_NONE, | 59 ACTIVITY_MEDIA_STATE_NONE, |
| 60 ACTIVITY_MEDIA_STATE_RECORDING, // Audio/Video being recorded by activity. | 60 ACTIVITY_MEDIA_STATE_RECORDING, // Audio/Video being recorded by activity. |
| 61 ACTIVITY_MEDIA_STATE_CAPTURING, // Activity is being captured. | 61 ACTIVITY_MEDIA_STATE_CAPTURING, // Activity is being captured. |
| 62 ACTIVITY_MEDIA_STATE_AUDIO_PLAYING // Audible audio is playing in activity. | 62 ACTIVITY_MEDIA_STATE_AUDIO_PLAYING // Audible audio is playing in activity. |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 // Delete an activity. | 65 // Shows and activates an activity. |
| 66 static void Show(Activity* activity); |
| 67 |
| 68 // Deletes an activity. |
| 66 static void Delete(Activity* activity); | 69 static void Delete(Activity* activity); |
| 67 | 70 |
| 68 // The Activity retains ownership of the returned view-model. | 71 // The Activity retains ownership of the returned view-model. |
| 69 virtual ActivityViewModel* GetActivityViewModel() = 0; | 72 virtual ActivityViewModel* GetActivityViewModel() = 0; |
| 70 | 73 |
| 71 // Transition the activity into a new state. | 74 // Transition the activity into a new state. |
| 72 virtual void SetCurrentState(ActivityState state) = 0; | 75 virtual void SetCurrentState(ActivityState state) = 0; |
| 73 | 76 |
| 74 // Returns the current state of the activity. | 77 // Returns the current state of the activity. |
| 75 virtual ActivityState GetCurrentState() = 0; | 78 virtual ActivityState GetCurrentState() = 0; |
| 76 | 79 |
| 77 // Returns if the activity is visible or not. | 80 // Returns if the activity is visible or not. |
| 78 virtual bool IsVisible() = 0; | 81 virtual bool IsVisible() = 0; |
| 79 | 82 |
| 80 // Returns the current media state. | 83 // Returns the current media state. |
| 81 virtual ActivityMediaState GetMediaState() = 0; | 84 virtual ActivityMediaState GetMediaState() = 0; |
| 82 | 85 |
| 83 // Returns the window for the activity. This can be used to determine the | 86 // Returns the window for the activity. This can be used to determine the |
| 84 // stacking order of this activity against others. | 87 // stacking order of this activity against others. |
| 88 // TODO(oshima): Consider returning base::Window window instead, |
| 89 // which has Show/ShowInactive and other control methods. |
| 85 virtual aura::Window* GetWindow() = 0; | 90 virtual aura::Window* GetWindow() = 0; |
| 86 | 91 |
| 87 protected: | 92 protected: |
| 88 virtual ~Activity() {} | 93 virtual ~Activity() {} |
| 89 }; | 94 }; |
| 90 | 95 |
| 91 } // namespace athena | 96 } // namespace athena |
| 92 | 97 |
| 93 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ | 98 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_H_ |
| OLD | NEW |