| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
| 10 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model
.h" |
| 10 #include "ui/views/bubble/bubble_delegate.h" | 11 #include "ui/views/bubble/bubble_delegate.h" |
| 11 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
| 12 #include "ui/views/controls/combobox/combobox.h" | 13 #include "ui/views/controls/combobox/combobox.h" |
| 13 #include "ui/views/controls/combobox/combobox_listener.h" | 14 #include "ui/views/controls/combobox/combobox_listener.h" |
| 14 #include "ui/views/controls/link.h" | 15 #include "ui/views/controls/link.h" |
| 15 #include "ui/views/controls/link_listener.h" | 16 #include "ui/views/controls/link_listener.h" |
| 16 | 17 |
| 17 class ManagePasswordsIconView; | 18 class ManagePasswordsIconView; |
| 18 | 19 |
| 19 namespace content { | 20 namespace content { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 100 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 100 | 101 |
| 101 // Handles the event when the user changes an index of a combobox. | 102 // Handles the event when the user changes an index of a combobox. |
| 102 virtual void OnPerformAction(views::Combobox* source) OVERRIDE; | 103 virtual void OnPerformAction(views::Combobox* source) OVERRIDE; |
| 103 | 104 |
| 104 // Singleton instance of the Password bubble. The Password bubble can only be | 105 // Singleton instance of the Password bubble. The Password bubble can only be |
| 105 // shown on the active browser window, so there is no case in which it will be | 106 // shown on the active browser window, so there is no case in which it will be |
| 106 // shown twice at the same time. | 107 // shown twice at the same time. |
| 107 static ManagePasswordsBubbleView* manage_passwords_bubble_; | 108 static ManagePasswordsBubbleView* manage_passwords_bubble_; |
| 108 | 109 |
| 109 // The buttons that are shown in the bubble. | 110 // The views that are shown in the bubble. |
| 110 views::BlueButton* save_button_; | 111 views::BlueButton* save_button_; |
| 111 views::Combobox* refuse_combobox_; | |
| 112 | |
| 113 views::Link* manage_link_; | 112 views::Link* manage_link_; |
| 114 views::LabelButton* done_button_; | 113 views::LabelButton* done_button_; |
| 115 | 114 |
| 115 // The combobox doesn't take ownership of it's model. If we created a combobox |
| 116 // we need to ensure that we delete the model here, and because the combobox |
| 117 // uses the model in it's destructor, we need to make sure we delete the model |
| 118 // _after_ the combobox itself is deleted. |
| 119 scoped_ptr<SavePasswordRefusalComboboxModel> combobox_model_; |
| 120 scoped_ptr<views::Combobox> refuse_combobox_; |
| 121 |
| 116 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 122 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
| 117 }; | 123 }; |
| 118 | 124 |
| 119 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 125 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
| OLD | NEW |