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

Side by Side Diff: tests/fake_browser_ppapi/fake_url_request_info.h

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Native Client 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 NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_REQUEST_INFO_H_
6 #define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_REQUEST_INFO_H_
7
8 #include <string>
9
10 #include "native_client/src/include/nacl_macros.h"
11 #include "native_client/tests/fake_browser_ppapi/fake_resource.h"
12 #include "ppapi/c/ppb_url_request_info.h"
13
14 namespace fake_browser_ppapi {
15
16 // Implements the PPB_URLRequestInfo interface.
17 class URLRequestInfo : public Resource {
18 public:
19 explicit URLRequestInfo(PP_Instance instance_id)
20 : instance_id_(instance_id), stream_to_file_(false) {}
21
22 URLRequestInfo* AsURLRequestInfo() { return this; }
23
24 // Setters
25 void set_url(const std::string& url) { url_ = url; }
26 void set_method(const std::string& method) { method_ = method; }
27 void set_headers(const std::string& headers) { headers_ = headers; }
28 void set_stream_to_file(bool stream_to_file) {
29 stream_to_file_ = stream_to_file;
30 }
31
32 // Getters
33 PP_Instance instance_id() const { return instance_id_; }
34 const std::string& url() const { return url_; }
35 bool stream_to_file() { return stream_to_file_; }
36
37 // Return an interface pointer usable by PPAPI.
38 static const PPB_URLRequestInfo* GetInterface();
39
40 private:
41 PP_Instance instance_id_;
42 std::string url_;
43 std::string method_;
44 std::string headers_;
45 bool stream_to_file_;
46
47 NACL_DISALLOW_COPY_AND_ASSIGN(URLRequestInfo);
48 };
49
50 } // namespace fake_browser_ppapi
51
52 #endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_REQUEST_INFO_H_
OLDNEW
« no previous file with comments | « tests/fake_browser_ppapi/fake_url_loader.cc ('k') | tests/fake_browser_ppapi/fake_url_request_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698