| 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 "ui/views/bubble/bubble_frame_view.h" | 5 #include "ui/views/bubble/bubble_frame_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "ui/views/controls/button/image_button_factory.h" | 29 #include "ui/views/controls/button/image_button_factory.h" |
| 30 #include "ui/views/controls/image_view.h" | 30 #include "ui/views/controls/image_view.h" |
| 31 #include "ui/views/controls/label.h" | 31 #include "ui/views/controls/label.h" |
| 32 #include "ui/views/layout/box_layout.h" | 32 #include "ui/views/layout/box_layout.h" |
| 33 #include "ui/views/layout/layout_constants.h" | 33 #include "ui/views/layout/layout_constants.h" |
| 34 #include "ui/views/layout/layout_provider.h" | 34 #include "ui/views/layout/layout_provider.h" |
| 35 #include "ui/views/resources/grit/views_resources.h" | 35 #include "ui/views/resources/grit/views_resources.h" |
| 36 #include "ui/views/widget/widget.h" | 36 #include "ui/views/widget/widget.h" |
| 37 #include "ui/views/widget/widget_delegate.h" | 37 #include "ui/views/widget/widget_delegate.h" |
| 38 #include "ui/views/window/client_view.h" | 38 #include "ui/views/window/client_view.h" |
| 39 #include "ui/views/window/dialog_delegate.h" |
| 39 | 40 |
| 40 namespace views { | 41 namespace views { |
| 41 | 42 |
| 42 namespace { | 43 namespace { |
| 43 | 44 |
| 44 // Background color of the footnote view. | 45 // Background color of the footnote view. |
| 45 const SkColor kFootnoteBackgroundColor = SkColorSetRGB(245, 245, 245); | 46 const SkColor kFootnoteBackgroundColor = SkColorSetRGB(245, 245, 245); |
| 46 | 47 |
| 47 // Color of the top border of the footnote. | 48 // Color of the top border of the footnote. |
| 48 const SkColor kFootnoteBorderColor = SkColorSetRGB(229, 229, 229); | 49 const SkColor kFootnoteBorderColor = SkColorSetRGB(229, 229, 229); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 title_bar_width += close_->width() + 1; | 526 title_bar_width += close_->width() + 1; |
| 526 | 527 |
| 527 gfx::Size size(client_size); | 528 gfx::Size size(client_size); |
| 528 gfx::Insets client_insets = GetInsets(); | 529 gfx::Insets client_insets = GetInsets(); |
| 529 size.Enlarge(client_insets.width(), client_insets.height()); | 530 size.Enlarge(client_insets.width(), client_insets.height()); |
| 530 size.SetToMax(gfx::Size(title_bar_width, 0)); | 531 size.SetToMax(gfx::Size(title_bar_width, 0)); |
| 531 | 532 |
| 532 if (footnote_container_) | 533 if (footnote_container_) |
| 533 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); | 534 size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width())); |
| 534 | 535 |
| 536 if (GetWidget()->widget_delegate()->AsDialogDelegate()) |
| 537 size.set_width(LayoutProvider::Get()->GetSnappedDialogWidth(size.width())); |
| 538 |
| 535 return size; | 539 return size; |
| 536 } | 540 } |
| 537 | 541 |
| 538 } // namespace views | 542 } // namespace views |
| OLD | NEW |