From 352a9cd6f210161c659ecec58fa1f4f7a4db5f4a Mon Sep 17 00:00:00 2001 From: "Brian R. Bondy" Date: Wed, 8 Jun 2016 16:37:27 -0400 Subject: [PATCH] Allow obtaining system Pepper Flash path --- atom/browser/api/atom_api_app.cc | 2 ++ docs/api/app.md | 1 + docs/tutorial/using-pepper-flash-plugin.md | 2 ++ 3 files changed, 5 insertions(+) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 87f960a87824..0b7612400ff0 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -110,6 +110,8 @@ int GetPathConstant(const std::string& name) { return chrome::DIR_USER_PICTURES; else if (name == "videos") return chrome::DIR_USER_VIDEOS; + else if (name == "pepperFlashSystemPlugin") + return chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN; else return -1; } diff --git a/docs/api/app.md b/docs/api/app.md index 1f72dba2ca0b..b7ce6ce02fa9 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -346,6 +346,7 @@ You can request the following paths by the name: * `music` Directory for a user's music. * `pictures` Directory for a user's pictures. * `videos` Directory for a user's videos. +* `pepperFlashSystemPlugin` Full path to the system version of the Pepper Flash plugin. ### `app.setPath(name, path)` diff --git a/docs/tutorial/using-pepper-flash-plugin.md b/docs/tutorial/using-pepper-flash-plugin.md index 76c89d6fdd43..9ff6ebf00eb2 100644 --- a/docs/tutorial/using-pepper-flash-plugin.md +++ b/docs/tutorial/using-pepper-flash-plugin.md @@ -41,6 +41,8 @@ app.on('ready', () => { }); ``` +The path to the system wide Pepper Flash plugin can also be obtained by calling `app.getPath('pepperFlashSystemPlugin')`. + ## Enable Flash Plugin in a `` Tag Add `plugins` attribute to `` tag.