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

Side by Side Diff: athena/test/base/activity_lifetime_tracker.h

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
« no previous file with comments | « athena/test/base/DEPS ('k') | athena/test/base/activity_lifetime_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_
6 #define ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_
7
8 #include "athena/activity/public/activity_manager_observer.h"
9 #include "base/macros.h"
10
11 namespace athena {
12 class Activity;
13
14 // Listens for activities to be started / ended and will return them.
15 class ActivityLifetimeTracker : public ActivityManagerObserver {
16 public:
17 ActivityLifetimeTracker();
18 ~ActivityLifetimeTracker() override;
19
20 // ActivityManagerObserver:
21 void OnActivityStarted(Activity* activity) override;
22 void OnActivityEnding(Activity* activity) override;
23 void OnActivityOrderChanged() override;
24
25 // Returns the newly created activity (if any) and resets its reference.
26 Activity* GetNewActivityAndReset();
27
28 // Returns a deleted activity (if any) and resets its reference.
29 // Note that the pointer is void* since the Activity was deleted when
30 // requested.
31 void* GetDeletedActivityAndReset();
32
33 private:
34 // The activity which got created if not nullptr.
35 Activity* new_activity_;
36
37 // An old activity which got unloaded if not nullptr.
38 void* deleted_activity_;
39
40 DISALLOW_COPY_AND_ASSIGN(ActivityLifetimeTracker);
41 };
42
43 } // namespace athena
44
45 #endif // ATHENA_TEST_BASE_ACTIVITY_LIFETIME_TRACKER_H_
46
OLDNEW
« no previous file with comments | « athena/test/base/DEPS ('k') | athena/test/base/activity_lifetime_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698