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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/plugin.cc

Issue 8786005: Move command line processing out of coordinator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifdef _MSC_VER 5 #ifdef _MSC_VER
6 // Do not warn about use of std::copy with raw pointers. 6 // Do not warn about use of std::copy with raw pointers.
7 #pragma warning(disable : 4996) 7 #pragma warning(disable : 4996)
8 #endif 8 #endif
9 9
10 #include "native_client/src/trusted/plugin/plugin.h" 10 #include "native_client/src/trusted/plugin/plugin.h"
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 PLUGIN_PRINTF(("Plugin::Init:" 959 PLUGIN_PRINTF(("Plugin::Init:"
960 " WARNING: 'nacl' property is incorrect. Use 'src'.\n")); 960 " WARNING: 'nacl' property is incorrect. Use 'src'.\n"));
961 } 961 }
962 } else { 962 } else {
963 // Issue a GET for the manifest_url. The manifest file will be parsed to 963 // Issue a GET for the manifest_url. The manifest file will be parsed to
964 // determine the nexe URL. 964 // determine the nexe URL.
965 // Sets src property to full manifest URL. 965 // Sets src property to full manifest URL.
966 RequestNaClManifest(manifest_url); 966 RequestNaClManifest(manifest_url);
967 } 967 }
968 } 968 }
969 pnacl_.Initialize(this);
robertm 2011/12/12 16:23:29 This is sort of pre-existing. why is this not done
sehr (please use chromium) 2011/12/13 00:12:45 I have changed how the coordinator is instantiated
969 970
970 // Export a property to allow us to get the last error description. 971 // Export a property to allow us to get the last error description.
971 AddPropertyGet(GetLastError, "lastError", "s"); 972 AddPropertyGet(GetLastError, "lastError", "s");
972 // Export a property to allow us to get the nexe exit status. 973 // Export a property to allow us to get the nexe exit status.
973 AddPropertyGet(GetExitStatus, "exitStatus", "i"); 974 AddPropertyGet(GetExitStatus, "exitStatus", "i");
974 975
975 PLUGIN_PRINTF(("Plugin::Init (status=%d)\n", status)); 976 PLUGIN_PRINTF(("Plugin::Init (status=%d)\n", status));
976 return status; 977 return status;
977 } 978 }
978 979
(...skipping 14 matching lines...) Expand all
993 enable_dev_interfaces_(false), 994 enable_dev_interfaces_(false),
994 replayDidChangeView(false), 995 replayDidChangeView(false),
995 replayHandleDocumentLoad(false), 996 replayHandleDocumentLoad(false),
996 init_time_(0), 997 init_time_(0),
997 ready_time_(0), 998 ready_time_(0),
998 nexe_size_(0), 999 nexe_size_(0),
999 time_of_last_progress_event_(0) { 1000 time_of_last_progress_event_(0) {
1000 PLUGIN_PRINTF(("Plugin::Plugin (this=%p, pp_instance=%" 1001 PLUGIN_PRINTF(("Plugin::Plugin (this=%p, pp_instance=%"
1001 NACL_PRId32")\n", static_cast<void*>(this), pp_instance)); 1002 NACL_PRId32")\n", static_cast<void*>(this), pp_instance));
1002 NaClSrpcModuleInit(); 1003 NaClSrpcModuleInit();
1004 callback_factory_.Initialize(this);
1003 nexe_downloader_.Initialize(this); 1005 nexe_downloader_.Initialize(this);
1004 pnacl_.Initialize(this);
1005 callback_factory_.Initialize(this);
1006 } 1006 }
1007 1007
1008 1008
1009 Plugin::~Plugin() { 1009 Plugin::~Plugin() {
1010 int64_t shutdown_start = NaClGetTimeOfDayMicroseconds(); 1010 int64_t shutdown_start = NaClGetTimeOfDayMicroseconds();
1011 1011
1012 PLUGIN_PRINTF(("Plugin::~Plugin (this=%p, scriptable_handle=%p)\n", 1012 PLUGIN_PRINTF(("Plugin::~Plugin (this=%p, scriptable_handle=%p)\n",
1013 static_cast<void*>(this), 1013 static_cast<void*>(this),
1014 static_cast<void*>(scriptable_handle()))); 1014 static_cast<void*>(scriptable_handle())));
1015 1015
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
2030 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, 2030 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin,
2031 comps.scheme.len); 2031 comps.scheme.len);
2032 if (scheme == kChromeExtensionUriScheme) 2032 if (scheme == kChromeExtensionUriScheme)
2033 return SCHEME_CHROME_EXTENSION; 2033 return SCHEME_CHROME_EXTENSION;
2034 if (scheme == kDataUriScheme) 2034 if (scheme == kDataUriScheme)
2035 return SCHEME_DATA; 2035 return SCHEME_DATA;
2036 return SCHEME_OTHER; 2036 return SCHEME_OTHER;
2037 } 2037 }
2038 2038
2039 } // namespace plugin 2039 } // namespace plugin
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698