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

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

Issue 2888563004: Delete panel metrics and define insets in terms of distance metrics. (Closed)
Patch Set: one wrong conversion Created 3 years, 7 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Header and separator line. 143 // Header and separator line.
144 if (!section_headers[i].empty() && !entries.empty()) { 144 if (!section_headers[i].empty() && !entries.empty()) {
145 views::Separator* separator = new views::Separator(); 145 views::Separator* separator = new views::Separator();
146 scroll_container->AddChildView(separator); 146 scroll_container->AddChildView(separator);
147 147
148 views::Label* header = new views::Label(section_headers[i]); 148 views::Label* header = new views::Label(section_headers[i]);
149 header->SetMultiLine(true); 149 header->SetMultiLine(true);
150 header->SetHorizontalAlignment(gfx::ALIGN_LEFT); 150 header->SetHorizontalAlignment(gfx::ALIGN_LEFT);
151 header->SetBorder(views::CreateEmptyBorder( 151 header->SetBorder(views::CreateEmptyBorder(
152 vertical_padding, 152 vertical_padding,
153 provider->GetDistanceMetric(DISTANCE_PANEL_CONTENT_MARGIN), 153 provider->GetDistanceMetric(
154 views::DISTANCE_DIALOG_CONTENTS_VERTICAL_MARGIN),
154 vertical_padding, 0)); 155 vertical_padding, 0));
155 scroll_container->AddChildView(header); 156 scroll_container->AddChildView(header);
156 } 157 }
157 158
158 // Checkboxes. 159 // Checkboxes.
159 MediaGalleriesDialogController::Entries::const_iterator iter; 160 MediaGalleriesDialogController::Entries::const_iterator iter;
160 for (iter = entries.begin(); iter != entries.end(); ++iter) { 161 for (iter = entries.begin(); iter != entries.end(); ++iter) {
161 int spacing = iter + 1 == entries.end() ? small_vertical_padding : 0; 162 int spacing = iter + 1 == entries.end() ? small_vertical_padding : 0;
162 AddOrUpdateGallery(*iter, scroll_container, spacing); 163 AddOrUpdateGallery(*iter, scroll_container, spacing);
163 } 164 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 context_menu_runner_.reset(); 322 context_menu_runner_.reset();
322 } 323 }
323 324
324 // MediaGalleriesDialogViewsController ----------------------------------------- 325 // MediaGalleriesDialogViewsController -----------------------------------------
325 326
326 // static 327 // static
327 MediaGalleriesDialog* MediaGalleriesDialog::Create( 328 MediaGalleriesDialog* MediaGalleriesDialog::Create(
328 MediaGalleriesDialogController* controller) { 329 MediaGalleriesDialogController* controller) {
329 return new MediaGalleriesDialogViews(controller); 330 return new MediaGalleriesDialogViews(controller);
330 } 331 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698