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

Side by Side Diff: base/message_loop/message_pump_android.h

Issue 15709015: Make sure that the UI window created by base::MessagePumpForUI is destoyed on the same thread (Wind… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 6 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/message_loop/message_pump.h ('k') | base/message_loop/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_LOOP_MESSAGE_PUMP_ANDROID_H_ 5 #ifndef BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_
6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_ 6 #define BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/message_loop/message_pump.h" 12 #include "base/message_loop/message_pump.h"
13 13
14 namespace base { 14 namespace base {
15 15
16 class RunLoop; 16 class RunLoop;
17 class TimeTicks; 17 class TimeTicks;
18 18
19 // This class implements a MessagePump needed for TYPE_UI MessageLoops on 19 // This class implements a MessagePump needed for TYPE_UI MessageLoops on
20 // OS_ANDROID platform. 20 // OS_ANDROID platform.
21 class BASE_EXPORT MessagePumpForUI : public MessagePump { 21 class BASE_EXPORT MessagePumpForUI : public MessagePump {
22 public: 22 public:
23 MessagePumpForUI(); 23 MessagePumpForUI();
24 24
25 virtual void Run(Delegate* delegate) OVERRIDE; 25 virtual void Run(Delegate* delegate) OVERRIDE;
26 virtual void Quit() OVERRIDE; 26 virtual void Quit() OVERRIDE;
27 virtual void ScheduleWork() OVERRIDE; 27 virtual void ScheduleWork() OVERRIDE;
28 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE; 28 virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) OVERRIDE;
29 virtual void Shutdown() OVERRIDE;
29 30
30 virtual void Start(Delegate* delegate); 31 virtual void Start(Delegate* delegate);
31 32
32 static bool RegisterBindings(JNIEnv* env); 33 static bool RegisterBindings(JNIEnv* env);
33 34
34 protected: 35 protected:
35 virtual ~MessagePumpForUI(); 36 virtual ~MessagePumpForUI();
36 37
37 private: 38 private:
38 RunLoop* run_loop_; 39 RunLoop* run_loop_;
39 40
40 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI); 41 DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
41 }; 42 };
42 43
43 } // namespace base 44 } // namespace base
44 45
45 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_ 46 #endif // BASE_MESSAGE_LOOP_MESSAGE_PUMP_ANDROID_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_pump.h ('k') | base/message_loop/message_pump_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698