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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 virtual ~ContentSettingImageModel() {} | 21 virtual ~ContentSettingImageModel() {} |
22 | 22 |
23 // Factory function. | 23 // Factory function. |
24 static ContentSettingImageModel* CreateContentSettingImageModel( | 24 static ContentSettingImageModel* CreateContentSettingImageModel( |
25 ContentSettingsType content_settings_type); | 25 ContentSettingsType content_settings_type); |
26 | 26 |
27 // Notifies this model that its setting might have changed and it may need to | 27 // Notifies this model that its setting might have changed and it may need to |
28 // update its visibility, icon and tooltip. | 28 // update its visibility, icon and tooltip. |
29 virtual void UpdateFromWebContents(content::WebContents* web_contents) = 0; | 29 virtual void UpdateFromWebContents(content::WebContents* web_contents) = 0; |
30 | 30 |
| 31 // Returns whether a bubble should be shown when a blockage for a content |
| 32 // setting is indicated. |
| 33 virtual bool ShouldShowBubbleOnBlockage(); |
| 34 |
31 ContentSettingsType get_content_settings_type() const { | 35 ContentSettingsType get_content_settings_type() const { |
32 return content_settings_type_; | 36 return content_settings_type_; |
33 } | 37 } |
34 bool is_visible() const { return is_visible_; } | 38 bool is_visible() const { return is_visible_; } |
35 int get_icon() const { return icon_; } | 39 int get_icon() const { return icon_; } |
36 // Returns the resource ID of a string to show when the icon appears, or 0 if | 40 // Returns the resource ID of a string to show when the icon appears, or 0 if |
37 // we don't wish to show anything. | 41 // we don't wish to show anything. |
38 int explanatory_string_id() const { return explanatory_string_id_; } | 42 int explanatory_string_id() const { return explanatory_string_id_; } |
39 std::string get_tooltip() const { return tooltip_; } | 43 std::string get_tooltip() const { return tooltip_; } |
40 | 44 |
(...skipping 10 matching lines...) Expand all Loading... |
51 const ContentSettingsType content_settings_type_; | 55 const ContentSettingsType content_settings_type_; |
52 bool is_visible_; | 56 bool is_visible_; |
53 int icon_; | 57 int icon_; |
54 int explanatory_string_id_; | 58 int explanatory_string_id_; |
55 std::string tooltip_; | 59 std::string tooltip_; |
56 | 60 |
57 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageModel); | 61 DISALLOW_COPY_AND_ASSIGN(ContentSettingImageModel); |
58 }; | 62 }; |
59 | 63 |
60 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ | 64 #endif // CHROME_BROWSER_UI_CONTENT_SETTINGS_CONTENT_SETTING_IMAGE_MODEL_H_ |
OLD | NEW |