| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/website_settings/website_settings_popup_gtk.h" | 5 #include "chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 TAB_ID_CONNECTION); | 335 TAB_ID_CONNECTION); |
| 336 | 336 |
| 337 DCHECK_EQ(gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook_)), NUM_TAB_IDS); | 337 DCHECK_EQ(gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook_)), NUM_TAB_IDS); |
| 338 | 338 |
| 339 gtk_box_pack_start(GTK_BOX(contents_), notebook_, FALSE, FALSE, 0); | 339 gtk_box_pack_start(GTK_BOX(contents_), notebook_, FALSE, FALSE, 0); |
| 340 gtk_widget_show_all(contents_); | 340 gtk_widget_show_all(contents_); |
| 341 } | 341 } |
| 342 | 342 |
| 343 void WebsiteSettingsPopupGtk::OnPermissionChanged( | 343 void WebsiteSettingsPopupGtk::OnPermissionChanged( |
| 344 PermissionSelector* selector) { | 344 PermissionSelector* selector) { |
| 345 presenter_->OnSitePermissionChanged(selector->type(), | 345 presenter_->OnSitePermissionChanged(selector->GetType(), |
| 346 selector->setting()); | 346 selector->GetSetting()); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void WebsiteSettingsPopupGtk::OnComboboxShown() { | 349 void WebsiteSettingsPopupGtk::OnComboboxShown() { |
| 350 bubble_->HandlePointerAndKeyboardUngrabbedByContent(); | 350 bubble_->HandlePointerAndKeyboardUngrabbedByContent(); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void WebsiteSettingsPopupGtk::SetCookieInfo( | 353 void WebsiteSettingsPopupGtk::SetCookieInfo( |
| 354 const CookieInfoList& cookie_info_list) { | 354 const CookieInfoList& cookie_info_list) { |
| 355 DCHECK(cookies_section_contents_); | 355 DCHECK(cookies_section_contents_); |
| 356 ClearContainer(cookies_section_contents_); | 356 ClearContainer(cookies_section_contents_); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 | 528 |
| 529 for (PermissionInfoList::const_iterator permission = | 529 for (PermissionInfoList::const_iterator permission = |
| 530 permission_info_list.begin(); | 530 permission_info_list.begin(); |
| 531 permission != permission_info_list.end(); | 531 permission != permission_info_list.end(); |
| 532 ++permission) { | 532 ++permission) { |
| 533 PermissionSelector* selector = | 533 PermissionSelector* selector = |
| 534 new PermissionSelector( | 534 new PermissionSelector( |
| 535 theme_service_, | 535 theme_service_, |
| 536 permission->type, | 536 permission->type, |
| 537 permission->setting, | 537 permission->setting, |
| 538 permission->default_setting); | 538 permission->default_setting, |
| 539 permission->source); |
| 539 selector->AddObserver(this); | 540 selector->AddObserver(this); |
| 540 GtkWidget* hbox = selector->CreateUI(); | 541 GtkWidget* hbox = selector->widget(); |
| 541 selectors_.push_back(selector); | 542 selectors_.push_back(selector); |
| 542 gtk_box_pack_start(GTK_BOX(permissions_section_contents_), hbox, FALSE, | 543 gtk_box_pack_start(GTK_BOX(permissions_section_contents_), hbox, FALSE, |
| 543 FALSE, 0); | 544 FALSE, 0); |
| 544 } | 545 } |
| 545 | 546 |
| 546 gtk_widget_show_all(permissions_section_contents_); | 547 gtk_widget_show_all(permissions_section_contents_); |
| 547 } | 548 } |
| 548 | 549 |
| 549 void WebsiteSettingsPopupGtk::SetSelectedTab(TabId tab_id) { | 550 void WebsiteSettingsPopupGtk::SetSelectedTab(TabId tab_id) { |
| 550 DCHECK(notebook_); | 551 DCHECK(notebook_); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 561 void WebsiteSettingsPopupGtk::OnViewCertLinkClicked(GtkWidget* widget) { | 562 void WebsiteSettingsPopupGtk::OnViewCertLinkClicked(GtkWidget* widget) { |
| 562 DCHECK_NE(cert_id_, 0); | 563 DCHECK_NE(cert_id_, 0); |
| 563 ShowCertificateViewerByID( | 564 ShowCertificateViewerByID( |
| 564 tab_contents_->web_contents(), GTK_WINDOW(parent_), cert_id_); | 565 tab_contents_->web_contents(), GTK_WINDOW(parent_), cert_id_); |
| 565 bubble_->Close(); | 566 bubble_->Close(); |
| 566 } | 567 } |
| 567 | 568 |
| 568 void WebsiteSettingsPopupGtk::OnCloseButtonClicked(GtkWidget* widget) { | 569 void WebsiteSettingsPopupGtk::OnCloseButtonClicked(GtkWidget* widget) { |
| 569 bubble_->Close(); | 570 bubble_->Close(); |
| 570 } | 571 } |
| OLD | NEW |