| 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/ui/views/extensions/media_galleries_dialog_views.h" | 5 #include "chrome/browser/ui/views/extensions/media_galleries_dialog_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/views/constrained_window_views.h" | 7 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 8 #include "grit/generated_resources.h" | 8 #include "grit/generated_resources.h" |
| 9 #include "grit/locale_settings.h" | 9 #include "grit/locale_settings.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool permitted) { | 124 bool permitted) { |
| 125 CheckboxMap::iterator iter = checkbox_map_.find(gallery); | 125 CheckboxMap::iterator iter = checkbox_map_.find(gallery); |
| 126 if (iter != checkbox_map_.end()) { | 126 if (iter != checkbox_map_.end()) { |
| 127 iter->second->SetChecked(permitted); | 127 iter->second->SetChecked(permitted); |
| 128 return false; | 128 return false; |
| 129 } | 129 } |
| 130 | 130 |
| 131 views::Checkbox* checkbox = new views::Checkbox(gallery->display_name); | 131 views::Checkbox* checkbox = new views::Checkbox(gallery->display_name); |
| 132 checkbox->set_border(new MediaGalleriesCheckboxBorder(checkbox)); | 132 checkbox->set_border(new MediaGalleriesCheckboxBorder(checkbox)); |
| 133 checkbox->set_listener(this); | 133 checkbox->set_listener(this); |
| 134 checkbox->SetTooltipText(gallery->path.LossyDisplayName()); | 134 checkbox->SetTooltipText(gallery->AbsolutePath().LossyDisplayName()); |
| 135 checkbox_container_->AddChildView(checkbox); | 135 checkbox_container_->AddChildView(checkbox); |
| 136 checkbox->SetChecked(permitted); | 136 checkbox->SetChecked(permitted); |
| 137 checkbox_map_[gallery] = checkbox; | 137 checkbox_map_[gallery] = checkbox; |
| 138 | 138 |
| 139 return true; | 139 return true; |
| 140 } | 140 } |
| 141 | 141 |
| 142 void MediaGalleriesDialogViews::DeleteDelegate() { | 142 void MediaGalleriesDialogViews::DeleteDelegate() { |
| 143 controller_->DialogFinished(accepted_); | 143 controller_->DialogFinished(accepted_); |
| 144 } | 144 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 // MediaGalleriesDialogViewsController ----------------------------------------- | 214 // MediaGalleriesDialogViewsController ----------------------------------------- |
| 215 | 215 |
| 216 // static | 216 // static |
| 217 MediaGalleriesDialog* MediaGalleriesDialog::Create( | 217 MediaGalleriesDialog* MediaGalleriesDialog::Create( |
| 218 MediaGalleriesDialogController* controller) { | 218 MediaGalleriesDialogController* controller) { |
| 219 return new MediaGalleriesDialogViews(controller); | 219 return new MediaGalleriesDialogViews(controller); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace chrome | 222 } // namespace chrome |
| OLD | NEW |