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

Side by Side Diff: base/android/activity_status.h

Issue 14476011: [Android] Auto-generate API 14 resources from the existing API 17 resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/gyp/copy_v17_resources.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 BASE_ANDROID_ACTIVITY_STATUS_H_ 5 #ifndef BASE_ANDROID_ACTIVITY_STATUS_H_
6 #define BASE_ANDROID_ACTIVITY_STATUS_H_ 6 #define BASE_ANDROID_ACTIVITY_STATUS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // 42 //
43 // // Start listening. 43 // // Start listening.
44 // ActivityStatus::Listener* my_listener = 44 // ActivityStatus::Listener* my_listener =
45 // new ActivityStatus::Listener(base::Bind(&OnActivityStateChange)); 45 // new ActivityStatus::Listener(base::Bind(&OnActivityStateChange));
46 // 46 //
47 // ... 47 // ...
48 // 48 //
49 // // Stop listening. 49 // // Stop listening.
50 // delete my_listener 50 // delete my_listener
51 // 51 //
52 BASE_EXPORT class ActivityStatus { 52 class BASE_EXPORT ActivityStatus {
53 public: 53 public:
54 typedef base::Callback<void(ActivityState)> StateChangeCallback; 54 typedef base::Callback<void(ActivityState)> StateChangeCallback;
55 55
56 class Listener { 56 class Listener {
57 public: 57 public:
58 explicit Listener(const StateChangeCallback& callback); 58 explicit Listener(const StateChangeCallback& callback);
59 ~Listener(); 59 ~Listener();
60 60
61 private: 61 private:
62 friend class ActivityStatus; 62 friend class ActivityStatus;
(...skipping 25 matching lines...) Expand all
88 88
89 scoped_refptr<ObserverListThreadSafe<Listener> > observers_; 89 scoped_refptr<ObserverListThreadSafe<Listener> > observers_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(ActivityStatus); 91 DISALLOW_COPY_AND_ASSIGN(ActivityStatus);
92 }; 92 };
93 93
94 } // namespace android 94 } // namespace android
95 } // namespace base 95 } // namespace base
96 96
97 #endif // BASE_ANDROID_ACTIVITY_STATUS_H_ 97 #endif // BASE_ANDROID_ACTIVITY_STATUS_H_
OLDNEW
« no previous file with comments | « no previous file | build/android/gyp/copy_v17_resources.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698