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

Side by Side Diff: chrome/browser/tab_contents/web_navigation_observer.h

Issue 6368011: Clean up WebNavigationObserver by taking out password specific callbacks, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 10
10 struct ViewHostMsg_FrameNavigate_Params; 11 struct ViewHostMsg_FrameNavigate_Params;
11 12
12 // 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
13 // load events from TabContents. 14 // load events from TabContents. They also get a chance to filter IPC messages.
14 15 class WebNavigationObserver : public IPC::Channel::Listener {
15 // TODO(pink): Is it worth having a bitfield where certain clients can only
16 // register for certain events? Is the extra function call worth the added pain
17 // on the caller to build the bitfield?
18
19 class WebNavigationObserver {
20 public: 16 public:
21 // For removing PasswordManager deps...
22
23 virtual void NavigateToPendingEntry() { } 17 virtual void NavigateToPendingEntry() { }
24 18
25 virtual void DidNavigateMainFramePostCommit( 19 virtual void DidNavigateMainFramePostCommit(
26 const NavigationController::LoadCommittedDetails& details, 20 const NavigationController::LoadCommittedDetails& details,
27 const ViewHostMsg_FrameNavigate_Params& params) { } 21 const ViewHostMsg_FrameNavigate_Params& params) { }
28 virtual void DidNavigateAnyFramePostCommit( 22 virtual void DidNavigateAnyFramePostCommit(
29 const NavigationController::LoadCommittedDetails& details, 23 const NavigationController::LoadCommittedDetails& details,
30 const ViewHostMsg_FrameNavigate_Params& params) { } 24 const ViewHostMsg_FrameNavigate_Params& params) { }
31 25
32 virtual void DidStartLoading() { } 26 virtual void DidStartLoading() { }
33 virtual void DidStopLoading() { } 27 virtual void DidStopLoading() { }
34 28
35 // TODO(beng): These should move from here once PasswordManager is able to 29 virtual void TranslateStarted() { }
36 // establish its own private communication protocol to the 30
37 // renderer. 31 // IPC::Channel::Listener implementation.
38 virtual void PasswordFormsFound( 32 virtual bool OnMessageReceived(const IPC::Message& message) { return false; }
39 const std::vector<webkit_glue::PasswordForm>& forms) { }
40 virtual void PasswordFormsVisible(
41 const std::vector<webkit_glue::PasswordForm>& visible_forms) { }
42 33
43 #if 0 34 #if 0
44 // For unifying with delegate... 35 // For unifying with delegate...
45 36
46 // Notifies the delegate that this contents is starting or is done loading 37 // Notifies the delegate that this contents is starting or is done loading
47 // some resource. The delegate should use this notification to represent 38 // some resource. The delegate should use this notification to represent
48 // loading feedback. See TabContents::is_loading() 39 // loading feedback. See TabContents::is_loading()
49 virtual void LoadingStateChanged(TabContents* contents) { } 40 virtual void LoadingStateChanged(TabContents* contents) { }
50 // Called to inform the delegate that the tab content's navigation state 41 // Called to inform the delegate that the tab content's navigation state
51 // changed. The |changed_flags| indicates the parts of the navigation state 42 // changed. The |changed_flags| indicates the parts of the navigation state
52 // that have been updated, and is any combination of the 43 // that have been updated, and is any combination of the
53 // |TabContents::InvalidateTypes| bits. 44 // |TabContents::InvalidateTypes| bits.
54 virtual void NavigationStateChanged(const TabContents* source, 45 virtual void NavigationStateChanged(const TabContents* source,
55 unsigned changed_flags) { } 46 unsigned changed_flags) { }
56 #endif 47 #endif
57 }; 48 };
58 49
59 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_ 50 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_NAVIGATION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698