| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 // defined(OS_WIN) | 10 #endif // defined(OS_WIN) |
| (...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 this, new ChromeSelectFilePolicy( | 806 this, new ChromeSelectFilePolicy( |
| 807 tab_strip_model_->GetActiveWebContents())); | 807 tab_strip_model_->GetActiveWebContents())); |
| 808 | 808 |
| 809 const base::FilePath directory = profile_->last_selected_directory(); | 809 const base::FilePath directory = profile_->last_selected_directory(); |
| 810 | 810 |
| 811 // TODO(beng): figure out how to juggle this. | 811 // TODO(beng): figure out how to juggle this. |
| 812 gfx::NativeWindow parent_window = window_->GetNativeWindow(); | 812 gfx::NativeWindow parent_window = window_->GetNativeWindow(); |
| 813 ui::SelectFileDialog::FileTypeInfo file_types; | 813 ui::SelectFileDialog::FileTypeInfo file_types; |
| 814 file_types.support_drive = true; | 814 file_types.support_drive = true; |
| 815 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, | 815 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, |
| 816 string16(), directory, | 816 string16(), |
| 817 &file_types, 0, FILE_PATH_LITERAL(""), | 817 directory, |
| 818 parent_window, NULL); | 818 &file_types, |
| 819 0, |
| 820 base::FilePath::StringType(), |
| 821 parent_window, |
| 822 NULL); |
| 819 } | 823 } |
| 820 | 824 |
| 821 void Browser::UpdateDownloadShelfVisibility(bool visible) { | 825 void Browser::UpdateDownloadShelfVisibility(bool visible) { |
| 822 if (GetStatusBubble()) | 826 if (GetStatusBubble()) |
| 823 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); | 827 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); |
| 824 } | 828 } |
| 825 | 829 |
| 826 /////////////////////////////////////////////////////////////////////////////// | 830 /////////////////////////////////////////////////////////////////////////////// |
| 827 | 831 |
| 828 // static | 832 // static |
| (...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2234 if (contents && !allow_js_access) { | 2238 if (contents && !allow_js_access) { |
| 2235 contents->web_contents()->GetController().LoadURL( | 2239 contents->web_contents()->GetController().LoadURL( |
| 2236 target_url, | 2240 target_url, |
| 2237 content::Referrer(), | 2241 content::Referrer(), |
| 2238 content::PAGE_TRANSITION_LINK, | 2242 content::PAGE_TRANSITION_LINK, |
| 2239 std::string()); // No extra headers. | 2243 std::string()); // No extra headers. |
| 2240 } | 2244 } |
| 2241 | 2245 |
| 2242 return contents != NULL; | 2246 return contents != NULL; |
| 2243 } | 2247 } |
| OLD | NEW |