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

Side by Side Diff: base/message_loop.cc

Issue 10689161: Adds MessageLoopUIApplication for use on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
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 #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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } 713 }
714 #endif // defined(OS_WIN) 714 #endif // defined(OS_WIN)
715 715
716 #if defined(OS_ANDROID) 716 #if defined(OS_ANDROID)
717 void MessageLoopForUI::Start() { 717 void MessageLoopForUI::Start() {
718 // No Histogram support for UI message loop as it is managed by Java side 718 // No Histogram support for UI message loop as it is managed by Java side
719 static_cast<base::MessagePumpForUI*>(pump_.get())->Start(this); 719 static_cast<base::MessagePumpForUI*>(pump_.get())->Start(this);
720 } 720 }
721 #endif 721 #endif
722 722
723 #if defined(OS_IOS)
724 void MessageLoopForUI::Attach() {
725 static_cast<base::MessagePumpUIApplication*>(pump_.get())->Attach(this);
726 }
727 #endif
728
723 #if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) 729 #if !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID)
724 void MessageLoopForUI::AddObserver(Observer* observer) { 730 void MessageLoopForUI::AddObserver(Observer* observer) {
725 pump_ui()->AddObserver(observer); 731 pump_ui()->AddObserver(observer);
726 } 732 }
727 733
728 void MessageLoopForUI::RemoveObserver(Observer* observer) { 734 void MessageLoopForUI::RemoveObserver(Observer* observer) {
729 pump_ui()->RemoveObserver(observer); 735 pump_ui()->RemoveObserver(observer);
730 } 736 }
731 737
732 #endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID) 738 #endif // !defined(OS_MACOSX) && !defined(OS_NACL) && !defined(OS_ANDROID)
(...skipping 20 matching lines...) Expand all
753 Watcher *delegate) { 759 Watcher *delegate) {
754 return pump_libevent()->WatchFileDescriptor( 760 return pump_libevent()->WatchFileDescriptor(
755 fd, 761 fd,
756 persistent, 762 persistent,
757 static_cast<base::MessagePumpLibevent::Mode>(mode), 763 static_cast<base::MessagePumpLibevent::Mode>(mode),
758 controller, 764 controller,
759 delegate); 765 delegate);
760 } 766 }
761 767
762 #endif 768 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698