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

Side by Side Diff: headless/app/shell_navigation_request.h

Issue 2687083002: Headless: make URLRequestDispatcher aware of navigations (Closed)
Patch Set: Address nits 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
« no previous file with comments | « headless/app/headless_shell.cc ('k') | headless/app/shell_navigation_request.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 private:
29 // Note the navigation likely isn't done when this is called, however we
30 // expect it will have been committed and the initial resource load requested.
31 static void ProcessNavigationResult(
32 base::Closure done_callback,
33 std::unique_ptr<page::ProcessNavigationResult>);
34
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
« no previous file with comments | « headless/app/headless_shell.cc ('k') | headless/app/shell_navigation_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698