Chromium Code Reviews| Index: chrome/browser/google/google_url_tracker_map_entry.h |
| diff --git a/chrome/browser/google/google_url_tracker_map_entry.h b/chrome/browser/google/google_url_tracker_map_entry.h |
| index 1acd274341bb8a3bad78753308d019c495b51c48..e1e0a4538eaf37bc49293ec3539722ec123e7562 100644 |
| --- a/chrome/browser/google/google_url_tracker_map_entry.h |
| +++ b/chrome/browser/google/google_url_tracker_map_entry.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -8,8 +8,7 @@ |
| #include "base/memory/scoped_ptr.h" |
| #include "chrome/browser/google/google_url_tracker_infobar_delegate.h" |
| #include "chrome/browser/google/google_url_tracker_navigation_helper.h" |
| -#include "content/public/browser/notification_observer.h" |
| -#include "content/public/browser/notification_registrar.h" |
| +#include "components/infobars/core/infobar_manager.h" |
| class GoogleURLTracker; |
| @@ -17,7 +16,7 @@ namespace infobars { |
| class InfoBarManager; |
| } |
| -class GoogleURLTrackerMapEntry : public content::NotificationObserver { |
| +class GoogleURLTrackerMapEntry : public infobars::InfoBarManager::Observer { |
| public: |
| GoogleURLTrackerMapEntry( |
| GoogleURLTracker* google_url_tracker, |
| @@ -38,21 +37,26 @@ class GoogleURLTrackerMapEntry : public content::NotificationObserver { |
| infobar_delegate_->navigation_helper() : navigation_helper_.get(); |
| } |
| + const infobars::InfoBarManager* infobar_manager() const { |
| + return infobar_manager_; |
| + } |
| + |
| void Close(bool redo_search); |
| private: |
| friend class GoogleURLTrackerTest; |
| - // content::NotificationObserver: |
| - virtual void Observe(int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) OVERRIDE; |
| + // infobars::InfoBarManager::Observer implementation: |
|
Peter Kasting
2014/06/02 18:46:44
Nit: Don't add "implementation"
droger
2014/06/03 08:33:56
Done.
|
| + virtual void OnInfoBarRemoved(infobars::InfoBar* infobar, |
| + bool animate) OVERRIDE; |
| + virtual void OnManagerShuttingDown( |
| + infobars::InfoBarManager* manager) OVERRIDE; |
| - content::NotificationRegistrar registrar_; |
| GoogleURLTracker* const google_url_tracker_; |
| - const infobars::InfoBarManager* const infobar_manager_; |
| + infobars::InfoBarManager* const infobar_manager_; |
| GoogleURLTrackerInfoBarDelegate* infobar_delegate_; |
| scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper_; |
| + bool observing_; |
| DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry); |
| }; |