Introducing TCP Listen, a new API for Chrome packaged apps

Friday, November 02, 2012

Labels:

Chrome packaged apps aim to deliver an app experience with the appearance and capabilities of native apps, but built using the growing capabilities of HTML5. These apps can access APIs for better filesystem handling, direct access to hardware devices, raw network communication and many others. One of the new APIs that just landed in an experimental state is TCP Listen, which allows an app to accept incoming TCP connections.

Since the developer preview launch earlier this year, Chrome packaged apps have been able to connect to remote servers using TCP or UDP, and bind to a UDP port. For example, this Media Center application searches for and connects to media servers in the local network. Now, through the new TCP Listen API, a Chrome packaged app can also act as a TCP server itself and accept incoming connections on specified ports.

You can use this API, for example, to create a HTTP server on a development environment application, to automate a browser window for page load testing (see image below) or even to augment the Media Center application with a DLNA®/UPnP media server and show your PicasaWeb pictures on your DLNA® enabled television.



To get started, clone this GitHub repository and look at the webserver and the TCP server samples. You may also want to watch the Chrome Apps Office Hours where we specifically talk about the TCP Listen API.

We are curious to see what clever ideas you will come up with. Have questions or comments? Subscribe to chromium-apps and let us know!

Smarter NPAPI installs from the Chrome Web Store

Wednesday, October 31, 2012

Labels:

Chrome Web Store developers can create and distribute apps and extensions that use NPAPI plug-ins. However, platforms such as ChromeOS and Windows 8 don’t support NPAPI. Today, we’re making the installation of apps and extensions that use NPAPI smarter, to help users avoid installing items that they can’t use on their particular platform.

If a user visits the Chrome Web Store on a platform that doesn’t support NPAPI, the store will filter out all items that use it from the home page and the various category pages. These apps and extensions will still show up in search results, and can be visited from direct URL links, but the Details dialog for each item will display a message that the app or the extension in question cannot be installed and the Install button will be disabled.

If you are a developer whose apps or extensions use NPAPI but can still work without it, we’ve provided a way for you to prevent your items from being filtered out. In your manifest.json file under the requirements section, specify the “npapi” flag like this:

"requirements": {
   "plugins": {
       "npapi": false
    }
 }

This will allow your apps and extensions to continue to be available to users on platforms that don’t support NPAPI. If your plug-in doesn’t have any explicit dependencies on the underlying OS, then you should really consider porting it to Native Client, which provides improved portability and security and runs just great on Windows 8 and ChromeOS.

Have any questions or comments about NPAPI? You can reach us on our developer forum for all of your store-related questions.

Do more with Chrome Developer Tools

Tuesday, October 23, 2012

Labels:

The Chrome Developer Tools team recently launched new features and made several UI changes to improve your development and debugging workflow.

Develop for mobile 

Since we launched Chrome for Android, you’ve been able to use Chrome Developer Tools to debug and profile mobile web pages and web apps.

Today, we take this feature one step further by introducing device emulation support in Chrome Developer Tools. Device emulation includes, among other things, native User Agent and dimension overriding. This allows developers to debug mobile browsers on different devices and operating systems via the Settings Menu. So, now, you can emulate the exact device metrics of devices like the Galaxy Nexus and the iPhone to test your media query-driven design.

Chrome Developer Tools also supports single touch event emulation to make it easier to debug mobile applications on the desktop.

Profile rendering performance 

The Timeline’s Frame Mode feature now allows you to profile Chrome’s rendering performance, remove the jank and deliver the silky smooth performance users expect from your apps. To learn more about this topic, check out the recent "Jank Busters" video from Google I/O.



Preview your log items

The console now prints a user-friendly snapshot of the object properties taken at log time, whereas by expanding the object manually, you can still see its live content. This is especially useful when logging an object in a loop and observing its mutation. With this change, we resolved a longstanding bug many of you prioritized on crbug.com.



Play with experimental features

You can now try new experimental features in Chrome Developer Tools by visiting chrome:flags and enabling them there. Once you do that, a new tab called “Experiments” will be visible in the settings menu, allowing you to enable and use any of the following experiments:

  • Snippets (essentially multi-line console on steroids) 
  • Source mapping support for SASS 
  • Native memory profiling 
  • Geolocation / orientation override 
  • FileSystem inspection 
  • Canvas inspection 
  • CPU activity in Timeline 
  • CSS Regions support 
