みんなの知らないChrome appsの世界

Post on 17-Feb-2017

535 views 0 download

Transcript of みんなの知らないChrome appsの世界

みんなの知らない Chrome Apps の世界The world of Chrome Apps everyone don't knowGoogle Developers Meetup #2

History of Chrome Apps

May 10, 2011

Chrome OS released

1st Chromebook released

July 16, 2012

Chrome Packaged Apps were enabled by default.

September 5, 2013

The name was changed to Chrome Apps

June 26, 2014

Native Client Library

June 26, 2014

Chrome Dev Editor

April 7, 2015

ARC Welder

Are you using Chrome Apps?

Are you developing Chrome Apps?

manifest.json

{ "manifest_version": 2, "name": "Hello, world", "version": "1.0", "app": { "background": { "scripts": ["background.js"] } }, "icons": { "16": "16.png", "128": "128.png" }}

background.js

chrome.app.runtime.onLaunched.addListener( function() { chrome.app.window.create( "window.html", { "outerBounds": { width: 400, height: 500 } } ); });

window.html

<!DOCTYPE html>

<html> <head> </head> <body> <div>Hello, world!</div> </body></html>

Yo!

(After installing node.js ...)$ sudo npm install -g yo$ sudo npm install -g generator-chromeapp$ make simple_app$ cd simple_app$ yo chromeapp(Type ENTER key for all questions ...)

Yo!

.├── Gruntfile.js├── app│ ├── _locales│ │ └── en│ │ └── messages.json│ ├── bower_components│ ├── images│ │ ├── icon-128.png│ │ └── icon-16.png│ ├── index.html│ ├── manifest.json│ ├── scripts│ │ ├── chromereload.js│ │ ├── index.js│ │ └── main.js│ └── styles│ └── main.css├── bower.json└── package.json

Installing

Installing

Installing

Installing

.├── _locales│ └── ...├── _metadata│ └── ...├── css│ └── ...├── html│ └── ...├── images│ ├── dev│ │ └── ...│ ├── ...│ └── stable│ └── ...

├── js│ └── ...├── manifest.json└── plugin └── pnacl ├── ssh_client.nmf ├── ssh_client_nl_arm.nexe ├── ssh_client_nl_x86_32.nexe └── ssh_client_nl_x86_64.nexe

.├── _metadata│ └── ...├── data│ ├── data.unity3d│ └── unity_nacl_files│ ├── License│ │ ├── COPYING.LIB│ │ └── README│ ├── i686│ │ ├── libc.so│ │ ├── libdl.so│ │ ├── libgcc_s.so│ │ ├── libm.so│ │ ├── libmono-2.0.so│ │ ├── libnacl_dyncode.so│ │ ├── libppapi_cpp.so│ │ ├── libppapi_gles2.so│ │ ├── libpthread.so│ │ ├── librt.so│ │ ├── libstdc++.so│ │ ├── runnable-ld.so│ │ └── unity.nexe│ ├── nacl_resources.unity3d│ ├── unity.nmf│ ├── unity_nacl.js

│ ├── unitylogo.png│ ├── unityprogress.png│ ├── unityprogressframe.png│ └── x86_64│ ├── libc.so│ ├── libdl.so│ ├── libgcc_s.so│ ├── libm.so│ ├── libmono-2.0.so│ ├── libnacl_dyncode.so│ ├── libppapi_cpp.so│ ├── libppapi_gles2.so│ ├── libpthread.so│ ├── librt.so│ ├── libstdc++.so│ ├── runnable-ld.so│ └── unity.nexe├── images│ └── ...├── js│ ├── jquery.js│ ├── json.js│ ├── silvertree.js│ └── silvertree.js~├── manifest.json└── ...

What APIs can we use?

accessibilityFeatures, alarms, app.runtime, app.window, bluetooth, bluetoothLowEnergy, bluetoothSocket, browser, commands, contextMenus, documentScan, events, extensionTypes, fileSystem, gcm, hid, i18n, identity, idle, instanceID, mdns, mediaGalleries, notifications, permissions, power, printerProvider, runtime, serial, socket, sockets.tcp, sockets.tcpServer, sockets.udp, storage, syncFileSystem, system.cpu, system.display, system.memory, system.network, system.storage, tts, types, usb, vpnProvider, wallpaper

accessibilityFeatures, alarms, app.runtime, app.window, bluetooth, bluetoothLowEnergy, bluetoothSocket, browser, commands, contextMenus, documentScan, events, extensionTypes, fileSystem, gcm, hid, i18n, identity, idle, instanceID, mdns, mediaGalleries, notifications, permissions, power, printerProvider, runtime, serial, socket, sockets.tcp, sockets.tcpServer, sockets.udp, storage, syncFileSystem, system.cpu, system.display, system.memory, system.network, system.storage, tts, types, usb, vpnProvider, wallpaper

accessibilityFeatures, alarms, app.runtime, app.window, bluetooth, bluetoothLowEnergy, bluetoothSocket, browser, commands, contextMenus, documentScan, events, extensionTypes, fileSystem, gcm, hid, i18n, identity, idle, instanceID, mdns, mediaGalleries, notifications, permissions, power, printerProvider, runtime, serial, socket, sockets.tcp, sockets.tcpServer, sockets.udp, storage, syncFileSystem, system.cpu, system.display, system.memory, system.network, system.storage, tts, types, usb, vpnProvider, wallpaper

https://chrome.google.com/webstore/detail/cog-system-info-viewer/difcjdggkffcfgcfconafogflmmaadco

Cog - System Info Viewer

sockets.tcp

We can develop ANYTHINGas Chrome Apps!

I must prove that!

https://github.com/yoichiro/mysql_js_driver

https://dev.mysql.com/doc/internals/en/client-server-protocol.html

https://github.com/yoichiro/mysql_js_driver/blob/master/src/mysql_types.js

https://github.com/yoichiro/chrome_mysql_console

https://github.com/yoichiro/chrome_mysql_admin

ChromeMyAdmin

sockets.tcp

digitalbazaar/forge (TLS)

libssh2 (NaCl Module)

AngularJS + ng-grid

jcanvas

jqplot

fileSystemProvider

https://github.com/yoichiro/chromeos-filesystem-dropbox

For Dropbox

Identity API

Dropbox Core API (Ajax)

https://github.com/yoichiro/chromeos-filesystem-sftp

For SFTP

nacl_io

libssh2 (NaCl Module)

https://github.com/yoichiro/chromeos-filesystem-sftp/blob/master/app/nacl_src/read_file_command.cc

For Windows

sockets.tcp

SMB1 / CIFS / SMB2

NTLMSSP

DCE/RPC

Domain / Workgroup

https://github.com/yoichiro/chromeos-filesystem-cifs

https://github.com/yoichiro/chromeos-filesystem-cifs/blob/master/app/scripts/smb_client/dce_rpc/dcerpc_bind.js

Other apps I'm using...

Pixlr Editor

https://chrome.google.com/webstore/detail/pixlr-editor/icmaknaampgiegkcjlimdiidlhopknpk?utm_source=chrome-ntp-icon

Text

https://chrome.g1oogle.com/webstore/detail/text/mmfbcljfglbokpmkimbfghdkjmjhdgbg

LINE

https://chrome.google.com/webstore/detail/line/menkifleemblimdogmoihpfopnplikde

Chrome Dev Editor

https://chrome.google.com/webstore/detail/chrome-dev-editor-develop/pnoffddplpippgcfjdhbmhkofpnaalpg

Chrome Apps= Can do anything!

https://developer.chrome.com/apps/first_app

Many users in the world are waiting Chrome App you create.

Any questions?