| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/website_settings/website_settings_bubble_contro
ller.h" | 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro
ller.h" |
| 6 | 6 |
| 7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 | 10 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } else { | 227 } else { |
| 228 [self initializeContents]; | 228 [self initializeContents]; |
| 229 } | 229 } |
| 230 | 230 |
| 231 bridge_.reset(bridge); | 231 bridge_.reset(bridge); |
| 232 bridge_->set_bubble_controller(self); | 232 bridge_->set_bubble_controller(self); |
| 233 } | 233 } |
| 234 return self; | 234 return self; |
| 235 } | 235 } |
| 236 | 236 |
| 237 - (LocationBarDecoration*)decorationForBubble { |
| 238 BrowserWindowController* controller = [[self parentWindow] windowController]; |
| 239 LocationBarViewMac* location_bar = [controller locationBarBridge]; |
| 240 return location_bar ? location_bar->GetPageInfoDecoration() : nullptr; |
| 241 } |
| 242 |
| 237 - (Profile*)profile { | 243 - (Profile*)profile { |
| 238 return Profile::FromBrowserContext(webContents_->GetBrowserContext()); | 244 return Profile::FromBrowserContext(webContents_->GetBrowserContext()); |
| 239 } | 245 } |
| 240 | 246 |
| 241 - (void)windowWillClose:(NSNotification*)notification { | 247 - (void)windowWillClose:(NSNotification*)notification { |
| 242 if (presenter_.get()) | 248 if (presenter_.get()) |
| 243 presenter_->OnUIClosing(); | 249 presenter_->OnUIClosing(); |
| 244 presenter_.reset(); | 250 presenter_.reset(); |
| 245 [super windowWillClose:notification]; | 251 [super windowWillClose:notification]; |
| 246 } | 252 } |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 void WebsiteSettingsUIBridge::SetPermissionInfo( | 1220 void WebsiteSettingsUIBridge::SetPermissionInfo( |
| 1215 const PermissionInfoList& permission_info_list, | 1221 const PermissionInfoList& permission_info_list, |
| 1216 ChosenObjectInfoList chosen_object_info_list) { | 1222 ChosenObjectInfoList chosen_object_info_list) { |
| 1217 [bubble_controller_ setPermissionInfo:permission_info_list | 1223 [bubble_controller_ setPermissionInfo:permission_info_list |
| 1218 andChosenObjects:std::move(chosen_object_info_list)]; | 1224 andChosenObjects:std::move(chosen_object_info_list)]; |
| 1219 } | 1225 } |
| 1220 | 1226 |
| 1221 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { | 1227 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { |
| 1222 // TODO(lgarron): Remove this from the interface. (crbug.com/571533) | 1228 // TODO(lgarron): Remove this from the interface. (crbug.com/571533) |
| 1223 } | 1229 } |
| OLD | NEW |