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

Side by Side Diff: chrome/browser/ui/cocoa/shell_dialogs_mac.mm

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/shell_dialogs.h" 5 #include "chrome/browser/shell_dialogs.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 9
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <vector> 12 #include <vector>
13 13
14 #include "app/l10n_util_mac.h" 14 #include "app/l10n_util_mac.h"
15 #include "base/file_util.h" 15 #include "base/file_util.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #import "base/mac/cocoa_protocols.h" 17 #import "base/mac/cocoa_protocols.h"
18 #include "base/mac_util.h" 18 #include "base/mac/mac_util.h"
19 #include "base/mac/scoped_cftyperef.h" 19 #include "base/mac/scoped_cftyperef.h"
20 #import "base/scoped_nsobject.h" 20 #import "base/scoped_nsobject.h"
21 #include "base/sys_string_conversions.h" 21 #include "base/sys_string_conversions.h"
22 #include "base/threading/thread_restrictions.h" 22 #include "base/threading/thread_restrictions.h"
23 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 24
25 static const int kFileTypePopupTag = 1234; 25 static const int kFileTypePopupTag = 1234;
26 26
27 class SelectFileDialogImpl; 27 class SelectFileDialogImpl;
28 28
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 listener_->FileSelected(files[0], index, params); 282 listener_->FileSelected(files[0], index, params);
283 } 283 }
284 } 284 }
285 } 285 }
286 286
287 NSView* SelectFileDialogImpl::GetAccessoryView(const FileTypeInfo* file_types, 287 NSView* SelectFileDialogImpl::GetAccessoryView(const FileTypeInfo* file_types,
288 int file_type_index) { 288 int file_type_index) {
289 DCHECK(file_types); 289 DCHECK(file_types);
290 scoped_nsobject<NSNib> nib ( 290 scoped_nsobject<NSNib> nib (
291 [[NSNib alloc] initWithNibNamed:@"SaveAccessoryView" 291 [[NSNib alloc] initWithNibNamed:@"SaveAccessoryView"
292 bundle:mac_util::MainAppBundle()]); 292 bundle:base::mac::MainAppBundle()]);
293 if (!nib) 293 if (!nib)
294 return nil; 294 return nil;
295 295
296 NSArray* objects; 296 NSArray* objects;
297 BOOL success = [nib instantiateNibWithOwner:nil 297 BOOL success = [nib instantiateNibWithOwner:nil
298 topLevelObjects:&objects]; 298 topLevelObjects:&objects];
299 if (!success) 299 if (!success)
300 return nil; 300 return nil;
301 [objects makeObjectsPerformSelector:@selector(release)]; 301 [objects makeObjectsPerformSelector:@selector(release)];
302 302
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 paths, 408 paths,
409 index); 409 index);
410 [panel release]; 410 [panel release];
411 } 411 }
412 412
413 - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename { 413 - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {
414 return selectFileDialogImpl_->ShouldEnableFilename(sender, filename); 414 return selectFileDialogImpl_->ShouldEnableFilename(sender, filename);
415 } 415 }
416 416
417 @end 417 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698