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

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

Issue 10082016: [mac] Enable the 'Hide Extension' checkbox on expanded save dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/select_file_dialog.h" 5 #include "chrome/browser/ui/select_file_dialog.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>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 SheetContext* context = new SheetContext; 226 SheetContext* context = new SheetContext;
227 227
228 // |context| should never be NULL, but we are seeing indications otherwise. 228 // |context| should never be NULL, but we are seeing indications otherwise.
229 // This CHECK is here to confirm if we are actually getting NULL 229 // This CHECK is here to confirm if we are actually getting NULL
230 // |context|s. http://crbug.com/58959 230 // |context|s. http://crbug.com/58959
231 CHECK(context); 231 CHECK(context);
232 context->type = type; 232 context->type = type;
233 context->owning_window = owning_window; 233 context->owning_window = owning_window;
234 234
235 if (type == SELECT_SAVEAS_FILE) { 235 if (type == SELECT_SAVEAS_FILE) {
236 [dialog setCanSelectHiddenExtension:YES];
236 [dialog beginSheetForDirectory:default_dir 237 [dialog beginSheetForDirectory:default_dir
237 file:default_filename 238 file:default_filename
238 modalForWindow:owning_window 239 modalForWindow:owning_window
239 modalDelegate:bridge_.get() 240 modalDelegate:bridge_.get()
240 didEndSelector:@selector(endedPanel:withReturn:context:) 241 didEndSelector:@selector(endedPanel:withReturn:context:)
241 contextInfo:context]; 242 contextInfo:context];
242 } else { 243 } else {
243 NSOpenPanel* open_dialog = (NSOpenPanel*)dialog; 244 NSOpenPanel* open_dialog = (NSOpenPanel*)dialog;
244 245
245 if (type == SELECT_OPEN_MULTI_FILE) 246 if (type == SELECT_OPEN_MULTI_FILE)
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 paths, 407 paths,
407 index); 408 index);
408 [panel release]; 409 [panel release];
409 } 410 }
410 411
411 - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename { 412 - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {
412 return selectFileDialogImpl_->ShouldEnableFilename(sender, filename); 413 return selectFileDialogImpl_->ShouldEnableFilename(sender, filename);
413 } 414 }
414 415
415 @end 416 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698