OLD | NEW |
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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 plugin::FileDownloader*&, | 1786 plugin::FileDownloader*&, |
1787 pp::VarPrivate&); | 1787 pp::VarPrivate&); |
1788 void Plugin::XYZZY(const nacl::string& url, | 1788 void Plugin::XYZZY(const nacl::string& url, |
1789 pp::VarPrivate js_callback) { | 1789 pp::VarPrivate js_callback) { |
1790 UNREFERENCED_PARAMETER(url); | 1790 UNREFERENCED_PARAMETER(url); |
1791 UNREFERENCED_PARAMETER(js_callback); | 1791 UNREFERENCED_PARAMETER(js_callback); |
1792 pp::CompletionCallback open_callback = | 1792 pp::CompletionCallback open_callback = |
1793 callback_factory_.NewRequiredCallback(pmem, | 1793 callback_factory_.NewRequiredCallback(pmem, |
1794 reinterpret_cast<plugin::FileDownloader*>(NULL), | 1794 reinterpret_cast<plugin::FileDownloader*>(NULL), |
1795 js_callback); | 1795 js_callback); |
| 1796 static_cast<void>(open_callback); |
1796 } | 1797 } |
1797 #endif // HACK_FOR_MACOS_HANG_REMOVED | 1798 #endif // HACK_FOR_MACOS_HANG_REMOVED |
1798 | 1799 |
1799 | 1800 |
1800 void Plugin::ReportLoadSuccess(LengthComputable length_computable, | 1801 void Plugin::ReportLoadSuccess(LengthComputable length_computable, |
1801 uint64_t loaded_bytes, | 1802 uint64_t loaded_bytes, |
1802 uint64_t total_bytes) { | 1803 uint64_t total_bytes) { |
1803 // Set the readyState attribute to indicate loaded. | 1804 // Set the readyState attribute to indicate loaded. |
1804 set_nacl_ready_state(DONE); | 1805 set_nacl_ready_state(DONE); |
1805 // Inform JavaScript that loading was successful and is complete. | 1806 // Inform JavaScript that loading was successful and is complete. |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, | 2003 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, |
2003 comps.scheme.len); | 2004 comps.scheme.len); |
2004 if (scheme == kChromeExtensionUriScheme) | 2005 if (scheme == kChromeExtensionUriScheme) |
2005 return SCHEME_CHROME_EXTENSION; | 2006 return SCHEME_CHROME_EXTENSION; |
2006 if (scheme == kDataUriScheme) | 2007 if (scheme == kDataUriScheme) |
2007 return SCHEME_DATA; | 2008 return SCHEME_DATA; |
2008 return SCHEME_OTHER; | 2009 return SCHEME_OTHER; |
2009 } | 2010 } |
2010 | 2011 |
2011 } // namespace plugin | 2012 } // namespace plugin |
OLD | NEW |