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 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" | 5 #import "chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #import "base/mac/mac_util.h" | 9 #import "base/mac/mac_util.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
11 #include "chrome/browser/content_settings/host_content_settings_map.h" | 11 #include "chrome/browser/content_settings/host_content_settings_map.h" |
12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 13 #include "chrome/browser/infobars/infobar_tab_helper.h" |
13 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" | 15 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" |
15 #import "chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller
.h" | 16 #import "chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller
.h" |
16 #import "chrome/browser/ui/cocoa/vertical_gradient_view.h" | 17 #import "chrome/browser/ui/cocoa/vertical_gradient_view.h" |
17 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" | 18 #include "chrome/browser/ui/collected_cookies_infobar_delegate.h" |
18 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
19 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
20 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
21 #include "content/common/notification_details.h" | 22 #include "content/common/notification_details.h" |
22 #include "content/common/notification_source.h" | 23 #include "content/common/notification_source.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 [[cookieDetailsViewPlaceholder_ superview] | 213 [[cookieDetailsViewPlaceholder_ superview] |
213 replaceSubview:cookieDetailsViewPlaceholder_ | 214 replaceSubview:cookieDetailsViewPlaceholder_ |
214 with:detailView]; | 215 with:detailView]; |
215 | 216 |
216 [self tabView:tabView_ didSelectTabViewItem:[tabView_ selectedTabViewItem]]; | 217 [self tabView:tabView_ didSelectTabViewItem:[tabView_ selectedTabViewItem]]; |
217 } | 218 } |
218 | 219 |
219 - (void)windowWillClose:(NSNotification*)notif { | 220 - (void)windowWillClose:(NSNotification*)notif { |
220 if (contentSettingsChanged_) { | 221 if (contentSettingsChanged_) { |
221 TabContentsWrapper::GetCurrentWrapperForContents(tabContents_)-> | 222 TabContentsWrapper::GetCurrentWrapperForContents(tabContents_)-> |
222 AddInfoBar(new CollectedCookiesInfoBarDelegate(tabContents_)); | 223 infobar_tab_helper()->AddInfoBar( |
| 224 new CollectedCookiesInfoBarDelegate(tabContents_)); |
223 } | 225 } |
224 [allowedOutlineView_ setDelegate:nil]; | 226 [allowedOutlineView_ setDelegate:nil]; |
225 [blockedOutlineView_ setDelegate:nil]; | 227 [blockedOutlineView_ setDelegate:nil]; |
226 [animation_ stopAnimation]; | 228 [animation_ stopAnimation]; |
227 [self autorelease]; | 229 [self autorelease]; |
228 } | 230 } |
229 | 231 |
230 - (IBAction)closeSheet:(id)sender { | 232 - (IBAction)closeSheet:(id)sender { |
231 [NSApp endSheet:[self window]]; | 233 [NSApp endSheet:[self window]]; |
232 } | 234 } |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 treeController = blockedTreeController_; | 513 treeController = blockedTreeController_; |
512 break; | 514 break; |
513 default: | 515 default: |
514 NOTREACHED(); | 516 NOTREACHED(); |
515 return; | 517 return; |
516 } | 518 } |
517 [detailsViewController_ configureBindingsForTreeController:treeController]; | 519 [detailsViewController_ configureBindingsForTreeController:treeController]; |
518 } | 520 } |
519 | 521 |
520 @end | 522 @end |
OLD | NEW |