| Index: blimp/engine/session/page_load_tracker.h
|
| diff --git a/blimp/engine/session/page_load_tracker.h b/blimp/engine/session/page_load_tracker.h
|
| index 2a1d02c218af57bf587c1ca8e7cdbc6195057be3..52e30836e687ca8cf81c52f4e1c2cb7a5dc635fe 100644
|
| --- a/blimp/engine/session/page_load_tracker.h
|
| +++ b/blimp/engine/session/page_load_tracker.h
|
| @@ -37,42 +37,24 @@ class PageLoadTracker : public content::WebContentsObserver {
|
| ~PageLoadTracker() override;
|
|
|
| private:
|
| - struct LoadStatus {
|
| - // Set to true on receiving a notification from the renderer that the load
|
| - // finished. See WebContentsObserver::DidFinishLoad.
|
| - bool page_loaded = false;
|
| -
|
| - // Set to true on receiving a notification from the renderer that the first
|
| - // paint after a navigation was performed.
|
| - // See WebContentsObserver::DidFirstPaintAfterLoad.
|
| - bool did_first_paint = false;
|
| -
|
| - bool Loaded() const;
|
| - };
|
| -
|
| - typedef base::SmallMap<std::map<content::RenderWidgetHost*, LoadStatus>>
|
| - RenderWidgetLoadStatusMap;
|
| -
|
| // content::WebContentsObserver implementation.
|
| - void DidStartProvisionalLoadForFrame(
|
| - content::RenderFrameHost* render_frame_host,
|
| - const GURL& validated_url,
|
| - bool is_error_page,
|
| - bool is_iframe_srcdoc) override;
|
| - void DidFinishLoad(content::RenderFrameHost* render_frame_host,
|
| - const GURL& validated_url) override;
|
| - void DidFailLoad(content::RenderFrameHost* render_frame_host,
|
| - const GURL& validated_url,
|
| - int error_code,
|
| - const base::string16& error_description,
|
| - bool was_ignored_by_handler) override;
|
| - void DidFirstPaintAfterLoad(
|
| - content::RenderWidgetHost* render_widget_host) override;
|
| + void DidStartNavigation(
|
| + content::NavigationHandle* navigation_handle) override;
|
| + void DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) override;
|
| +
|
| + // Invoked when the renderer has performed at least one paint after the
|
| + // navigation was committed.
|
| + void DidPaintAfterNavigationCommitted(bool result);
|
|
|
| - RenderWidgetLoadStatusMap render_widget_load_status_;
|
| + // Set to true if a pending navigation exits, and we are awaiting a status
|
| + // update for it.
|
| + bool navigation_pending_ = false;
|
|
|
| PageLoadTrackerClient* client_;
|
|
|
| + base::WeakPtrFactory<PageLoadTracker> weak_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PageLoadTracker);
|
| };
|
|
|
|
|