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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "ppapi/c/dev/ppp_zoom_dev.h" | 60 #include "ppapi/c/dev/ppp_zoom_dev.h" |
61 #include "ppapi/c/pp_errors.h" | 61 #include "ppapi/c/pp_errors.h" |
62 #include "ppapi/c/ppp_input_event.h" | 62 #include "ppapi/c/ppp_input_event.h" |
63 #include "ppapi/c/ppp_instance.h" | 63 #include "ppapi/c/ppp_instance.h" |
64 #include "ppapi/c/ppp_mouse_lock.h" | 64 #include "ppapi/c/ppp_mouse_lock.h" |
65 #include "ppapi/c/private/ppb_uma_private.h" | 65 #include "ppapi/c/private/ppb_uma_private.h" |
66 #include "ppapi/cpp/dev/find_dev.h" | 66 #include "ppapi/cpp/dev/find_dev.h" |
67 #include "ppapi/cpp/dev/printing_dev.h" | 67 #include "ppapi/cpp/dev/printing_dev.h" |
68 #include "ppapi/cpp/dev/scrollbar_dev.h" | 68 #include "ppapi/cpp/dev/scrollbar_dev.h" |
69 #include "ppapi/cpp/dev/selection_dev.h" | 69 #include "ppapi/cpp/dev/selection_dev.h" |
| 70 #include "ppapi/cpp/dev/text_input_dev.h" |
70 #include "ppapi/cpp/dev/url_util_dev.h" | 71 #include "ppapi/cpp/dev/url_util_dev.h" |
71 #include "ppapi/cpp/dev/widget_client_dev.h" | 72 #include "ppapi/cpp/dev/widget_client_dev.h" |
72 #include "ppapi/cpp/dev/zoom_dev.h" | 73 #include "ppapi/cpp/dev/zoom_dev.h" |
73 #include "ppapi/cpp/image_data.h" | 74 #include "ppapi/cpp/image_data.h" |
74 #include "ppapi/cpp/input_event.h" | 75 #include "ppapi/cpp/input_event.h" |
75 #include "ppapi/cpp/module.h" | 76 #include "ppapi/cpp/module.h" |
76 #include "ppapi/cpp/mouse_lock.h" | 77 #include "ppapi/cpp/mouse_lock.h" |
77 #include "ppapi/cpp/rect.h" | 78 #include "ppapi/cpp/rect.h" |
78 | 79 |
79 using ppapi_proxy::BrowserPpp; | 80 using ppapi_proxy::BrowserPpp; |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 } | 573 } |
573 return main_subprocess_.Invoke(method_id, params); | 574 return main_subprocess_.Invoke(method_id, params); |
574 } | 575 } |
575 | 576 |
576 bool Plugin::Init(BrowserInterface* browser_interface, | 577 bool Plugin::Init(BrowserInterface* browser_interface, |
577 int argc, | 578 int argc, |
578 char* argn[], | 579 char* argn[], |
579 char* argv[]) { | 580 char* argv[]) { |
580 PLUGIN_PRINTF(("Plugin::Init (instance=%p)\n", static_cast<void*>(this))); | 581 PLUGIN_PRINTF(("Plugin::Init (instance=%p)\n", static_cast<void*>(this))); |
581 | 582 |
| 583 #ifdef NACL_OSX |
| 584 // TODO(kochi): For crbug.com/102808, this is a stopgap solution for Lion |
| 585 // until we expose IME API to .nexe. This disables any IME interference |
| 586 // against key inputs, so you cannot use off-the-spot IME input for NaCl apps. |
| 587 // This makes discrepancy among platforms and therefore we should remove |
| 588 // this hack when IME API is made available. |
| 589 // The default for non-Mac platforms is still off-the-spot IME mode. |
| 590 pp::TextInput_Dev(this).SetTextInputType(PP_TEXTINPUT_TYPE_NONE); |
| 591 #endif |
| 592 |
582 browser_interface_ = browser_interface; | 593 browser_interface_ = browser_interface; |
583 // Remember the embed/object argn/argv pairs. | 594 // Remember the embed/object argn/argv pairs. |
584 argn_ = new(std::nothrow) char*[argc]; | 595 argn_ = new(std::nothrow) char*[argc]; |
585 argv_ = new(std::nothrow) char*[argc]; | 596 argv_ = new(std::nothrow) char*[argc]; |
586 argc_ = 0; | 597 argc_ = 0; |
587 for (int i = 0; i < argc; ++i) { | 598 for (int i = 0; i < argc; ++i) { |
588 if (NULL != argn_ && NULL != argv_) { | 599 if (NULL != argn_ && NULL != argv_) { |
589 argn_[argc_] = strdup(argn[i]); | 600 argn_[argc_] = strdup(argn[i]); |
590 argv_[argc_] = strdup(argv[i]); | 601 argv_[argc_] = strdup(argv[i]); |
591 if (NULL == argn_[argc_] || NULL == argv_[argc_]) { | 602 if (NULL == argn_[argc_] || NULL == argv_[argc_]) { |
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2019 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, | 2030 std::string scheme = canonicalized.AsString().substr(comps.scheme.begin, |
2020 comps.scheme.len); | 2031 comps.scheme.len); |
2021 if (scheme == kChromeExtensionUriScheme) | 2032 if (scheme == kChromeExtensionUriScheme) |
2022 return SCHEME_CHROME_EXTENSION; | 2033 return SCHEME_CHROME_EXTENSION; |
2023 if (scheme == kDataUriScheme) | 2034 if (scheme == kDataUriScheme) |
2024 return SCHEME_DATA; | 2035 return SCHEME_DATA; |
2025 return SCHEME_OTHER; | 2036 return SCHEME_OTHER; |
2026 } | 2037 } |
2027 | 2038 |
2028 } // namespace plugin | 2039 } // namespace plugin |
OLD | NEW |