| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 const FindNotificationDetails& find_result() const { return find_result_; } | 229 const FindNotificationDetails& find_result() const { return find_result_; } |
| 230 | 230 |
| 231 // Misc state & callbacks ---------------------------------------------------- | 231 // Misc state & callbacks ---------------------------------------------------- |
| 232 | 232 |
| 233 // Set whether the contents should block javascript message boxes or not. | 233 // Set whether the contents should block javascript message boxes or not. |
| 234 // Default is not to block any message boxes. | 234 // Default is not to block any message boxes. |
| 235 void set_suppress_javascript_messages(bool suppress_javascript_messages) { | 235 void set_suppress_javascript_messages(bool suppress_javascript_messages) { |
| 236 suppress_javascript_messages_ = suppress_javascript_messages; | 236 suppress_javascript_messages_ = suppress_javascript_messages; |
| 237 } | 237 } |
| 238 | 238 |
| 239 // JavascriptMessageBoxHandler calls this when the dialog is closed. | 239 // AppModalDialog calls this when the dialog is closed. |
| 240 void OnJavaScriptMessageBoxClosed(IPC::Message* reply_msg, | 240 void OnJavaScriptMessageBoxClosed(IPC::Message* reply_msg, |
| 241 bool success, | 241 bool success, |
| 242 const std::wstring& prompt); | 242 const std::wstring& prompt); |
| 243 | 243 |
| 244 // Prepare for saving the current web page to disk. | 244 // Prepare for saving the current web page to disk. |
| 245 void OnSavePage(); | 245 void OnSavePage(); |
| 246 | 246 |
| 247 // Save page with the main HTML file path, the directory for saving resources, | 247 // Save page with the main HTML file path, the directory for saving resources, |
| 248 // and the save type: HTML only or complete web page. | 248 // and the save type: HTML only or complete web page. |
| 249 void SavePage(const std::wstring& main_file, | 249 void SavePage(const std::wstring& main_file, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 virtual void RunFileChooser(bool multiple_files, | 371 virtual void RunFileChooser(bool multiple_files, |
| 372 const string16& title, | 372 const string16& title, |
| 373 const FilePath& default_file, | 373 const FilePath& default_file, |
| 374 const std::wstring& filter); | 374 const std::wstring& filter); |
| 375 virtual void RunJavaScriptMessage(const std::wstring& message, | 375 virtual void RunJavaScriptMessage(const std::wstring& message, |
| 376 const std::wstring& default_prompt, | 376 const std::wstring& default_prompt, |
| 377 const GURL& frame_url, | 377 const GURL& frame_url, |
| 378 const int flags, | 378 const int flags, |
| 379 IPC::Message* reply_msg, | 379 IPC::Message* reply_msg, |
| 380 bool* did_suppress_message); | 380 bool* did_suppress_message); |
| 381 virtual void RunBeforeUnloadConfirm(const GURL& frame_url, | 381 virtual void RunBeforeUnloadConfirm(const std::wstring& message, |
| 382 const std::wstring& message, | |
| 383 IPC::Message* reply_msg); | 382 IPC::Message* reply_msg); |
| 384 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 383 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, |
| 385 const std::string& json_arguments, | 384 const std::string& json_arguments, |
| 386 IPC::Message* reply_msg); | 385 IPC::Message* reply_msg); |
| 387 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms); | 386 virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms); |
| 388 virtual void AutofillFormSubmitted(const AutofillForm& form); | 387 virtual void AutofillFormSubmitted(const AutofillForm& form); |
| 389 virtual void GetAutofillSuggestions(const std::wstring& field_name, | 388 virtual void GetAutofillSuggestions(const std::wstring& field_name, |
| 390 const std::wstring& user_text, int64 node_id, int request_id); | 389 const std::wstring& user_text, int64 node_id, int request_id); |
| 391 virtual void RemoveAutofillEntry(const std::wstring& field_name, | 390 virtual void RemoveAutofillEntry(const std::wstring& field_name, |
| 392 const std::wstring& value); | 391 const std::wstring& value); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 | 699 |
| 701 // The last find result. This object contains details about the number of | 700 // The last find result. This object contains details about the number of |
| 702 // matches, the find selection rectangle, etc. The UI can access this | 701 // matches, the find selection rectangle, etc. The UI can access this |
| 703 // information to build its presentation. | 702 // information to build its presentation. |
| 704 FindNotificationDetails find_result_; | 703 FindNotificationDetails find_result_; |
| 705 | 704 |
| 706 DISALLOW_COPY_AND_ASSIGN(WebContents); | 705 DISALLOW_COPY_AND_ASSIGN(WebContents); |
| 707 }; | 706 }; |
| 708 | 707 |
| 709 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ | 708 #endif // CHROME_BROWSER_TAB_CONTENTS_WEB_CONTENTS_H_ |
| OLD | NEW |