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

Side by Side Diff: content/browser/tab_contents/tab_contents_observer.h

Issue 6814029: Revert 80519 - Move favicon from TabContents to TabContentsWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 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 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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
7 7
8 #include "content/browser/tab_contents/navigation_controller.h" 8 #include "content/browser/tab_contents/navigation_controller.h"
9 #include "ipc/ipc_channel.h" 9 #include "ipc/ipc_channel.h"
10 10
11 struct ViewHostMsg_FrameNavigate_Params; 11 struct ViewHostMsg_FrameNavigate_Params;
12 12
13 // An observer API implemented by classes which are interested in various page 13 // An observer API implemented by classes which are interested in various page
14 // load events from TabContents. They also get a chance to filter IPC messages. 14 // load events from TabContents. They also get a chance to filter IPC messages.
15 class TabContentsObserver : public IPC::Channel::Listener, 15 class TabContentsObserver : public IPC::Channel::Listener,
16 public IPC::Message::Sender { 16 public IPC::Message::Sender {
17 public: 17 public:
18 // Use this as a member variable in a class that uses the empty constructor 18 // Use this as a member variable in a class that uses the emptry constructor
19 // version of this interface. 19 // version of this interface.
20 class Registrar { 20 class Registrar {
21 public: 21 public:
22 explicit Registrar(TabContentsObserver* observer); 22 explicit Registrar(TabContentsObserver* observer);
23 ~Registrar(); 23 ~Registrar();
24 24
25 // Call this to start observing a tab. Passing in NULL resets it. 25 // Call this to start observing a tab. Passing in NULL resets it.
26 // This can only be used to watch one tab at a time. If you call this and 26 // This can only be used to watch one tab at a time. If you call this and
27 // you're already observing another tab, the old tab won't be observed 27 // you're already observing another tab, the old tab won't be observed
28 // afterwards. 28 // afterwards.
29 void Observe(TabContents* tab); 29 void Observe(TabContents* tab);
30 30
31 private: 31 private:
32 TabContentsObserver* observer_; 32 TabContentsObserver* observer_;
33 TabContents* tab_; 33 TabContents* tab_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(Registrar); 35 DISALLOW_COPY_AND_ASSIGN(Registrar);
36 }; 36 };
37 37
38 virtual void NavigateToPendingEntry( 38 virtual void NavigateToPendingEntry();
39 const GURL& url,
40 NavigationController::ReloadType reload_type);
41 39
42 virtual void DidNavigateMainFramePostCommit( 40 virtual void DidNavigateMainFramePostCommit(
43 const NavigationController::LoadCommittedDetails& details, 41 const NavigationController::LoadCommittedDetails& details,
44 const ViewHostMsg_FrameNavigate_Params& params); 42 const ViewHostMsg_FrameNavigate_Params& params);
45 virtual void DidNavigateAnyFramePostCommit( 43 virtual void DidNavigateAnyFramePostCommit(
46 const NavigationController::LoadCommittedDetails& details, 44 const NavigationController::LoadCommittedDetails& details,
47 const ViewHostMsg_FrameNavigate_Params& params); 45 const ViewHostMsg_FrameNavigate_Params& params);
48 virtual void OnProvisionalChangeToMainFrameUrl(const GURL& url); 46 virtual void OnProvisionalChangeToMainFrameUrl(const GURL& url);
49 47
50 virtual void DidStartLoading(); 48 virtual void DidStartLoading();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 105
108 TabContents* tab_contents_; 106 TabContents* tab_contents_;
109 107
110 // The routing ID of the associated TabContents. 108 // The routing ID of the associated TabContents.
111 int routing_id_; 109 int routing_id_;
112 110
113 DISALLOW_COPY_AND_ASSIGN(TabContentsObserver); 111 DISALLOW_COPY_AND_ASSIGN(TabContentsObserver);
114 }; 112 };
115 113
116 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_ 114 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | content/browser/tab_contents/tab_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698