Commit graph

73 commits

Author SHA1 Message Date
Alexandre Lachèze
e1a232e7c8 Add support for css in content_scripts 2017-09-14 17:23:33 +09:00
Kevin Sawicki
34fff57646 Grant the devtools access to the extension origins 2017-08-15 16:19:21 +03:00
John Kleinschmidt
ccdff72ee4 Merge pull request #9918 from alexstrat/add-extensions-loading-api
Introduce Chrome extensions management APIs independent of Dev Tools Extensions
2017-08-07 20:06:22 -04:00
Alexandre Lachèze
03ec155ecb Oops 2017-07-05 17:34:04 +02:00
Alexandre Lachèze
cba53604eb Introduce extensions management APIs indépendant of Dev Tools Extensions
- introduce API BrowserWindow#[add,remove,get]Extension
- make [add,remove, get]DevToolsExtension use newly introduced API
- make the app persist only the extensions added via
#addDevToolsExtension
2017-07-03 20:01:08 +02:00
Boik
2e9ace6f59 Use Buffer.from instead of deprecated new Buffer
Use Buffer.from instead of deprecated new Buffer.
2017-06-12 16:57:42 +08:00
Samuel Attard
01005688b6
Implement chrome.runtime.onMessage response callback 2016-11-15 21:30:40 +11:00
Thiago de Arruda
a64978b812 Use the routing id on api::WebContents::GetID
The sandbox option allows multiple webContents in one renderer process, so using
the only the renderer id to identify WebContents instances is no longer an
option.

WebContents::GetID now returns a 64-bit integer, which is composed of both the
process id(high 32), and the RenderViewHost routing id(low 32). Also add a
`GetProcessID` that retrieves the renderer process id, a requirement in some of
our javascript code.
2016-09-27 06:01:47 -03:00
Kevin Sawicki
902bd0564e Require Buffer explicitly instead of relying on global 2016-09-08 10:17:06 -07:00
Cheng Zhao
41d2799514 Run background pages in separate partition
This avoids the default partition always being created on startup, so it
gives users a chance to run session.fromParititon.
2016-07-13 16:22:55 +09:00
Cheng Zhao
e653c67153 Move chromeExtensionHandler out of ready handler
This code were in ready handler because we could not require "protocol"
before ready before. It is now safe to move the code out.
2016-07-13 12:23:14 +09:00
Cheng Zhao
d739d8772c Move session-created event to app
This follows the convention of other *-created events.
2016-07-13 12:23:14 +09:00
Jhen
d4f64ce943 Use background page path instead of generated path
if extension use manifest.background.page
2016-07-01 23:50:31 +08:00
Jhen
76f4bd01eb Support background.page in extension manifest 2016-06-30 16:04:13 +08:00
Kevin Sawicki
df22082110 Call loadExtension from addDevToolsExtension 2016-06-17 14:53:51 -07:00
Kevin Sawicki
65abaee299 Forward will/did navigate events to extensions 2016-06-16 12:07:59 -07:00
Cheng Zhao
bb10551d23 Work around a compiler bug that crashes on Windows 2016-06-16 10:55:25 +09:00
Kevin Sawicki
ae6ffa6d5e unkown -> unknown 2016-06-14 15:47:33 -07:00
Kevin Sawicki
ee09c7534a Only add extensions to windows and webviews 2016-06-14 15:47:33 -07:00
Kevin Sawicki
f29801ad2b Add background page web contents type 2016-06-14 15:47:33 -07:00
Kevin Sawicki
f25c1f864b Use RenderProcessPreferences for non-remote web contents 2016-06-14 15:47:32 -07:00
Kevin Sawicki
56001b481e Emit web-contents-created on app 2016-06-13 08:59:57 -07:00
Kevin Sawicki
1f245d5ff6 Add getDevToolsExtensions API 2016-06-10 09:26:38 -07:00
Kevin Sawicki
0a26075699 Add BrowserWindow.isDevToolsExtensionInstalled API 2016-06-10 09:24:04 -07:00
Cheng Zhao
ccaf837da4 Merge pull request #5964 from electron/manifest-errors
Throw errors reading/parsing manifest.json files
2016-06-10 03:28:57 +00:00
Kevin Sawicki
84960af793 Add initial chrome.i18n.getMessage API 2016-06-09 13:57:08 -07:00
Kevin Sawicki
6d3fc611bd Tweak duplicate extension message 2016-06-09 10:08:21 -07:00
Kevin Sawicki
f46edd5186 Throw errors reading/parsing manifest.json 2016-06-09 09:45:02 -07:00
deepak1556
4749e18fc0 fix spec and docs 2016-06-09 10:48:05 +05:30
deepak1556
cb5e648502 register extension handler for every session created 2016-06-09 10:40:51 +05:30
Kevin Sawicki
4823a04a44 hookWindowForTabEvents -> hookWebContentsForTabEvents 2016-06-08 12:00:13 -07:00
Kevin Sawicki
11e68ff932 Only add extensions to non-remote webContents 2016-06-08 12:00:13 -07:00
Kevin Sawicki
c8c60dd313 Add devtools from web-contents-created event 2016-06-08 12:00:13 -07:00
Kevin Sawicki
d8fe5da3ea 🎨 2016-06-08 12:00:13 -07:00
Kevin Sawicki
ec8b9e3f35 Export loadDevToolsExtensions API to use in guest view manager 2016-06-08 12:00:13 -07:00
Kevin Sawicki
219d177731 Load extensions for all web contents 2016-06-08 12:00:13 -07:00
Kevin Sawicki
4c1ede32cf Use destroyed event instead of closed event 2016-06-08 12:00:12 -07:00
Kevin Sawicki
4f46f75d8f Load dev tools extensions in webviews 2016-06-08 12:00:12 -07:00
Kevin Sawicki
a906336b1e Don't log extension id 2016-06-06 13:03:01 -07:00
Felix Rieseberg
eb62abcc23 🎨 Log a warning if an extension's manifest cannot be parsed
Also logs a clean warning if an extension's manifest is incomplete,
missing, or can otherwise not be parsed.
2016-06-05 18:30:49 -07:00
Felix Rieseberg
b42e6583f7 🎨 Log a warning if an extension has already been loaded
If an extension has already been loaded (for instance because it’s
persisted), `addDevToolsExtension` will return nothing, which is
confusing. This adds a little `console.warn` to educate people about
what’s happening.

Closes #5854
2016-06-03 14:32:22 -07:00
Cheng Zhao
de001a9bbf Use meaningful name for extensionId 2016-05-29 11:57:20 +09:00
Cheng Zhao
ec1944c146 Implement chrome.tab.onCreated/onRemoved APIs 2016-05-29 11:50:14 +09:00
Cheng Zhao
2431d886bf Current handle sender.tab for background pages 2016-05-29 10:46:48 +09:00
Cheng Zhao
f4fe60d126 Set default mimeType for BufferJob 2016-05-28 22:36:22 +09:00
Cheng Zhao
9ed4730cba Pass sender for chrome.runtime.onMessage 2016-05-28 21:45:23 +09:00
Cheng Zhao
5eb9ed1729 Implement chrome.tabs.sendMessage 2016-05-28 21:35:07 +09:00
Cheng Zhao
62fb4f9820 Implement chrome.runtime.sendMessage 2016-05-28 21:23:43 +09:00
Cheng Zhao
ba315248e0 Use ipcRenderer.sendTo to get rid of routers in main process 2016-05-28 21:13:00 +09:00
Cheng Zhao
d55b96fdf5 Clean up the Chrome API implementation code 2016-05-28 20:33:18 +09:00