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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_api.cc

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implements the Chrome Extensions Media Galleries API. 5 // Implements the Chrome Extensions Media Galleries API.
6 6
7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h" 7 #include "chrome/browser/extensions/api/media_galleries/media_galleries_api.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 void MediaGalleriesGetMediaFileSystemsFunction::ReturnGalleries( 431 void MediaGalleriesGetMediaFileSystemsFunction::ReturnGalleries(
432 const std::vector<MediaFileSystemInfo>& filesystems) { 432 const std::vector<MediaFileSystemInfo>& filesystems) {
433 std::unique_ptr<base::ListValue> list( 433 std::unique_ptr<base::ListValue> list(
434 ConstructFileSystemList(render_frame_host(), extension(), filesystems)); 434 ConstructFileSystemList(render_frame_host(), extension(), filesystems));
435 if (!list.get()) { 435 if (!list.get()) {
436 SendResponse(false); 436 SendResponse(false);
437 return; 437 return;
438 } 438 }
439 439
440 // The custom JS binding will use this list to create DOMFileSystem objects. 440 // The custom JS binding will use this list to create FileSystem objects.
441 SetResult(std::move(list)); 441 SetResult(std::move(list));
442 SendResponse(true); 442 SendResponse(true);
443 } 443 }
444 444
445 void MediaGalleriesGetMediaFileSystemsFunction::ShowDialog() { 445 void MediaGalleriesGetMediaFileSystemsFunction::ShowDialog() {
446 media_galleries::UsageCount(media_galleries::SHOW_DIALOG); 446 media_galleries::UsageCount(media_galleries::SHOW_DIALOG);
447 WebContents* contents = 447 WebContents* contents =
448 ChromeExtensionFunctionDetails(this).GetOriginWebContents(); 448 ChromeExtensionFunctionDetails(this).GetOriginWebContents();
449 if (!contents) { 449 if (!contents) {
450 SendResponse(false); 450 SendResponse(false);
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 SendResponse(false); 871 SendResponse(false);
872 return; 872 return;
873 } 873 }
874 874
875 gallery_watch_manager()->RemoveWatch( 875 gallery_watch_manager()->RemoveWatch(
876 GetProfile(), extension_id(), gallery_pref_id); 876 GetProfile(), extension_id(), gallery_pref_id);
877 SendResponse(true); 877 SendResponse(true);
878 } 878 }
879 879
880 } // namespace extensions 880 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/fileapi_util.h ('k') | chrome/common/extensions/api/developer_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698