Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/shell/browser/shell_browser_main_parts.h" | 5 #include "content/shell/browser/shell_browser_main_parts.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 #include "base/mac/sdk_forward_declarations.h" | |
| 11 #include "content/shell/browser/shell_application_mac.h" | 12 #include "content/shell/browser/shell_application_mac.h" |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 void ShellBrowserMainParts::PreMainMessageLoopStart() { | 16 void ShellBrowserMainParts::PreMainMessageLoopStart() { |
| 16 // Force the NSApplication subclass to be used. | 17 // Force the NSApplication subclass to be used. |
| 17 [ShellCrApplication sharedApplication]; | 18 [ShellCrApplication sharedApplication]; |
| 18 | 19 |
| 19 base::scoped_nsobject<NSNib> nib( | 20 base::scoped_nsobject<NSNib> nib( |
| 20 [[NSNib alloc] initWithNibNamed:@"MainMenu" | 21 [[NSNib alloc] initWithNibNamed:@"MainMenu" |
| 21 bundle:base::mac::FrameworkBundle()]); | 22 bundle:base::mac::FrameworkBundle()]); |
| 22 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil]; | 23 NSArray* top_level_objects = nil; |
| 24 [nib instantiateWithOwner:NSApp topLevelObjects:nil]; | |
| 25 for (NSObject* object : top_level_objects) | |
| 26 [object retain]; | |
|
Avi (use Gerrit)
2016/07/01 22:23:54
Is
[top_level_objects makeObjectsPerformSelector:
| |
| 23 } | 27 } |
| 24 | 28 |
| 25 } // namespace content | 29 } // namespace content |
| OLD | NEW |