OLD | NEW |
---|---|
1 // -*- c++ -*- | 1 // -*- c++ -*- |
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 // The portable representation of an instance and root scriptable object. | 6 // The portable representation of an instance and root scriptable object. |
7 // The PPAPI version of the plugin instantiates a subclass of this class. | 7 // The PPAPI version of the plugin instantiates a subclass of this class. |
8 | 8 |
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
11 | 11 |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <queue> | 15 #include <queue> |
16 #include <set> | 16 #include <set> |
17 #include <string> | 17 #include <string> |
18 #include <vector> | 18 #include <vector> |
19 | 19 |
20 #include "native_client/src/include/nacl_macros.h" | 20 #include "native_client/src/include/nacl_macros.h" |
21 #include "native_client/src/include/nacl_scoped_ptr.h" | 21 #include "native_client/src/include/nacl_scoped_ptr.h" |
22 #include "native_client/src/include/nacl_string.h" | 22 #include "native_client/src/include/nacl_string.h" |
23 #include "native_client/src/trusted/plugin/file_downloader.h" | 23 #include "native_client/src/trusted/plugin/file_downloader.h" |
24 #include "native_client/src/trusted/plugin/method_map.h" | 24 #include "native_client/src/trusted/plugin/method_map.h" |
25 #include "native_client/src/trusted/plugin/nacl_subprocess.h" | 25 #include "native_client/src/trusted/plugin/nacl_subprocess.h" |
26 #include "native_client/src/trusted/plugin/pnacl_coordinator.h" | 26 #include "native_client/src/trusted/plugin/pnacl_coordinator.h" |
robertm
2011/12/13 17:06:39
this may not longer be needed and could be replace
sehr (please use chromium)
2011/12/13 20:05:04
My change to use scoped_ptr requires it be include
| |
27 #include "native_client/src/trusted/plugin/service_runtime.h" | 27 #include "native_client/src/trusted/plugin/service_runtime.h" |
28 #include "native_client/src/trusted/plugin/utility.h" | 28 #include "native_client/src/trusted/plugin/utility.h" |
29 | 29 |
30 #include "ppapi/cpp/private/var_private.h" | 30 #include "ppapi/cpp/private/var_private.h" |
31 // for pp::VarPrivate | 31 // for pp::VarPrivate |
32 #include "ppapi/cpp/private/instance_private.h" | 32 #include "ppapi/cpp/private/instance_private.h" |
33 #include "ppapi/cpp/rect.h" | 33 #include "ppapi/cpp/rect.h" |
34 #include "ppapi/cpp/url_loader.h" | 34 #include "ppapi/cpp/url_loader.h" |
35 #include "ppapi/cpp/var.h" | 35 #include "ppapi/cpp/var.h" |
36 | 36 |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
481 | 481 |
482 // File download support. |nexe_downloader_| can be opened with a specific | 482 // File download support. |nexe_downloader_| can be opened with a specific |
483 // callback to run when the file has been downloaded and is opened for | 483 // callback to run when the file has been downloaded and is opened for |
484 // reading. We use one downloader for all URL downloads to prevent issuing | 484 // reading. We use one downloader for all URL downloads to prevent issuing |
485 // multiple GETs that might arrive out of order. For example, this will | 485 // multiple GETs that might arrive out of order. For example, this will |
486 // prevent a GET of a NaCl manifest while a .nexe GET is pending. Note that | 486 // prevent a GET of a NaCl manifest while a .nexe GET is pending. Note that |
487 // this will also prevent simultaneous handling of multiple .nexes on a page. | 487 // this will also prevent simultaneous handling of multiple .nexes on a page. |
488 FileDownloader nexe_downloader_; | 488 FileDownloader nexe_downloader_; |
489 pp::CompletionCallbackFactory<Plugin> callback_factory_; | 489 pp::CompletionCallbackFactory<Plugin> callback_factory_; |
490 | 490 |
491 PnaclCoordinator pnacl_; | 491 PnaclCoordinator* pnacl_; |
jvoung - send to chromium...
2011/12/13 03:14:33
Does this ever get deleted?
sehr (please use chromium)
2011/12/13 20:05:04
Thanks. Changed to scoped_ptr so that it goes awa
| |
492 | 492 |
493 // The manifest dictionary. Used for looking up resources to be loaded. | 493 // The manifest dictionary. Used for looking up resources to be loaded. |
494 nacl::scoped_ptr<Manifest> manifest_; | 494 nacl::scoped_ptr<Manifest> manifest_; |
495 // URL processing interface for use in looking up resources in manifests. | 495 // URL processing interface for use in looking up resources in manifests. |
496 const pp::URLUtil_Dev* url_util_; | 496 const pp::URLUtil_Dev* url_util_; |
497 | 497 |
498 // A string containing the text description of the last error | 498 // A string containing the text description of the last error |
499 // produced by this plugin. | 499 // produced by this plugin. |
500 nacl::string last_error_string_; | 500 nacl::string last_error_string_; |
501 | 501 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
559 // in UpdateDownloadProgress to map a url loader back to the URL being | 559 // in UpdateDownloadProgress to map a url loader back to the URL being |
560 // downloaded. | 560 // downloaded. |
561 const FileDownloader* FindFileDownloader(PP_Resource url_loader) const; | 561 const FileDownloader* FindFileDownloader(PP_Resource url_loader) const; |
562 | 562 |
563 int64_t time_of_last_progress_event_; | 563 int64_t time_of_last_progress_event_; |
564 }; | 564 }; |
565 | 565 |
566 } // namespace plugin | 566 } // namespace plugin |
567 | 567 |
568 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ | 568 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PLUGIN_H_ |
OLD | NEW |