OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/gtk/options/passwords_exceptions_page_gtk.h" | 5 #include "chrome/browser/gtk/options/passwords_exceptions_page_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 } // anonymous namespace | 32 } // anonymous namespace |
33 | 33 |
34 /////////////////////////////////////////////////////////////////////////////// | 34 /////////////////////////////////////////////////////////////////////////////// |
35 // PasswordsExceptionsPageGtk, public: | 35 // PasswordsExceptionsPageGtk, public: |
36 | 36 |
37 PasswordsExceptionsPageGtk::PasswordsExceptionsPageGtk(Profile* profile) | 37 PasswordsExceptionsPageGtk::PasswordsExceptionsPageGtk(Profile* profile) |
38 : populater(this), profile_(profile) { | 38 : populater(this), profile_(profile) { |
39 | 39 |
40 remove_button_ = gtk_button_new_with_label( | 40 remove_button_ = gtk_button_new_with_label( |
41 l10n_util::GetStringUTF8(IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_BUTTON).c_str()); | 41 l10n_util::GetStringUTF8(IDS_PASSWORDS_PAGE_VIEW_REMOVE_BUTTON).c_str()); |
42 gtk_widget_set_sensitive(remove_button_, FALSE); | 42 gtk_widget_set_sensitive(remove_button_, FALSE); |
43 g_signal_connect(remove_button_, "clicked", | 43 g_signal_connect(remove_button_, "clicked", |
44 G_CALLBACK(OnRemoveButtonClickedThunk), this); | 44 G_CALLBACK(OnRemoveButtonClickedThunk), this); |
45 remove_all_button_ = gtk_button_new_with_label(l10n_util::GetStringUTF8( | 45 remove_all_button_ = gtk_button_new_with_label(l10n_util::GetStringUTF8( |
46 IDS_EXCEPTIONS_PAGE_VIEW_REMOVE_ALL_BUTTON).c_str()); | 46 IDS_PASSWORDS_PAGE_VIEW_REMOVE_ALL_BUTTON).c_str()); |
47 gtk_widget_set_sensitive(remove_all_button_, FALSE); | 47 gtk_widget_set_sensitive(remove_all_button_, FALSE); |
48 g_signal_connect(remove_all_button_, "clicked", | 48 g_signal_connect(remove_all_button_, "clicked", |
49 G_CALLBACK(OnRemoveAllButtonClickedThunk), this); | 49 G_CALLBACK(OnRemoveAllButtonClickedThunk), this); |
50 | 50 |
51 GtkWidget* buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 51 GtkWidget* buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
52 gtk_box_pack_start(GTK_BOX(buttons), remove_button_, FALSE, FALSE, 0); | 52 gtk_box_pack_start(GTK_BOX(buttons), remove_button_, FALSE, FALSE, 0); |
53 gtk_box_pack_start(GTK_BOX(buttons), remove_all_button_, FALSE, FALSE, 0); | 53 gtk_box_pack_start(GTK_BOX(buttons), remove_all_button_, FALSE, FALSE, 0); |
54 | 54 |
55 GtkWidget* scroll_window = gtk_scrolled_window_new(NULL, NULL); | 55 GtkWidget* scroll_window = gtk_scrolled_window_new(NULL, NULL); |
56 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_window), | 56 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_window), |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 LOG(ERROR) << "No password store! Cannot display exceptions."; | 193 LOG(ERROR) << "No password store! Cannot display exceptions."; |
194 } | 194 } |
195 | 195 |
196 void | 196 void |
197 PasswordsExceptionsPageGtk::ExceptionListPopulater::OnPasswordStoreRequestDone( | 197 PasswordsExceptionsPageGtk::ExceptionListPopulater::OnPasswordStoreRequestDone( |
198 int handle, const std::vector<webkit_glue::PasswordForm*>& result) { | 198 int handle, const std::vector<webkit_glue::PasswordForm*>& result) { |
199 DCHECK_EQ(pending_login_query_, handle); | 199 DCHECK_EQ(pending_login_query_, handle); |
200 pending_login_query_ = 0; | 200 pending_login_query_ = 0; |
201 page_->SetExceptionList(result); | 201 page_->SetExceptionList(result); |
202 } | 202 } |
OLD | NEW |