Some of these experimental features are almost ready while others have just landed and need some more refining. In either case, we’d love your feedback before we bake these fully in Chrome Developer Tools. You can also read our recently updated contribution guide if you’re interested in helping us make the tools better.

To get more information on all of Chrome Developer Tools features, check out our “Chrome Developer Tools Evolution” talk at the I/O 2012. You can also follow Google Chrome Developers on Google+ or @ChromiumDev on Twitter for more news on changes landing in Chrome Developer Tools.

New site ownership verification option in CWS

Friday, October 19, 2012

Labels:

To publish an app in the Chrome Web Store, developers need to prove they own the domain that hosts their application. Until recently, the only way to do this was through Google’s Webmaster Tools. Today, we are simplifying the process further by allowing you use Google's site verification service to prove your association with a verified site.

Suppose you want to publish an app on the Chrome Web Store and have it associated with your company’s existing site, but you don’t have the ability to use any of the current verification methods e.g. you’re not allowed to upload a verification file to the root directory. The site verification service option in the edit page for each item listed in your Chrome Web Store developer dashboard allows you to request association of your app with your organization’s site:



When you choose an existing site from the drop-down menu or click “Add a new site”, the current registered owner for the site will receive a notification of your request to be associated. The owner can see who is making the request, and then approve or deny the request appropriately. That’s all there is to it! (Note: if this checkbox isn’t available, it may be because there’s no current owner of the site or you already have an outstanding association request).

We hope that this new feature will further streamline the process for publishing new apps on the Chrome Web Store, and allows you to focus more on developing your app and less on process. Have any questions or comments about using Google’s site verification service? You can reach us on our developer forum for store-related questions or head on over to the Webmaster Help forum.

A better developer experience for Native Client

Wednesday, October 17, 2012

Labels:

Native Client (NaCl) enables you to write high-performance apps that run your C and C++ code in the browser. With the new Native Client add-in for Microsoft Visual Studio and the new Native Client debugger it just got a lot easier.

The Visual Studio add-in makes it easy to set up, build, run, and debug your app as a Pepper plug-in and as a Native Client module. If you are porting an existing application to Native Client, building as a Pepper plug-in is a convenient intermediate stage for development enabling you to gradually rewrite the app to use the Pepper APIs (video).



The Native Client debugger, affectionately called nacl-gdb, works on Windows, Mac, and Linux and is now available in the SDK. So whatever your development platform, you can now spend more time coding features and less time chasing bugs with printf.

Following the Native Client philosophy of being OS-independent and open source, nacl-gdb is based on... well... gdb! For those of you who are not excited by a text interface, the Visual Studio add-in makes interacting with the debugger easier. If you use a different development environment that can interact with gdb, you can point it to nacl-gdb and use the same commands plus some additional NaCl-specific commands.



Whether you’re an existing Native Client developer or thinking about using Native Client for your next project, now is a great time to grab the SDK, write an amazing app, and quickly squash any bugs you find. We look forward to questions on Stack Overflow and ideas and comments in the discussion forum.

Celebrating Dart’s birthday with the first release of the Dart SDK

Tuesday, October 16, 2012

Labels:

A year ago we released a technology preview of Dart, a project that includes a modern language, libraries and tools for building complex web applications. Today, after plowing through thousands of bug reports and feature requests from the web community, a new, more stable and comprehensive version of Dart is now available and ready to use.

With this version of the Dart SDK, we’ve made several improvements and added many features:

Over the following months, we will continue to work hard to evolve the SDK, improve Dart’s robustness and performance, and fine-tune the language while maintaining backwards compatibility.



You can download the Dart Editor from dartlang.org. It comes with a copy of the open-source SDK and Dartium. Thanks again for all your feedback - keep it coming.

Posted by Lars Bak, Software Engineer

mod_pagespeed is now out of beta

Wednesday, October 10, 2012

If you are as obsessed with the speed of your web pages as we are, then you may have heard of mod_pagespeed, an Apache module that automatically optimizes your web pages for performance. Since we introduced mod_pagespeed in 2010, we’ve been focused on improving its functionality, to help developers increase the performance of their web pages. Today, after 18 releases, mod_pagespeed is now officially out of beta.



More than 120,000 sites are already using mod_pagespeed to take advantage of the latest performance optimization techniques. To learn more about mod_pagespeed and how to incorporate it in your site, watch our recent Google Developers Live session or visit the mod_pagespeed developer documentation site.