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/content_setting_bubble_cocoa.h " | 5 #import "chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h " |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 if (settingsType == type_to_path.type) { | 278 if (settingsType == type_to_path.type) { |
279 nibPath = type_to_path.path; | 279 nibPath = type_to_path.path; |
280 break; | 280 break; |
281 } | 281 } |
282 } | 282 } |
283 } | 283 } |
284 | 284 |
285 if (model->AsMediaStreamBubbleModel()) | 285 if (model->AsMediaStreamBubbleModel()) |
286 nibPath = @"ContentBlockedMedia"; | 286 nibPath = @"ContentBlockedMedia"; |
287 | 287 |
288 if (model->AsSubresourceFilterBubbleModel()) | |
Bernhard Bauer
2016/07/27 19:27:44
Doing all of these checks in sequence feels a bit
melandory
2016/07/28 14:04:56
Done.
| |
289 nibPath = @"ContentSubresourceFilter"; | |
290 | |
288 DCHECK_NE(0u, [nibPath length]); | 291 DCHECK_NE(0u, [nibPath length]); |
289 | 292 |
290 if ((self = [super initWithWindowNibPath:nibPath | 293 if ((self = [super initWithWindowNibPath:nibPath |
291 parentWindow:parentWindow | 294 parentWindow:parentWindow |
292 anchoredAt:anchoredAt])) { | 295 anchoredAt:anchoredAt])) { |
293 contentSettingBubbleModel_.reset(model.release()); | 296 contentSettingBubbleModel_.reset(model.release()); |
294 [self showWindow:nil]; | 297 [self showWindow:nil]; |
295 } | 298 } |
296 return self; | 299 return self; |
297 } | 300 } |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
849 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 852 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); |
850 | 853 |
851 it->second->model->ExecuteCommand(index, 0); | 854 it->second->model->ExecuteCommand(index, 0); |
852 } | 855 } |
853 | 856 |
854 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 857 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { |
855 return &mediaMenus_; | 858 return &mediaMenus_; |
856 } | 859 } |
857 | 860 |
858 @end // ContentSettingBubbleController | 861 @end // ContentSettingBubbleController |
OLD | NEW |