| 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 12 matching lines...) Expand all Loading... |
| 23 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 23 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 24 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 24 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
| 25 #include "content/public/browser/native_web_keyboard_event.h" | 25 #include "content/public/browser/native_web_keyboard_event.h" |
| 26 #include "content/public/browser/navigation_controller.h" | 26 #include "content/public/browser/navigation_controller.h" |
| 27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
| 29 #include "third_party/skia/include/core/SkColor.h" | 29 #include "third_party/skia/include/core/SkColor.h" |
| 30 #include "ui/base/models/combobox_model.h" | 30 #include "ui/base/models/combobox_model.h" |
| 31 #include "ui/base/models/menu_model.h" | 31 #include "ui/base/models/menu_model.h" |
| 32 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
| 33 #include "ui/compositor/paint_context.h" |
| 33 #include "ui/events/event_handler.h" | 34 #include "ui/events/event_handler.h" |
| 34 #include "ui/gfx/animation/animation_delegate.h" | 35 #include "ui/gfx/animation/animation_delegate.h" |
| 35 #include "ui/gfx/canvas.h" | 36 #include "ui/gfx/canvas.h" |
| 36 #include "ui/gfx/color_utils.h" | 37 #include "ui/gfx/color_utils.h" |
| 37 #include "ui/gfx/font_list.h" | 38 #include "ui/gfx/font_list.h" |
| 38 #include "ui/gfx/geometry/point.h" | 39 #include "ui/gfx/geometry/point.h" |
| 39 #include "ui/gfx/path.h" | 40 #include "ui/gfx/path.h" |
| 40 #include "ui/gfx/skia_util.h" | 41 #include "ui/gfx/skia_util.h" |
| 41 #include "ui/views/background.h" | 42 #include "ui/views/background.h" |
| 42 #include "ui/views/border.h" | 43 #include "ui/views/border.h" |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 // Ensure that long notifications wrap and don't enlarge the dialog. | 747 // Ensure that long notifications wrap and don't enlarge the dialog. |
| 747 size.set_width(1); | 748 size.set_width(1); |
| 748 return size; | 749 return size; |
| 749 } | 750 } |
| 750 | 751 |
| 751 const char* AutofillDialogViews::NotificationArea::GetClassName() const { | 752 const char* AutofillDialogViews::NotificationArea::GetClassName() const { |
| 752 return kNotificationAreaClassName; | 753 return kNotificationAreaClassName; |
| 753 } | 754 } |
| 754 | 755 |
| 755 void AutofillDialogViews::NotificationArea::PaintChildren( | 756 void AutofillDialogViews::NotificationArea::PaintChildren( |
| 756 const PaintContext& context) { | 757 const ui::PaintContext& context) { |
| 757 views::View::PaintChildren(context); | 758 views::View::PaintChildren(context); |
| 758 gfx::Canvas* canvas = context.canvas(); | 759 gfx::Canvas* canvas = context.canvas(); |
| 759 if (HasArrow()) { | 760 if (HasArrow()) { |
| 760 DrawArrow( | 761 DrawArrow( |
| 761 canvas, | 762 canvas, |
| 762 GetMirroredXInView(width() - arrow_centering_anchor_->width() / 2.0f), | 763 GetMirroredXInView(width() - arrow_centering_anchor_->width() / 2.0f), |
| 763 notifications_[0].GetBackgroundColor(), | 764 notifications_[0].GetBackgroundColor(), |
| 764 notifications_[0].GetBorderColor()); | 765 notifications_[0].GetBorderColor()); |
| 765 } | 766 } |
| 766 } | 767 } |
| (...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2483 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
| 2483 : section(section), | 2484 : section(section), |
| 2484 container(NULL), | 2485 container(NULL), |
| 2485 manual_input(NULL), | 2486 manual_input(NULL), |
| 2486 suggested_info(NULL), | 2487 suggested_info(NULL), |
| 2487 suggested_button(NULL) {} | 2488 suggested_button(NULL) {} |
| 2488 | 2489 |
| 2489 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2490 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
| 2490 | 2491 |
| 2491 } // namespace autofill | 2492 } // namespace autofill |
| OLD | NEW |