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

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

Issue 2675983003: views::Separator cleanup. (Closed)
Patch Set: revert test change Created 3 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
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 views::kRelatedControlVerticalSpacing, 0)); 131 views::kRelatedControlVerticalSpacing, 0));
132 132
133 std::vector<base::string16> section_headers = 133 std::vector<base::string16> section_headers =
134 controller_->GetSectionHeaders(); 134 controller_->GetSectionHeaders();
135 for (size_t i = 0; i < section_headers.size(); i++) { 135 for (size_t i = 0; i < section_headers.size(); i++) {
136 MediaGalleriesDialogController::Entries entries = 136 MediaGalleriesDialogController::Entries entries =
137 controller_->GetSectionEntries(i); 137 controller_->GetSectionEntries(i);
138 138
139 // Header and separator line. 139 // Header and separator line.
140 if (!section_headers[i].empty() && !entries.empty()) { 140 if (!section_headers[i].empty() && !entries.empty()) {
141 views::Separator* separator = new views::Separator( 141 views::Separator* separator = new views::Separator();
142 views::Separator::HORIZONTAL);
143 scroll_container->AddChildView(separator); 142 scroll_container->AddChildView(separator);
144 143
145 views::Label* header = new views::Label(section_headers[i]); 144 views::Label* header = new views::Label(section_headers[i]);
146 header->SetMultiLine(true); 145 header->SetMultiLine(true);
147 header->SetHorizontalAlignment(gfx::ALIGN_LEFT); 146 header->SetHorizontalAlignment(gfx::ALIGN_LEFT);
148 header->SetBorder(views::CreateEmptyBorder( 147 header->SetBorder(views::CreateEmptyBorder(
149 views::kRelatedControlVerticalSpacing, views::kPanelHorizMargin, 148 views::kRelatedControlVerticalSpacing, views::kPanelHorizMargin,
150 views::kRelatedControlVerticalSpacing, 0)); 149 views::kRelatedControlVerticalSpacing, 0));
151 scroll_container->AddChildView(header); 150 scroll_container->AddChildView(header);
152 } 151 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 context_menu_runner_.reset(); 320 context_menu_runner_.reset();
322 } 321 }
323 322
324 // MediaGalleriesDialogViewsController ----------------------------------------- 323 // MediaGalleriesDialogViewsController -----------------------------------------
325 324
326 // static 325 // static
327 MediaGalleriesDialog* MediaGalleriesDialog::Create( 326 MediaGalleriesDialog* MediaGalleriesDialog::Create(
328 MediaGalleriesDialogController* controller) { 327 MediaGalleriesDialogController* controller) {
329 return new MediaGalleriesDialogViews(controller); 328 return new MediaGalleriesDialogViews(controller);
330 } 329 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | chrome/browser/ui/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698