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

Side by Side Diff: base/run_loop.h

Issue 1390513002: Remove base::MessageLoop::{Quit,QuitClosure} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split into small CLs Created 5 years, 2 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 | « base/message_loop/message_loop_unittest.cc ('k') | base/test/launcher/test_launcher.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_RUN_LOOP_H_ 5 #ifndef BASE_RUN_LOOP_H_
6 #define BASE_RUN_LOOP_H_ 6 #define BASE_RUN_LOOP_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 20 matching lines...) Expand all
31 class BASE_EXPORT RunLoop { 31 class BASE_EXPORT RunLoop {
32 public: 32 public:
33 RunLoop(); 33 RunLoop();
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 explicit RunLoop(MessagePumpDispatcher* dispatcher); 35 explicit RunLoop(MessagePumpDispatcher* dispatcher);
36 #endif 36 #endif
37 ~RunLoop(); 37 ~RunLoop();
38 38
39 // Run the current MessageLoop. This blocks until Quit is called. Before 39 // Run the current MessageLoop. This blocks until Quit is called. Before
40 // calling Run, be sure to grab an AsWeakPtr or the QuitClosure in order to 40 // calling Run, be sure to grab an AsWeakPtr or the QuitClosure in order to
41 // stop the MessageLoop asynchronously. MessageLoop::Quit and QuitNow will 41 // stop the MessageLoop asynchronously. MessageLoop::QuitWhenIdle and QuitNow
42 // also trigger a return from Run, but those are deprecated. 42 // will also trigger a return from Run, but those are deprecated.
43 void Run(); 43 void Run();
44 44
45 // Run the current MessageLoop until it doesn't find any tasks or messages in 45 // Run the current MessageLoop until it doesn't find any tasks or messages in
46 // the queue (it goes idle). WARNING: This may never return! Only use this 46 // the queue (it goes idle). WARNING: This may never return! Only use this
47 // when repeating tasks such as animated web pages have been shut down. 47 // when repeating tasks such as animated web pages have been shut down.
48 void RunUntilIdle(); 48 void RunUntilIdle();
49 49
50 bool running() const { return running_; } 50 bool running() const { return running_; }
51 51
52 // Quit an earlier call to Run(). There can be other nested RunLoops servicing 52 // Quit an earlier call to Run(). There can be other nested RunLoops servicing
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // WeakPtrFactory for QuitClosure safety. 111 // WeakPtrFactory for QuitClosure safety.
112 base::WeakPtrFactory<RunLoop> weak_factory_; 112 base::WeakPtrFactory<RunLoop> weak_factory_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(RunLoop); 114 DISALLOW_COPY_AND_ASSIGN(RunLoop);
115 }; 115 };
116 116
117 } // namespace base 117 } // namespace base
118 118
119 #endif // BASE_RUN_LOOP_H_ 119 #endif // BASE_RUN_LOOP_H_
OLDNEW
« no previous file with comments | « base/message_loop/message_loop_unittest.cc ('k') | base/test/launcher/test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698