| 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 15 matching lines...) Expand all Loading... |
| 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: | 31 public: |
| 32 static const SkColor kBorderColor; | 32 static const SkColor kBorderColor; |
| 33 static const SkColor kHoveredBackgroundColor; | 33 static const SkColor kHoveredBackgroundColor; |
| 34 static const SkColor kItemTextColor; | 34 static const SkColor kItemTextColor; |
| 35 static const SkColor kPopupBackground; | 35 static const SkColor kPopupBackground; |
| 36 static const SkColor kPromoPopupBackground; |
| 36 static const SkColor kValueTextColor; | 37 static const SkColor kValueTextColor; |
| 37 static const SkColor kWarningTextColor; | 38 static const SkColor kWarningTextColor; |
| 38 | 39 |
| 39 protected: | 40 protected: |
| 40 explicit AutofillPopupBaseView(AutofillPopupViewDelegate* delegate, | 41 explicit AutofillPopupBaseView(AutofillPopupViewDelegate* delegate, |
| 41 views::Widget* parent_widget); | 42 views::Widget* parent_widget); |
| 42 ~AutofillPopupBaseView() override; | 43 ~AutofillPopupBaseView() override; |
| 43 | 44 |
| 44 // Show this popup. Idempotent. | 45 // Show this popup. Idempotent. |
| 45 void DoShow(); | 46 void DoShow(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 base::Time show_time_; | 95 base::Time show_time_; |
| 95 | 96 |
| 96 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; | 97 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); | 99 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace autofill | 102 } // namespace autofill |
| 102 | 103 |
| 103 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 104 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
| OLD | NEW |