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

Unified Diff: chrome/browser/media_gallery/media_galleries_dialog_controller.cc

Issue 10834242: Cocoa: Implement media gallery dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 4 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
Index: chrome/browser/media_gallery/media_galleries_dialog_controller.cc
diff --git a/chrome/browser/media_gallery/media_galleries_dialog_controller.cc b/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
index d3bbc60864c084c1453c17ce34da63601f9887ea..e404df59816052a4f8c2b2d548ece080e2eef115 100644
--- a/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
+++ b/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
@@ -39,12 +39,12 @@ MediaGalleriesDialogController::~MediaGalleriesDialogController() {
select_folder_dialog_->ListenerDestroyed();
}
-string16 MediaGalleriesDialogController::GetHeader() {
+string16 MediaGalleriesDialogController::GetHeader() const {
return l10n_util::GetStringFUTF16(IDS_MEDIA_GALLERIES_DIALOG_HEADER,
UTF8ToUTF16(extension_.name()));
}
-string16 MediaGalleriesDialogController::GetSubtext() {
+string16 MediaGalleriesDialogController::GetSubtext() const {
if (extension_.HasAPIPermission(
extensions::APIPermission::kMediaGalleriesRead)) {
return l10n_util::GetStringFUTF16(IDS_MEDIA_GALLERIES_DIALOG_READ_SUBTEXT,
@@ -54,6 +54,15 @@ string16 MediaGalleriesDialogController::GetSubtext() {
return string16();
}
+bool MediaGalleriesDialogController::HasPermittedGalleries() const {
+ for (KnownGalleryPermissions::const_iterator iter = permissions().begin();
+ iter != permissions().end(); iter++) {
+ if (iter->second.allowed)
+ return true;
+ }
+ return false;
+}
+
void MediaGalleriesDialogController::OnAddFolderClicked() {
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
@@ -69,7 +78,7 @@ void MediaGalleriesDialogController::OnAddFolderClicked() {
NULL);
}
-void MediaGalleriesDialogController::GalleryToggled(
+void MediaGalleriesDialogController::DidToggleGallery(
const MediaGalleryPrefInfo* gallery,
bool enabled) {
// Check known galleries.

Powered by Google App Engine
This is Rietveld 408576698