SlideShare a Scribd company logo
Chrome Apps & Extension
About Me

Varun Raj
Web Developer | Internet Addict |
Android Fan Boy | Techie | Engineering

Student
Chrome Extensions and Apps
Looking beyond browsing on Chrome
What is an Extension?

•
•
•
•

A compressed package
Extends the functionality of the browser
Minimal or No UI

Usually enhances functionality of websites or web apps
What is an App?

•
•
•
•

Runs inside your browser
Has a Dedicated User Interface
Rich User Interaction

Ex. Games and Photo Editors
What an Extension contains?

•
•
•
•
•

manifest.json
browser action or page action
content script - CSS/JS

background pages
Other media files
Extension UIs

Browser Action

Page Action
Layout of an Extension
chrome - top-level object & is exposed to extensions

•
•
•
•
•
•
•

chrome.extension.*

chrome.browserAction.*
chrome.pageAction.*
chrome.windows.*
chrome.tabs.*
chrome.bookmarks.*

Does not access much of the native code
Manifest.json
For details, see Manifest Files.
{

JSON

"manifest_version": 2,
"name": “HUG Chennai",
"description": "This is a sample app",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png", "default_popup": "popup.html"
},
"permissions": [
"https://secure.flickr.com/"
]
}
Architecture

•
•

The background page

UI pages
Background Pages

•
•

Persistent Background Pages
Event Pages
UI Pages

•
•
•

Written in HTML
Provides the UI for an Extension
Ex. popup.html
Content Script

•
•
•

Part of the loaded page
Injects contents into the page using scripts
Exchange messages to parent script
Where are extensions stored?
http://dev.chromium.org/user-experience/user-data-directory

Windows :
%userprofile%Local SettingsApplication DataGoogleChromeUser DataDefaultExtensions

or
C:Documents and SettingsAdminLocal SettingsApplication DataGoogleChromeUser
DataDefaultExtensions

Linux :

~/.config/google-chrome/Default/Extensions/

Mac OSX :

~/Library/Application Support/Google/Chrome/Default

File:///
Demo Time !
Nothing works!
• Refused to load script from 'http://code.jquery.com/jquery-latest.js' because of
Content-Security-Policy.
• Refused to execute inline script because of Content-Security-Policy.
• Refused to execute inline event handler because of Content-Security-Policy.
Need to:
• Load external scripts over HTTPS
• Extract own scripts to .js files
• Remove inline event handlers
CSP-ready extension
<!DOCTYPE html>
<html>
<head><title>ManifestLint</title>
<script src="https://ajax.googleapis.com/.../jquery.min.js"
type="text/javascript"></script>
<script src="main.js" type="text/javascript"></script>
</head>
<body>
...

HTML
Chrome Apps
The App Architecture
Links
• Manifest versions:
o

http://code.google.com/chrome/extensions/manifestVersion.html

• Content Security Policy:
o

http://code.google.com/chrome/extensions/contentSecurityPolicy.html

• HTML5 sandbox attribute for iframes:
o

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-

iframe-element.html#attr-iframe-sandbox
Creating an App
1. Create manifest.json
2. Create the background script
3. Create the window page

4. Create the icons
5. Enable Chrome Flags: chrome://flags - Experimental Extension APIs
6. Load the app as Unpacked Extension
Making money out of Chrome Apps
● In-App Purchases
● Google Wallet
Thank You !
Contact Me
mailme@varunraj.in

More Related Content

What's hot

Chrome extension development
Chrome extension developmentChrome extension development
Chrome extension development
Mārtiņš Balodis
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions
Ahmad Tahhan
 
Build your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJSBuild your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJS
flrent
 
Orange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox ExtensionOrange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox Extension
chaykaborya
 
Google chrome extension
Google chrome extensionGoogle chrome extension
Google chrome extensionJohnny Kingdom
 
Develop Chrome Extension
Develop Chrome ExtensionDevelop Chrome Extension
Develop Chrome Extension
Aleksandr Golovatyi
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09
mihaiionescu
 
Browser extension
Browser extensionBrowser extension
Browser extension
Cosmin Stefanache
 
Making Chrome Extension with AngularJS
Making Chrome Extension with AngularJSMaking Chrome Extension with AngularJS
Making Chrome Extension with AngularJS
Ben Lau
 
