OLD | NEW |
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/tab_contents/web_contents.h" | 5 #include "chrome/browser/tab_contents/web_contents.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 | 1138 |
1139 if (controller()) { | 1139 if (controller()) { |
1140 int current_index = controller()->GetLastCommittedEntryIndex(); | 1140 int current_index = controller()->GetLastCommittedEntryIndex(); |
1141 *back_list_count = current_index; | 1141 *back_list_count = current_index; |
1142 *forward_list_count = controller()->GetEntryCount() - current_index - 1; | 1142 *forward_list_count = controller()->GetEntryCount() - current_index - 1; |
1143 } | 1143 } |
1144 } | 1144 } |
1145 | 1145 |
1146 void WebContents::RunFileChooser(bool multiple_files, | 1146 void WebContents::RunFileChooser(bool multiple_files, |
1147 const string16& title, | 1147 const string16& title, |
1148 const FilePath& default_file, | 1148 const FilePath& default_file) { |
1149 const std::wstring& filter) { | |
1150 if (!select_file_dialog_.get()) | 1149 if (!select_file_dialog_.get()) |
1151 select_file_dialog_ = SelectFileDialog::Create(this); | 1150 select_file_dialog_ = SelectFileDialog::Create(this); |
1152 SelectFileDialog::Type dialog_type = | 1151 SelectFileDialog::Type dialog_type = |
1153 multiple_files ? SelectFileDialog::SELECT_OPEN_MULTI_FILE : | 1152 multiple_files ? SelectFileDialog::SELECT_OPEN_MULTI_FILE : |
1154 SelectFileDialog::SELECT_OPEN_FILE; | 1153 SelectFileDialog::SELECT_OPEN_FILE; |
1155 select_file_dialog_->SelectFile(dialog_type, title, default_file, | 1154 select_file_dialog_->SelectFile(dialog_type, title, default_file, |
1156 filter, 0, FILE_PATH_LITERAL(""), | 1155 NULL, 0, FILE_PATH_LITERAL(""), |
1157 view_->GetTopLevelNativeWindow(), NULL); | 1156 view_->GetTopLevelNativeWindow(), NULL); |
1158 } | 1157 } |
1159 | 1158 |
1160 void WebContents::RunJavaScriptMessage( | 1159 void WebContents::RunJavaScriptMessage( |
1161 const std::wstring& message, | 1160 const std::wstring& message, |
1162 const std::wstring& default_prompt, | 1161 const std::wstring& default_prompt, |
1163 const GURL& frame_url, | 1162 const GURL& frame_url, |
1164 const int flags, | 1163 const int flags, |
1165 IPC::Message* reply_msg, | 1164 IPC::Message* reply_msg, |
1166 bool* did_suppress_message) { | 1165 bool* did_suppress_message) { |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 // -> Use pending DOM UI if any. | 2031 // -> Use pending DOM UI if any. |
2033 // | 2032 // |
2034 // - Normal state with no load: committed nav entry + no pending nav entry: | 2033 // - Normal state with no load: committed nav entry + no pending nav entry: |
2035 // -> Use committed DOM UI. | 2034 // -> Use committed DOM UI. |
2036 if (controller()->GetPendingEntry() && | 2035 if (controller()->GetPendingEntry() && |
2037 (controller()->GetLastCommittedEntry() || | 2036 (controller()->GetLastCommittedEntry() || |
2038 render_manager_.pending_dom_ui())) | 2037 render_manager_.pending_dom_ui())) |
2039 return render_manager_.pending_dom_ui(); | 2038 return render_manager_.pending_dom_ui(); |
2040 return render_manager_.dom_ui(); | 2039 return render_manager_.dom_ui(); |
2041 } | 2040 } |
OLD | NEW |