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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool is_main_frame, | 147 bool is_main_frame, |
148 const GURL& validated_url, | 148 const GURL& validated_url, |
149 int error_code, | 149 int error_code, |
150 const string16& error_description) OVERRIDE; | 150 const string16& error_description) OVERRIDE; |
151 virtual void DocumentLoadedInFrame(int64 frame_id) OVERRIDE; | 151 virtual void DocumentLoadedInFrame(int64 frame_id) OVERRIDE; |
152 virtual void DidFinishLoad(int64 frame_id, | 152 virtual void DidFinishLoad(int64 frame_id, |
153 const GURL& validated_url, | 153 const GURL& validated_url, |
154 bool is_main_frame) OVERRIDE; | 154 bool is_main_frame) OVERRIDE; |
155 virtual void DidOpenRequestedURL(TabContents* new_contents, | 155 virtual void DidOpenRequestedURL(TabContents* new_contents, |
156 const GURL& url, | 156 const GURL& url, |
157 const GURL& referrer, | 157 const content::Referrer& referrer, |
158 WindowOpenDisposition disposition, | 158 WindowOpenDisposition disposition, |
159 content::PageTransition transition, | 159 content::PageTransition transition, |
160 int64 source_frame_id) OVERRIDE; | 160 int64 source_frame_id) OVERRIDE; |
161 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; | 161 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; |
162 | 162 |
163 private: | 163 private: |
164 // True if the transition and target url correspond to a reference fragment | 164 // True if the transition and target url correspond to a reference fragment |
165 // navigation. | 165 // navigation. |
166 bool IsReferenceFragmentNavigation(int64 frame_id, const GURL& url); | 166 bool IsReferenceFragmentNavigation(int64 frame_id, const GURL& url); |
167 | 167 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 }; | 239 }; |
240 | 240 |
241 // API function that returns the states of all frames in a given tab. | 241 // API function that returns the states of all frames in a given tab. |
242 class GetAllFramesFunction : public SyncExtensionFunction { | 242 class GetAllFramesFunction : public SyncExtensionFunction { |
243 virtual ~GetAllFramesFunction() {} | 243 virtual ~GetAllFramesFunction() {} |
244 virtual bool RunImpl() OVERRIDE; | 244 virtual bool RunImpl() OVERRIDE; |
245 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") | 245 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") |
246 }; | 246 }; |
247 | 247 |
248 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ | 248 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBNAVIGATION_API_H_ |
OLD | NEW |