Home | History | Annotate | Download | only in automation
      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_autocomplete_edit_tracker.h"
      6 
      7 #include "content/common/notification_source.h"
      8 #include "content/common/notification_type.h"
      9 
     10 AutomationAutocompleteEditTracker::AutomationAutocompleteEditTracker(
     11     IPC::Message::Sender* automation)
     12     : AutomationResourceTracker<AutocompleteEditView*>(automation) {
     13 }
     14 
     15 AutomationAutocompleteEditTracker::~AutomationAutocompleteEditTracker() {
     16 }
     17 
     18 void AutomationAutocompleteEditTracker::AddObserver(
     19     AutocompleteEditView* resource) {
     20   registrar_.Add(this, NotificationType::AUTOCOMPLETE_EDIT_DESTROYED,
     21                  Source<AutocompleteEditView>(resource));
     22 }
     23 
     24 void AutomationAutocompleteEditTracker::RemoveObserver(
     25     AutocompleteEditView* resource) {
     26   registrar_.Remove(this, NotificationType::AUTOCOMPLETE_EDIT_DESTROYED,
     27                     Source<AutocompleteEditView>(resource));
     28 }
     29