Chromium Code Reviews| Index: blimp/engine/session/blimp_engine_session.h |
| diff --git a/blimp/engine/session/blimp_engine_session.h b/blimp/engine/session/blimp_engine_session.h |
| index a78bb664c4b7a560cf1ca9a07c75f8b76be33b11..3f66f5d2abdbcd7e5bc240735851d4d22e3f489d 100644 |
| --- a/blimp/engine/session/blimp_engine_session.h |
| +++ b/blimp/engine/session/blimp_engine_session.h |
| @@ -14,6 +14,7 @@ |
| #include "blimp/common/proto/blimp_message.pb.h" |
| #include "blimp/engine/feature/engine_render_widget_feature.h" |
| #include "blimp/engine/feature/engine_settings_feature.h" |
| +#include "blimp/engine/session/page_load_tracker.h" |
| #include "blimp/net/blimp_message_processor.h" |
| #include "blimp/net/connection_error_observer.h" |
| #include "content/public/browser/invalidate_type.h" |
| @@ -72,7 +73,8 @@ class BlimpEngineSession |
| public content::WebContentsDelegate, |
| public content::WebContentsObserver, |
| public ui::InputMethodObserver, |
| - public EngineRenderWidgetFeature::RenderWidgetMessageDelegate { |
| + public EngineRenderWidgetFeature::RenderWidgetMessageDelegate, |
| + public PageLoadTrackerClient { |
| public: |
| BlimpEngineSession(std::unique_ptr<BlimpBrowserContext> browser_context, |
| net::NetLog* net_log, |
| @@ -141,8 +143,6 @@ class BlimpEngineSession |
| const std::vector<uint8_t>& proto) override; |
| void NavigationStateChanged(content::WebContents* source, |
| content::InvalidateTypes changed_flags) override; |
| - void LoadProgressChanged(content::WebContents* source, |
| - double progress) override; |
| // ui::InputMethodObserver overrides. |
| void OnTextInputTypeChanged(const ui::TextInputClient* client) override; |
| @@ -158,14 +158,27 @@ class BlimpEngineSession |
| void RenderViewHostChanged(content::RenderViewHost* old_host, |
| content::RenderViewHost* new_host) override; |
| void RenderViewDeleted(content::RenderViewHost* render_view_host) override; |
| + 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; |
|
Wez
2016/05/24 01:42:17
Why not make the PageLoadTracker a WebContentsObse
Khushal
2016/05/24 18:28:09
Thanks, that makes sense. Done.
|
| + |
| + // PageLoadTrackerClient implementation. |
| + void SendPageLoadStatusUpdate(bool load_status) override; |
| // Sets up and owns |new_contents|. |
| void PlatformSetContents(std::unique_ptr<content::WebContents> new_contents); |
| - // Stores the value of the last page load completed update sent to the client. |
| - // This field is used per tab. |
| - bool last_page_load_completed_value_; |
| - |
| // Content BrowserContext for this session. |
| std::unique_ptr<BlimpBrowserContext> browser_context_; |
| @@ -202,6 +215,9 @@ class BlimpEngineSession |
| // including INPUT, COMPOSITOR and RENDER_WIDGET messages. |
| EngineRenderWidgetFeature render_widget_feature_; |
| + // Tracks the page load status for a tab. |
| + PageLoadTracker page_load_tracker_; |
| + |
| // Container for connection manager, authentication handler, and |
| // browser connection handler. The components run on the I/O thread, and |
| // this object is destroyed there. |