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/views/collected_cookies_views.h" | 5 #include "chrome/browser/ui/views/collected_cookies_views.h" |
6 | 6 |
7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" | 8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" |
9 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" |
10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
11 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" | 11 #include "chrome/browser/browsing_data/browsing_data_file_system_helper.h" |
12 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 12 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
13 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
14 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" | 14 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" |
15 #include "chrome/browser/browsing_data/cookies_tree_model.h" | 15 #include "chrome/browser/browsing_data/cookies_tree_model.h" |
16 #include "chrome/browser/content_settings/cookie_settings.h" | 16 #include "chrome/browser/content_settings/cookie_settings.h" |
17 #include "chrome/browser/content_settings/local_shared_objects_container.h" | 17 #include "chrome/browser/content_settings/local_shared_objects_container.h" |
18 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 18 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
19 #include "chrome/browser/infobars/infobar_service.h" | 19 #include "chrome/browser/infobars/infobar_service.h" |
20 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" | 21 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" |
22 #include "chrome/browser/ui/views/constrained_window_views.h" | 22 #include "chrome/browser/ui/views/constrained_window_views.h" |
23 #include "chrome/browser/ui/views/cookie_info_view.h" | 23 #include "chrome/browser/ui/views/cookie_info_view.h" |
24 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | |
25 #include "chrome/browser/ui/web_contents_modal_dialog_manager_delegate.h" | |
26 #include "chrome/common/chrome_notification_types.h" | 24 #include "chrome/common/chrome_notification_types.h" |
27 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
| 26 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 27 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
28 #include "content/public/browser/notification_details.h" | 28 #include "content/public/browser/notification_details.h" |
29 #include "content/public/browser/notification_source.h" | 29 #include "content/public/browser/notification_source.h" |
30 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
31 #include "content/public/browser/web_contents_view.h" | 31 #include "content/public/browser/web_contents_view.h" |
32 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
33 #include "grit/locale_settings.h" | 33 #include "grit/locale_settings.h" |
34 #include "grit/theme_resources.h" | 34 #include "grit/theme_resources.h" |
35 #include "net/cookies/canonical_cookie.h" | 35 #include "net/cookies/canonical_cookie.h" |
36 #include "ui/base/l10n/l10n_util.h" | 36 #include "ui/base/l10n/l10n_util.h" |
37 #include "ui/base/resource/resource_bundle.h" | 37 #include "ui/base/resource/resource_bundle.h" |
38 #include "ui/gfx/color_utils.h" | 38 #include "ui/gfx/color_utils.h" |
39 #include "ui/views/controls/button/label_button.h" | 39 #include "ui/views/controls/button/label_button.h" |
40 #include "ui/views/controls/image_view.h" | 40 #include "ui/views/controls/image_view.h" |
41 #include "ui/views/controls/label.h" | 41 #include "ui/views/controls/label.h" |
42 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" | 42 #include "ui/views/controls/tabbed_pane/tabbed_pane.h" |
43 #include "ui/views/controls/tree/tree_view.h" | 43 #include "ui/views/controls/tree/tree_view.h" |
44 #include "ui/views/layout/box_layout.h" | 44 #include "ui/views/layout/box_layout.h" |
45 #include "ui/views/layout/grid_layout.h" | 45 #include "ui/views/layout/grid_layout.h" |
46 #include "ui/views/layout/layout_constants.h" | 46 #include "ui/views/layout/layout_constants.h" |
47 #include "ui/views/widget/widget.h" | 47 #include "ui/views/widget/widget.h" |
48 | 48 |
| 49 using web_modal::WebContentsModalDialogManager; |
| 50 |
49 namespace chrome { | 51 namespace chrome { |
50 | 52 |
51 // Declared in browser_dialogs.h so others don't have to depend on our header. | 53 // Declared in browser_dialogs.h so others don't have to depend on our header. |
52 void ShowCollectedCookiesDialog(content::WebContents* web_contents) { | 54 void ShowCollectedCookiesDialog(content::WebContents* web_contents) { |
53 // Deletes itself on close. | 55 // Deletes itself on close. |
54 new CollectedCookiesViews(web_contents); | 56 new CollectedCookiesViews(web_contents); |
55 } | 57 } |
56 | 58 |
57 } // namespace chrome | 59 } // namespace chrome |
58 | 60 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 /////////////////////////////////////////////////////////////////////////////// | 527 /////////////////////////////////////////////////////////////////////////////// |
526 // CollectedCookiesViews, content::NotificationObserver implementation: | 528 // CollectedCookiesViews, content::NotificationObserver implementation: |
527 | 529 |
528 void CollectedCookiesViews::Observe( | 530 void CollectedCookiesViews::Observe( |
529 int type, | 531 int type, |
530 const content::NotificationSource& source, | 532 const content::NotificationSource& source, |
531 const content::NotificationDetails& details) { | 533 const content::NotificationDetails& details) { |
532 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); | 534 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); |
533 window_->Close(); | 535 window_->Close(); |
534 } | 536 } |
OLD | NEW |