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

Side by Side Diff: tests/fake_browser_ppapi/fake_url_response_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 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file.
5 */
6
7 #ifndef NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_RESPONSE_INFO_H_
8 #define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_RESPONSE_INFO_H_
9
10 #include <string>
11
12 #include "native_client/src/include/nacl_macros.h"
13 #include "native_client/tests/fake_browser_ppapi/fake_resource.h"
14
15 #include "ppapi/c/pp_module.h"
16 #include "ppapi/c/ppb_url_response_info.h"
17
18 namespace fake_browser_ppapi {
19
20 // Implements the PPB_URLResponse_Info interface.
21 class URLResponseInfo : public Resource {
22 public:
23 explicit URLResponseInfo(PP_Module module_id)
24 : module_id_(module_id), body_as_file_ref_(NULL) {}
25
26 URLResponseInfo* AsURLResponseInfo() { return this; }
27
28 // Setters.
29 void set_url(const std::string& url) { url_ = url; }
30 void set_status_code(int32_t status_code) { status_code_ = status_code; }
31 void set_body_as_file_ref(FileRef* file_ref) {
32 body_as_file_ref_ = file_ref;
33 }
34
35 // Getters.
36 PP_Module module_id() const { return module_id_; }
37 const std::string& url() const { return url_; }
38 int32_t status_code() { return status_code_; }
39 FileRef* body_as_file_ref() const { return body_as_file_ref_; }
40
41 // Return an interface pointer usable by PPAPI.
42 static const PPB_URLResponseInfo* GetInterface();
43
44 private:
45 PP_Module module_id_;
46 std::string url_;
47 int32_t status_code_; // Http status code.
48 FileRef* body_as_file_ref_;
49
50 NACL_DISALLOW_COPY_AND_ASSIGN(URLResponseInfo);
51 };
52
53 } // namespace fake_browser_ppapi
54
55 #endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_RESPONSE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698