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

Side by Side Diff: chrome/browser/media_gallery/media_galleries_dialog_controller.cc

Issue 10832330: disable [add folder] button for media galleries dialog if (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h" 5 #include "chrome/browser/media_gallery/media_galleries_dialog_controller.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h" 9 #include "chrome/browser/media_gallery/media_galleries_preferences_factory.h"
10 #include "chrome/browser/ui/chrome_select_file_policy.h" 10 #include "chrome/browser/ui/chrome_select_file_policy.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return l10n_util::GetStringFUTF16(IDS_MEDIA_GALLERIES_DIALOG_READ_SUBTEXT, 56 return l10n_util::GetStringFUTF16(IDS_MEDIA_GALLERIES_DIALOG_READ_SUBTEXT,
57 UTF8ToUTF16(extension_->name())); 57 UTF8ToUTF16(extension_->name()));
58 } 58 }
59 // TODO(estade): handle write et al. 59 // TODO(estade): handle write et al.
60 return string16(); 60 return string16();
61 } 61 }
62 62
63 void MediaGalleriesDialogController::OnAddFolderClicked() { 63 void MediaGalleriesDialogController::OnAddFolderClicked() {
64 FilePath user_data_dir; 64 FilePath user_data_dir;
65 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 65 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
66 // TODO(estade): if file dialogs are disabled we need to handle it somehow.
67 select_folder_dialog_ = 66 select_folder_dialog_ =
68 ui::SelectFileDialog::Create(this, new ChromeSelectFilePolicy(NULL)); 67 ui::SelectFileDialog::Create(this, new ChromeSelectFilePolicy(NULL));
69 select_folder_dialog_->SelectFile( 68 select_folder_dialog_->SelectFile(
70 ui::SelectFileDialog::SELECT_FOLDER, 69 ui::SelectFileDialog::SELECT_FOLDER,
71 l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_ADD_GALLERY_TITLE), 70 l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_ADD_GALLERY_TITLE),
72 user_data_dir, 71 user_data_dir,
73 NULL, 0, FILE_PATH_LITERAL(""), 72 NULL, 0, FILE_PATH_LITERAL(""),
74 tab_contents_->web_contents()->GetView()->GetTopLevelNativeWindow(), 73 tab_contents_->web_contents()->GetView()->GetTopLevelNativeWindow(),
75 NULL); 74 NULL);
76 } 75 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 preferences_->SetGalleryPermissionForExtension( 181 preferences_->SetGalleryPermissionForExtension(
183 *extension_, id, true); 182 *extension_, id, true);
184 } 183 }
185 } 184 }
186 185
187 // MediaGalleries dialog ------------------------------------------------------- 186 // MediaGalleries dialog -------------------------------------------------------
188 187
189 MediaGalleriesDialog::~MediaGalleriesDialog() {} 188 MediaGalleriesDialog::~MediaGalleriesDialog() {}
190 189
191 } // namespace chrome 190 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698