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 "chrome/browser/ui/views/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 | 642 |
643 void AutofillDialogViews::OverlayView::OnPaint(gfx::Canvas* canvas) { | 643 void AutofillDialogViews::OverlayView::OnPaint(gfx::Canvas* canvas) { |
644 // BubbleFrameView doesn't mask the window, it just draws the border via | 644 // BubbleFrameView doesn't mask the window, it just draws the border via |
645 // image assets. Match that rounding here. | 645 // image assets. Match that rounding here. |
646 gfx::Rect rect = ContentBoundsSansBubbleBorder(); | 646 gfx::Rect rect = ContentBoundsSansBubbleBorder(); |
647 const SkScalar kCornerRadius = SkIntToScalar( | 647 const SkScalar kCornerRadius = SkIntToScalar( |
648 GetBubbleBorder() ? GetBubbleBorder()->GetBorderCornerRadius() : 2); | 648 GetBubbleBorder() ? GetBubbleBorder()->GetBorderCornerRadius() : 2); |
649 gfx::Path window_mask; | 649 gfx::Path window_mask; |
650 window_mask.addRoundRect(gfx::RectToSkRect(rect), | 650 window_mask.addRoundRect(gfx::RectToSkRect(rect), |
651 kCornerRadius, kCornerRadius); | 651 kCornerRadius, kCornerRadius); |
652 canvas->ClipPath(window_mask); | 652 canvas->ClipPath(window_mask, false); |
653 | 653 |
654 OnPaintBackground(canvas); | 654 OnPaintBackground(canvas); |
655 | 655 |
656 // Draw the arrow, border, and fill for the bottom area. | 656 // Draw the arrow, border, and fill for the bottom area. |
657 if (message_view_->visible()) { | 657 if (message_view_->visible()) { |
658 const int arrow_half_width = kArrowWidth / 2.0f; | 658 const int arrow_half_width = kArrowWidth / 2.0f; |
659 SkPath arrow; | 659 SkPath arrow; |
660 int y = message_view_->y() - 1; | 660 int y = message_view_->y() - 1; |
661 // Note that we purposely draw slightly outside of |rect| so that the | 661 // Note that we purposely draw slightly outside of |rect| so that the |
662 // stroke is hidden on the sides. | 662 // stroke is hidden on the sides. |
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2511 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2512 : section(section), | 2512 : section(section), |
2513 container(NULL), | 2513 container(NULL), |
2514 manual_input(NULL), | 2514 manual_input(NULL), |
2515 suggested_info(NULL), | 2515 suggested_info(NULL), |
2516 suggested_button(NULL) {} | 2516 suggested_button(NULL) {} |
2517 | 2517 |
2518 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2518 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2519 | 2519 |
2520 } // namespace autofill | 2520 } // namespace autofill |
OLD | NEW |