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

Side by Side Diff: chrome/browser/extensions/extension_webnavigation_api.h

Issue 4448003: Implement onCompleted event for the webNavigation API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 // Defines the Chrome Extensions WebNavigation API functions for observing and 5 // Defines the Chrome Extensions WebNavigation API functions for observing and
6 // intercepting navigation events, as specified in 6 // intercepting navigation events, as specified in
7 // chrome/common/extensions/api/extension_api.json. 7 // chrome/common/extensions/api/extension_api.json.
8 8
9 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ 9 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_
10 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ 10 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // the details of such an event and constructs a suitable JSON formatted 99 // the details of such an event and constructs a suitable JSON formatted
100 // extension event from it. 100 // extension event from it.
101 void FrameProvisionalLoadCommitted(NavigationController* controller, 101 void FrameProvisionalLoadCommitted(NavigationController* controller,
102 ProvisionalLoadDetails* details); 102 ProvisionalLoadDetails* details);
103 103
104 // Handler for the FRAME_DOM_CONTENT_LOADED event. The method takes the frame 104 // Handler for the FRAME_DOM_CONTENT_LOADED event. The method takes the frame
105 // ID and constructs a suitable JSON formatted extension event from it. 105 // ID and constructs a suitable JSON formatted extension event from it.
106 void FrameDomContentLoaded(NavigationController* controller, 106 void FrameDomContentLoaded(NavigationController* controller,
107 long long frame_id); 107 long long frame_id);
108 108
109 // Handler for the FRAME_DID_FINISH_LOAD event. The method takes the frame
110 // ID and constructs a suitable JSON formatted extension event from it.
111 void FrameDidFinishLoad(NavigationController* controller, long long frame_id);
112
109 // Handler for the FAIL_PROVISIONAL_LOAD_WITH_ERROR event. The method takes 113 // Handler for the FAIL_PROVISIONAL_LOAD_WITH_ERROR event. The method takes
110 // the details of such an event and constructs a suitable JSON formatted 114 // the details of such an event and constructs a suitable JSON formatted
111 // extension event from it. 115 // extension event from it.
112 void FailProvisionalLoadWithError(NavigationController* controller, 116 void FailProvisionalLoadWithError(NavigationController* controller,
113 ProvisionalLoadDetails* details); 117 ProvisionalLoadDetails* details);
114 118
115 // This method dispatches events to the extension message service. 119 // This method dispatches events to the extension message service.
116 void DispatchEvent(Profile* context, 120 void DispatchEvent(Profile* context,
117 const char* event_name, 121 const char* event_name,
118 const std::string& json_args); 122 const std::string& json_args);
119 123
120 // Tracks the state of the frames we are sending events for. 124 // Tracks the state of the frames we are sending events for.
121 FrameNavigationState navigation_state_; 125 FrameNavigationState navigation_state_;
122 126
123 // Used for tracking registrations to navigation notifications. 127 // Used for tracking registrations to navigation notifications.
124 NotificationRegistrar registrar_; 128 NotificationRegistrar registrar_;
125 129
126 DISALLOW_COPY_AND_ASSIGN(ExtensionWebNavigationEventRouter); 130 DISALLOW_COPY_AND_ASSIGN(ExtensionWebNavigationEventRouter);
127 }; 131 };
128 132
129 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ 133 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/web_page_view.cc ('k') | chrome/browser/extensions/extension_webnavigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698