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

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

Issue 384993004: Simplify WebNavigationApi by using RenderFrameHost internally. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert formatting too 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.h
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
index 35a2956b8d79d985012884e7f374a9b2b6fe3b24..3832b951cc068a6877c1afac143a2e8e286d397a 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
@@ -52,6 +52,8 @@ class WebNavigationTabObserver
const content::NotificationDetails& details) OVERRIDE;
// content::WebContentsObserver implementation.
+ virtual void RenderFrameDeleted(
+ content::RenderFrameHost* render_frame_host) OVERRIDE;
virtual void RenderViewDeleted(
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void AboutToNavigateRenderView(
@@ -97,16 +99,17 @@ class WebNavigationTabObserver
// True if the transition and target url correspond to a reference fragment
// navigation.
- bool IsReferenceFragmentNavigation(FrameNavigationState::FrameID frame_id,
+ bool IsReferenceFragmentNavigation(content::RenderFrameHost* frame_host,
const GURL& url);
// Creates and sends onErrorOccurred events for all on-going navigations. If
// |render_view_host| is non-NULL, only generates events for frames in this
- // render view host. If |id_to_skip| is given, no events are sent for that
+ // render view host. If |frame_host_to_skip| is given, no events are sent for
+ // that
// frame.
void SendErrorEvents(content::WebContents* web_contents,
content::RenderViewHost* render_view_host,
- FrameNavigationState::FrameID id_to_skip);
+ content::RenderFrameHost* frame_host_to_skip);
// Tracks the state of the frames we are sending events for.
FrameNavigationState navigation_state_;
@@ -138,15 +141,13 @@ class WebNavigationEventRouter : public TabStripModelObserver,
struct PendingWebContents{
PendingWebContents();
PendingWebContents(content::WebContents* source_web_contents,
- int64 source_frame_id,
- bool source_frame_is_main_frame,
+ content::RenderFrameHost* source_frame_host,
content::WebContents* target_web_contents,
const GURL& target_url);
~PendingWebContents();
content::WebContents* source_web_contents;
- int64 source_frame_id;
- bool source_frame_is_main_frame;
+ content::RenderFrameHost* source_frame_host;
content::WebContents* target_web_contents;
GURL target_url;
};

Powered by Google App Engine
This is Rietveld 408576698