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