| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "ppapi/c/ppb_console.h" | 46 #include "ppapi/c/ppb_console.h" |
| 47 #include "ppapi/c/ppb_var.h" | 47 #include "ppapi/c/ppb_var.h" |
| 48 #include "ppapi/c/ppp_input_event.h" | 48 #include "ppapi/c/ppp_input_event.h" |
| 49 #include "ppapi/c/ppp_instance.h" | 49 #include "ppapi/c/ppp_instance.h" |
| 50 #include "ppapi/c/ppp_mouse_lock.h" | 50 #include "ppapi/c/ppp_mouse_lock.h" |
| 51 #include "ppapi/c/private/ppb_nacl_private.h" | 51 #include "ppapi/c/private/ppb_nacl_private.h" |
| 52 #include "ppapi/c/private/ppb_uma_private.h" | 52 #include "ppapi/c/private/ppb_uma_private.h" |
| 53 #include "ppapi/cpp/dev/find_dev.h" | 53 #include "ppapi/cpp/dev/find_dev.h" |
| 54 #include "ppapi/cpp/dev/printing_dev.h" | 54 #include "ppapi/cpp/dev/printing_dev.h" |
| 55 #include "ppapi/cpp/dev/selection_dev.h" | 55 #include "ppapi/cpp/dev/selection_dev.h" |
| 56 #include "ppapi/cpp/dev/text_input_dev.h" | |
| 57 #include "ppapi/cpp/dev/url_util_dev.h" | 56 #include "ppapi/cpp/dev/url_util_dev.h" |
| 58 #include "ppapi/cpp/dev/zoom_dev.h" | 57 #include "ppapi/cpp/dev/zoom_dev.h" |
| 59 #include "ppapi/cpp/image_data.h" | 58 #include "ppapi/cpp/image_data.h" |
| 60 #include "ppapi/cpp/input_event.h" | 59 #include "ppapi/cpp/input_event.h" |
| 61 #include "ppapi/cpp/module.h" | 60 #include "ppapi/cpp/module.h" |
| 62 #include "ppapi/cpp/mouse_lock.h" | 61 #include "ppapi/cpp/mouse_lock.h" |
| 63 #include "ppapi/cpp/rect.h" | 62 #include "ppapi/cpp/rect.h" |
| 63 #include "ppapi/cpp/text_input.h" |
| 64 | 64 |
| 65 namespace plugin { | 65 namespace plugin { |
| 66 | 66 |
| 67 namespace { | 67 namespace { |
| 68 | 68 |
| 69 const char* const kTypeAttribute = "type"; | 69 const char* const kTypeAttribute = "type"; |
| 70 // The "src" attribute of the <embed> tag. The value is expected to be either | 70 // The "src" attribute of the <embed> tag. The value is expected to be either |
| 71 // a URL or URI pointing to the manifest file (which is expected to contain | 71 // a URL or URI pointing to the manifest file (which is expected to contain |
| 72 // JSON matching ISAs with .nexe URLs). | 72 // JSON matching ISAs with .nexe URLs). |
| 73 const char* const kSrcManifestAttribute = "src"; | 73 const char* const kSrcManifestAttribute = "src"; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 bool Plugin::Init(int argc, char* argn[], char* argv[]) { | 310 bool Plugin::Init(int argc, char* argn[], char* argv[]) { |
| 311 PLUGIN_PRINTF(("Plugin::Init (instance=%p)\n", static_cast<void*>(this))); | 311 PLUGIN_PRINTF(("Plugin::Init (instance=%p)\n", static_cast<void*>(this))); |
| 312 | 312 |
| 313 #ifdef NACL_OSX | 313 #ifdef NACL_OSX |
| 314 // TODO(kochi): For crbug.com/102808, this is a stopgap solution for Lion | 314 // TODO(kochi): For crbug.com/102808, this is a stopgap solution for Lion |
| 315 // until we expose IME API to .nexe. This disables any IME interference | 315 // until we expose IME API to .nexe. This disables any IME interference |
| 316 // against key inputs, so you cannot use off-the-spot IME input for NaCl apps. | 316 // against key inputs, so you cannot use off-the-spot IME input for NaCl apps. |
| 317 // This makes discrepancy among platforms and therefore we should remove | 317 // This makes discrepancy among platforms and therefore we should remove |
| 318 // this hack when IME API is made available. | 318 // this hack when IME API is made available. |
| 319 // The default for non-Mac platforms is still off-the-spot IME mode. | 319 // The default for non-Mac platforms is still off-the-spot IME mode. |
| 320 pp::TextInput_Dev(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE); | 320 pp::TextInput(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE); |
| 321 #endif | 321 #endif |
| 322 | 322 |
| 323 // Remember the embed/object argn/argv pairs. | 323 // Remember the embed/object argn/argv pairs. |
| 324 argn_ = new char*[argc]; | 324 argn_ = new char*[argc]; |
| 325 argv_ = new char*[argc]; | 325 argv_ = new char*[argc]; |
| 326 argc_ = 0; | 326 argc_ = 0; |
| 327 for (int i = 0; i < argc; ++i) { | 327 for (int i = 0; i < argc; ++i) { |
| 328 if (NULL != argn_ && NULL != argv_) { | 328 if (NULL != argn_ && NULL != argv_) { |
| 329 argn_[argc_] = strdup(argn[i]); | 329 argn_[argc_] = strdup(argn[i]); |
| 330 argv_[argc_] = strdup(argv[i]); | 330 argv_[argc_] = strdup(argv[i]); |
| (...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 static_cast<uint32_t>(text.size())); | 1679 static_cast<uint32_t>(text.size())); |
| 1680 const PPB_Console* console_interface = | 1680 const PPB_Console* console_interface = |
| 1681 static_cast<const PPB_Console*>( | 1681 static_cast<const PPB_Console*>( |
| 1682 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); | 1682 module->GetBrowserInterface(PPB_CONSOLE_INTERFACE)); |
| 1683 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); | 1683 console_interface->LogWithSource(pp_instance(), PP_LOGLEVEL_LOG, prefix, str); |
| 1684 var_interface->Release(prefix); | 1684 var_interface->Release(prefix); |
| 1685 var_interface->Release(str); | 1685 var_interface->Release(str); |
| 1686 } | 1686 } |
| 1687 | 1687 |
| 1688 } // namespace plugin | 1688 } // namespace plugin |
| OLD | NEW |