Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698