OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2011 The Native Client 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 | 6 |
7 #ifdef _MSC_VER | 7 #ifdef _MSC_VER |
8 // Do not warn about use of std::copy with raw pointers. | 8 // Do not warn about use of std::copy with raw pointers. |
9 #pragma warning(disable : 4996) | 9 #pragma warning(disable : 4996) |
10 #endif | 10 #endif |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 PLUGIN_PRINTF(("PluginPpapi::StartProxiedExecution (did_create=%d)\n", | 872 PLUGIN_PRINTF(("PluginPpapi::StartProxiedExecution (did_create=%d)\n", |
873 did_create)); | 873 did_create)); |
874 if (did_create == PP_FALSE) { | 874 if (did_create == PP_FALSE) { |
875 error_info->SetReport(ERROR_START_PROXY, | 875 error_info->SetReport(ERROR_START_PROXY, |
876 "could not create instance."); | 876 "could not create instance."); |
877 return false; | 877 return false; |
878 } | 878 } |
879 | 879 |
880 ppapi_proxy_ = ppapi_proxy.release(); | 880 ppapi_proxy_ = ppapi_proxy.release(); |
881 | 881 |
882 // TODO(dmichael): Remove the scripting proxy code entirely. | |
883 #ifndef PPAPI_INSTANCE_REMOVE_SCRIPTING | |
884 ScriptableHandlePpapi* handle = | |
885 static_cast<ScriptableHandlePpapi*>(scriptable_handle()); | |
886 PP_Var scriptable_proxy = | |
887 instance_interface->GetInstanceObject(pp_instance()); | |
888 handle->set_scriptable_proxy(pp::Var(pp::Var::PassRef(), scriptable_proxy)); | |
889 #endif | |
890 | |
891 // Create PPP* interface adapters to forward calls to .nexe. | 882 // Create PPP* interface adapters to forward calls to .nexe. |
892 find_adapter_.reset(new(std::nothrow) FindAdapter(this)); | 883 find_adapter_.reset(new(std::nothrow) FindAdapter(this)); |
893 printing_adapter_.reset(new(std::nothrow) PrintingAdapter(this)); | 884 printing_adapter_.reset(new(std::nothrow) PrintingAdapter(this)); |
894 selection_adapter_.reset(new(std::nothrow) SelectionAdapter(this)); | 885 selection_adapter_.reset(new(std::nothrow) SelectionAdapter(this)); |
895 widget_client_adapter_.reset(new(std::nothrow) WidgetClientAdapter(this)); | 886 widget_client_adapter_.reset(new(std::nothrow) WidgetClientAdapter(this)); |
896 zoom_adapter_.reset(new(std::nothrow) ZoomAdapter(this)); | 887 zoom_adapter_.reset(new(std::nothrow) ZoomAdapter(this)); |
897 | 888 |
898 // Replay missed events. | 889 // Replay missed events. |
899 if (replayDidChangeView) { | 890 if (replayDidChangeView) { |
900 replayDidChangeView = false; | 891 replayDidChangeView = false; |
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, | 1485 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, |
1495 comps.scheme.len); | 1486 comps.scheme.len); |
1496 if (scheme == kChromeExtensionUriScheme) | 1487 if (scheme == kChromeExtensionUriScheme) |
1497 return SCHEME_CHROME_EXTENSION; | 1488 return SCHEME_CHROME_EXTENSION; |
1498 if (scheme == kDataUriScheme) | 1489 if (scheme == kDataUriScheme) |
1499 return SCHEME_DATA; | 1490 return SCHEME_DATA; |
1500 return SCHEME_OTHER; | 1491 return SCHEME_OTHER; |
1501 } | 1492 } |
1502 | 1493 |
1503 } // namespace plugin | 1494 } // namespace plugin |
OLD | NEW |