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 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" | 5 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 10 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 gtk_button_set_label(GTK_BUTTON(close_button_), | 156 gtk_button_set_label(GTK_BUTTON(close_button_), |
157 l10n_util::GetStringUTF8(IDS_CLOSE).c_str()); | 157 l10n_util::GetStringUTF8(IDS_CLOSE).c_str()); |
158 g_signal_connect(close_button_, "clicked", G_CALLBACK(OnCloseThunk), this); | 158 g_signal_connect(close_button_, "clicked", G_CALLBACK(OnCloseThunk), this); |
159 gtk_box_pack_end(GTK_BOX(button_box), close_button_, FALSE, TRUE, 0); | 159 gtk_box_pack_end(GTK_BOX(button_box), close_button_, FALSE, TRUE, 0); |
160 | 160 |
161 // Show the dialog. | 161 // Show the dialog. |
162 allowed_cookies_tree_adapter_->Init(); | 162 allowed_cookies_tree_adapter_->Init(); |
163 blocked_cookies_tree_adapter_->Init(); | 163 blocked_cookies_tree_adapter_->Init(); |
164 EnableControls(); | 164 EnableControls(); |
165 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); | 165 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); |
166 window_ = new ConstrainedWindowGtk(wrapper_->tab_contents(), this); | 166 window_ = new ConstrainedWindowGtk(wrapper_, this); |
167 } | 167 } |
168 | 168 |
169 GtkWidget* CollectedCookiesGtk::CreateAllowedPane() { | 169 GtkWidget* CollectedCookiesGtk::CreateAllowedPane() { |
170 GtkWidget* cookie_list_vbox = gtk_vbox_new(FALSE, ui::kControlSpacing); | 170 GtkWidget* cookie_list_vbox = gtk_vbox_new(FALSE, ui::kControlSpacing); |
171 | 171 |
172 GtkWidget* label = gtk_label_new( | 172 GtkWidget* label = gtk_label_new( |
173 l10n_util::GetStringUTF8(IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL). | 173 l10n_util::GetStringUTF8(IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL). |
174 c_str()); | 174 c_str()); |
175 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 175 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
176 gtk_box_pack_start(GTK_BOX(cookie_list_vbox), label, FALSE, FALSE, | 176 gtk_box_pack_start(GTK_BOX(cookie_list_vbox), label, FALSE, FALSE, |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); | 505 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); |
506 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE); | 506 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE); |
507 g_signal_handlers_unblock_by_func( | 507 g_signal_handlers_unblock_by_func( |
508 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); | 508 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); |
509 } | 509 } |
510 | 510 |
511 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { | 511 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { |
512 EnableControls(); | 512 EnableControls(); |
513 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); | 513 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); |
514 } | 514 } |
OLD | NEW |