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

Side by Side Diff: chrome/browser/ui/views/extensions/media_galleries_scan_result_dialog_views.cc

Issue 130263007: Set a reasonable icon for the media galleries scan result dialog folder viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move resource Created 6 years, 10 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 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 "chrome/browser/ui/views/constrained_window_views.h" 7 #include "chrome/browser/ui/views/constrained_window_views.h"
8 #include "components/web_modal/web_contents_modal_dialog_host.h" 8 #include "components/web_modal/web_contents_modal_dialog_host.h"
9 #include "components/web_modal/web_contents_modal_dialog_manager.h" 9 #include "components/web_modal/web_contents_modal_dialog_manager.h"
10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 10 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
11 #include "content/public/browser/web_contents.h" 11 #include "content/public/browser/web_contents.h"
12 #include "grit/generated_resources.h" 12 #include "grit/generated_resources.h"
13 #include "grit/locale_settings.h" 13 #include "grit/locale_settings.h"
14 #include "grit/theme_resources.h"
14 #include "grit/ui_resources.h" 15 #include "grit/ui_resources.h"
15 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/views/border.h" 19 #include "ui/views/border.h"
19 #include "ui/views/controls/button/checkbox.h" 20 #include "ui/views/controls/button/checkbox.h"
20 #include "ui/views/controls/button/image_button.h" 21 #include "ui/views/controls/button/image_button.h"
21 #include "ui/views/controls/label.h" 22 #include "ui/views/controls/label.h"
22 #include "ui/views/controls/menu/menu_runner.h" 23 #include "ui/views/controls/menu/menu_runner.h"
23 #include "ui/views/controls/scroll_view.h" 24 #include "ui/views/controls/scroll_view.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 184 }
184 185
185 views::Checkbox* checkbox = new views::Checkbox(label); 186 views::Checkbox* checkbox = new views::Checkbox(label);
186 checkbox->set_listener(this); 187 checkbox->set_listener(this);
187 checkbox->set_context_menu_controller(this); 188 checkbox->set_context_menu_controller(this);
188 checkbox->SetTooltipText(tooltip_text); 189 checkbox->SetTooltipText(tooltip_text);
189 190
190 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 191 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
191 views::ImageButton* folder_viewer_button = new views::ImageButton(this); 192 views::ImageButton* folder_viewer_button = new views::ImageButton(this);
192 folder_viewer_button->set_context_menu_controller(this); 193 folder_viewer_button->set_context_menu_controller(this);
193 folder_viewer_button->SetImage(views::ImageButton::STATE_NORMAL, 194 folder_viewer_button->SetImage(
194 rb.GetImageSkiaNamed(IDR_OAK)); 195 views::ImageButton::STATE_NORMAL,
196 rb.GetImageSkiaNamed(IDR_FILE_MANAGER_IMG_FILETYPE_FOLDER));
197 folder_viewer_button->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
198 views::ImageButton::ALIGN_MIDDLE);
195 folder_viewer_button->SetAccessibleName(l10n_util::GetStringUTF16( 199 folder_viewer_button->SetAccessibleName(l10n_util::GetStringUTF16(
196 IDS_MEDIA_GALLERIES_SCAN_RESULT_OPEN_FOLDER_VIEW_ACCESSIBILITY_NAME)); 200 IDS_MEDIA_GALLERIES_SCAN_RESULT_OPEN_FOLDER_VIEW_ACCESSIBILITY_NAME));
197 folder_viewer_button->SetFocusable(true); 201 folder_viewer_button->SetFocusable(true);
198 folder_viewer_button->SetVisible(is_attached); 202 folder_viewer_button->SetVisible(is_attached);
199 203
200 views::Label* secondary_text = new views::Label(details); 204 views::Label* secondary_text = new views::Label(details);
201 secondary_text->set_context_menu_controller(this); 205 secondary_text->set_context_menu_controller(this);
202 secondary_text->SetTooltipText(tooltip_text); 206 secondary_text->SetTooltipText(tooltip_text);
203 secondary_text->SetEnabledColor(kDeemphasizedTextColor); 207 secondary_text->SetEnabledColor(kDeemphasizedTextColor);
204 secondary_text->SetTooltipText(tooltip_text); 208 secondary_text->SetTooltipText(tooltip_text);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 337 }
334 } 338 }
335 339
336 // MediaGalleriesScanResultDialogViewsController ------------------------------- 340 // MediaGalleriesScanResultDialogViewsController -------------------------------
337 341
338 // static 342 // static
339 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create( 343 MediaGalleriesScanResultDialog* MediaGalleriesScanResultDialog::Create(
340 MediaGalleriesScanResultDialogController* controller) { 344 MediaGalleriesScanResultDialogController* controller) {
341 return new MediaGalleriesScanResultDialogViews(controller); 345 return new MediaGalleriesScanResultDialogViews(controller);
342 } 346 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698