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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h

Issue 384993004: Simplify WebNavigationApi by using RenderFrameHost internally. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove troublesome DCHECKs Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
index 1807fa55b84dbe24c8f8a8f490f0e5617a7e22c0..50c30e1d01b64a2fcd543eeb7cbc2fa3ec93ea2d 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
@@ -12,6 +12,7 @@
namespace content {
class BrowserContext;
+class RenderFrameHost;
class WebContents;
}
@@ -22,49 +23,39 @@ namespace extensions {
namespace web_navigation_api_helpers {
// Returns the frame ID as it will be passed to the extension:
-// 0 if the navigation happens in the main frame, or the frame ID
-// modulo 32 bits otherwise.
-int GetFrameId(bool is_main_frame, int64 frame_id);
+// 0 if the navigation happens in the main frame, or the frame routing ID
+// otherwise.
+int GetFrameId(content::RenderFrameHost* frame_host);
// Create and dispatch the various events of the webNavigation API.
void DispatchOnBeforeNavigate(content::WebContents* web_contents,
- int render_process_id,
- int64 frame_id,
- bool is_main_frame,
- int64 parent_frame_id,
- bool parent_is_main_frame,
+ content::RenderFrameHost* frame_host,
const GURL& validated_url);
void DispatchOnCommitted(const std::string& event_name,
content::WebContents* web_contents,
- int64 frame_id,
- bool is_main_frame,
+ content::RenderFrameHost* frame_host,
const GURL& url,
content::PageTransition transition_type);
void DispatchOnDOMContentLoaded(content::WebContents* web_contents,
- const GURL& url,
- bool is_main_frame,
- int64 frame_id);
+ content::RenderFrameHost* frame_host,
+ const GURL& url);
void DispatchOnCompleted(content::WebContents* web_contents,
- const GURL& url,
- bool is_main_frame,
- int64 frame_id);
+ content::RenderFrameHost* frame_host,
+ const GURL& url);
void DispatchOnCreatedNavigationTarget(
content::WebContents* web_contents,
content::BrowserContext* browser_context,
- int64 source_frame_id,
- bool source_frame_is_main_frame,
+ content::RenderFrameHost* source_frame_host,
content::WebContents* target_web_contents,
const GURL& target_url);
void DispatchOnErrorOccurred(content::WebContents* web_contents,
- int render_process_id,
+ content::RenderFrameHost* frame_host,
const GURL& url,
- int64 frame_id,
- bool is_main_frame,
int error_code);
void DispatchOnTabReplaced(

Powered by Google App Engine
This is Rietveld 408576698