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

Side by Side Diff: base/message_loop.cc

Issue 8343023: rename Run in MessageLoopForUI to RunWithDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 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 | Annotate | Revision Log
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_unittest.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 #if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) 827 #if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID)
828 void MessageLoopForUI::AddObserver(Observer* observer) { 828 void MessageLoopForUI::AddObserver(Observer* observer) {
829 pump_ui()->AddObserver(observer); 829 pump_ui()->AddObserver(observer);
830 } 830 }
831 831
832 void MessageLoopForUI::RemoveObserver(Observer* observer) { 832 void MessageLoopForUI::RemoveObserver(Observer* observer) {
833 pump_ui()->RemoveObserver(observer); 833 pump_ui()->RemoveObserver(observer);
834 } 834 }
835 835
836 void MessageLoopForUI::Run(Dispatcher* dispatcher) { 836 void MessageLoopForUI::RunWithDispatcher(Dispatcher* dispatcher) {
837 AutoRunState save_state(this); 837 AutoRunState save_state(this);
838 state_->dispatcher = dispatcher; 838 state_->dispatcher = dispatcher;
839 RunHandler(); 839 RunHandler();
840 } 840 }
841 841
842 void MessageLoopForUI::RunAllPendingWithDispatcher(Dispatcher* dispatcher) { 842 void MessageLoopForUI::RunAllPendingWithDispatcher(Dispatcher* dispatcher) {
843 AutoRunState save_state(this); 843 AutoRunState save_state(this);
844 state_->dispatcher = dispatcher; 844 state_->dispatcher = dispatcher;
845 state_->quit_received = true; // Means run until we would otherwise block. 845 state_->quit_received = true; // Means run until we would otherwise block.
846 RunHandler(); 846 RunHandler();
(...skipping 23 matching lines...) Expand all
870 Watcher *delegate) { 870 Watcher *delegate) {
871 return pump_libevent()->WatchFileDescriptor( 871 return pump_libevent()->WatchFileDescriptor(
872 fd, 872 fd,
873 persistent, 873 persistent,
874 static_cast<base::MessagePumpLibevent::Mode>(mode), 874 static_cast<base::MessagePumpLibevent::Mode>(mode),
875 controller, 875 controller,
876 delegate); 876 delegate);
877 } 877 }
878 878
879 #endif 879 #endif
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698