Chromium Code Reviews| 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 #include "chrome/browser/chrome_browser_main_mac.h" | 5 #include "chrome/browser/chrome_browser_main_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 #include <sys/sysctl.h> | 8 #include <sys/sysctl.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 | 277 |
| 278 // Prevent Cocoa from turning command-line arguments into | 278 // Prevent Cocoa from turning command-line arguments into |
| 279 // |-application:openFiles:|, since we already handle them directly. | 279 // |-application:openFiles:|, since we already handle them directly. |
| 280 [[NSUserDefaults standardUserDefaults] | 280 [[NSUserDefaults standardUserDefaults] |
| 281 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; | 281 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; |
| 282 } | 282 } |
| 283 | 283 |
| 284 void ChromeBrowserMainPartsMac::PreProfileInit() { | 284 void ChromeBrowserMainPartsMac::PreProfileInit() { |
| 285 removable_device_notifications_mac_ = | 285 removable_device_notifications_mac_ = |
| 286 new chrome::RemovableDeviceNotificationsMac(); | 286 new chrome::RemovableDeviceNotificationsMac(); |
| 287 if (base::mac::IsOSLionOrLater()) | 287 if (base::mac::IsOSLionOrLater()) { |
| 288 image_capture_device_manager_.reset(new chrome::ImageCaptureDeviceManager); | 288 image_capture_device_manager_.reset(new chrome::ImageCaptureDeviceManager); |
|
vandebo (ex-Chrome)
2013/01/31 23:51:29
Add a TODO to make ImageCpatureDeviceManger owned
Greg Billock
2013/02/01 18:28:42
Done.
| |
| 289 image_capture_device_manager_->SetNotifications( | |
| 290 removable_device_notifications_mac_->receiver_.get()); | |
| 291 } | |
| 289 | 292 |
| 290 ChromeBrowserMainPartsPosix::PreProfileInit(); | 293 ChromeBrowserMainPartsPosix::PreProfileInit(); |
| 291 } | 294 } |
| 292 | 295 |
| 293 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 296 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 294 AppController* appController = [NSApp delegate]; | 297 AppController* appController = [NSApp delegate]; |
| 295 [appController didEndMainMessageLoop]; | 298 [appController didEndMainMessageLoop]; |
| 296 } | 299 } |
| OLD | NEW |