| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 the extension JSON API. | 6 // intercepting navigation events, as specified in the extension JSON API. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 void DidFailLoad(content::RenderFrameHost* render_frame_host, | 61 void DidFailLoad(content::RenderFrameHost* render_frame_host, |
| 62 const GURL& validated_url, | 62 const GURL& validated_url, |
| 63 int error_code, | 63 int error_code, |
| 64 const base::string16& error_description, | 64 const base::string16& error_description, |
| 65 bool was_ignored_by_handler) override; | 65 bool was_ignored_by_handler) override; |
| 66 void DidOpenRequestedURL(content::WebContents* new_contents, | 66 void DidOpenRequestedURL(content::WebContents* new_contents, |
| 67 content::RenderFrameHost* source_render_frame_host, | 67 content::RenderFrameHost* source_render_frame_host, |
| 68 const GURL& url, | 68 const GURL& url, |
| 69 const content::Referrer& referrer, | 69 const content::Referrer& referrer, |
| 70 WindowOpenDisposition disposition, | 70 WindowOpenDisposition disposition, |
| 71 ui::PageTransition transition) override; | 71 ui::PageTransition transition, |
| 72 bool started_from_context_menu) override; |
| 72 void WebContentsDestroyed() override; | 73 void WebContentsDestroyed() override; |
| 73 | 74 |
| 74 // This method dispatches the already created onBeforeNavigate event. | 75 // This method dispatches the already created onBeforeNavigate event. |
| 75 void DispatchCachedOnBeforeNavigate(); | 76 void DispatchCachedOnBeforeNavigate(); |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 explicit WebNavigationTabObserver(content::WebContents* web_contents); | 79 explicit WebNavigationTabObserver(content::WebContents* web_contents); |
| 79 friend class content::WebContentsUserData<WebNavigationTabObserver>; | 80 friend class content::WebContentsUserData<WebNavigationTabObserver>; |
| 80 | 81 |
| 81 void HandleCommit(content::NavigationHandle* navigation_handle); | 82 void HandleCommit(content::NavigationHandle* navigation_handle); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 220 |
| 220 // Created lazily upon OnListenerAdded. | 221 // Created lazily upon OnListenerAdded. |
| 221 std::unique_ptr<WebNavigationEventRouter> web_navigation_event_router_; | 222 std::unique_ptr<WebNavigationEventRouter> web_navigation_event_router_; |
| 222 | 223 |
| 223 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI); | 224 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI); |
| 224 }; | 225 }; |
| 225 | 226 |
| 226 } // namespace extensions | 227 } // namespace extensions |
| 227 | 228 |
| 228 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ | 229 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ |
| OLD | NEW |