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" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 @selector(sheetDidEnd:returnCode:contextInfo:)) { | 85 @selector(sheetDidEnd:returnCode:contextInfo:)) { |
86 TabSpecificContentSettings* content_settings = wrapper->content_settings(); | 86 TabSpecificContentSettings* content_settings = wrapper->content_settings(); |
87 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, | 87 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, |
88 Source<TabSpecificContentSettings>(content_settings)); | 88 Source<TabSpecificContentSettings>(content_settings)); |
89 | 89 |
90 sheet_controller_ = [[CollectedCookiesWindowController alloc] | 90 sheet_controller_ = [[CollectedCookiesWindowController alloc] |
91 initWithTabContentsWrapper:wrapper]; | 91 initWithTabContentsWrapper:wrapper]; |
92 | 92 |
93 set_sheet([sheet_controller_ window]); | 93 set_sheet([sheet_controller_ window]); |
94 | 94 |
95 window_ = new ConstrainedWindowMac(wrapper->tab_contents(), this); | 95 window_ = new ConstrainedWindowMac(wrapper, this); |
96 } | 96 } |
97 | 97 |
98 CollectedCookiesMac::~CollectedCookiesMac() { | 98 CollectedCookiesMac::~CollectedCookiesMac() { |
99 NSWindow* window = [sheet_controller_ window]; | 99 NSWindow* window = [sheet_controller_ window]; |
100 if (window_ && window && is_sheet_open()) { | 100 if (window_ && window && is_sheet_open()) { |
101 window_ = NULL; | 101 window_ = NULL; |
102 [NSApp endSheet:window]; | 102 [NSApp endSheet:window]; |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 treeController = blockedTreeController_; | 505 treeController = blockedTreeController_; |
506 break; | 506 break; |
507 default: | 507 default: |
508 NOTREACHED(); | 508 NOTREACHED(); |
509 return; | 509 return; |
510 } | 510 } |
511 [detailsViewController_ configureBindingsForTreeController:treeController]; | 511 [detailsViewController_ configureBindingsForTreeController:treeController]; |
512 } | 512 } |
513 | 513 |
514 @end | 514 @end |
OLD | NEW |