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_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 | 85 |
86 // views::MenuButtonListener: | 86 // views::MenuButtonListener: |
87 virtual void OnMenuButtonClicked(views::View* source, | 87 virtual void OnMenuButtonClicked(views::View* source, |
88 const gfx::Point& point) OVERRIDE; | 88 const gfx::Point& point) OVERRIDE; |
89 | 89 |
90 // content::NotificationObserver: | 90 // content::NotificationObserver: |
91 virtual void Observe(int type, | 91 virtual void Observe(int type, |
92 const content::NotificationSource& source, | 92 const content::NotificationSource& source, |
93 const content::NotificationDetails& details) OVERRIDE; | 93 const content::NotificationDetails& details) OVERRIDE; |
94 | 94 |
95 // Called when the 'save password' button is pressed. If this function | |
96 // returns true, the bubble is then immediately closed. Subclasses MUST NOT | |
97 // return true if in handling this call triggers the infobar to begin | |
98 // closing. | |
99 virtual bool Accept(); | |
sky
2013/08/26 20:48:27
Does this and Cancel need to be virtual?
npentrel
2013/08/27 16:35:11
Actually it doesn't need to be there at all. Thank
| |
100 | |
101 // Called when the 'never save password for this site' button is pressed. | |
102 virtual bool Cancel(); | |
103 | |
95 // Helper to get the preferred width of the media menu. | 104 // Helper to get the preferred width of the media menu. |
96 int GetPreferredMediaMenuWidth(views::MenuButton* button, | 105 int GetPreferredMediaMenuWidth(views::MenuButton* button, |
97 ui::SimpleMenuModel* menu_model); | 106 ui::SimpleMenuModel* menu_model); |
98 | 107 |
99 // Provides data for this bubble. | 108 // Provides data for this bubble. |
100 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model_; | 109 scoped_ptr<ContentSettingBubbleModel> content_setting_bubble_model_; |
101 | 110 |
102 // The active web contents. | 111 // The active web contents. |
103 content::WebContents* web_contents_; | 112 content::WebContents* web_contents_; |
104 | 113 |
105 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. | 114 // A registrar for listening for WEB_CONTENTS_DESTROYED notifications. |
106 content::NotificationRegistrar registrar_; | 115 content::NotificationRegistrar registrar_; |
107 | 116 |
108 // Some of our controls, so we can tell what's been clicked when we get a | 117 // Some of our controls, so we can tell what's been clicked when we get a |
109 // message. | 118 // message. |
110 PopupLinks popup_links_; | 119 PopupLinks popup_links_; |
111 typedef std::vector<views::RadioButton*> RadioGroup; | 120 typedef std::vector<views::RadioButton*> RadioGroup; |
112 RadioGroup radio_group_; | 121 RadioGroup radio_group_; |
113 views::Link* custom_link_; | 122 views::Link* custom_link_; |
114 views::Link* manage_link_; | 123 views::Link* manage_link_; |
115 views::LabelButton* close_button_; | 124 views::LabelButton* close_button_; |
125 views::LabelButton* never_button_; | |
126 views::LabelButton* save_button_; | |
116 scoped_ptr<views::MenuRunner> menu_runner_; | 127 scoped_ptr<views::MenuRunner> menu_runner_; |
117 MediaMenuPartsMap media_menus_; | 128 MediaMenuPartsMap media_menus_; |
118 | 129 |
119 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents); | 130 DISALLOW_IMPLICIT_CONSTRUCTORS(ContentSettingBubbleContents); |
120 }; | 131 }; |
121 | 132 |
122 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_CONTENT_SETTING_BUBBLE_CONTENTS_H_ |
OLD | NEW |