OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_scan_result_dialog_
views.h" | 5 #include "chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_
views.h" |
6 | 6 |
7 #include "components/web_modal/web_contents_modal_dialog_host.h" | 7 #include "components/web_modal/web_contents_modal_dialog_host.h" |
8 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 8 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 9 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
12 #include "grit/locale_settings.h" | 12 #include "grit/locale_settings.h" |
| 13 #include "grit/theme_resources.h" |
13 #include "grit/ui_resources.h" | 14 #include "grit/ui_resources.h" |
14 #include "third_party/skia/include/core/SkColor.h" | 15 #include "third_party/skia/include/core/SkColor.h" |
15 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/views/border.h" | 18 #include "ui/views/border.h" |
18 #include "ui/views/controls/button/checkbox.h" | 19 #include "ui/views/controls/button/checkbox.h" |
19 #include "ui/views/controls/button/image_button.h" | 20 #include "ui/views/controls/button/image_button.h" |
20 #include "ui/views/controls/label.h" | 21 #include "ui/views/controls/label.h" |
21 #include "ui/views/controls/menu/menu_runner.h" | 22 #include "ui/views/controls/menu/menu_runner.h" |
22 #include "ui/views/controls/scroll_view.h" | 23 #include "ui/views/controls/scroll_view.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 views::Checkbox* checkbox = new views::Checkbox(label); | 185 views::Checkbox* checkbox = new views::Checkbox(label); |
185 checkbox->set_listener(this); | 186 checkbox->set_listener(this); |
186 checkbox->set_context_menu_controller(this); | 187 checkbox->set_context_menu_controller(this); |
187 checkbox->SetTooltipText(tooltip_text); | 188 checkbox->SetTooltipText(tooltip_text); |
188 | 189 |
189 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 190 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
190 views::ImageButton* folder_viewer_button = new views::ImageButton(this); | 191 views::ImageButton* folder_viewer_button = new views::ImageButton(this); |
191 folder_viewer_button->set_context_menu_controller(this); | 192 folder_viewer_button->set_context_menu_controller(this); |
192 folder_viewer_button->SetImage(views::ImageButton::STATE_NORMAL, | 193 folder_viewer_button->SetImage(views::ImageButton::STATE_NORMAL, |
193 rb.GetImageSkiaNamed(IDR_OAK)); | 194 rb.GetImageSkiaNamed(IDR_FILE_FOLDER)); |
| 195 folder_viewer_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER, |
| 196 views::ImageButton::ALIGN_MIDDLE); |
194 folder_viewer_button->SetAccessibleName(l10n_util::GetStringUTF16( | 197 folder_viewer_button->SetAccessibleName(l10n_util::GetStringUTF16( |
195 IDS_MEDIA_GALLERIES_SCAN_RESULT_OPEN_FOLDER_VIEW_ACCESSIBILITY_NAME)); | 198 IDS_MEDIA_GALLERIES_SCAN_RESULT_OPEN_FOLDER_VIEW_ACCESSIBILITY_NAME)); |
196 folder_viewer_button->SetFocusable(true); | 199 folder_viewer_button->SetFocusable(true); |
197 folder_viewer_button->SetVisible(is_attached); | 200 folder_viewer_button->SetVisible(is_attached); |
198 | 201 |
199 views::Label* secondary_text = new views::Label(details); | 202 views::Label* secondary_text = new views::Label(details); |
200 secondary_text->set_context_menu_controller(this); | 203 secondary_text->set_context_menu_controller(this); |
201 secondary_text->SetTooltipText(tooltip_text); | 204 secondary_text->SetTooltipText(tooltip_text); |
202 secondary_text->SetEnabledColor(kDeemphasizedTextColor); | 205 secondary_text->SetEnabledColor(kDeemphasizedTextColor); |
203 secondary_text->SetTooltipText(tooltip_text); | 206 secondary_text->SetTooltipText(tooltip_text); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 325 } |
323 } | 326 } |
324 | 327 |
325 // MediaGalleriesScanResultDialogViewsController ------------------------------- | 328 // MediaGalleriesScanResultDialogViewsController ------------------------------- |
326 | 329 |
327 // static | 330 // static |
328 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( | 331 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( |
329 MediaGalleriesScanResultDialogController* controller) { | 332 MediaGalleriesScanResultDialogController* controller) { |
330 return new MediaGalleriesScanResultDialogViews(controller); | 333 return new MediaGalleriesScanResultDialogViews(controller); |
331 } | 334 } |
OLD | NEW |