Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4070)

Unified Diff: chrome/browser/google/google_url_tracker_map_entry.h

Issue 11114009: Split the existing GoogleURLTrackerInfoBarDelegate into two classes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google/google_url_tracker_map_entry.h
===================================================================
--- chrome/browser/google/google_url_tracker_map_entry.h (revision 0)
+++ chrome/browser/google/google_url_tracker_map_entry.h (working copy)
@@ -0,0 +1,56 @@
+// Copyright (c) 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.
+
+#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
+#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
+
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
+
+class GoogleURLTracker;
+class GoogleURLTrackerInfoBarDelegate;
+class InfoBarTabHelper;
+
+class GoogleURLTrackerMapEntry : public content::NotificationObserver {
+ public:
+ GoogleURLTrackerMapEntry(
+ GoogleURLTracker* google_url_tracker,
+ InfoBarTabHelper* infobar_helper,
+ const content::NotificationSource& navigation_controller_source,
+ const content::NotificationSource& web_contents_source);
+ virtual ~GoogleURLTrackerMapEntry();
+
+ bool has_infobar() const { return !!infobar_; }
+ GoogleURLTrackerInfoBarDelegate* infobar() { return infobar_; }
+ void SetInfoBar(GoogleURLTrackerInfoBarDelegate* infobar);
+
+ const content::NotificationSource& navigation_controller_source() const {
+ return navigation_controller_source_;
+ }
+ const content::NotificationSource& web_contents_source() const {
+ return web_contents_source_;
+ }
+
+ 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;
+
+ content::NotificationRegistrar registrar_;
+ GoogleURLTracker* const google_url_tracker_;
+ const InfoBarTabHelper* const infobar_helper_;
+ GoogleURLTrackerInfoBarDelegate* infobar_;
+ const content::NotificationSource navigation_controller_source_;
+ const content::NotificationSource web_contents_source_;
+
+ DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry);
+};
+
+#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
Property changes on: chrome/browser/google/google_url_tracker_map_entry.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
« no previous file with comments | « chrome/browser/google/google_url_tracker_infobar_delegate.cc ('k') | chrome/browser/google/google_url_tracker_map_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698