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

Side by Side Diff: chrome/browser/browser_commands.cc

Issue 10621: Adds the ability for save dialogs to take a default extension.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include <commdlg.h> 7 #include <commdlg.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 PageZoom::STANDARD); 539 PageZoom::STANDARD);
540 } 540 }
541 break; 541 break;
542 } 542 }
543 543
544 case IDC_OPENFILE: { 544 case IDC_OPENFILE: {
545 UserMetrics::RecordAction(L"OpenFile", profile_); 545 UserMetrics::RecordAction(L"OpenFile", profile_);
546 if (!select_file_dialog_.get()) 546 if (!select_file_dialog_.get())
547 select_file_dialog_ = SelectFileDialog::Create(this); 547 select_file_dialog_ = SelectFileDialog::Create(this);
548 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, 548 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE,
549 L"", L"", GetTopLevelHWND(), NULL); 549 std::wstring(), std::wstring(),
550 std::wstring(), std::wstring(),
551 GetTopLevelHWND(), NULL);
550 break; 552 break;
551 } 553 }
552 554
553 case IDC_TASKMANAGER: 555 case IDC_TASKMANAGER:
554 UserMetrics::RecordAction(L"TaskManager", profile_); 556 UserMetrics::RecordAction(L"TaskManager", profile_);
555 TaskManager::Open(); 557 TaskManager::Open();
556 break; 558 break;
557 559
558 case IDC_CLOSEPOPUPS: 560 case IDC_CLOSEPOPUPS:
559 UserMetrics::RecordAction(L"CloseAllSuppressedPopups", profile_); 561 UserMetrics::RecordAction(L"CloseAllSuppressedPopups", profile_);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 1043
1042 //////////////////////////////////////////////////////////////////////////////// 1044 ////////////////////////////////////////////////////////////////////////////////
1043 // Browser, SelectFileDialog::Listener implementation: 1045 // Browser, SelectFileDialog::Listener implementation:
1044 1046
1045 void Browser::FileSelected(const std::wstring& path, void* params) { 1047 void Browser::FileSelected(const std::wstring& path, void* params) {
1046 GURL file_url = net::FilePathToFileURL(path); 1048 GURL file_url = net::FilePathToFileURL(path);
1047 if (!file_url.is_empty()) 1049 if (!file_url.is_empty())
1048 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED); 1050 OpenURL(file_url, GURL(), CURRENT_TAB, PageTransition::TYPED);
1049 } 1051 }
1050 1052
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698