From 214f8477b32e7d4067742ed5b49a933dfe4dcffb Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 17 Oct 2015 19:28:14 +0800 Subject: [PATCH] Fix some typos. --- atom/browser/lib/desktop-capturer.coffee | 4 ++-- atom/renderer/api/lib/desktop-capturer.coffee | 2 +- docs/api/desktop-capturer.md | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atom/browser/lib/desktop-capturer.coffee b/atom/browser/lib/desktop-capturer.coffee index daef854cb74..fc3cdd5feaa 100644 --- a/atom/browser/lib/desktop-capturer.coffee +++ b/atom/browser/lib/desktop-capturer.coffee @@ -22,14 +22,14 @@ desktopCapturer.emit = (event_name, event, sources) -> # Receiving sources result from main process, now send them back to renderer. handledRequest = requestsQueue.shift 0 result = ({ id: source.id, name: source.name, thumbnail: source.thumbnail.toDataUrl() } for source in sources) - handledRequest.webContents?.send 'ATOM_REDNERER_DESKTOP_CAPTURER_RESULT', result + handledRequest.webContents?.send 'ATOM_RENDERER_DESKTOP_CAPTURER_RESULT', result # Check the queue to see whether there is other same request. If has, handle # it for reducing redunplicated `desktopCaptuer.startHandling` calls. unhandledRequestsQueue = [] for request in requestsQueue if isOptionsEqual handledRequest.options, request.options - request.webContents?.send 'ATOM_REDNERER_DESKTOP_CAPTURER_RESULT', result + request.webContents?.send 'ATOM_RENDERER_DESKTOP_CAPTURER_RESULT', result else unhandledRequestsQueue.push request requestsQueue = unhandledRequestsQueue diff --git a/atom/renderer/api/lib/desktop-capturer.coffee b/atom/renderer/api/lib/desktop-capturer.coffee index 7ac5a4024c9..a82eb69e657 100644 --- a/atom/renderer/api/lib/desktop-capturer.coffee +++ b/atom/renderer/api/lib/desktop-capturer.coffee @@ -3,7 +3,7 @@ NativeImage = require 'native-image' getSources = (options, callback) -> ipc.send 'ATOM_BROWSER_DESKTOP_CAPTURER_GET_SOURCES', options - ipc.once 'ATOM_REDNERER_DESKTOP_CAPTURER_RESULT', (sources) -> + ipc.once 'ATOM_RENDERER_DESKTOP_CAPTURER_RESULT', (sources) -> callback ({id: source.id, name: source.name, thumbnail: NativeImage.createFromDataUrl source.thumbnail} for source in sources) module.exports = diff --git a/docs/api/desktop-capturer.md b/docs/api/desktop-capturer.md index 916538a4e9f..8002451c463 100644 --- a/docs/api/desktop-capturer.md +++ b/docs/api/desktop-capturer.md @@ -47,8 +47,8 @@ The `desktopCapturer` module has the following methods: * `types` Array - An array of String that enums the types of desktop sources. * `screen` String - Screen * `window` String - Individual window -* `thumnailSize` Object (optional) - The suggested size that thumbnail should be - scaled. +* `thumbnailSize` Object (optional) - The suggested size that thumbnail should + be scaled. * `width` Integer - The width of thumbnail. By default, it is 150px. * `height` Integer - The height of thumbnail. By default, it is 150px. @@ -59,8 +59,8 @@ The `desktopCapturer` module has the following methods: Gets all desktop sources. **Note:** There is no garuantee that the size of `source.thumbnail` is always -the same as the `thumnailSize` in `options`. It also depends on the scale of the -screen or window. +the same as the `thumnbailSize` in `options`. It also depends on the scale of +the screen or window. ## Source