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 #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 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #import "base/mac/mac_util.h" | 10 #import "base/mac/mac_util.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 TabSpecificContentSettings* content_settings = | 111 TabSpecificContentSettings* content_settings = |
112 TabSpecificContentSettings::FromWebContents(tab_contents->web_contents()); | 112 TabSpecificContentSettings::FromWebContents(tab_contents->web_contents()); |
113 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, | 113 registrar_.Add(this, chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, |
114 content::Source<TabSpecificContentSettings>(content_settings)); | 114 content::Source<TabSpecificContentSettings>(content_settings)); |
115 | 115 |
116 sheet_controller_ = [[CollectedCookiesWindowController alloc] | 116 sheet_controller_ = [[CollectedCookiesWindowController alloc] |
117 initWithTabContents:tab_contents]; | 117 initWithTabContents:tab_contents]; |
118 | 118 |
119 set_sheet([sheet_controller_ window]); | 119 set_sheet([sheet_controller_ window]); |
120 | 120 |
121 window_ = new ConstrainedWindowMac(tab_contents, this); | 121 window_ = new ConstrainedWindowMac(tab_contents->web_contents(), this); |
122 } | 122 } |
123 | 123 |
124 CollectedCookiesMac::~CollectedCookiesMac() { | 124 CollectedCookiesMac::~CollectedCookiesMac() { |
125 NSWindow* window = [sheet_controller_ window]; | 125 NSWindow* window = [sheet_controller_ window]; |
126 if (window_ && window && is_sheet_open()) { | 126 if (window_ && window && is_sheet_open()) { |
127 window_ = NULL; | 127 window_ = NULL; |
128 [NSApp endSheet:window]; | 128 [NSApp endSheet:window]; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 treeController = blockedTreeController_; | 541 treeController = blockedTreeController_; |
542 break; | 542 break; |
543 default: | 543 default: |
544 NOTREACHED(); | 544 NOTREACHED(); |
545 return; | 545 return; |
546 } | 546 } |
547 [detailsViewController_ configureBindingsForTreeController:treeController]; | 547 [detailsViewController_ configureBindingsForTreeController:treeController]; |
548 } | 548 } |
549 | 549 |
550 @end | 550 @end |
OLD | NEW |