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

Unified Diff: headless/public/util/navigation_request.h

Issue 2687083002: Headless: make URLRequestDispatcher aware of navigations (Closed)
Patch Set: Pulled ShellNavigationRequest out into a separate file Created 3 years, 10 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/public/util/navigation_request.h
diff --git a/headless/public/util/navigation_request.h b/headless/public/util/navigation_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..cd28f10dd93862278602d19d5e22811e732fd9f0
--- /dev/null
+++ b/headless/public/util/navigation_request.h
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HEADLESS_PUBLIC_UTIL_NAVIGATION_REQUEST_H_
+#define HEADLESS_PUBLIC_UTIL_NAVIGATION_REQUEST_H_
+
+#include "base/macros.h"
+
+namespace headless {
+
+// While the actual details of the navigation processing are left undefined,
+// it's anticipated implementations will use devtools Page.setControlNavigations
+// and Page.processNavigation commands.
+class NavigationRequest {
+ public:
+ NavigationRequest() {}
+ virtual ~NavigationRequest() {}
+
+ // Called on the IO thread to ask the implementation to start processing the
+ // navigation request. The NavigationRequest will be deleted immediately after
+ // The |done_callback| can be called from any thread.
+ virtual void StartProcessing(base::Closure done_callback) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(NavigationRequest);
+};
+
+} // namespace headless
+
+#endif // HEADLESS_PUBLIC_UTIL_NAVIGATION_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698