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

Side by Side Diff: headless/app/shell_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef HEADLESS_PUBLIC_UTIL_HTTP_URL_FETCHER_H_
6 #define HEADLESS_PUBLIC_UTIL_HTTP_URL_FETCHER_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "headless/public/devtools/domains/page.h"
12 #include "headless/public/util/navigation_request.h"
13
14 namespace headless {
15 class HeadlessShell;
16
17 // Used in deterministic mode to make sure navigations and resource requests
18 // complete in the order requested.
19 class ShellNavigationRequest : public NavigationRequest {
20 public:
21 ShellNavigationRequest(base::WeakPtr<HeadlessShell> headless_shell,
22 const page::NavigationRequestedParams& params);
23
24 ~ShellNavigationRequest() override;
25
26 void StartProcessing(base::Closure done_callback) override;
27
28 // Note the navigation likely isn't done when this is called, however we
29 // expect it will have been committed and the initial resource load requested.
30 static void ProcessNavigationResult(
Sami 2017/02/09 15:12:52 nit: Make private?
alex clarke (OOO till 29th) 2017/02/09 15:55:45 Done.
31 base::Closure done_callback,
32 std::unique_ptr<page::ProcessNavigationResult>);
33
34 private:
35 base::WeakPtr<HeadlessShell> headless_shell_;
36 int navigation_id_;
37 };
38
39 } // namespace headless
40
41 #endif // HEADLESS_PUBLIC_UTIL_HTTP_URL_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698