Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc

Issue 134993002: Media Galleries: chrome.mediaGalleries.addUserSelectedFolder() requires a user gesture. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/media_galleries.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc
===================================================================
--- chrome/browser/extensions/api/media_galleries/media_galleries_api.cc (revision 244236)
+++ chrome/browser/extensions/api/media_galleries/media_galleries_api.cc (working copy)
@@ -420,6 +420,11 @@
}
void MediaGalleriesAddUserSelectedFolderFunction::OnPreferencesInit() {
+ if (!user_gesture()) {
+ OnDirectorySelected(base::FilePath());
+ return;
+ }
+
Profile* profile = GetProfile();
const std::string& app_id = GetExtension()->id();
WebContents* contents = GetWebContents(render_view_host(), profile, app_id);
« no previous file with comments | « no previous file | chrome/common/extensions/api/media_galleries.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698