| 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_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 13 matching lines...) Expand all Loading... |
| 24 TabContents* tab_contents, | 24 TabContents* tab_contents, |
| 25 const Extension& extension, | 25 const Extension& extension, |
| 26 const base::Callback<void(void)>& on_finish) | 26 const base::Callback<void(void)>& on_finish) |
| 27 : tab_contents_(tab_contents), | 27 : tab_contents_(tab_contents), |
| 28 extension_(extension), | 28 extension_(extension), |
| 29 on_finish_(on_finish), | 29 on_finish_(on_finish), |
| 30 preferences_(MediaGalleriesPreferencesFactory::GetForProfile( | 30 preferences_(MediaGalleriesPreferencesFactory::GetForProfile( |
| 31 tab_contents_->profile())) { | 31 tab_contents_->profile())) { |
| 32 LookUpPermissions(); | 32 LookUpPermissions(); |
| 33 | 33 |
| 34 #if defined(TOOLKIT_GTK) | 34 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX) |
| 35 dialog_.reset(MediaGalleriesDialog::Create(this)); | 35 dialog_.reset(MediaGalleriesDialog::Create(this)); |
| 36 #else | 36 #else |
| 37 NOTIMPLEMENTED(); | 37 NOTIMPLEMENTED(); |
| 38 #endif | 38 #endif |
| 39 } | 39 } |
| 40 | 40 |
| 41 MediaGalleriesDialogController::~MediaGalleriesDialogController() { | 41 MediaGalleriesDialogController::~MediaGalleriesDialogController() { |
| 42 if (select_folder_dialog_.get()) | 42 if (select_folder_dialog_.get()) |
| 43 select_folder_dialog_->ListenerDestroyed(); | 43 select_folder_dialog_->ListenerDestroyed(); |
| 44 } | 44 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 preferences_->SetGalleryPermissionForExtension( | 180 preferences_->SetGalleryPermissionForExtension( |
| 181 extension_, id, true); | 181 extension_, id, true); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 // MediaGalleries dialog ------------------------------------------------------- | 185 // MediaGalleries dialog ------------------------------------------------------- |
| 186 | 186 |
| 187 MediaGalleriesDialog::~MediaGalleriesDialog() {} | 187 MediaGalleriesDialog::~MediaGalleriesDialog() {} |
| 188 | 188 |
| 189 } // namespace chrome | 189 } // namespace chrome |
| OLD | NEW |