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

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

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-before-land Created 7 years, 7 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 "base/prefs/pref_service.h" 8 #include "base/prefs/pref_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"
11 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" 11 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
12 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" 12 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h"
13 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" 13 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h"
14 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" 14 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h"
15 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" 15 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h"
16 #include "chrome/browser/browsing_data/cookies_tree_model.h" 16 #include "chrome/browser/browsing_data/cookies_tree_model.h"
17 #include "chrome/browser/browsing_data/local_data_container.h" 17 #include "chrome/browser/browsing_data/local_data_container.h"
18 #include "chrome/browser/content_settings/cookie_settings.h" 18 #include "chrome/browser/content_settings/cookie_settings.h"
19 #include "chrome/browser/content_settings/local_shared_objects_container.h" 19 #include "chrome/browser/content_settings/local_shared_objects_container.h"
20 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 20 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
21 #include "chrome/browser/infobars/infobar_service.h" 21 #include "chrome/browser/infobars/infobar_service.h"
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/ui/browser_dialogs.h" 23 #include "chrome/browser/ui/browser_dialogs.h"
24 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" 24 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h"
25 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 25 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
26 #include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h" 26 #include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h"
27 #include "chrome/browser/ui/gtk/gtk_util.h" 27 #include "chrome/browser/ui/gtk/gtk_util.h"
28 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
29 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
30 #include "chrome/common/pref_names.h" 29 #include "chrome/common/pref_names.h"
30 #include "components/web_modal/web_contents_modal_dialog_manager.h"
31 #include "content/public/browser/notification_source.h" 31 #include "content/public/browser/notification_source.h"
32 #include "content/public/browser/web_contents.h" 32 #include "content/public/browser/web_contents.h"
33 #include "content/public/browser/web_contents_view.h" 33 #include "content/public/browser/web_contents_view.h"
34 #include "grit/generated_resources.h" 34 #include "grit/generated_resources.h"
35 #include "net/cookies/canonical_cookie.h" 35 #include "net/cookies/canonical_cookie.h"
36 #include "ui/base/gtk/gtk_hig_constants.h" 36 #include "ui/base/gtk/gtk_hig_constants.h"
37 #include "ui/base/l10n/l10n_util.h" 37 #include "ui/base/l10n/l10n_util.h"
38 38
39 using web_modal::WebContentsModalDialogManager;
40
39 namespace { 41 namespace {
40 // Width and height of the cookie tree view. 42 // Width and height of the cookie tree view.
41 const int kTreeViewWidth = 450; 43 const int kTreeViewWidth = 450;
42 const int kTreeViewHeight = 150; 44 const int kTreeViewHeight = 150;
43 45
44 // The page numbers of the pages in the notebook. 46 // The page numbers of the pages in the notebook.
45 const gint kAllowedPageNumber = 0; 47 const gint kAllowedPageNumber = 0;
46 const gint kBlockedPageNumber = 1; 48 const gint kBlockedPageNumber = 1;
47 49
48 // Padding within the banner box. 50 // Padding within the banner box.
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 } 538 }
537 539
538 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) { 540 void CollectedCookiesGtk::OnTreeViewSelectionChange(GtkWidget* selection) {
539 EnableControls(); 541 EnableControls();
540 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_))); 542 ShowCookieInfo(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook_)));
541 } 543 }
542 544
543 void CollectedCookiesGtk::OnDestroy(GtkWidget* widget) { 545 void CollectedCookiesGtk::OnDestroy(GtkWidget* widget) {
544 delete this; 546 delete this;
545 } 547 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/constrained_web_dialog_delegate_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698