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

Side by Side Diff: tests/fake_browser_ppapi/fake_url_loader.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
« no previous file with comments | « tests/fake_browser_ppapi/fake_resource.cc ('k') | tests/fake_browser_ppapi/fake_url_loader.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 /*
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_LOADER_H_
8 #define NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_LOADER_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 #include "ppapi/c/ppb_url_loader.h"
15
16 namespace fake_browser_ppapi {
17
18 // Must be set by main.cc to fake-map a url to a local path.
19 extern std::string g_nacl_ppapi_url_path;
20 extern std::string g_nacl_ppapi_local_path;
21
22 // Implements the PPB_URLLoader interface.
23 class URLLoader : public Resource {
24 public:
25 explicit URLLoader(PP_Instance instance_id)
26 : instance_id_(instance_id), response_(NULL) {}
27
28 URLLoader* AsURLLoader() { return this; }
29
30 URLRequestInfo* request() const { return request_; }
31 URLResponseInfo* response() const { return response_; }
32 void set_request(URLRequestInfo* request) { request_ = request; }
33 void set_response(URLResponseInfo* response) { response_ = response; }
34
35 // Return an interface pointer usable by PPAPI.
36 static const PPB_URLLoader* GetInterface();
37
38 private:
39 PP_Instance instance_id_;
40 URLRequestInfo* request_;
41 URLResponseInfo* response_;
42
43 NACL_DISALLOW_COPY_AND_ASSIGN(URLLoader);
44 };
45
46 } // namespace fake_browser_ppapi
47
48 #endif // NATIVE_CLIENT_TESTS_FAKE_BROWSER_PPAPI_FAKE_URL_LOADER_H_
OLDNEW
« no previous file with comments | « tests/fake_browser_ppapi/fake_resource.cc ('k') | tests/fake_browser_ppapi/fake_url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698