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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, | 904 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, |
905 base::string16(), | 905 base::string16(), |
906 directory, | 906 directory, |
907 &file_types, | 907 &file_types, |
908 0, | 908 0, |
909 base::FilePath::StringType(), | 909 base::FilePath::StringType(), |
910 parent_window, | 910 parent_window, |
911 NULL); | 911 NULL); |
912 } | 912 } |
913 | 913 |
| 914 void Browser::CloseFileDialog() { |
| 915 select_file_dialog_->Close(); |
| 916 } |
| 917 |
914 void Browser::UpdateDownloadShelfVisibility(bool visible) { | 918 void Browser::UpdateDownloadShelfVisibility(bool visible) { |
915 if (GetStatusBubble()) | 919 if (GetStatusBubble()) |
916 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); | 920 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); |
917 } | 921 } |
918 | 922 |
919 /////////////////////////////////////////////////////////////////////////////// | 923 /////////////////////////////////////////////////////////////////////////////// |
920 | 924 |
921 void Browser::UpdateUIForNavigationInTab(WebContents* contents, | 925 void Browser::UpdateUIForNavigationInTab(WebContents* contents, |
922 ui::PageTransition transition, | 926 ui::PageTransition transition, |
923 bool user_initiated) { | 927 bool user_initiated) { |
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2695 if (contents && !allow_js_access) { | 2699 if (contents && !allow_js_access) { |
2696 contents->web_contents()->GetController().LoadURL( | 2700 contents->web_contents()->GetController().LoadURL( |
2697 target_url, | 2701 target_url, |
2698 content::Referrer(), | 2702 content::Referrer(), |
2699 ui::PAGE_TRANSITION_LINK, | 2703 ui::PAGE_TRANSITION_LINK, |
2700 std::string()); // No extra headers. | 2704 std::string()); // No extra headers. |
2701 } | 2705 } |
2702 | 2706 |
2703 return contents != NULL; | 2707 return contents != NULL; |
2704 } | 2708 } |
OLD | NEW |