SlideShare a Scribd company logo
browser & bookmark 
yliao@mozilla.com
BROWSER APP
summary 
• Manages navigation controls, address bar 
and tabbing 
• Manages top sites, history, bookmarks 
and browser settings in IndexedDB (DB 
name: ‘browser’) 
• Handle mozbrowser events 
• Handles navigator.mozNfc.onpeerready 
to share the current link address 
(MozActivity ‘view’ is removed from 
here, it’s handled by system app now)
body 
HTML overview 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog
body 
HTML overview 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog
body 
HTML overview 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog
body 
HTML overview 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog
body 
HTML overview 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog
body 
HTML & JS module 
div#main-screen 
menu#toolbar-start 
div#frames 
div#startscreen 
div#awesomescreen 
Awesomescreen 
div#crashscreen 
div#tab_1 
ul#toolbar-end 
Toolbar 
div#tray 
section#bookmark-menu 
section#bookmark-entry-sheet 
section#http-authentication-dialog 
AuthenticationDialog 
div#modal-dialog 
ModalDialog 
section#settings 
Settings 
form#danger-dialog
body 
HTML & JS module 
div#main-screen 
Browser 
menu#toolbar-start 
Browser 
div#frames 
Browser 
div#startscreen 
Browser 
div#awesomescreen 
div#crashscreen 
Browser 
div#tab_1 
Browser 
ul#toolbar-end 
div#tray 
Browser 
section#bookmark-menu 
Browser 
section#bookmark-entry-sheet 
Browser 
section#http-authentication-dialog 
div#modal-dialog 
section#settings 
form#danger-dialog 
Browser
Browser module 
• Init modules (except Toolbar) 
• Manage navigation and address bar UI (filter top sites with 
awesome screen) 
• Manage tabs and iframes (create, select, delete, visibility), iframes 
are created with ‘ mozbrowser’, ‘mozallowfullscreen’, 
‘mozasyncpanzoom’ and ‘remote’ attributes 
• Handle mozbrowser events (each tab gets its own handler)
Browser module 
• Manage screen transitions 
• Manage bookmark UI (except bookmarks tab in Awesomescreen) 
and bookmark editing with BrowserDB 
• Manage browsing history with BrowserDB 
• Manage touch (touchstart, pan, tap, swipe) using GestureDetector 
(shared/js/gesture_detector.js) 
• Handle MozActivity ‘view’ (it’s been removed from manifest)
startscreen 
• Browser.showStartscreen 
• Displayed when: 
• browser app launched 
• empty tab selected
crashscreen 
• Browser.showCrashScreen 
• Displayed on ‘mozbrowsererror’
browser screens 
• These class names are applied to body 
• ‘page-screen’: Browser.showPageScreen 
• ‘tabs-screen’: Browser.showTabScreen 
• ‘awesome-screen’: Awesomescreen.show 
• ‘settings-screen’: Settings.show
Toolbar 
• Manage button states 
• Init click event listeners (but callbacks are 
implemented in Browser except ‘share’ 
button) 
• Handle ‘share’ button click with 
MozActivity ‘share’
AwesomeScreen 
• Manage tabbing and UI events 
• Generate and display top site, bookmark 
and history list from BrowserDB 
• Filter top sites by input using BrowserDB 
• Cache awesomescreen result 
• On ‘contextmenu’ event on bookmark 
items using Browser module to edit 
bookmark 
• On link clicked using Browser module to 
navigate the URL
Settings 
• Handle settings panel UI events 
• Clear history using BrowserDB 
• Clear cookies & data with 
navigator.mozApps.getSelf request 
• Manage search engine options using 
BrowserDB
ModalDialog 
• Handle mozbrowsershowmodalprompt 
event (event listener in Browser) 
• Manage prompt UI 
• evt.detail.message: dialog message 
• evt.detail.promptType: as above 
• evt.detail.initialValue: default value for the 
prompt input 
• evt.detail.returnValue: the value to be returned 
to the tab 
• evt.detail.showCheckbox: show checkbox or 
not 
• evt.detail.unblock: the method to unblock the 
tab
AuthenticationDialog 
• Handle mozbrowserusernameandpasswordrequired event (event 
listener in Browser) 
• Manage authentication dialog UI 
• evt.detail.authenticate(name, password) 
• evt.detail.cancel()
BrowserDB 
• Manage bookmarks, topsites, history, search engines and settings in 
IndexedDB 
• Load default top sites and bookmarks from json on init 
• Handle system message ‘first-run-with-sim’ to get bookmarks in 
config 
• navigator.mozSettings.addObserver(‘operatorResources.data.topsit 
es', …) for setting operator provided top sites 
• object stores: 
• places: uri, iconUri, title, frecency(typo), screenshot 
• visits: uri, timestamp 
• icons: uri (iconUri), data, expiration, failed 
• bookmarks: uri, timestamp 
• settings: defaultSearchEngine, 
• search_engines: uri, title
NfcURI 
• Handles NFC connections using NDEF (NFC Data Exchange 
Format) & MozNDEFRecord (implementation of NDEF) 
• Share the link of the current tab on peer ready 
(navigator.mozNfc.onpeerready) 
• More on NFC: 
• http://developer.android.com/guide/topics/connectivity/nfc/ 
nfc.html 
• https://wiki.mozilla.org/WebAPI/WebNFC#Usage_of_APIs
load a page 
• Page loading browser events in general: 
• mozbrowserloadstart 
• mozbrowserlocationchange 
• mozbrowsertitlechange 
• mozbrowsericonchange 
• mozbrowserloadend
SYSTEM BROWSER
system browser 
• Init a browser page from rocketbar:
system browser 
• Handle chrome UI events:
system browser 
• Handle chrome menu clicks:
system browser 
• Handle mozbrowsercontextmenu:
BOOKMARK APP
• To save a link to homescreen: 
• Handles MozActivity ‘save-bookmark’ 
• Saves the entry using 
BookmarksDatabase 
• Links on the homescreen are 
saved using Data Store API in 
‘bookmarks_store’ 
! 
bookmark app
bookmark app 
• To remove a link from homescreen: 
• Handles MozActivity ‘remove-bookmark’ 
• Removes the entry using BookmarksDatabase 
• Only used in homescreen app, vertical homescreen implements 
the bookmark removing by itself
Browser and bookmark in FirefoxOS on Aug.21.2014

More Related Content

Similar to Browser and bookmark in FirefoxOS on Aug.21.2014

Wheel.js
Wheel.jsWheel.js
Wheel.js
baccigalupi
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)
Andreas Bovens
 
