| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class Point; | 21 class Point; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace autofill { | 24 namespace autofill { |
| 25 | 25 |
| 26 // Class that deals with the event handling for Autofill-style popups. This | 26 // Class that deals with the event handling for Autofill-style popups. This |
| 27 // class should only be instantiated by sub-classes. | 27 // class should only be instantiated by sub-classes. |
| 28 class AutofillPopupBaseView : public views::WidgetDelegateView, | 28 class AutofillPopupBaseView : public views::WidgetDelegateView, |
| 29 public views::WidgetFocusChangeListener, | 29 public views::WidgetFocusChangeListener, |
| 30 public views::WidgetObserver { | 30 public views::WidgetObserver { |
| 31 public: | |
| 32 static const SkColor kBorderColor; | |
| 33 static const SkColor kHoveredBackgroundColor; | |
| 34 static const SkColor kItemTextColor; | |
| 35 static const SkColor kPopupBackground; | |
| 36 static const SkColor kValueTextColor; | |
| 37 static const SkColor kWarningTextColor; | |
| 38 | |
| 39 protected: | 31 protected: |
| 40 explicit AutofillPopupBaseView(AutofillPopupViewDelegate* delegate, | 32 explicit AutofillPopupBaseView(AutofillPopupViewDelegate* delegate, |
| 41 views::Widget* parent_widget); | 33 views::Widget* parent_widget); |
| 42 ~AutofillPopupBaseView() override; | 34 ~AutofillPopupBaseView() override; |
| 43 | 35 |
| 44 // Show this popup. Idempotent. | 36 // Show this popup. Idempotent. |
| 45 void DoShow(); | 37 void DoShow(); |
| 46 | 38 |
| 47 // Hide the widget and delete |this|. | 39 // Hide the widget and delete |this|. |
| 48 void DoHide(); | 40 void DoHide(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 base::Time show_time_; | 86 base::Time show_time_; |
| 95 | 87 |
| 96 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; | 88 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; |
| 97 | 89 |
| 98 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); | 90 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); |
| 99 }; | 91 }; |
| 100 | 92 |
| 101 } // namespace autofill | 93 } // namespace autofill |
| 102 | 94 |
| 103 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 95 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
| OLD | NEW |