OLD | NEW |
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_galleries/media_galleries_dialog_controller.h" | 5 #include "chrome/browser/media_galleries/media_galleries_dialog_controller.h" |
6 | 6 |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 base::FilePath user_data_dir; | 179 base::FilePath user_data_dir; |
180 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); | 180 PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |
181 select_folder_dialog_ = | 181 select_folder_dialog_ = |
182 ui::SelectFileDialog::Create(this, new ChromeSelectFilePolicy(NULL)); | 182 ui::SelectFileDialog::Create(this, new ChromeSelectFilePolicy(NULL)); |
183 select_folder_dialog_->SelectFile( | 183 select_folder_dialog_->SelectFile( |
184 ui::SelectFileDialog::SELECT_FOLDER, | 184 ui::SelectFileDialog::SELECT_FOLDER, |
185 l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_ADD_GALLERY_TITLE), | 185 l10n_util::GetStringUTF16(IDS_MEDIA_GALLERIES_DIALOG_ADD_GALLERY_TITLE), |
186 user_data_dir, | 186 user_data_dir, |
187 NULL, | 187 NULL, |
188 0, | 188 0, |
189 FILE_PATH_LITERAL(std::string()), | 189 base::FilePath::StringType(), |
190 web_contents_->GetView()->GetTopLevelNativeWindow(), | 190 web_contents_->GetView()->GetTopLevelNativeWindow(), |
191 NULL); | 191 NULL); |
192 } | 192 } |
193 | 193 |
194 void MediaGalleriesDialogController::DidToggleGallery( | 194 void MediaGalleriesDialogController::DidToggleGallery( |
195 const MediaGalleryPrefInfo* gallery, | 195 const MediaGalleryPrefInfo* gallery, |
196 bool enabled) { | 196 bool enabled) { |
197 // Check known galleries. | 197 // Check known galleries. |
198 KnownGalleryPermissions::iterator iter = | 198 KnownGalleryPermissions::iterator iter = |
199 known_galleries_.find(gallery->pref_id); | 199 known_galleries_.find(gallery->pref_id); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 if (iter->pref_info.device_id == device_id) | 400 if (iter->pref_info.device_id == device_id) |
401 dialog_->UpdateGallery(&iter->pref_info, iter->allowed); | 401 dialog_->UpdateGallery(&iter->pref_info, iter->allowed); |
402 } | 402 } |
403 } | 403 } |
404 | 404 |
405 // MediaGalleries dialog ------------------------------------------------------- | 405 // MediaGalleries dialog ------------------------------------------------------- |
406 | 406 |
407 MediaGalleriesDialog::~MediaGalleriesDialog() {} | 407 MediaGalleriesDialog::~MediaGalleriesDialog() {} |
408 | 408 |
409 } // namespace chrome | 409 } // namespace chrome |
OLD | NEW |