How dojo works
How dojo worksHow dojo works
How dojo works
Amit Tyagi
 
Webdriver io presentation
Webdriver io presentationWebdriver io presentation
Webdriver io presentation
João Nabais
 
##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages
Dominopoint - Italian Lotus User Group
 
Building responsive web mobile mapping applications
Building responsive web mobile mapping applicationsBuilding responsive web mobile mapping applications
Building responsive web mobile mapping applications
Allan Laframboise
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010Patrick Lauke
 
PLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and ExtensionPLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and Extension
Alfresco Software
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
RTigger
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
Roy Clarkson
 
WordPress Navigation in Responsive Design
WordPress Navigation in Responsive DesignWordPress Navigation in Responsive Design
WordPress Navigation in Responsive Design
openchamp
 
Responsive WordPress workflow
Responsive WordPress workflowResponsive WordPress workflow
Responsive WordPress workflow
James Bundey
 
PLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and ExtensionPLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and Extension
Alfresco Software
 
JavaScript
JavaScriptJavaScript
JavaScript
Vidyut Singhania
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Patrick Lauke
 
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...Patrick Lauke
 
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Frédéric Harper
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
Ron Reiter
 

Similar to Browser and bookmark in FirefoxOS on Aug.21.2014 (20)

Wheel.js
Wheel.jsWheel.js
Wheel.js
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
 
Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)Mobile web development techniques (and Opera's developer tools)
Mobile web development techniques (and Opera's developer tools)
 
How dojo works
How dojo worksHow dojo works
How dojo works
 
Webdriver io presentation
Webdriver io presentationWebdriver io presentation
Webdriver io presentation
 
##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages##dd12 sviluppo mobile XPages
##dd12 sviluppo mobile XPages
 
Building responsive web mobile mapping applications
Building responsive web mobile mapping applicationsBuilding responsive web mobile mapping applications
Building responsive web mobile mapping applications
 
openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010openMIC barcamp 11.02.2010
openMIC barcamp 11.02.2010
 
PLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and ExtensionPLAT-14 Forms Config, Customization, and Extension
PLAT-14 Forms Config, Customization, and Extension
 
JavaScript!
JavaScript!JavaScript!
JavaScript!
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
WordPress Navigation in Responsive Design
WordPress Navigation in Responsive DesignWordPress Navigation in Responsive Design
WordPress Navigation in Responsive Design
 
Responsive WordPress workflow
Responsive WordPress workflowResponsive WordPress workflow
Responsive WordPress workflow
 
PLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and ExtensionPLAT-15 Forms Config, Customization, and Extension
PLAT-15 Forms Config, Customization, and Extension
 
Cos 432 web_security
Cos 432 web_securityCos 432 web_security
Cos 432 web_security
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
 
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
Handys und Tablets - Webentwicklung jenseits des Desktops - MobileTech Confer...
 
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
Windows 8 Pure Imagination - 2012-11-24 - Getting your HTML5 game Windows 8 r...
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 

Recently uploaded

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 

Recently uploaded (20)

Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 

Browser and bookmark in FirefoxOS on Aug.21.2014

  • 1. browser & bookmark yliao@mozilla.com
  • 3. summary • Manages navigation controls, address bar and tabbing • Manages top sites, history, bookmarks and browser settings in IndexedDB (DB name: ‘browser’) • Handle mozbrowser events • Handles navigator.mozNfc.onpeerready to share the current link address (MozActivity ‘view’ is removed from here, it’s handled by system app now)
  • 4. body HTML overview div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen div#crashscreen div#tab_1 ul#toolbar-end div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog
  • 5. body HTML overview div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen div#crashscreen div#tab_1 ul#toolbar-end div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog
  • 6. body HTML overview div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen div#crashscreen div#tab_1 ul#toolbar-end div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog
  • 7. body HTML overview div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen div#crashscreen div#tab_1 ul#toolbar-end div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog
  • 8. body HTML overview div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen div#crashscreen div#tab_1 ul#toolbar-end div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog
  • 9. body HTML & JS module div#main-screen menu#toolbar-start div#frames div#startscreen div#awesomescreen Awesomescreen div#crashscreen div#tab_1 ul#toolbar-end Toolbar div#tray section#bookmark-menu section#bookmark-entry-sheet section#http-authentication-dialog AuthenticationDialog div#modal-dialog ModalDialog section#settings Settings form#danger-dialog
  • 10. body HTML & JS module div#main-screen Browser menu#toolbar-start Browser div#frames Browser div#startscreen Browser div#awesomescreen div#crashscreen Browser div#tab_1 Browser ul#toolbar-end div#tray Browser section#bookmark-menu Browser section#bookmark-entry-sheet Browser section#http-authentication-dialog div#modal-dialog section#settings form#danger-dialog Browser
  • 11. Browser module • Init modules (except Toolbar) • Manage navigation and address bar UI (filter top sites with awesome screen) • Manage tabs and iframes (create, select, delete, visibility), iframes are created with ‘ mozbrowser’, ‘mozallowfullscreen’, ‘mozasyncpanzoom’ and ‘remote’ attributes • Handle mozbrowser events (each tab gets its own handler)
  • 12. Browser module • Manage screen transitions • Manage bookmark UI (except bookmarks tab in Awesomescreen) and bookmark editing with BrowserDB • Manage browsing history with BrowserDB • Manage touch (touchstart, pan, tap, swipe) using GestureDetector (shared/js/gesture_detector.js) • Handle MozActivity ‘view’ (it’s been removed from manifest)
  • 13. startscreen • Browser.showStartscreen • Displayed when: • browser app launched • empty tab selected
  • 14. crashscreen • Browser.showCrashScreen • Displayed on ‘mozbrowsererror’
  • 15. browser screens • These class names are applied to body • ‘page-screen’: Browser.showPageScreen • ‘tabs-screen’: Browser.showTabScreen • ‘awesome-screen’: Awesomescreen.show • ‘settings-screen’: Settings.show
  • 16. Toolbar • Manage button states • Init click event listeners (but callbacks are implemented in Browser except ‘share’ button) • Handle ‘share’ button click with MozActivity ‘share’
  • 17. AwesomeScreen • Manage tabbing and UI events • Generate and display top site, bookmark and history list from BrowserDB • Filter top sites by input using BrowserDB • Cache awesomescreen result • On ‘contextmenu’ event on bookmark items using Browser module to edit bookmark • On link clicked using Browser module to navigate the URL
  • 18. Settings • Handle settings panel UI events • Clear history using BrowserDB • Clear cookies & data with navigator.mozApps.getSelf request • Manage search engine options using BrowserDB
  • 19. ModalDialog • Handle mozbrowsershowmodalprompt event (event listener in Browser) • Manage prompt UI • evt.detail.message: dialog message • evt.detail.promptType: as above • evt.detail.initialValue: default value for the prompt input • evt.detail.returnValue: the value to be returned to the tab • evt.detail.showCheckbox: show checkbox or not • evt.detail.unblock: the method to unblock the tab
  • 20. AuthenticationDialog • Handle mozbrowserusernameandpasswordrequired event (event listener in Browser) • Manage authentication dialog UI • evt.detail.authenticate(name, password) • evt.detail.cancel()
  • 21. BrowserDB • Manage bookmarks, topsites, history, search engines and settings in IndexedDB • Load default top sites and bookmarks from json on init • Handle system message ‘first-run-with-sim’ to get bookmarks in config • navigator.mozSettings.addObserver(‘operatorResources.data.topsit es', …) for setting operator provided top sites • object stores: • places: uri, iconUri, title, frecency(typo), screenshot • visits: uri, timestamp • icons: uri (iconUri), data, expiration, failed • bookmarks: uri, timestamp • settings: defaultSearchEngine, • search_engines: uri, title
  • 22. NfcURI • Handles NFC connections using NDEF (NFC Data Exchange Format) & MozNDEFRecord (implementation of NDEF) • Share the link of the current tab on peer ready (navigator.mozNfc.onpeerready) • More on NFC: • http://developer.android.com/guide/topics/connectivity/nfc/ nfc.html • https://wiki.mozilla.org/WebAPI/WebNFC#Usage_of_APIs
  • 23.
  • 24.
  • 25.
  • 26. load a page • Page loading browser events in general: • mozbrowserloadstart • mozbrowserlocationchange • mozbrowsertitlechange • mozbrowsericonchange • mozbrowserloadend
  • 27.
  • 29. system browser • Init a browser page from rocketbar:
  • 30.
  • 31. system browser • Handle chrome UI events:
  • 32.
  • 33. system browser • Handle chrome menu clicks:
  • 34.
  • 35. system browser • Handle mozbrowsercontextmenu:
  • 36.
  • 38. • To save a link to homescreen: • Handles MozActivity ‘save-bookmark’ • Saves the entry using BookmarksDatabase • Links on the homescreen are saved using Data Store API in ‘bookmarks_store’ ! bookmark app
  • 39.
  • 40. bookmark app • To remove a link from homescreen: • Handles MozActivity ‘remove-bookmark’ • Removes the entry using BookmarksDatabase • Only used in homescreen app, vertical homescreen implements the bookmark removing by itself