Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into refactoring-aphro…
Browse files Browse the repository at this point in the history
…dite
  • Loading branch information
Suguru Hirahara committed Apr 19, 2017
2 parents c1894b1 + c719806 commit a278055
Show file tree
Hide file tree
Showing 202 changed files with 16,033 additions and 2,401 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"react",
["env", {
"targets": {
"chrome": 54
"chrome": 57
}
}]
],
Expand Down
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Brave welcomes contributions via [pull requests](https://github.com/brave/browse
Fix #206
````

* If you update the npm dependencies, run `npm shrinkwrap --dev` before committing changes.
* Run the tests by running `npm run watch-test` and `npm test` in separate terminals.
* Make sure [Flow](http://flowtype.org/) type checking passes: `npm run-script flow`. BONUS: Help us out by adding more [Flow type annotations](http://flowtype.org/blog/2015/02/20/Flow-Comments.html) to new and existing Brave code!
* When making style changes, please be sure that you are [following our style guidelines](https://github.com/brave/browser-laptop/blob/master/docs/style.md).
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ node_js:
- "7"
dist: trusty
sudo: required
cache:
directories:
- node_modules
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
Expand Down
5 changes: 5 additions & 0 deletions app/browser/reducers/tabsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ const tabsReducer = (state, action) => {
case windowConstants.WINDOW_SET_AUDIO_MUTED:
state = tabs.setAudioMuted(state, action)
break
case windowConstants.WINDOW_SET_ALL_AUDIO_MUTED:
action.get('frameList').forEach((frameProp) => {
state = tabs.setAudioMuted(state, frameProp)
})
break
case windowConstants.WINDOW_SET_ACTIVE_FRAME:
state = tabs.setActive(state, action)
break
Expand Down
8 changes: 5 additions & 3 deletions app/browser/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const tabState = require('../common/state/tabState')
const {app, BrowserWindow, extensions, session, ipcMain} = require('electron')
const {makeImmutable} = require('../common/state/immutableUtil')
const {getTargetAboutUrl, getSourceAboutUrl, isSourceAboutUrl, newFrameUrl} = require('../../js/lib/appUrlUtil')
const {isURL, getUrlFromInput} = require('../../js/lib/urlutil')
const {isURL, getUrlFromInput, toPDFJSLocation} = require('../../js/lib/urlutil')
const {isSessionPartition} = require('../../js/state/frameStateUtil')
const {getOrigin} = require('../../js/state/siteUtil')
const {getSetting} = require('../../js/settings')
Expand Down Expand Up @@ -38,6 +38,9 @@ const normalizeUrl = function (url) {
if (isURL(url)) {
url = getUrlFromInput(url)
}
if (getSetting(settings.PDFJS_ENABLED)) {
url = toPDFJSLocation(url)
}
return url
}

Expand Down Expand Up @@ -454,9 +457,8 @@ const api = {

setAudioMuted: (state, action) => {
action = makeImmutable(action)
const frameProps = action.get('frameProps')
const muted = action.get('muted')
const tabId = frameProps.get('tabId')
const tabId = action.get('tabId')
const tab = api.getWebContents(tabId)
if (tab && !tab.isDestroyed()) {
tab.setAudioMuted(muted)
Expand Down
6 changes: 6 additions & 0 deletions app/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const contextMenus = require('./browser/extensions/contextMenus')
const extensionActions = require('./common/actions/extensionActions')
const config = require('../js/constants/config')
const appConfig = require('../js/constants/appConfig')
const messages = require('../js/constants/messages')
const {fileUrl} = require('../js/lib/appUrlUtil')
const {getExtensionsPath, getBraveExtUrl, getBraveExtIndexHTML} = require('../js/lib/appUrlUtil')
const {getSetting} = require('../js/settings')
Expand All @@ -16,6 +17,7 @@ const fs = require('fs')
const path = require('path')
const l10n = require('../js/l10n')
const {bravifyText} = require('./renderer/lib/extensionsUtil')
const ipcMain = require('electron').ipcMain

// Takes Content Security Policy flags, for example { 'default-src': '*' }
// Returns a CSP string, for example 'default-src: *;'
Expand Down Expand Up @@ -340,6 +342,10 @@ module.exports.init = () => {
}
})

ipcMain.on(messages.LOAD_URL_REQUESTED, (e, tabId, url) => {
appActions.loadURLRequested(tabId, url)
})

process.on('reload-sync-extension', () => {
console.log('reloading sync')
disableExtension(config.syncExtensionId)
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/locales/bn-BD/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,4 @@ preventMoreAlerts=Prevent this page from creating additional dialogs
copied=Copied!
connectionError=Server connection failed. Please make sure you are connected to the Internet.
unknownError=Oops, something went wrong.
browserActionButton.title={{name}}
40 changes: 20 additions & 20 deletions app/extensions/brave/locales/bn-BD/extensions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ latest=Latest
notInstalled=Not Installed
integrated=Integrated

l10nBitwarden=bitwarden - Free Password Manager
l10nBitwardenDesc=bitwarden is a secure and free password manager for all of your devices.
l10nDashlane=Dashlane Secure Password Manager
l10nDashlaneDesc=Never forget another password. Dashlane password manager - the most secure password storage and fast login on all of your devices
l10nEnpass=Enpass Password Manager
l10nEnpassDesc=Enpass Password Manager extension for Brave
l10nLastpass= LastPass: Free Password Manager
l10nLastpassDesc=LastPass, an award-winning password manager, saves your passwords and gives you secure access from every computer and mobile device.
l10nOnepassword= 1Password: Password Manager and Secure Wallet
l10nOnepasswordDesc=1Password extension for Brave.
l10nPdfjs= PDF Viewer
l10nPdfjsDesc=Uses HTML5 to display PDF files directly in the browser.
l10nPocket= Save to Pocket
l10nPocketDesc=Pocket Extension for Brave - The best way to save articles, videos and more.
l10nSync= Brave Sync
l10nSyncDesc=
l10nWebtorrent= Torrent Viewer
l10nWebtorrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links.
l10nVimium= Vimium
l10nVimiumDesc=
bitwarden=bitwarden - Free Password Manager
bitwardenDesc=bitwarden is a secure and free password manager for all of your devices.
dashlane=Dashlane Secure Password Manager
dashlaneDesc=Never forget another password. Dashlane password manager - the most secure password storage and fast login on all of your devices
enpass=Enpass Password Manager
enpassDesc=Enpass Password Manager extension for Brave
lastpass= LastPass: Free Password Manager
lastpassDesc=LastPass, an award-winning password manager, saves your passwords and gives you secure access from every computer and mobile device.
1password= 1Password: Password Manager and Secure Wallet
1passwordDesc=1Password extension for Brave.
pdfjs= PDF Viewer
pdfjsDesc=Uses HTML5 to display PDF files directly in the browser.
saveToPocket= Save to Pocket
saveToPocketDesc=Pocket Extension for Brave - The best way to save articles, videos and more.
sync= Brave Sync
syncDesc=
torrent= Torrent Viewer
torrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links.
vimium= Vimium
vimiumDesc=
5 changes: 0 additions & 5 deletions app/extensions/brave/locales/bn-BD/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ lastPass=১. সর্বশেষ পাসওয়ার্ড এবং নি
enpass=Enpass® (requires application)
bitwarden=bitwarden®
doNotManageMyPasswords=আমার পাসওয়ার্ড নিয়ন্ত্রণ করবেন না
usePDFJS=Enable HTML5 PDF reader *
enableFlash=Enable Adobe Flash support
widevineSection=Google Widevine Support
enableWidevine=Enable Google Widevine support
Expand All @@ -256,10 +255,7 @@ bookmarkToolbarShowFavicon=Favicons
bookmarkToolbarShowOnlyFavicon=শুধুমাত্র favicon দেখান
contentSettings=কন্টেন্ট সেটিংস
extensions=Extensions
enableExtension=Enable {{extensionName}}
enableVimium=Enable Vimium
moreExtensionsComingSoon=আরও এক্সটেনশান শীঘ্রই আসছে ...
viewInstalledExtensions=ইনস্টল এক্সটেনশানগুলি দেখুন...
useHardwareAcceleration=Use hardware acceleration when available *
useSmoothScroll=Enable smooth scrolling *
defaultZoomLevel=জুমের স্বাভাবিক লেভেল
Expand Down Expand Up @@ -357,7 +353,6 @@ defaultBrowser=Brave is your default browser.
notDefaultBrowser=Brave is not your default browser.
setAsDefault=Set as default…
checkDefaultOnStartup=Always check on startup
useTorrentViewer=Enable Torrent Viewer *
dashboardSettingsTitle=Dashboard
dashboardShowImages=Show images
requiresRestart=* Requires browser restart
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/locales/bn-IN/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,4 @@ preventMoreAlerts=Prevent this page from creating additional dialogs
copied=Copied!
connectionError=Server connection failed. Please make sure you are connected to the Internet.
unknownError=Oops, something went wrong.
browserActionButton.title={{name}}
40 changes: 20 additions & 20 deletions app/extensions/brave/locales/bn-IN/extensions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ latest=Latest
notInstalled=Not Installed
integrated=Integrated

l10nBitwarden=bitwarden - Free Password Manager
l10nBitwardenDesc=bitwarden is a secure and free password manager for all of your devices.
l10nDashlane=Dashlane Secure Password Manager
l10nDashlaneDesc=Never forget another password. Dashlane password manager - the most secure password storage and fast login on all of your devices
l10nEnpass=Enpass Password Manager
l10nEnpassDesc=Enpass Password Manager extension for Brave
l10nLastpass= LastPass: Free Password Manager
l10nLastpassDesc=LastPass, an award-winning password manager, saves your passwords and gives you secure access from every computer and mobile device.
l10nOnepassword= 1Password: Password Manager and Secure Wallet
l10nOnepasswordDesc=1Password extension for Brave.
l10nPdfjs= PDF Viewer
l10nPdfjsDesc=Uses HTML5 to display PDF files directly in the browser.
l10nPocket= Save to Pocket
l10nPocketDesc=Pocket Extension for Brave - The best way to save articles, videos and more.
l10nSync= Brave Sync
l10nSyncDesc=
l10nWebtorrent= Torrent Viewer
l10nWebtorrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links.
l10nVimium= Vimium
l10nVimiumDesc=
bitwarden=bitwarden - Free Password Manager
bitwardenDesc=bitwarden is a secure and free password manager for all of your devices.
dashlane=Dashlane Secure Password Manager
dashlaneDesc=Never forget another password. Dashlane password manager - the most secure password storage and fast login on all of your devices
enpass=Enpass Password Manager
enpassDesc=Enpass Password Manager extension for Brave
lastpass= LastPass: Free Password Manager
lastpassDesc=LastPass, an award-winning password manager, saves your passwords and gives you secure access from every computer and mobile device.
1password= 1Password: Password Manager and Secure Wallet
1passwordDesc=1Password extension for Brave.
pdfjs= PDF Viewer
pdfjsDesc=Uses HTML5 to display PDF files directly in the browser.
saveToPocket= Save to Pocket
saveToPocketDesc=Pocket Extension for Brave - The best way to save articles, videos and more.
sync= Brave Sync
syncDesc=
torrent= Torrent Viewer
torrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links.
vimium= Vimium
vimiumDesc=
5 changes: 0 additions & 5 deletions app/extensions/brave/locales/bn-IN/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ lastPass=LastPass®
enpass=Enpass® (requires application)
bitwarden=bitwarden®
doNotManageMyPasswords=Don't manage my passwords
usePDFJS=Enable HTML5 PDF reader *
enableFlash=Enable Adobe Flash support
widevineSection=Google Widevine Support
enableWidevine=Enable Google Widevine support
Expand All @@ -256,10 +255,7 @@ bookmarkToolbarShowFavicon=Favicons
bookmarkToolbarShowOnlyFavicon=Show only favicon
contentSettings=Content Settings
extensions=Extensions
enableExtension=Enable {{extensionName}}
enableVimium=Enable Vimium
moreExtensionsComingSoon=More extensions coming soon…
viewInstalledExtensions=View Installed Extensions…
useHardwareAcceleration=Use hardware acceleration when available *
useSmoothScroll=Enable smooth scrolling *
defaultZoomLevel=ডিফল্ট জুম স্তর
Expand Down Expand Up @@ -357,7 +353,6 @@ defaultBrowser=Brave is your default browser.
notDefaultBrowser=Brave is not your default browser.
setAsDefault=Set as default…
checkDefaultOnStartup=Always check on startup
useTorrentViewer=Enable Torrent Viewer *
dashboardSettingsTitle=Dashboard
dashboardShowImages=Show images
requiresRestart=* Requires browser restart
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/locales/cs/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,4 @@ preventMoreAlerts=Zabránit této stránce ve vytváření dodatečných dialog
copied=Zkopírováno!
connectionError=Spojení se serverem selhalo. Ujistěte se, prosím, že jste připojeni k síti (internetu).
unknownError=Ku...a. Něco se podělalo.
browserActionButton.title={{name}}
40 changes: 20 additions & 20 deletions app/extensions/brave/locales/cs/extensions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ latest=Nejnovější
notInstalled=Nenainstalováno
integrated=Začleněno

l10nBitwarden=bitwarden: Svobodný správce hesel
l10nBitwardenDesc=bitwarden je bezpečný a svobodný správce hesel pro všechna vaše zařízení.
l10nDashlane=Bezpečný správce hesel Dashlane
l10nDashlaneDesc=Nikdy nezapomeňte další heslo. Správce hesel Dashlane - nejbezpečnější úložiště na hesla a rychlé přihlášení na všech vašich zařízeních
l10nEnpass=Správce hesel Enpass
l10nEnpassDesc=Rozšíření pro Brave správce hesel Enpass
l10nLastpass= LastPass: Svobodný správce hesel
l10nLastpassDesc=Oceněný správce hesel LastPass uloží vaše hesla a dá vám k nim zabezpečený přístup z každého počítače a přenosného zařízení.
l10nOnepassword= 1Password: Správce hesel a bezpečná peněženka
l10nOnepasswordDesc=Rozšíření pro Brave 1Password.
l10nPdfjs= Prohlížeč PDF
l10nPdfjsDesc=Používá HTML5 na zobrazení souborů PDF přímo v prohlížeči.
l10nPocket= Uložit do Pocket
l10nPocketDesc=Rozšíření pro Brave Pocket. Nejlepší způsob, jak ukládat články, obrazy a další záznamy.
l10nSync= Seřizování Brave
l10nSyncDesc=
l10nWebtorrent= Prohlížeč torrentů
l10nWebtorrentDesc=používá WebTorrent k přímému zobrazení torrentu v prohlížeči. Podporuje soubory torrentů a magnetické odkazy.
l10nVimium= Vimium
l10nVimiumDesc=
bitwarden=bitwarden: Svobodný správce hesel
bitwardenDesc=bitwarden je bezpečný a svobodný správce hesel pro všechna vaše zařízení.
dashlane=Bezpečný správce hesel Dashlane
dashlaneDesc=Nikdy nezapomeňte další heslo. Správce hesel Dashlane - nejbezpečnější úložiště na hesla a rychlé přihlášení na všech vašich zařízeních
enpass=Správce hesel Enpass
enpassDesc=Rozšíření pro Brave správce hesel Enpass
lastpass= LastPass: Svobodný správce hesel
lastpassDesc=Oceněný správce hesel LastPass uloží vaše hesla a dá vám k nim zabezpečený přístup z každého počítače a přenosného zařízení.
1password= 1Password: Správce hesel a bezpečná peněženka
1passwordDesc=Rozšíření pro Brave 1Password.
pdfjs= Prohlížeč PDF
pdfjsDesc=Používá HTML5 na zobrazení souborů PDF přímo v prohlížeči.
saveToPocket= Uložit do Pocket
saveToPocketDesc=Rozšíření pro Brave Pocket. Nejlepší způsob, jak ukládat články, obrazy a další záznamy.
sync= Seřizování Brave
syncDesc=
torrent= Prohlížeč torrentů
torrentDesc=používá WebTorrent k přímému zobrazení torrentu v prohlížeči. Podporuje soubory torrentů a magnetické odkazy.
vimium= Vimium
vimiumDesc=
5 changes: 0 additions & 5 deletions app/extensions/brave/locales/cs/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ lastPass=LastPass®
enpass=Enpass® (vyžaduje program)
bitwarden=bitwarden®
doNotManageMyPasswords=Nespravovat moje hesla
usePDFJS=Povolit čtečku PDF HTML5 *
enableFlash=Povolit podporu pro Adobe Flash
widevineSection=Podpora pro Google Widevine
enableWidevine=Povolit podporu pro Google Widevine
Expand All @@ -256,10 +255,7 @@ bookmarkToolbarShowFavicon=Malé symboly
bookmarkToolbarShowOnlyFavicon=Ukázat jen malé symboly
contentSettings=Nastavení obsahu
extensions=Rozšíření
enableExtension=Povolit {{extensionName}}
enableVimium=Povolit Vimium
moreExtensionsComingSoon=Další rozšíření už brzy...
viewInstalledExtensions=Zobrazit nainstalovaná rozšíření...
useHardwareAcceleration=Použít hardwarové zrychlení, je-li je dostupné *
useSmoothScroll=Povolit plynulý posun *
defaultZoomLevel=Výchozí úroveň přiblížení
Expand Down Expand Up @@ -357,7 +353,6 @@ defaultBrowser=Brave je váš výchozí prohlížeč.
notDefaultBrowser=Brave není váš výchozí prohlížeč.
setAsDefault=Nastavit jako výchozí...
checkDefaultOnStartup=Vždy prověřit při spuštění
useTorrentViewer=Povolit prohlížeč torrentů *
dashboardSettingsTitle=Nástěnka
dashboardShowImages=Ukázat obrázky
requiresRestart=* Vyžaduje opětovné spuštění prohlížeče
Expand Down
1 change: 1 addition & 0 deletions app/extensions/brave/locales/de-DE/app.properties
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,4 @@ preventMoreAlerts=Diese Seite vor der Erstellung weiterer Dialoge hindern
copied=In die Zwischenablage kopiert!
connectionError=Die Verbindung zum Server ist fehlgeschlagen. Bitte Stellen Sie sicher, dass Sie mit dem Internet verbunden sind.
unknownError=Uppsaluppsi... irgendetwas ist schief gelaufen.
browserActionButton.title={{name}}
40 changes: 20 additions & 20 deletions app/extensions/brave/locales/de-DE/extensions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ latest=Aktuell
notInstalled=Nicht installiert
integrated=Integriert

l10nBitwarden=bitwarden - Kostenlose Passwort Verwaltung
l10nBitwardenDesc=bitwarden ist eine sichere und kostenlose Passwort Verwaltung, die auf all Ihren Geräten verwendet werden kann.
l10nDashlane=Dashlane Secure Passwort Verwaltung
l10nDashlaneDesc=Nie mehr Passwörter vergessen. Dashlane Passwort Verwaltung - Der sicherste Speicher für Passwörter mit einer schnellen Anmeldung über all Ihre Geräte
l10nEnpass=Enpass Passwort Verwaltung
l10nEnpassDesc=Enpass Passwort Verwaltung als Erweiterung für Brave
l10nLastpass= LastPass: Kostenlose Passwortverwaltung
l10nLastpassDesc=LastPass ist eine preisgekrönte Passwort Verwaltung, die Passwörter speichert und Ihnen einen sicheren Zugriff darauf von all Ihren Computern und Mobilgeräten ermöglicht.
l10nOnepassword= 1Password: Passwort Verwaltung und ein sicheres Konto
l10nOnepasswordDesc=Die 1Password Erweiterung für Brave.
l10nPdfjs= PDF Viewer
l10nPdfjsDesc=Verwendet HTML5 um PDF Dateien direkt im Browser anzuzeigen
l10nPocket= In Pocket speichern
l10nPocketDesc=Pocket für Brave - Der beste Weg Artikel, Videos und mehr zu speichern.
l10nSync= Brave Sync
l10nSyncDesc=
l10nWebtorrent= Torrent Viewer
l10nWebtorrentDesc=Verwendet WebTorrent um Torrents direkt im Browser anzuzeigen. Es werden Torrent Dateien und Magnet Links unterstützt.
l10nVimium= Vimium
l10nVimiumDesc=
bitwarden=bitwarden - Free Password Manager
bitwardenDesc=bitwarden is a secure and free password manager for all of your devices.
dashlane=Dashlane Secure Password Manager
dashlaneDesc=Never forget another password. Dashlane password manager - the most secure password storage and fast login on all of your devices
enpass=Enpass Password Manager
enpassDesc=Enpass Password Manager extension for Brave
lastpass= LastPass: Free Password Manager
lastpassDesc=LastPass, an award-winning password manager, saves your passwords and gives you secure access from every computer and mobile device.
1password= 1Password: Password Manager and Secure Wallet
1passwordDesc=1Password extension for Brave.
pdfjs= PDF Viewer
pdfjsDesc=Uses HTML5 to display PDF files directly in the browser.
saveToPocket= Save to Pocket
saveToPocketDesc=Pocket Extension for Brave - The best way to save articles, videos and more.
sync= Brave Sync
syncDesc=
torrent= Torrent Viewer
torrentDesc=Uses WebTorrent to display torrents directly in the browser. Supports torrent files and magnet links.
vimium= Vimium
vimiumDesc=
Loading

0 comments on commit a278055

Please sign in to comment.