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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 content::RenderViewHost* render_view_host, | 98 content::RenderViewHost* render_view_host, |
99 const content::ResourceRedirectDetails& details) OVERRIDE; | 99 const content::ResourceRedirectDetails& details) OVERRIDE; |
100 virtual void DidOpenRequestedURL(content::WebContents* new_contents, | 100 virtual void DidOpenRequestedURL(content::WebContents* new_contents, |
101 const GURL& url, | 101 const GURL& url, |
102 const content::Referrer& referrer, | 102 const content::Referrer& referrer, |
103 WindowOpenDisposition disposition, | 103 WindowOpenDisposition disposition, |
104 content::PageTransition transition, | 104 content::PageTransition transition, |
105 int64 source_frame_num) OVERRIDE; | 105 int64 source_frame_num) OVERRIDE; |
106 virtual void FrameDetached(content::RenderViewHost* render_view_host, | 106 virtual void FrameDetached(content::RenderViewHost* render_view_host, |
107 int64 frame_num) OVERRIDE; | 107 int64 frame_num) OVERRIDE; |
108 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; | 108 virtual void WebContentsDestroyed() OVERRIDE; |
109 | 109 |
110 private: | 110 private: |
111 explicit WebNavigationTabObserver(content::WebContents* web_contents); | 111 explicit WebNavigationTabObserver(content::WebContents* web_contents); |
112 friend class content::WebContentsUserData<WebNavigationTabObserver>; | 112 friend class content::WebContentsUserData<WebNavigationTabObserver>; |
113 | 113 |
114 // True if the transition and target url correspond to a reference fragment | 114 // True if the transition and target url correspond to a reference fragment |
115 // navigation. | 115 // navigation. |
116 bool IsReferenceFragmentNavigation(FrameNavigationState::FrameID frame_id, | 116 bool IsReferenceFragmentNavigation(FrameNavigationState::FrameID frame_id, |
117 const GURL& url); | 117 const GURL& url); |
118 | 118 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 // Created lazily upon OnListenerAdded. | 253 // Created lazily upon OnListenerAdded. |
254 scoped_ptr<WebNavigationEventRouter> web_navigation_event_router_; | 254 scoped_ptr<WebNavigationEventRouter> web_navigation_event_router_; |
255 | 255 |
256 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI); | 256 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI); |
257 }; | 257 }; |
258 | 258 |
259 } // namespace extensions | 259 } // namespace extensions |
260 | 260 |
261 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ | 261 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ |
OLD | NEW |