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

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

Issue 10820034: Remove redirection header and add "ui::" before all SelectFileDialog usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reuploading for different try run. Created 8 years, 4 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 | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/certificate_dialogs.h » ('j') | 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 profile_->GetPrefs()->GetString(prefs::kRecentlySelectedEncoding), 782 profile_->GetPrefs()->GetString(prefs::kRecentlySelectedEncoding),
783 encoding_id, 783 encoding_id,
784 &new_selected_encoding_list)) { 784 &new_selected_encoding_list)) {
785 profile_->GetPrefs()->SetString(prefs::kRecentlySelectedEncoding, 785 profile_->GetPrefs()->SetString(prefs::kRecentlySelectedEncoding,
786 new_selected_encoding_list); 786 new_selected_encoding_list);
787 } 787 }
788 } 788 }
789 789
790 void Browser::OpenFile() { 790 void Browser::OpenFile() {
791 content::RecordAction(UserMetricsAction("OpenFile")); 791 content::RecordAction(UserMetricsAction("OpenFile"));
792 select_file_dialog_ = SelectFileDialog::Create( 792 select_file_dialog_ = ui::SelectFileDialog::Create(
793 this, new ChromeSelectFilePolicy( 793 this, new ChromeSelectFilePolicy(
794 chrome::GetActiveWebContents(this))); 794 chrome::GetActiveWebContents(this)));
795 795
796 const FilePath directory = profile_->last_selected_directory(); 796 const FilePath directory = profile_->last_selected_directory();
797 797
798 // TODO(beng): figure out how to juggle this. 798 // TODO(beng): figure out how to juggle this.
799 gfx::NativeWindow parent_window = window_->GetNativeWindow(); 799 gfx::NativeWindow parent_window = window_->GetNativeWindow();
800 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, 800 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE,
801 string16(), directory, 801 string16(), directory,
802 NULL, 0, FILE_PATH_LITERAL(""), 802 NULL, 0, FILE_PATH_LITERAL(""),
803 parent_window, NULL); 803 parent_window, NULL);
804 } 804 }
805 805
806 void Browser::UpdateDownloadShelfVisibility(bool visible) { 806 void Browser::UpdateDownloadShelfVisibility(bool visible) {
807 if (GetStatusBubble()) 807 if (GetStatusBubble())
808 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); 808 GetStatusBubble()->UpdateDownloadShelfVisibility(visible);
809 } 809 }
810 810
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 if (source == chrome::GetActiveTabContents(this)) { 1726 if (source == chrome::GetActiveTabContents(this)) {
1727 window_->SetZoomIconTooltipPercent(zoom_percent); 1727 window_->SetZoomIconTooltipPercent(zoom_percent);
1728 1728
1729 // Only show the zoom bubble for zoom changes in the active window. 1729 // Only show the zoom bubble for zoom changes in the active window.
1730 if (can_show_bubble && window_->IsActive()) 1730 if (can_show_bubble && window_->IsActive())
1731 window_->ShowZoomBubble(zoom_percent); 1731 window_->ShowZoomBubble(zoom_percent);
1732 } 1732 }
1733 } 1733 }
1734 1734
1735 /////////////////////////////////////////////////////////////////////////////// 1735 ///////////////////////////////////////////////////////////////////////////////
1736 // Browser, SelectFileDialog::Listener implementation: 1736 // Browser, ui::SelectFileDialog::Listener implementation:
1737 1737
1738 void Browser::FileSelected(const FilePath& path, int index, void* params) { 1738 void Browser::FileSelected(const FilePath& path, int index, void* params) {
1739 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params); 1739 FileSelectedWithExtraInfo(ui::SelectedFileInfo(path, path), index, params);
1740 } 1740 }
1741 1741
1742 void Browser::FileSelectedWithExtraInfo( 1742 void Browser::FileSelectedWithExtraInfo(
1743 const ui::SelectedFileInfo& file_info, 1743 const ui::SelectedFileInfo& file_info,
1744 int index, 1744 int index,
1745 void* params) { 1745 void* params) {
1746 profile_->set_last_selected_directory(file_info.file_path.DirName()); 1746 profile_->set_last_selected_directory(file_info.file_path.DirName());
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 if (contents && !allow_js_access) { 2267 if (contents && !allow_js_access) {
2268 contents->web_contents()->GetController().LoadURL( 2268 contents->web_contents()->GetController().LoadURL(
2269 target_url, 2269 target_url,
2270 content::Referrer(), 2270 content::Referrer(),
2271 content::PAGE_TRANSITION_LINK, 2271 content::PAGE_TRANSITION_LINK,
2272 std::string()); // No extra headers. 2272 std::string()); // No extra headers.
2273 } 2273 }
2274 2274
2275 return contents != NULL; 2275 return contents != NULL;
2276 } 2276 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/certificate_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698