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 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2566 this, | 2566 this, |
2567 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); | 2567 &WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread)); |
2568 } | 2568 } |
2569 | 2569 |
2570 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { | 2570 void WaitForProcessLauncherThreadToGoIdleObserver::RunOnUIThread() { |
2571 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 2571 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
2572 if (automation_) | 2572 if (automation_) |
2573 automation_->Send(reply_message_.release()); | 2573 automation_->Send(reply_message_.release()); |
2574 Release(); | 2574 Release(); |
2575 } | 2575 } |
| 2576 |
| 2577 DragTargetDropAckNotificationObserver::DragTargetDropAckNotificationObserver( |
| 2578 AutomationProvider* automation, |
| 2579 IPC::Message* reply_message) |
| 2580 : automation_(automation->AsWeakPtr()), |
| 2581 reply_message_(reply_message) { |
| 2582 registrar_.Add( |
| 2583 this, |
| 2584 NotificationType::RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, |
| 2585 NotificationService::AllSources()); |
| 2586 } |
| 2587 |
| 2588 DragTargetDropAckNotificationObserver:: |
| 2589 ~DragTargetDropAckNotificationObserver() {} |
| 2590 |
| 2591 void DragTargetDropAckNotificationObserver::Observe( |
| 2592 NotificationType type, |
| 2593 const NotificationSource& source, |
| 2594 const NotificationDetails& details) { |
| 2595 if (automation_) { |
| 2596 AutomationJSONReply(automation_, |
| 2597 reply_message_.release()).SendSuccess(NULL); |
| 2598 } |
| 2599 delete this; |
| 2600 } |
OLD | NEW |