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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 permissions_header = new views::Label(prompt.GetPermissionsHeading()); | 369 permissions_header = new views::Label(prompt.GetPermissionsHeading()); |
370 } | 370 } |
371 permissions_header->SetMultiLine(true); | 371 permissions_header->SetMultiLine(true); |
372 permissions_header->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 372 permissions_header->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
373 permissions_header->SizeToFit(left_column_width); | 373 permissions_header->SizeToFit(left_column_width); |
374 layout->AddView(permissions_header); | 374 layout->AddView(permissions_header); |
375 | 375 |
376 for (size_t i = 0; i < prompt.GetPermissionCount(); ++i) { | 376 for (size_t i = 0; i < prompt.GetPermissionCount(); ++i) { |
377 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 377 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
378 layout->StartRow(0, column_set_id); | 378 layout->StartRow(0, column_set_id); |
379 views::Label* permission_label = new views::Label( | 379 views::Label* permission_label = new views::Label(PrepareForDisplay( |
380 prompt.GetPermission(i)); | 380 prompt.GetPermission(i), true)); |
381 permission_label->SetMultiLine(true); | 381 permission_label->SetMultiLine(true); |
382 permission_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 382 permission_label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
383 permission_label->SizeToFit(left_column_width); | 383 permission_label->SizeToFit(left_column_width); |
384 layout->AddView(permission_label); | 384 layout->AddView(permission_label); |
385 } | 385 } |
386 } | 386 } |
387 | 387 |
388 if (prompt.GetOAuthIssueCount()) { | 388 if (prompt.GetOAuthIssueCount()) { |
389 // Slide in under the permissions; stretch all the way to the right of the | 389 // Slide in under the permissions; stretch all the way to the right of the |
390 // dialog. | 390 // dialog. |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 rotate.ConcatTranslate(arrow_view_->width() / 2.0, | 614 rotate.ConcatTranslate(arrow_view_->width() / 2.0, |
615 arrow_view_->height() / 2.0); | 615 arrow_view_->height() / 2.0); |
616 } | 616 } |
617 arrow_view_->SetTransform(rotate); | 617 arrow_view_->SetTransform(rotate); |
618 } | 618 } |
619 } | 619 } |
620 | 620 |
621 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { | 621 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { |
622 owner_->SizeToContents(); | 622 owner_->SizeToContents(); |
623 } | 623 } |
OLD | NEW |