OLD | NEW |
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 // 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 int64 frame_id, | 135 int64 frame_id, |
136 bool is_main_frame, | 136 bool is_main_frame, |
137 const GURL& validated_url, | 137 const GURL& validated_url, |
138 bool is_error_page, | 138 bool is_error_page, |
139 RenderViewHost* render_view_host) OVERRIDE; | 139 RenderViewHost* render_view_host) OVERRIDE; |
140 virtual void DidCommitProvisionalLoadForFrame( | 140 virtual void DidCommitProvisionalLoadForFrame( |
141 int64 frame_id, | 141 int64 frame_id, |
142 bool is_main_frame, | 142 bool is_main_frame, |
143 const GURL& url, | 143 const GURL& url, |
144 PageTransition::Type transition_type) OVERRIDE; | 144 PageTransition::Type transition_type) OVERRIDE; |
145 virtual void DidFailProvisionalLoad(int64 frame_id, | 145 virtual void DidFailProvisionalLoad( |
146 bool is_main_frame, | 146 int64 frame_id, |
147 const GURL& validated_url, | 147 bool is_main_frame, |
148 int error_code) OVERRIDE; | 148 const GURL& validated_url, |
| 149 int error_code, |
| 150 const string16& error_description) OVERRIDE; |
149 virtual void DocumentLoadedInFrame(int64 frame_id) OVERRIDE; | 151 virtual void DocumentLoadedInFrame(int64 frame_id) OVERRIDE; |
150 virtual void DidFinishLoad(int64 frame_id) OVERRIDE; | 152 virtual void DidFinishLoad(int64 frame_id) OVERRIDE; |
151 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; | 153 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; |
152 | 154 |
153 private: | 155 private: |
154 // True if the transition and target url correspond to a reference fragment | 156 // True if the transition and target url correspond to a reference fragment |
155 // navigation. | 157 // navigation. |
156 bool IsReferenceFragmentNavigation(int64 frame_id, const GURL& url); | 158 bool IsReferenceFragmentNavigation(int64 frame_id, const GURL& url); |
157 | 159 |
158 // Tracks the state of the frames we are sending events for. | 160 // Tracks the state of the frames we are sending events for. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 }; | 231 }; |
230 | 232 |
231 // API function that returns the states of all frames in a given tab. | 233 // API function that returns the states of all frames in a given tab. |
232 class GetAllFramesFunction : public SyncExtensionFunction { | 234 class GetAllFramesFunction : public SyncExtensionFunction { |
233 virtual ~GetAllFramesFunction() {} | 235 virtual ~GetAllFramesFunction() {} |
234 virtual bool RunImpl() OVERRIDE; | 236 virtual bool RunImpl() OVERRIDE; |
235 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") | 237 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") |
236 }; | 238 }; |
237 | 239 |
238 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ | 240 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ |
OLD | NEW |