chrome.i18n.getMessage undefined

397 views
Skip to first unread message

Tao Liu

unread,
Jun 9, 2017, 6:56:27 AM6/9/17
to Chromium-dev
Hi,
    I want to access "chrome://keyboard" from content_shell webcontents, I implement a keyboad WebUIController(see Attachment). But I got:

    Uncaught TypeError: Cannot read property 'getMessage' of undefined  inputview.js:26798
    Uncaught TypeError: Cannot read property 'prototype' of undefined   inputview_adapter.js:96

   Can anyone help?

  Thanks

PhistucK

unread,
Jun 9, 2017, 9:30:41 AM6/9/17
to Tao Liu, Chromium-dev
You forgot the attachment.

I do not think content_shell supports accessing Chrome web user interface at all. Looks like some resources are missing. It might take some nontrivial effort to add support for that there (but that is just my observation, I am not developing Chrome).


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/40cef929-a74b-49aa-92a6-a76a3d2b4abe%40chromium.org.

Tao Liu

unread,
Jun 11, 2017, 10:17:37 PM6/11/17
to Chromium-dev, liuta...@gmail.com
Sorry for missing attachment. Content_shell support webui, you can see /content/browser/webui and "Creating Chrome WebUI Interfaces" and my attachment. But I didn't find which js file define the chrome.i18n.getMessage.


On Friday, June 9, 2017 at 9:30:41 PM UTC+8, PhistucK wrote:
You forgot the attachment.

I do not think content_shell supports accessing Chrome web user interface at all. Looks like some resources are missing. It might take some nontrivial effort to add support for that there (but that is just my observation, I am not developing Chrome).


PhistucK

On Fri, Jun 9, 2017 at 1:56 PM, Tao Liu <liuta...@gmail.com> wrote:
Hi,
    I want to access "chrome://keyboard" from content_shell webcontents, I implement a keyboad WebUIController(see Attachment). But I got:

    Uncaught TypeError: Cannot read property 'getMessage' of undefined  inputview.js:26798
    Uncaught TypeError: Cannot read property 'prototype' of undefined   inputview_adapter.js:96

   Can anyone help?

  Thanks

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
virtual_keyboard_ui.cc

Michael Giuffrida

unread,
Jun 12, 2017, 12:34:10 AM6/12/17
to liuta...@gmail.com, Chromium-dev
On Sun, Jun 11, 2017 at 7:18 PM Tao Liu <liuta...@gmail.com> wrote:
Sorry for missing attachment. Content_shell support webui, you can see /content/browser/webui and "Creating Chrome WebUI Interfaces" and my attachment. But I didn't find which js file define the chrome.i18n.getMessage.

chrome.i18n is an extension API. (Some WebUI pages have access to Chrome extension APIs.) Since content_shell doesn't include the extensions module at all, it won't exist there.

Can I ask what you're trying to do with content_shell?

Tao Liu

unread,
Jun 12, 2017, 2:07:29 AM6/12/17
to Chromium-dev, liuta...@gmail.com
I want to implement a virtual keyboard according to KeyboardUIContent like ChomeKeyboardUI, and i have implement my ShellKeyboardUI like  
ChomeKeyboardUI but no Extensions API. Then I want to access to webui "chrome://keyboard" to show virtual keyboard when input element focused. And now as your said, I think I can:
1 Compile extension module to content_shell
2 Do some workaround in front-end(implement extension function in javascript)
3 Implement "chrome://keyboard" with my own javascript
And Now I think mybe method 3 is reliable for me, but it will take too much time to support multi-languages. Any suggestion? 

Tao Liu

unread,
Jun 12, 2017, 7:13:49 AM6/12/17
to Chromium-dev, liuta...@gmail.com
I compile chrome/browser/extensions and chrome/browser/common to content_shell, but no Extensions API(such as chrome.i18n), so how can I compile Extensions API to content_shell.
Reply all
Reply to author
Forward
0 new messages