Chromium Blog
News and developments from the open source browser project
Connecting Chrome apps and extensions with native applications
2013年10月15日火曜日
We
recently announced
the deprecation of
NPAPI
plug-in support in Chrome. One of the main use cases for NPAPI plugins in Chrome apps and extensions was to connect with native applications installed on the same computer. For example, a native password management application that a user has already installed on the system may want to connect with a Chrome extension to synchronize passwords. To support such use cases without the need for NPAPI, we’ve recently added the
Native Messaging API
.
To use this API, native applications must register a native messaging host that Chrome apps and extensions can connect to. This is done by installing a
special manifest file
that defines a name and path to the native messaging host binary, as well as set of app and extension IDs that can connect to it. Once a native messaging host manifest is installed, Chrome apps and extensions can connect to it using simple API:
var port = chrome.extension.connectNative( "org.chromium.native_messaging_example");
The parameter passed to
chrome.extension.connectNative()
is the name used to identify the native messaging host. When a native messaging port is created Chrome starts the host in a separate process and communicates with it over the standard input and output streams. The app or extension can send and receive messages from the native application using this simple API:
// Register handler for incoming messages.
port.onMessage.addListener(function(msg) {
console.log("Received " + msg);
});
// Send a message.
port.postMessage({text: "Hello!"})
It's also possible to send one-off messages without creating a port:
chrome.extension.sendNativeMessage(
"org.chromium.native_messaging_example",
{messageField: "field value"},
function(response) {
console.log("Received response" + response);
});
For details on how to create and register a native messaging host please refer to the
API documentation
and check out our
sample application
, which also includes a simple native messaging host.
The Native Messaging API is available on Windows, OS X and Linux starting from Chrome 29. To learn about other NPAPI alternatives, check out the
NPAPI deprecation Chromium wiki page
.
Posted by Sergey Ulanov, Software Engineer and Message Dispatcher
Chrome 31 Beta: Android Application Shortcuts, requestAutocomplete(), and PNaCl
2013年10月3日木曜日
The developer updates in today’s Chrome
Beta
enable a seamless Android web app experience, smoother web payment flows, and portable native code in desktop Chrome. Unless otherwise noted, changes apply to desktop versions of Chrome and Chrome for Android.
Application shortcuts in Chrome for Android
Application shortcuts
allow users to add website shortcuts to their Android home screen. Sites launched in this way will open in a normal Chrome for Android window, unless they include the
mobile-web-app-capable
meta tag. Those sites will instead open in a special fullscreen Chrome for Android window that doesn't display tabs, buttons, menus, or the Omnibox. Try adding a shortcut to
weight.aerotwist.com
to see this in action:
UPDATE, November 13th: Application shortcuts will now be launching in Chrome 32, not 31.
Payment requestAutocomplete() on Chrome for Android, Windows, Chrome OS
requestAutocomplete()
makes it easier for users to fill out online forms by offering web developers programmatic access to the browser’s autocomplete information (with the user’s explicit permission).
For this first release, we’ve made it work for web payments. On sites with requestAutocomplete(), users will be able to either use their existing payment data stored with the browser or enter new details through a browser-provided interface. As a developer, you can continue processing payments with your existing payment processor.
This feature will be rolling out to Beta users in Android, Windows, and Chrome OS in the coming days. A Mac version will be included in a future release.
PNaCl on desktop versions of Chrome
Over the last few years, web applications have benefited tremendously from more powerful processors and faster browsers. For developers looking to improve performance even further,
Portable Native Client
(PNaCl) now offers the ability to execute native code in the browser. Developers can compile C/C++ code--even complex existing code bases--into a single executable that runs across all desktop versions of Chrome and Chrome OS, no user installation required. PNaCl combines the portability of the web with the performance of native code. For more information, check out
gonacl.com
.
New Chrome Apps APIs
With
URL handlers for apps
,
Chrome App
developers can now specify URLs to be handled by a Chrome App. For example, a document link on a website could open a document editor Chrome App. This gives users more seamless entry points into their favorite Chrome Apps.
Directory access for Apps
allows Chrome Apps to access and write to user-approved folders. This feature can be used to share files between a Chrome App and a native app. For example, a Chrome App code editor could modify files managed by a native Git client. Check out
the demo
to see it in action.
Other new features in this release
SCTP
for WebRTC Data Channel allows P2P data transfers between browsers to be either best effort, reliable, or semi reliable, opening up use cases such as gaming.
Alpha channel support for WebM video
enables transparency masking (a.k.a. green screen effects) in WebM videos.
Speech recognition with the JavaScript Web Speech API
is now supported on Chrome for Android.
window.devicePixelRatio
now takes full-page zoom (but not pinch zoom) into account.
Support for
{ alpha: false }
in
getContext('2d')
lets you create an
opaque canvas
. This is similar to existing WebGL functionality and can improve the rendering performance of your app.
The
Media Source API
has been unprefixed and is now supported on Chrome for Android. It allows JavaScript to generate media streams for playback, addressing use cases like adaptive streaming and time shifting live streams.
2D canvas
now supports the "ellipse" method.
Support for several
Mutation Events
has been removed. Consider using
MutationObserver
instead.
Visit
chromestatus.com
for a complete overview of Chrome’s developer features, and circle
+Google Chrome Developers
for more frequent updates. We hope you enjoy this Beta release as much as we’ve enjoyed working on it!
Posted by Dan Alcantara, Software Engineer and Screen Real Estate Agent
ラベル
$200K
1
10th birthday
4
abusive ads
1
abusive notifications
2
accessibility
3
ad blockers
1
ad blocking
2
advanced capabilities
1
android
2
anti abuse
1
anti-deception
1
background periodic sync
1
badging
1
benchmarks
1
beta
83
better ads standards
1
billing
1
birthday
4
blink
2
browser
2
browser interoperability
1
bundles
1
capabilities
6
capable web
1
cds
1
cds18
2
cds2018
1
chrome
35
chrome 81
1
chrome 83
2
chrome 84
2
chrome ads
1
chrome apps
5
Chrome dev
1
chrome dev summit
1
chrome dev summit 2018
1
chrome dev summit 2019
1
chrome developer
1
Chrome Developer Center
1
chrome developer summit
1
chrome devtools
1
Chrome extension
1
chrome extensions
3
Chrome Frame
1
Chrome lite
1
Chrome on Android
2
chrome on ios
1
Chrome on Mac
1
Chrome OS
1
chrome privacy
4
chrome releases
1
chrome security
10
chrome web store
32
chromedevtools
1
chromeframe
3
chromeos
4
chromeos.dev
1
chromium
9
cloud print
1
coalition
1
coalition for better ads
1
contact picker
1
content indexing
1
cookies
1
core web vitals
2
csrf
1
css
1
cumulative layout shift
1
custom tabs
1
dart
8
dashboard
1
Data Saver
3
Data saver desktop extension
1
day 2
1
deceptive installation
1
declarative net request api
1
design
2
developer dashboard
1
Developer Program Policy
2
developer website
1
devtools
13
digital event
1
discoverability
1
DNS-over-HTTPS
4
DoH
4
emoji
1
emscriptem
1
enterprise
1
extensions
27
Fast badging
1
faster web
1
features
1
feedback
2
field data
1
first input delay
1
Follow
1
fonts
1
form controls
1
frameworks
1
fugu
2
fund
1
funding
1
gdd
1
google earth
1
google event
1
google io 2019
1
google web developer
1
googlechrome
12
harmful ads
1
html5
11
HTTP/3
1
HTTPS
4
iframes
1
images
1
incognito
1
insecure forms
1
intent to explain
1
ios
1
ios Chrome
1
issue tracker
3
jank
1
javascript
5
lab data
1
labelling
1
largest contentful paint
1
launch
1
lazy-loading
1
lighthouse
2
linux
2
Lite Mode
2
Lite pages
1
loading interventions
1
loading optimizations
1
lock icon
1
long-tail
1
mac
1
manifest v3
2
metrics
2
microsoft edge
1
mixed forms
1
mobile
2
na
1
native client
8
native file system
1
New Features
5
notifications
1
octane
1
open web
4
origin trials
2
pagespeed insights
1
pagespeedinsights
1
passwords
1
payment handler
1
payment request
1
payments
2
performance
20
performance tools
1
permission UI
1
permissions
1
play store
1
portals
3
prefetching
1
privacy
2
privacy sandbox
4
private prefetch proxy
1
profile guided optimization
1
progressive web apps
2
Project Strobe
1
protection
1
pwa
1
QUIC
1
quieter permissions
1
releases
3
removals
1
rlz
1
root program
1
safe browsing
2
Secure DNS
2
security
36
site isolation
1
slow loading
1
sms receiver
1
spam policy
1
spdy
2
spectre
1
speed
4
ssl
2
store listing
1
strobe
2
subscription pages
1
suspicious site reporter extension
1
TCP
1
the fast and the curious
23
TLS
1
tools
1
tracing
1
transparency
1
trusted web activities
1
twa
2
user agent string
1
user data policy
1
v8
6
video
2
wasm
1
web
1
web apps
1
web assembly
2
web developers
1
web intents
1
web packaging
1
web payments
1
web platform
1
web request api
1
web vitals
1
web.dev
1
web.dev live
1
webapi
1
webassembly
1
webaudio
3
webgl
7
webkit
5
WebM
1
webmaster
1
webp
5
webrtc
6
websockets
5
webtiming
1
writable-files
1
yerba beuna center for the arts
1
Archive
2024
12月
8月
6月
5月
4月
3月
2月
2023
11月
10月
9月
8月
6月
5月
4月
2月
2022
12月
9月
8月
6月
5月
4月
3月
2月
1月
2021
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2020
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2019
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2018
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2017
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2016
12月
11月
10月
9月
8月
6月
5月
4月
3月
2月
1月
2015
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2014
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2013
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2012
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2011
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2010
12月
11月
10月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2009
12月
11月
9月
8月
7月
6月
5月
4月
3月
2月
1月
2008
12月
11月
10月
9月
Feed
Follow @ChromiumDev
Give us feedback in our
Product Forums
.