| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/automation/automation_omnibox_tracker.h" | |
| 6 | |
| 7 #include "content/common/notification_source.h" | |
| 8 #include "content/common/notification_type.h" | |
| 9 | |
| 10 AutomationOmniboxTracker::AutomationOmniboxTracker( | |
| 11 IPC::Message::Sender* automation) | |
| 12 : AutomationResourceTracker<OmniboxView*>(automation) { | |
| 13 } | |
| 14 | |
| 15 AutomationOmniboxTracker::~AutomationOmniboxTracker() { | |
| 16 } | |
| 17 | |
| 18 void AutomationOmniboxTracker::AddObserver(OmniboxView* resource) { | |
| 19 registrar_.Add(this, NotificationType::OMNIBOX_DESTROYED, | |
| 20 Source<OmniboxView>(resource)); | |
| 21 } | |
| 22 | |
| 23 void AutomationOmniboxTracker::RemoveObserver(OmniboxView* resource) { | |
| 24 registrar_.Remove(this, NotificationType::OMNIBOX_DESTROYED, | |
| 25 Source<OmniboxView>(resource)); | |
| 26 } | |
| OLD | NEW |