Native apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged appsNative apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged appsTom Wilson
 
Building a resposive slider plugin for WordPress theme
Building a resposive slider plugin for WordPress themeBuilding a resposive slider plugin for WordPress theme
Building a resposive slider plugin for WordPress theme
codebangla
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome Extensions
Aces Mndr
 
Creating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPressCreating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPress
codebangla
 
Google chrome
Google chrome Google chrome
Google chrome
Paramjeet Rawat
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018
Traversy Media
 
Discover the power of browser developer tools
Discover the power of browser developer toolsDiscover the power of browser developer tools
Discover the power of browser developer tools
ylefebvre
 
Getting started with add ons
Getting started with add onsGetting started with add ons
Getting started with add ons
CS Simple education
 
Web browser extensions development
Web browser extensions developmentWeb browser extensions development
Web browser extensions development
dragoslargu
 
Secured Development
Secured DevelopmentSecured Development
Secured Development
Burhan Khalid
 
The Ultimate WordPress Development Environment
The Ultimate WordPress Development EnvironmentThe Ultimate WordPress Development Environment
The Ultimate WordPress Development Environment
Matt Geri
 

What's hot (20)

Chrome extension development
Chrome extension developmentChrome extension development
Chrome extension development
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions
 
Build your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJSBuild your own Chrome Extension with AngularJS
Build your own Chrome Extension with AngularJS
 
Orange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox ExtensionOrange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox Extension
 
Google chrome extension
Google chrome extensionGoogle chrome extension
Google chrome extension
 
Develop Chrome Extension
Develop Chrome ExtensionDevelop Chrome Extension
Develop Chrome Extension
 
HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09HTML5 and Google Chrome - DevFest09
HTML5 and Google Chrome - DevFest09
 
Browser extension
Browser extensionBrowser extension
Browser extension
 
Making Chrome Extension with AngularJS
Making Chrome Extension with AngularJSMaking Chrome Extension with AngularJS
Making Chrome Extension with AngularJS
 
Native apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged appsNative apps in html5 with chrome packaged apps
Native apps in html5 with chrome packaged apps
 
Building a resposive slider plugin for WordPress theme
Building a resposive slider plugin for WordPress themeBuilding a resposive slider plugin for WordPress theme
Building a resposive slider plugin for WordPress theme
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome Extensions
 
Creating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPressCreating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPress
 
Google chrome
Google chrome Google chrome
Google chrome
 
Web Development In 2018
Web Development In 2018Web Development In 2018
Web Development In 2018
 
Discover the power of browser developer tools
Discover the power of browser developer toolsDiscover the power of browser developer tools
Discover the power of browser developer tools
 
Getting started with add ons
Getting started with add onsGetting started with add ons
Getting started with add ons
 
Web browser extensions development
Web browser extensions developmentWeb browser extensions development
Web browser extensions development
 
Secured Development
Secured DevelopmentSecured Development
Secured Development
 
The Ultimate WordPress Development Environment
The Ultimate WordPress Development EnvironmentThe Ultimate WordPress Development Environment
The Ultimate WordPress Development Environment
 

Similar to Chrome Apps & Extensions

Web browser extension development
Web browser extension developmentWeb browser extension development
Web browser extension developmentalecsrusu
 
The state of packaged web apps
The state of packaged web appsThe state of packaged web apps
The state of packaged web appsCristiano Betta
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Atlassian
 
High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
Peter Lubbers
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Startstaobao.com
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Brian Culver
 
The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts
Just van den Broecke
 
Chrome extensions threat analysis and countermeasures
Chrome extensions threat analysis and countermeasuresChrome extensions threat analysis and countermeasures
Chrome extensions threat analysis and countermeasures
Roel Palmaers
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
Pablo Godel
 
Browserscope oscon 2011
Browserscope oscon 2011Browserscope oscon 2011
Browserscope oscon 2011lsimon
 
Flashack
FlashackFlashack
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
Prabhu Nehru
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
edm00se
 
Chrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxChrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptx
geekhouse.io
 
Chrome extension 2014.08.03
Chrome extension 2014.08.03Chrome extension 2014.08.03
Chrome extension 2014.08.03
louisasea666
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGGDBologna
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
Danilo Ercoli
 

