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

Side by Side Diff: base/message_pump_android.h

Issue 10753007: Switch base/ registrations to a static class method where appropriate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 | « base/android/build_info.cc ('k') | base/message_pump_android.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_MESSAGE_PUMP_ANDROID_H_ 5 #ifndef BASE_MESSAGE_PUMP_ANDROID_H_
6 #define BASE_MESSAGE_PUMP_ANDROID_H_ 6 #define BASE_MESSAGE_PUMP_ANDROID_H_
7 #pragma once 7 #pragma once
8 8
9 #include <jni.h>
10
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/message_pump.h" 12 #include "base/message_pump.h"
11 #include "base/time.h" 13 #include "base/time.h"
12 14
13 namespace base { 15 namespace base {
14 class RunLoop; 16 class RunLoop;
15 17
16 // This class implements a MessagePump needed for TYPE_UI MessageLoops on 18 // This class implements a MessagePump needed for TYPE_UI MessageLoops on
17 // OS_ANDROID platform. 19 // OS_ANDROID platform.
18 class MessagePumpForUI : public MessagePump { 20 class MessagePumpForUI : public MessagePump {
19 public: 21 public:
20 MessagePumpForUI(); 22 MessagePumpForUI();
21 virtual ~MessagePumpForUI();
22 23
23 virtual void Run(Delegate* delegate) OVERRIDE; 24 virtual void Run(Delegate* delegate) OVERRIDE;
24 virtual void Quit() OVERRIDE; 25 virtual void Quit() OVERRIDE;
25 virtual void ScheduleWork() OVERRIDE; 26 virtual void ScheduleWork() OVERRIDE;
26 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; 27 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
27 28
28 virtual void Start(Delegate* delegate); 29 virtual void Start(Delegate* delegate);
29 30
31 static bool RegisterBindings(JNIEnv* env);
32
33 protected:
34 virtual ~MessagePumpForUI();
35
30 private: 36 private:
31 base::RunLoop* run_loop_; 37 base::RunLoop* run_loop_;
32 38
33 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI); 39 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
34 }; 40 };
35 41
36 } // namespace base 42 } // namespace base
37 43
38 #endif // BASE_MESSAGE_PUMP_ANDROID_H_ 44 #endif // BASE_MESSAGE_PUMP_ANDROID_H_
OLDNEW
« no previous file with comments | « base/android/build_info.cc ('k') | base/message_pump_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698