본문 바로가기
Computer/Chrome Extension

OverView

by 생각하는달팽이 2015. 1. 28.

기본적으로

크롬확장프로그램은 HTML,CSS,JavaScript,Image 등과 같은 파일들의 압축이다.

확장프로그램은 근본적으로는 웹페이지이다. 그리고 크롬 브라우저에서 제공하는 API 를 사용할 수 있다.


Stable APIs


NameDescriptionSince
accessibilityFeatures Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission. 37
alarms Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future. 22
bookmarks Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you can use to create a custom Bookmark Manager page. 5
browserAction Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup. 5
browsingData Use the chrome.browsingData API to remove browsing data from a user's local profile. 19
commands Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension. 25
contentSettings Use the chrome.contentSettings API to change settings that control whether websites can use features such as cookies, JavaScript, and plug-ins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally. 16
contextMenus Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages. 6
cookies Use the chrome.cookies API to query and modify cookies, and to be notified when they change. 6
debugger The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks. 18
declarativeContent Use the chrome.declarativeContent API to take actions depending on the content of a page, without requiring permission to read the page's content. 33
desktopCapture Desktop Capture API that can be used to capture content of screen, individual windows or tabs. 34
devtools.inspectedWindow Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page. 18
devtools.network Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel. 18
devtools.panels Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars. 18
downloads Use the chrome.downloads API to programmatically initiate, monitor, manipulate, and search for downloads. 31
enterprise.platformKeys Use the chrome.enterprise.platformKeys API to generate hardware-backed keys and to install certificates for these keys. The certificates will be available to the platform and can, for example, be used for TLS authentication and network access. 37
events The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens. 21
extension The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing. 5
extensionTypes The chrome.extensionTypes API contains type declarations for Chrome extensions. 39
fileBrowserHandler Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website. 12
fileSystemProvider Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS. 40
fontSettings Use the chrome.fontSettings API to manage Chrome's font settings. 22
gcm Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service. 35
history Use the chrome.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see Override Pages. 5
i18n Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension. 5
identity Use the chrome.identity API to get OAuth2 access tokens. 29
idle Use the chrome.idle API to detect when the machine's idle state changes. 6
input.ime Use the chrome.input.ime API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window. 21
management The chrome.management API provides ways to manage the list of extensions/apps that are installed and running. It is particularly useful for extensions that override the built-in New Tab page. 8
notifications Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray. 28
omnibox The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox. 9
pageAction Use the chrome.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages. 5
pageCapture Use the chrome.pageCapture API to save a tab as MHTML. 18
permissions Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary. 16
power Use the chrome.power API to override the system's power management features. 27
privacy Use the chrome.privacy API to control usage of the features in Chrome that can affect a user's privacy. This API relies on the ChromeSetting prototype of the type API for getting and setting Chrome's configuration. 18
proxy Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API for getting and setting the proxy configuration. 13
pushMessaging The chrome.pushMessaging API is deprecated since Chrome 38, and will no longer be supported in Chrome 41. Switch to chrome.gcm to take advantage of Google Cloud Messaging. 24
runtime Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs. 22
sessions Use the chrome.sessions API to query and restore tabs and windows from a browsing session. 37
storage Use the chrome.storage API to store, retrieve, and track changes to user data. 20
system.cpu Use the system.cpu API to query CPU metadata. 32
system.memory The chrome.system.memory API. 32
system.storage Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached. 30
tabCapture Use the chrome.tabCapture API to interact with tab media streams. 31
tabs Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser. 5
topSites Use the chrome.topSites API to access the top sites that are displayed on the new tab page. 19
tts Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine. 14
ttsEngine Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status. 14
types The chrome.types API contains type declarations for Chrome. 13
webNavigation Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight. 16
webRequest Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight. 17
webstore Use the chrome.webstore API to initiate app and extension installations "inline" from your site. 15
windows Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser. 5



Dev APIs

NameDescription
automation The chrome.automation API allows developers to access the automation (accessibility) tree for the browser. The tree resembles the DOM tree, but only exposes the semantic structure of a page. It can be used to programmatically interact with a page by examining names, roles, and states, listening for events, and performing actions on nodes.
infobars Use the chrome.infobars API to add a horizontal panel just above a tab's contents. See the screenshot below.
location Use the chrome.location API to retrieve the geographic location of the host machine. This API is a version of the HTML Geolocation API that is compatible with event pages.
processes Use the chrome.processes API to interact with the browser's processes.
signedInDevices Use the chrome.signedInDevices API to get a list of devices signed into chrome with the same account as the current profile.
vpnProvider Use the chrome.vpnProvider API to implement a VPN client.


기본


1. 크롬 확장 프로그램의 위치

주소창 우측에 배치되거나, 주소창 안쪽 우측에 배치됩니다.

https://developer.chrome.com/extensions/overview

출처: https://developer.chrome.com/extensions/overview


2. manifest file (manifest.json)

확장프로그램의 정보를 담고 있다.



3. Architecture 

많은 확장프로그램들이 백그라운드 페이지를 갖고있다. 확장프로그램의메인 로직을 관장하기 위해서 사용한다.


            


백그라운트 페이지와 컨텐츠 스크립트는 서로 메시지를 주고 받는다.

반응형

'Computer > Chrome Extension' 카테고리의 다른 글

[Sample] Content Settings  (0) 2015.01.30
[Sample] Print this page  (0) 2015.01.30
[Sample] My Bookmarks  (0) 2015.01.30
크롬 확장 API 리스트 정리  (0) 2015.01.30