Similar to Chrome Apps & Extensions (20)

Web browser extension development
Web browser extension developmentWeb browser extension development
Web browser extension development
 
The state of packaged web apps
The state of packaged web appsThe state of packaged web apps
The state of packaged web apps
 
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012 Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
Plugins on OnDemand with Remote Apps - Atlassian Summit 2012
 
High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 
The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts
 
Chrome extensions threat analysis and countermeasures
Chrome extensions threat analysis and countermeasuresChrome extensions threat analysis and countermeasures
Chrome extensions threat analysis and countermeasures
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Browserscope oscon 2011
Browserscope oscon 2011Browserscope oscon 2011
Browserscope oscon 2011
 
Flashack
FlashackFlashack
Flashack
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
 
Chrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxChrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptx
 
Chrome extension 2014.08.03
Chrome extension 2014.08.03Chrome extension 2014.08.03
Chrome extension 2014.08.03
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
 
Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 

Recently uploaded

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

Chrome Apps & Extensions

  • 1. Chrome Apps & Extension
  • 2. About Me Varun Raj Web Developer | Internet Addict | Android Fan Boy | Techie | Engineering Student
  • 3. Chrome Extensions and Apps Looking beyond browsing on Chrome
  • 4. What is an Extension? • • • • A compressed package Extends the functionality of the browser Minimal or No UI Usually enhances functionality of websites or web apps
  • 5. What is an App? • • • • Runs inside your browser Has a Dedicated User Interface Rich User Interaction Ex. Games and Photo Editors
  • 6. What an Extension contains? • • • • • manifest.json browser action or page action content script - CSS/JS background pages Other media files
  • 8. Layout of an Extension chrome - top-level object & is exposed to extensions • • • • • • • chrome.extension.* chrome.browserAction.* chrome.pageAction.* chrome.windows.* chrome.tabs.* chrome.bookmarks.* Does not access much of the native code
  • 9. Manifest.json For details, see Manifest Files. { JSON "manifest_version": 2, "name": “HUG Chennai", "description": "This is a sample app", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "https://secure.flickr.com/" ] }
  • 12. UI Pages • • • Written in HTML Provides the UI for an Extension Ex. popup.html
  • 13. Content Script • • • Part of the loaded page Injects contents into the page using scripts Exchange messages to parent script
  • 14. Where are extensions stored? http://dev.chromium.org/user-experience/user-data-directory Windows : %userprofile%Local SettingsApplication DataGoogleChromeUser DataDefaultExtensions or C:Documents and SettingsAdminLocal SettingsApplication DataGoogleChromeUser DataDefaultExtensions Linux : ~/.config/google-chrome/Default/Extensions/ Mac OSX : ~/Library/Application Support/Google/Chrome/Default File:///
  • 16. Nothing works! • Refused to load script from 'http://code.jquery.com/jquery-latest.js' because of Content-Security-Policy. • Refused to execute inline script because of Content-Security-Policy. • Refused to execute inline event handler because of Content-Security-Policy. Need to: • Load external scripts over HTTPS • Extract own scripts to .js files • Remove inline event handlers
  • 17. CSP-ready extension <!DOCTYPE html> <html> <head><title>ManifestLint</title> <script src="https://ajax.googleapis.com/.../jquery.min.js" type="text/javascript"></script> <script src="main.js" type="text/javascript"></script> </head> <body> ... HTML
  • 20. Links • Manifest versions: o http://code.google.com/chrome/extensions/manifestVersion.html • Content Security Policy: o http://code.google.com/chrome/extensions/contentSecurityPolicy.html • HTML5 sandbox attribute for iframes: o http://www.whatwg.org/specs/web-apps/current-work/multipage/the- iframe-element.html#attr-iframe-sandbox
  • 21. Creating an App 1. Create manifest.json 2. Create the background script 3. Create the window page 4. Create the icons 5. Enable Chrome Flags: chrome://flags - Experimental Extension APIs 6. Load the app as Unpacked Extension
  • 22. Making money out of Chrome Apps ● In-App Purchases ● Google Wallet
  • 23. Thank You ! Contact Me mailme@varunraj.in