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

Side by Side Diff: chrome/browser/google/google_url_tracker_map_entry.h

Issue 294193005: Revert of Turn GoogleURLTrackerNavigationHelper(Impl) into a per-tab object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
7 7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/google/google_url_tracker_navigation_helper.h"
10 #include "content/public/browser/notification_observer.h" 8 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 9 #include "content/public/browser/notification_registrar.h"
12 10
13 class GoogleURLTracker; 11 class GoogleURLTracker;
14 class GoogleURLTrackerInfoBarDelegate; 12 class GoogleURLTrackerInfoBarDelegate;
15 class InfoBarService; 13 class InfoBarService;
16 14
15 namespace content {
16 class NavigationController;
17 }
18
17 class GoogleURLTrackerMapEntry : public content::NotificationObserver { 19 class GoogleURLTrackerMapEntry : public content::NotificationObserver {
18 public: 20 public:
19 GoogleURLTrackerMapEntry( 21 GoogleURLTrackerMapEntry(
20 GoogleURLTracker* google_url_tracker, 22 GoogleURLTracker* google_url_tracker,
21 InfoBarService* infobar_service, 23 InfoBarService* infobar_service,
22 scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper); 24 const content::NavigationController* navigation_controller);
23 virtual ~GoogleURLTrackerMapEntry(); 25 virtual ~GoogleURLTrackerMapEntry();
24 26
25 bool has_infobar_delegate() const { return !!infobar_delegate_; } 27 bool has_infobar_delegate() const { return !!infobar_delegate_; }
26 GoogleURLTrackerInfoBarDelegate* infobar_delegate() { 28 GoogleURLTrackerInfoBarDelegate* infobar_delegate() {
27 return infobar_delegate_; 29 return infobar_delegate_;
28 } 30 }
29 void SetInfoBarDelegate(GoogleURLTrackerInfoBarDelegate* infobar_delegate); 31 void SetInfoBarDelegate(GoogleURLTrackerInfoBarDelegate* infobar_delegate);
30 32
31 GoogleURLTrackerNavigationHelper* navigation_helper() { 33 const content::NavigationController* navigation_controller() const {
32 return navigation_helper_.get(); 34 return navigation_controller_;
33 } 35 }
34 36
35 void Close(bool redo_search); 37 void Close(bool redo_search);
36 38
37 private: 39 private:
38 friend class GoogleURLTrackerTest; 40 friend class GoogleURLTrackerTest;
39 41
40 // content::NotificationObserver: 42 // content::NotificationObserver:
41 virtual void Observe(int type, 43 virtual void Observe(int type,
42 const content::NotificationSource& source, 44 const content::NotificationSource& source,
43 const content::NotificationDetails& details) OVERRIDE; 45 const content::NotificationDetails& details) OVERRIDE;
44 46
45 content::NotificationRegistrar registrar_; 47 content::NotificationRegistrar registrar_;
46 GoogleURLTracker* const google_url_tracker_; 48 GoogleURLTracker* const google_url_tracker_;
47 const InfoBarService* const infobar_service_; 49 const InfoBarService* const infobar_service_;
48 GoogleURLTrackerInfoBarDelegate* infobar_delegate_; 50 GoogleURLTrackerInfoBarDelegate* infobar_delegate_;
49 scoped_ptr<GoogleURLTrackerNavigationHelper> navigation_helper_; 51 const content::NavigationController* const navigation_controller_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry); 53 DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry);
52 }; 54 };
53 55
54 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ 56 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/google/google_url_tracker_factory.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