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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_controller.h

Issue 2581513002: Replace hard-coded colors from ui::NativeTheme for consistency and accessibility. (Closed)
Patch Set: Using NativeTheme::GetInstanceForNativeUi() to get NativeThemeMac instance Created 3 years, 11 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
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 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 15 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
16 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
17 #include "ui/native_theme/native_theme.h"
17 18
18 namespace autofill { 19 namespace autofill {
19 20
20 class AutofillPopupLayoutModel; 21 class AutofillPopupLayoutModel;
21 struct Suggestion; 22 struct Suggestion;
22 23
23 // This interface provides data to an AutofillPopupView. 24 // This interface provides data to an AutofillPopupView.
24 class AutofillPopupController : public AutofillPopupViewDelegate { 25 class AutofillPopupController : public AutofillPopupViewDelegate {
25 public: 26 public:
26 // Recalculates the height and width of the popup and triggers a redraw. 27 // Recalculates the height and width of the popup and triggers a redraw.
(...skipping 12 matching lines...) Expand all
39 40
40 // Returns whether the item at |list_index| can be removed. If so, fills 41 // Returns whether the item at |list_index| can be removed. If so, fills
41 // out |title| and |body| (when non-null) with relevant user-facing text. 42 // out |title| and |body| (when non-null) with relevant user-facing text.
42 virtual bool GetRemovalConfirmationText(int index, 43 virtual bool GetRemovalConfirmationText(int index,
43 base::string16* title, 44 base::string16* title,
44 base::string16* body) = 0; 45 base::string16* body) = 0;
45 46
46 // Removes the suggestion at the given index. 47 // Removes the suggestion at the given index.
47 virtual bool RemoveSuggestion(int index) = 0; 48 virtual bool RemoveSuggestion(int index) = 0;
48 49
49 // Returns the background color of the row item according to its |index|, or 50 // Returns the background color ID of the row item according to its |index|,
50 // transparent if the default popup background should be used. 51 // or default popup background should be used.
Jared Saul 2017/01/04 19:51:38 s/should be used/otherwise
jiahuiguo 2017/01/05 19:21:20 Done.
51 virtual SkColor GetBackgroundColorForRow(int index) const = 0; 52 virtual ui::NativeTheme::ColorId GetBackgroundColorIDForRow(
53 int index) const = 0;
52 54
53 // Returns the index of the selected line. A line is "selected" when it is 55 // Returns the index of the selected line. A line is "selected" when it is
54 // hovered or has keyboard focus. 56 // hovered or has keyboard focus.
55 virtual int selected_line() const = 0; 57 virtual int selected_line() const = 0;
56 58
57 virtual const AutofillPopupLayoutModel& layout_model() const = 0; 59 virtual const AutofillPopupLayoutModel& layout_model() const = 0;
58 60
59 protected: 61 protected:
60 ~AutofillPopupController() override {} 62 ~AutofillPopupController() override {}
61 }; 63 };
62 64
63 } // namespace autofill 65 } // namespace autofill
64 66
65 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 67 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698