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

Side by Side Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 12147002: Add a receiver interface to RemovableStorageNotifications. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merging Created 7 years, 10 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 #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
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 // TODO(gbillock): Make the ImageCapture manager owned by
288 // RemovableDeviceNotificationsMac.
289 if (base::mac::IsOSLionOrLater()) {
288 image_capture_device_manager_.reset(new chrome::ImageCaptureDeviceManager); 290 image_capture_device_manager_.reset(new chrome::ImageCaptureDeviceManager);
291 image_capture_device_manager_->SetNotifications(
292 removable_device_notifications_mac_->receiver());
293 }
289 294
290 ChromeBrowserMainPartsPosix::PreProfileInit(); 295 ChromeBrowserMainPartsPosix::PreProfileInit();
291 } 296 }
292 297
293 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 298 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
294 AppController* appController = [NSApp delegate]; 299 AppController* appController = [NSApp delegate];
295 [appController didEndMainMessageLoop]; 300 [appController didEndMainMessageLoop];
296 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698