Change WebContents::IsLoadingMainFrame
to compare SiteInstances
(per @deepak1556's recommendation) Also updates tests to cover the situation where navigating between pages from the same potential "site" and adds generalized tests for `isLoadingMainFrame()`.
This commit is contained in:
parent
942971b01a
commit
d3e879cd7f
3 changed files with 69 additions and 64 deletions
|
@ -224,21 +224,11 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
int error_code,
|
||||
const base::string16& error_description,
|
||||
bool was_ignored_by_handler) override;
|
||||
void DidFailProvisionalLoad(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description,
|
||||
bool was_ignored_by_handler) override;
|
||||
void DidStartProvisionalLoadForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
bool is_error_page,
|
||||
bool is_iframe_srcdoc) override;
|
||||
void DidCommitProvisionalLoadForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& url,
|
||||
ui::PageTransition transition_type) override;
|
||||
void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description,
|
||||
bool was_ignored_by_handler) override;
|
||||
void DidStartLoading() override;
|
||||
void DidStopLoading() override;
|
||||
void DidGetResourceResponseStart(
|
||||
|
@ -313,9 +303,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
|||
// Whether background throttling is disabled.
|
||||
bool background_throttling_;
|
||||
|
||||
// Whether the main frame (not just a sub-frame) is currently loading.
|
||||
bool is_loading_main_frame_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(WebContents);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue