Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/tab_contents/navigation_controller.h" | 8 #include "chrome/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 WebNavigationObserver : public IPC::Channel::Listener { | 15 class WebNavigationObserver : public IPC::Channel::Listener { |
| 16 public: | 16 public: |
|
Nico
2011/01/27 03:55:17
no constructor/destructor here?
Elliot Glaysher
2011/01/27 18:48:05
Correct. This is a base class whose base class alr
| |
| 17 virtual void NavigateToPendingEntry() { } | 17 virtual void NavigateToPendingEntry() { } |
| 18 | 18 |
| 19 virtual void DidNavigateMainFramePostCommit( | 19 virtual void DidNavigateMainFramePostCommit( |
| 20 const NavigationController::LoadCommittedDetails& details, | 20 const NavigationController::LoadCommittedDetails& details, |
| 21 const ViewHostMsg_FrameNavigate_Params& params) { } | 21 const ViewHostMsg_FrameNavigate_Params& params) { } |
| 22 virtual void DidNavigateAnyFramePostCommit( | 22 virtual void DidNavigateAnyFramePostCommit( |
| 23 const NavigationController::LoadCommittedDetails& details, | 23 const NavigationController::LoadCommittedDetails& details, |
| 24 const ViewHostMsg_FrameNavigate_Params& params) { } | 24 const ViewHostMsg_FrameNavigate_Params& params) { } |
| 25 | 25 |
| 26 virtual void DidStartLoading() { } | 26 virtual void DidStartLoading() { } |
| 27 virtual void DidStopLoading() { } | 27 virtual void DidStopLoading() { } |
| 28 | 28 |
| 29 // IPC::Channel::Listener implementation. | 29 // IPC::Channel::Listener implementation. |
| 30 virtual bool OnMessageReceived(const IPC::Message& message) { return false; } | 30 virtual bool OnMessageReceived(const IPC::Message& message); |
|
Nico
2011/01/27 03:55:17
this looks harmless too?
Elliot Glaysher
2011/01/27 18:48:05
See this code review for discussion between me and
| |
| 31 | 31 |
| 32 #if 0 | 32 #if 0 |
| 33 // For unifying with delegate... | 33 // For unifying with delegate... |
| 34 | 34 |
| 35 // Notifies the delegate that this contents is starting or is done loading | 35 // Notifies the delegate that this contents is starting or is done loading |
| 36 // some resource. The delegate should use this notification to represent | 36 // some resource. The delegate should use this notification to represent |
| 37 // loading feedback. See TabContents::is_loading() | 37 // loading feedback. See TabContents::is_loading() |
| 38 virtual void LoadingStateChanged(TabContents* contents) { } | 38 virtual void LoadingStateChanged(TabContents* contents) { } |
| 39 // Called to inform the delegate that the tab content's navigation state | 39 // Called to inform the delegate that the tab content's navigation state |
| 40 // changed. The |changed_flags| indicates the parts of the navigation state | 40 // changed. The |changed_flags| indicates the parts of the navigation state |
| 41 // that have been updated, and is any combination of the | 41 // that have been updated, and is any combination of the |
| 42 // |TabContents::InvalidateTypes| bits. | 42 // |TabContents::InvalidateTypes| bits. |
| 43 virtual void NavigationStateChanged(const TabContents* source, | 43 virtual void NavigationStateChanged(const TabContents* source, |
| 44 unsigned changed_flags) { } | 44 unsigned changed_flags) { } |
| 45 #endif | 45 #endif |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ | 48 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |