OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_resource_tracker.h" | 5 #include "chrome/browser/automation/automation_resource_tracker.h" |
6 | 6 |
7 #include "chrome/common/automation_messages.h" | |
8 #include "chrome/common/notification_service.h" | 7 #include "chrome/common/notification_service.h" |
| 8 #include "chrome/test/automation/automation_messages.h" |
9 | 9 |
10 AutomationResourceTrackerImpl::AutomationResourceTrackerImpl( | 10 AutomationResourceTrackerImpl::AutomationResourceTrackerImpl( |
11 IPC::Message::Sender* sender) | 11 IPC::Message::Sender* sender) |
12 : sender_(sender) { | 12 : sender_(sender) { |
13 } | 13 } |
14 | 14 |
15 AutomationResourceTrackerImpl::~AutomationResourceTrackerImpl() { | 15 AutomationResourceTrackerImpl::~AutomationResourceTrackerImpl() { |
16 } | 16 } |
17 | 17 |
18 int AutomationResourceTrackerImpl::AddImpl(const void* resource) { | 18 int AutomationResourceTrackerImpl::AddImpl(const void* resource) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void AutomationResourceTrackerImpl::HandleCloseNotification( | 76 void AutomationResourceTrackerImpl::HandleCloseNotification( |
77 const void* resource) { | 77 const void* resource) { |
78 if (!ContainsResourceImpl(resource)) | 78 if (!ContainsResourceImpl(resource)) |
79 return; | 79 return; |
80 | 80 |
81 sender_->Send( | 81 sender_->Send( |
82 new AutomationMsg_InvalidateHandle(0, resource_to_handle_[resource])); | 82 new AutomationMsg_InvalidateHandle(0, resource_to_handle_[resource])); |
83 | 83 |
84 RemoveImpl(resource); | 84 RemoveImpl(resource); |
85 } | 85 } |
OLD | NEW |