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

Side by Side Diff: headless/lib/browser/headless_network_delegate.h

Issue 1674263002: headless: Initial headless embedder API implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove provisional client API for now. Created 4 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 6 #define CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "net/base/network_delegate_impl.h" 10 #include "net/base/network_delegate_impl.h"
11 11
12 namespace content { 12 namespace headless {
13 13
14 class ShellNetworkDelegate : public net::NetworkDelegateImpl { 14 class HeadlessNetworkDelegate : public net::NetworkDelegateImpl {
15 public: 15 public:
16 ShellNetworkDelegate(); 16 HeadlessNetworkDelegate();
17 ~ShellNetworkDelegate() override; 17 ~HeadlessNetworkDelegate() override;
18 18
19 static void SetAcceptAllCookies(bool accept);
20
21 private:
22 // net::NetworkDelegate implementation. 19 // net::NetworkDelegate implementation.
23 int OnBeforeURLRequest(net::URLRequest* request, 20 int OnBeforeURLRequest(net::URLRequest* request,
24 const net::CompletionCallback& callback, 21 const net::CompletionCallback& callback,
25 GURL* new_url) override; 22 GURL* new_url) override;
26 int OnBeforeSendHeaders(net::URLRequest* request, 23 int OnBeforeSendHeaders(net::URLRequest* request,
27 const net::CompletionCallback& callback, 24 const net::CompletionCallback& callback,
28 net::HttpRequestHeaders* headers) override; 25 net::HttpRequestHeaders* headers) override;
29 void OnSendHeaders(net::URLRequest* request, 26 void OnSendHeaders(net::URLRequest* request,
30 const net::HttpRequestHeaders& headers) override; 27 const net::HttpRequestHeaders& headers) override;
31 int OnHeadersReceived( 28 int OnHeadersReceived(
(...skipping 16 matching lines...) Expand all
48 bool OnCanGetCookies(const net::URLRequest& request, 45 bool OnCanGetCookies(const net::URLRequest& request,
49 const net::CookieList& cookie_list) override; 46 const net::CookieList& cookie_list) override;
50 bool OnCanSetCookie(const net::URLRequest& request, 47 bool OnCanSetCookie(const net::URLRequest& request,
51 const std::string& cookie_line, 48 const std::string& cookie_line,
52 net::CookieOptions* options) override; 49 net::CookieOptions* options) override;
53 bool OnCanAccessFile(const net::URLRequest& request, 50 bool OnCanAccessFile(const net::URLRequest& request,
54 const base::FilePath& path) const override; 51 const base::FilePath& path) const override;
55 bool OnAreExperimentalCookieFeaturesEnabled() const override; 52 bool OnAreExperimentalCookieFeaturesEnabled() const override;
56 bool OnAreStrictSecureCookiesEnabled() const override; 53 bool OnAreStrictSecureCookiesEnabled() const override;
57 54
58 DISALLOW_COPY_AND_ASSIGN(ShellNetworkDelegate); 55 private:
56 DISALLOW_COPY_AND_ASSIGN(HeadlessNetworkDelegate);
59 }; 57 };
60 58
61 } // namespace content 59 } // namespace headless
62 60
63 #endif // CONTENT_SHELL_BROWSER_SHELL_NETWORK_DELEGATE_H_ 61 #endif // HEADLESS_LIB_BROWSER_HEADLESS_NETWORK_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698