| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // | oauth issue 1 | | 233 // | oauth issue 1 | |
| 234 // +---------------------------+ | 234 // +---------------------------+ |
| 235 // | oauth issue 2 | | 235 // | oauth issue 2 | |
| 236 // +---------------------------+ | 236 // +---------------------------+ |
| 237 | 237 |
| 238 views::GridLayout* layout = views::GridLayout::CreatePanel(this); | 238 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
| 239 SetLayoutManager(layout); | 239 SetLayoutManager(layout); |
| 240 | 240 |
| 241 int column_set_id = 0; | 241 int column_set_id = 0; |
| 242 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); | 242 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); |
| 243 int left_column_width = prompt.GetPermissionCount() > 0 ? | 243 int left_column_width = |
| 244 kPermissionsLeftColumnWidth : kNoPermissionsLeftColumnWidth; | 244 prompt.GetPermissionCount() + prompt.GetOAuthIssueCount() > 0 ? |
| 245 kPermissionsLeftColumnWidth : kNoPermissionsLeftColumnWidth; |
| 245 if (is_bundle_install()) | 246 if (is_bundle_install()) |
| 246 left_column_width = kBundleLeftColumnWidth; | 247 left_column_width = kBundleLeftColumnWidth; |
| 247 | 248 |
| 248 column_set->AddColumn(views::GridLayout::LEADING, | 249 column_set->AddColumn(views::GridLayout::LEADING, |
| 249 views::GridLayout::FILL, | 250 views::GridLayout::FILL, |
| 250 0, // no resizing | 251 0, // no resizing |
| 251 views::GridLayout::USE_PREF, | 252 views::GridLayout::USE_PREF, |
| 252 0, // no fixed width | 253 0, // no fixed width |
| 253 left_column_width); | 254 left_column_width); |
| 254 if (!is_bundle_install()) { | 255 if (!is_bundle_install()) { |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 rotate.ConcatTranslate(arrow_view_->width() / 2.0, | 615 rotate.ConcatTranslate(arrow_view_->width() / 2.0, |
| 615 arrow_view_->height() / 2.0); | 616 arrow_view_->height() / 2.0); |
| 616 } | 617 } |
| 617 arrow_view_->SetTransform(rotate); | 618 arrow_view_->SetTransform(rotate); |
| 618 } | 619 } |
| 619 } | 620 } |
| 620 | 621 |
| 621 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { | 622 void IssueAdviceView::ChildPreferredSizeChanged(views::View* child) { |
| 622 owner_->SizeToContents(); | 623 owner_->SizeToContents(); |
| 623 } | 624 } |
| OLD | NEW |