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

Unified Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 1781193004: headless: Make it possible to configure an HTTP proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 4 years, 9 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: headless/lib/browser/headless_web_contents_impl.cc
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 869b2b12e588a6c92d427a73ec7bb0469ea6ae61..1977e7ffac218c0f2a531e6811579372f919d1fb 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/trace_event/trace_event.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -33,6 +34,12 @@ class WebContentsObserverAdapter : public content::WebContentsObserver {
observer_->DocumentOnLoadCompletedInMainFrame();
}
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override {
+ observer_->DidFinishNavigation(navigation_handle->HasCommitted() &&
+ !navigation_handle->IsErrorPage());
+ }
+
private:
HeadlessWebContents::Observer* observer_; // Not owned.
« no previous file with comments | « headless/lib/browser/headless_url_request_context_getter.cc ('k') | headless/lib/headless_browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698