OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ |
6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 content::WebContents* web_contents); | 58 content::WebContents* web_contents); |
59 #endif | 59 #endif |
60 | 60 |
61 gfx::Image GetIcon(SkColor nearby_text_color) const; | 61 gfx::Image GetIcon(SkColor nearby_text_color) const; |
62 | 62 |
63 // Returns the resource ID of a string to show when the icon appears, or 0 if | 63 // Returns the resource ID of a string to show when the icon appears, or 0 if |
64 // we don't wish to show anything. | 64 // we don't wish to show anything. |
65 int explanatory_string_id() const { return explanatory_string_id_; } | 65 int explanatory_string_id() const { return explanatory_string_id_; } |
66 const base::string16& get_tooltip() const { return tooltip_; } | 66 const base::string16& get_tooltip() const { return tooltip_; } |
67 | 67 |
68 static std::unique_ptr<ContentSettingImageModel> | |
69 CreateSubresourceFilterImageModelForTesting(); | |
msramek
2016/07/27 09:46:22
I think this fundamentally doesn't belong here. We
melandory
2016/07/27 12:53:41
Done.
| |
70 | |
68 protected: | 71 protected: |
69 ContentSettingImageModel(); | 72 ContentSettingImageModel(); |
70 void SetIconByResourceId(int id); | 73 void SetIconByResourceId(int id); |
71 | 74 |
72 void set_icon_by_vector_id(gfx::VectorIconId id, gfx::VectorIconId badge_id) { | 75 void set_icon_by_vector_id(gfx::VectorIconId id, gfx::VectorIconId badge_id) { |
73 vector_icon_id_ = id; | 76 vector_icon_id_ = id; |
74 vector_icon_badge_id_ = badge_id; | 77 vector_icon_badge_id_ = badge_id; |
75 } | 78 } |
76 | 79 |
77 void set_visible(bool visible) { is_visible_ = visible; } | 80 void set_visible(bool visible) { is_visible_ = visible; } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 protected: | 119 protected: |
117 ContentSettingsType content_type() { return content_type_; } | 120 ContentSettingsType content_type() { return content_type_; } |
118 | 121 |
119 private: | 122 private: |
120 ContentSettingsType content_type_; | 123 ContentSettingsType content_type_; |
121 | 124 |
122 DISALLOW_COPY_AND_ASSIGN(ContentSettingSimpleImageModel); | 125 DISALLOW_COPY_AND_ASSIGN(ContentSettingSimpleImageModel); |
123 }; | 126 }; |
124 | 127 |
125 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ | 128 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ |
OLD | NEW |