| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, @"ContentProtocolHandlers"}, | 256 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, @"ContentProtocolHandlers"}, |
| 257 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, @"ContentBlockedDownloads"}, | 257 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, @"ContentBlockedDownloads"}, |
| 258 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, @"ContentBlockedMIDISysEx"}, | 258 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, @"ContentBlockedMIDISysEx"}, |
| 259 }; | 259 }; |
| 260 | 260 |
| 261 - (id)initWithModel:(ContentSettingBubbleModel*)contentSettingBubbleModel | 261 - (id)initWithModel:(ContentSettingBubbleModel*)contentSettingBubbleModel |
| 262 webContents:(content::WebContents*)webContents | 262 webContents:(content::WebContents*)webContents |
| 263 parentWindow:(NSWindow*)parentWindow | 263 parentWindow:(NSWindow*)parentWindow |
| 264 anchoredAt:(NSPoint)anchoredAt { | 264 anchoredAt:(NSPoint)anchoredAt { |
| 265 // This method takes ownership of |contentSettingBubbleModel| in all cases. | 265 // This method takes ownership of |contentSettingBubbleModel| in all cases. |
| 266 scoped_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel); | 266 std::unique_ptr<ContentSettingBubbleModel> model(contentSettingBubbleModel); |
| 267 DCHECK(model.get()); | 267 DCHECK(model.get()); |
| 268 observerBridge_.reset( | 268 observerBridge_.reset( |
| 269 new ContentSettingBubbleWebContentsObserverBridge(webContents, self)); | 269 new ContentSettingBubbleWebContentsObserverBridge(webContents, self)); |
| 270 | 270 |
| 271 NSString* nibPath = @""; | 271 NSString* nibPath = @""; |
| 272 | 272 |
| 273 ContentSettingSimpleBubbleModel* simple_bubble = model->AsSimpleBubbleModel(); | 273 ContentSettingSimpleBubbleModel* simple_bubble = model->AsSimpleBubbleModel(); |
| 274 if (simple_bubble) { | 274 if (simple_bubble) { |
| 275 ContentSettingsType settingsType = simple_bubble->content_type(); | 275 ContentSettingsType settingsType = simple_bubble->content_type(); |
| 276 | 276 |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); | 846 button, base::SysUTF16ToNSString(it->second->model->GetLabelAt(index))); |
| 847 | 847 |
| 848 it->second->model->ExecuteCommand(index, 0); | 848 it->second->model->ExecuteCommand(index, 0); |
| 849 } | 849 } |
| 850 | 850 |
| 851 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 851 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { |
| 852 return &mediaMenus_; | 852 return &mediaMenus_; |
| 853 } | 853 } |
| 854 | 854 |
| 855 @end // ContentSettingBubbleController | 855 @end // ContentSettingBubbleController |
| OLD | NEW |