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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
846 PLUGIN_PRINTF(("PluginPpapi::StartProxiedExecution (did_create=%d)\n", | 846 PLUGIN_PRINTF(("PluginPpapi::StartProxiedExecution (did_create=%d)\n", |
847 did_create)); | 847 did_create)); |
848 if (did_create == PP_FALSE) { | 848 if (did_create == PP_FALSE) { |
849 error_info->SetReport(ERROR_START_PROXY, | 849 error_info->SetReport(ERROR_START_PROXY, |
850 "could not create instance."); | 850 "could not create instance."); |
851 return false; | 851 return false; |
852 } | 852 } |
853 | 853 |
854 ppapi_proxy_ = ppapi_proxy.release(); | 854 ppapi_proxy_ = ppapi_proxy.release(); |
855 | 855 |
856 // TODO(dmichael): Remove the scripting proxy code entirely. | |
857 #ifndef PPAPI_INSTANCE_REMOVE_SCRIPTING | |
858 ScriptableHandlePpapi* handle = | |
859 static_cast<ScriptableHandlePpapi*>(scriptable_handle()); | |
860 PP_Var scriptable_proxy = | |
861 instance_interface->GetInstanceObject(pp_instance()); | |
862 handle->set_scriptable_proxy(pp::Var(pp::Var::PassRef(), scriptable_proxy)); | |
863 #endif | |
864 | |
865 // Create PPP* interface adapters to forward calls to .nexe. | 856 // Create PPP* interface adapters to forward calls to .nexe. |
866 find_adapter_.reset(new(std::nothrow) FindAdapter(this)); | 857 find_adapter_.reset(new(std::nothrow) FindAdapter(this)); |
867 printing_adapter_.reset(new(std::nothrow) PrintingAdapter(this)); | 858 printing_adapter_.reset(new(std::nothrow) PrintingAdapter(this)); |
868 selection_adapter_.reset(new(std::nothrow) SelectionAdapter(this)); | 859 selection_adapter_.reset(new(std::nothrow) SelectionAdapter(this)); |
869 widget_client_adapter_.reset(new(std::nothrow) WidgetClientAdapter(this)); | 860 widget_client_adapter_.reset(new(std::nothrow) WidgetClientAdapter(this)); |
870 zoom_adapter_.reset(new(std::nothrow) ZoomAdapter(this)); | 861 zoom_adapter_.reset(new(std::nothrow) ZoomAdapter(this)); |
871 | 862 |
872 // Replay missed events. | 863 // Replay missed events. |
873 if (replayDidChangeView) { | 864 if (replayDidChangeView) { |
874 replayDidChangeView = false; | 865 replayDidChangeView = false; |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, | 1422 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, |
1432 comps.scheme.len); | 1423 comps.scheme.len); |
1433 if (scheme == kChromeExtensionUriScheme) | 1424 if (scheme == kChromeExtensionUriScheme) |
1434 return SCHEME_CHROME_EXTENSION; | 1425 return SCHEME_CHROME_EXTENSION; |
1435 if (scheme == kDataUriScheme) | 1426 if (scheme == kDataUriScheme) |
1436 return SCHEME_DATA; | 1427 return SCHEME_DATA; |
1437 return SCHEME_OTHER; | 1428 return SCHEME_OTHER; |
1438 } | 1429 } |
1439 | 1430 |
1440 } // namespace plugin | 1431 } // namespace plugin |
OLD | NEW |