| OLD | NEW |
| 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 #import "base/message_pump_mac.h" | 5 #import "base/message_loop/message_pump_mac.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 | 14 |
| 15 #if !defined(OS_IOS) | 15 #if !defined(OS_IOS) |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 void MessagePumpUIApplication::DoRun(Delegate* delegate) { | 539 void MessagePumpUIApplication::DoRun(Delegate* delegate) { |
| 540 NOTREACHED(); | 540 NOTREACHED(); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void MessagePumpUIApplication::Quit() { | 543 void MessagePumpUIApplication::Quit() { |
| 544 NOTREACHED(); | 544 NOTREACHED(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void MessagePumpUIApplication::Attach(Delegate* delegate) { | 547 void MessagePumpUIApplication::Attach(Delegate* delegate) { |
| 548 DCHECK(!run_loop_); | 548 DCHECK(!run_loop_); |
| 549 run_loop_ = new base::RunLoop(); | 549 run_loop_ = new RunLoop(); |
| 550 CHECK(run_loop_->BeforeRun()); | 550 CHECK(run_loop_->BeforeRun()); |
| 551 SetDelegate(delegate); | 551 SetDelegate(delegate); |
| 552 } | 552 } |
| 553 | 553 |
| 554 #else | 554 #else |
| 555 | 555 |
| 556 MessagePumpNSApplication::MessagePumpNSApplication() | 556 MessagePumpNSApplication::MessagePumpNSApplication() |
| 557 : keep_running_(true), | 557 : keep_running_(true), |
| 558 running_own_loop_(false) { | 558 running_own_loop_(false) { |
| 559 } | 559 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 [NSApplication sharedApplication]; | 692 [NSApplication sharedApplication]; |
| 693 g_not_using_cr_app = true; | 693 g_not_using_cr_app = true; |
| 694 return new MessagePumpNSApplication; | 694 return new MessagePumpNSApplication; |
| 695 #endif | 695 #endif |
| 696 } | 696 } |
| 697 | 697 |
| 698 return new MessagePumpNSRunLoop; | 698 return new MessagePumpNSRunLoop; |
| 699 } | 699 } |
| 700 | 700 |
| 701 } // namespace base | 701 } // namespace base |
| OLD | NEW |