Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: chrome/browser/ui/gtk/collected_cookies_gtk.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/collected_cookies_gtk.h" 5 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h"
6 6
7 #include <string> 7 #include <string>
8 #include "chrome/browser/api/infobars/infobar_service.h" 8 #include "chrome/browser/api/infobars/infobar_service.h"
9 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" 9 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h"
10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 void CollectedCookiesGtk::Observe(int type, 454 void CollectedCookiesGtk::Observe(int type,
455 const content::NotificationSource& source, 455 const content::NotificationSource& source,
456 const content::NotificationDetails& details) { 456 const content::NotificationDetails& details) {
457 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); 457 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN);
458 window_->CloseWebContentsModalDialog(); 458 window_->CloseWebContentsModalDialog();
459 } 459 }
460 460
461 void CollectedCookiesGtk::OnClose(GtkWidget* close_button) { 461 void CollectedCookiesGtk::OnClose(GtkWidget* close_button) {
462 if (status_changed_) { 462 if (status_changed_) {
463 InfoBarService* infobar_service = 463 CollectedCookiesInfoBarDelegate::Create(
464 InfoBarService::FromWebContents(web_contents_); 464 InfoBarService::FromWebContents(web_contents_));
465 infobar_service->AddInfoBar(
466 new CollectedCookiesInfoBarDelegate(infobar_service));
467 } 465 }
468 window_->CloseWebContentsModalDialog(); 466 window_->CloseWebContentsModalDialog();
469 } 467 }
470 468
471 void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection, 469 void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection,
472 gtk_tree::TreeAdapter* adapter, 470 gtk_tree::TreeAdapter* adapter,
473 ContentSetting setting) { 471 ContentSetting setting) {
474 GtkTreeModel* model; 472 GtkTreeModel* model;
475 GList* paths = 473 GList* paths =
476 gtk_tree_selection_get_selected_rows(selection, &model); 474 gtk_tree_selection_get_selected_rows(selection, &model);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); 538 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this);
541 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE); 539 gtk_tree_view_expand_row(GTK_TREE_VIEW(tree_view), path, TRUE);
542 g_signal_handlers_unblock_by_func( 540 g_signal_handlers_unblock_by_func(
543 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this); 541 tree_view, reinterpret_cast<gpointer>(OnTreeViewRowExpandedThunk), this);
544 } 542 }
545 543
546 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { 544 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) {
547 EnableControls(); 545 EnableControls();
548 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); 546 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_)));
549 } 547 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/content_settings/content_setting_bubble_model.cc ('k') | chrome/browser/ui/hung_plugin_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698