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