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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.h

Issue 1140023002: Code Refactor and making function static in frame_navigation_state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 const GURL& url, 77 const GURL& url,
78 const content::Referrer& referrer, 78 const content::Referrer& referrer,
79 WindowOpenDisposition disposition, 79 WindowOpenDisposition disposition,
80 ui::PageTransition transition) override; 80 ui::PageTransition transition) override;
81 void WebContentsDestroyed() override; 81 void WebContentsDestroyed() override;
82 82
83 private: 83 private:
84 explicit WebNavigationTabObserver(content::WebContents* web_contents); 84 explicit WebNavigationTabObserver(content::WebContents* web_contents);
85 friend class content::WebContentsUserData<WebNavigationTabObserver>; 85 friend class content::WebContentsUserData<WebNavigationTabObserver>;
86 86
87 void DispatchErrorToHelper(content::RenderFrameHost* render_frame_host,
88 int error_code);
89
87 // True if the transition and target url correspond to a reference fragment 90 // True if the transition and target url correspond to a reference fragment
88 // navigation. 91 // navigation.
89 bool IsReferenceFragmentNavigation(content::RenderFrameHost* frame_host, 92 bool IsReferenceFragmentNavigation(content::RenderFrameHost* frame_host,
90 const GURL& url); 93 const GURL& url);
91 94
92 // Creates and sends onErrorOccurred events for all on-going navigations. If 95 // Creates and sends onErrorOccurred events for all on-going navigations. If
93 // |render_view_host| is non-NULL, only generates events for frames in this 96 // |render_view_host| is non-NULL, only generates events for frames in this
94 // render view host. If |frame_host_to_skip| is given, no events are sent for 97 // render view host. If |frame_host_to_skip| is given, no events are sent for
95 // that 98 // that
96 // frame. 99 // frame.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 219
217 // Created lazily upon OnListenerAdded. 220 // Created lazily upon OnListenerAdded.
218 scoped_ptr<WebNavigationEventRouter> web_navigation_event_router_; 221 scoped_ptr<WebNavigationEventRouter> web_navigation_event_router_;
219 222
220 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI); 223 DISALLOW_COPY_AND_ASSIGN(WebNavigationAPI);
221 }; 224 };
222 225
223 } // namespace extensions 226 } // namespace extensions
224 227
225 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ 228 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698