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

Side by Side Diff: headless/public/util/kv_map_request_job.h

Issue 2049363003: Adds support for headless chrome embedder mojo services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Abandon (for now) the concice bindings. Add BINDINGS_POLICY_HEADLESS and headless-mojo:// Created 4 years, 5 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 2016 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_TEST_TEST_URL_REQUEST_JOB_H_
6 #define HEADLESS_TEST_TEST_URL_REQUEST_JOB_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "headless/public/util/kv_map_protocol_handler.h"
10 #include "net/url_request/url_request_job.h"
11
12 namespace net {
13 class StringIOBuffer;
14 class DrainableIOBuffer;
15 }
16
17 namespace headless {
18 class KVMapRequestJob : public net::URLRequestJob {
19 public:
20 KVMapRequestJob(net::URLRequest* request,
21 net::NetworkDelegate* network_delegate,
22 const KVMapProtocolHandler::Response* response);
23
24 // net::URLRequestJob implementation:
25 void Start() override;
26 void Kill() override;
27 int ReadRawData(net::IOBuffer* buf, int buf_size) override;
28 bool GetMimeType(std::string* mime_type) const override;
29
30 private:
31 ~KVMapRequestJob() override;
32 void StartAsync();
33
34 const KVMapProtocolHandler::Response* response_; // NOT OWNED
35 size_t data_offset_;
36
37 base::WeakPtrFactory<KVMapRequestJob> weak_factory_;
38
39 DISALLOW_COPY_AND_ASSIGN(KVMapRequestJob);
40 };
41
42 } // namespace headless
43
44 #endif // HEADLESS_TEST_TEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698