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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 454173002: Fixed BubbleBorder sizing problems & added unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined test fixtures and rewrote tests to be more easily maintained. Created 6 years, 4 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
« no previous file with comments | « no previous file | ui/views/bubble/bubble_border.h » ('j') | ui/views/bubble/bubble_border.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 if (frame->GetClassName() == bubble_frame_view_name) 704 if (frame->GetClassName() == bubble_frame_view_name)
705 return static_cast<views::BubbleFrameView*>(frame)->bubble_border(); 705 return static_cast<views::BubbleFrameView*>(frame)->bubble_border();
706 NOTREACHED(); 706 NOTREACHED();
707 return NULL; 707 return NULL;
708 } 708 }
709 709
710 gfx::Rect AutofillDialogViews::OverlayView::ContentBoundsSansBubbleBorder() { 710 gfx::Rect AutofillDialogViews::OverlayView::ContentBoundsSansBubbleBorder() {
711 gfx::Rect bounds = GetContentsBounds(); 711 gfx::Rect bounds = GetContentsBounds();
712 int bubble_width = 5; 712 int bubble_width = 5;
713 if (GetBubbleBorder()) 713 if (GetBubbleBorder())
714 bubble_width = GetBubbleBorder()->GetBorderThickness(); 714 bubble_width = GetBubbleBorder()->GetBorderExteriorThickness();
715 bounds.Inset(bubble_width, bubble_width, bubble_width, bubble_width); 715 bounds.Inset(bubble_width, bubble_width, bubble_width, bubble_width);
716 return bounds; 716 return bounds;
717 } 717 }
718 718
719 // AutofillDialogViews::NotificationArea --------------------------------------- 719 // AutofillDialogViews::NotificationArea ---------------------------------------
720 720
721 AutofillDialogViews::NotificationArea::NotificationArea( 721 AutofillDialogViews::NotificationArea::NotificationArea(
722 AutofillDialogViewDelegate* delegate) 722 AutofillDialogViewDelegate* delegate)
723 : delegate_(delegate) { 723 : delegate_(delegate) {
724 // Reserve vertical space for the arrow (regardless of whether one exists). 724 // Reserve vertical space for the arrow (regardless of whether one exists).
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2505 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2505 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2506 : section(section), 2506 : section(section),
2507 container(NULL), 2507 container(NULL),
2508 manual_input(NULL), 2508 manual_input(NULL),
2509 suggested_info(NULL), 2509 suggested_info(NULL),
2510 suggested_button(NULL) {} 2510 suggested_button(NULL) {}
2511 2511
2512 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2512 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2513 2513
2514 } // namespace autofill 2514 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | ui/views/bubble/bubble_border.h » ('j') | ui/views/bubble/bubble_border.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698