OLD | NEW |
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 "chrome/browser/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
6 | 6 |
7 #include <deque> | 7 #include <deque> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 this, | 2544 this, |
2545 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); | 2545 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); |
2546 } | 2546 } |
2547 | 2547 |
2548 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { | 2548 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { |
2549 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2549 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
2550 if (automation_) | 2550 if (automation_) |
2551 automation_->Send(reply_message_.release()); | 2551 automation_->Send(reply_message_.release()); |
2552 Release(); | 2552 Release(); |
2553 } | 2553 } |
| 2554 |
| 2555 DragTargetDropAckNotificationObserver::DragTargetDropAckNotificationObserver( |
| 2556 AutomationProvider* automation, |
| 2557 IPC::Message* reply_message) |
| 2558 : automation_(automation->AsWeakPtr()), |
| 2559 reply_message_(reply_message) { |
| 2560 registrar_.Add( |
| 2561 this, |
| 2562 NotificationType::RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, |
| 2563 NotificationService::AllSources()); |
| 2564 } |
| 2565 |
| 2566 DragTargetDropAckNotificationObserver:: |
| 2567 ~DragTargetDropAckNotificationObserver() {} |
| 2568 |
| 2569 void DragTargetDropAckNotificationObserver::Observe( |
| 2570 NotificationType type, |
| 2571 const NotificationSource& source, |
| 2572 const NotificationDetails& details) { |
| 2573 if (automation_) { |
| 2574 AutomationJSONReply(automation_, |
| 2575 reply_message_.release()).SendSuccess(NULL); |
| 2576 } |
| 2577 delete this; |
| 2578 } |
OLD | NEW |