| 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 observerBridge_.reset( | 278 observerBridge_.reset( |
| 279 new ContentSettingBubbleWebContentsObserverBridge(webContents, self)); | 279 new ContentSettingBubbleWebContentsObserverBridge(webContents, self)); |
| 280 | 280 |
| 281 NSString* nibPath = [self getNibPathForModel:model.get()]; | 281 NSString* nibPath = [self getNibPathForModel:model.get()]; |
| 282 | 282 |
| 283 DCHECK_NE(0u, [nibPath length]); | 283 DCHECK_NE(0u, [nibPath length]); |
| 284 | 284 |
| 285 if ((self = [super initWithWindowNibPath:nibPath | 285 if ((self = [super initWithWindowNibPath:nibPath |
| 286 parentWindow:parentWindow | 286 parentWindow:parentWindow |
| 287 anchoredAt:anchoredAt])) { | 287 anchoredAt:anchoredAt])) { |
| 288 contentSettingBubbleModel_.reset(model.release()); | 288 contentSettingBubbleModel_ = std::move(model); |
| 289 decoration_ = decoration; | 289 decoration_ = decoration; |
| 290 [self showWindow:nil]; | 290 [self showWindow:nil]; |
| 291 } | 291 } |
| 292 return self; | 292 return self; |
| 293 } | 293 } |
| 294 | 294 |
| 295 - (NSString*)getNibPathForModel:(ContentSettingBubbleModel*)model { | 295 - (NSString*)getNibPathForModel:(ContentSettingBubbleModel*)model { |
| 296 NSString* nibPath = @""; | 296 NSString* nibPath = @""; |
| 297 | 297 |
| 298 ContentSettingSimpleBubbleModel* simple_bubble = model->AsSimpleBubbleModel(); | 298 ContentSettingSimpleBubbleModel* simple_bubble = model->AsSimpleBubbleModel(); |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 | 916 |
| 917 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { | 917 - (content_setting_bubble::MediaMenuPartsMap*)mediaMenus { |
| 918 return &mediaMenus_; | 918 return &mediaMenus_; |
| 919 } | 919 } |
| 920 | 920 |
| 921 - (LocationBarDecoration*)decorationForBubble { | 921 - (LocationBarDecoration*)decorationForBubble { |
| 922 return decoration_; | 922 return decoration_; |
| 923 } | 923 } |
| 924 | 924 |
| 925 @end // ContentSettingBubbleController | 925 @end // ContentSettingBubbleController |
| OLD | NEW |