| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 namespace history { | 50 namespace history { |
| 51 class HistoryAddPageArgs; | 51 class HistoryAddPageArgs; |
| 52 } | 52 } |
| 53 | 53 |
| 54 namespace printing { | 54 namespace printing { |
| 55 class PrintViewManager; | 55 class PrintViewManager; |
| 56 } | 56 } |
| 57 | 57 |
| 58 namespace webkit_glue { | |
| 59 struct PasswordForm; | |
| 60 } | |
| 61 | |
| 62 class AutocompleteHistoryManager; | 58 class AutocompleteHistoryManager; |
| 63 class AutoFillManager; | 59 class AutoFillManager; |
| 64 class BlockedContentContainer; | 60 class BlockedContentContainer; |
| 65 class DOMUI; | 61 class DOMUI; |
| 66 class DownloadItem; | 62 class DownloadItem; |
| 67 class Extension; | 63 class Extension; |
| 68 class FileSelectHelper; | 64 class FileSelectHelper; |
| 69 class InfoBarDelegate; | 65 class InfoBarDelegate; |
| 70 class LoadNotificationDetails; | 66 class LoadNotificationDetails; |
| 71 class OmniboxSearchHint; | 67 class OmniboxSearchHint; |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 // Shows a fade effect over this tab contents. Repeated calls will be ignored | 732 // Shows a fade effect over this tab contents. Repeated calls will be ignored |
| 737 // until the fade is canceled. If |animate| is true the fade should animate. | 733 // until the fade is canceled. If |animate| is true the fade should animate. |
| 738 void FadeForInstant(bool animate); | 734 void FadeForInstant(bool animate); |
| 739 | 735 |
| 740 // Immediately removes the fade. | 736 // Immediately removes the fade. |
| 741 void CancelInstantFade(); | 737 void CancelInstantFade(); |
| 742 | 738 |
| 743 // Opens view-source tab for this contents. | 739 // Opens view-source tab for this contents. |
| 744 void ViewSource(); | 740 void ViewSource(); |
| 745 | 741 |
| 742 // Notification that translation has started for this tab. |
| 743 void TranslateStarted(); |
| 744 |
| 746 // Gets the minimum/maximum zoom percent. | 745 // Gets the minimum/maximum zoom percent. |
| 747 int minimum_zoom_percent() const { return minimum_zoom_percent_; } | 746 int minimum_zoom_percent() const { return minimum_zoom_percent_; } |
| 748 int maximum_zoom_percent() const { return maximum_zoom_percent_; } | 747 int maximum_zoom_percent() const { return maximum_zoom_percent_; } |
| 749 | 748 |
| 750 int content_restrictions() const { return content_restrictions_; } | 749 int content_restrictions() const { return content_restrictions_; } |
| 751 | 750 |
| 752 AutocompleteHistoryManager* autocomplete_history_manager() { | 751 AutocompleteHistoryManager* autocomplete_history_manager() { |
| 753 return autocomplete_history_manager_.get(); | 752 return autocomplete_history_manager_.get(); |
| 754 } | 753 } |
| 755 AutoFillManager* autofill_manager() { return autofill_manager_.get(); } | |
| 756 | 754 |
| 757 protected: | 755 protected: |
| 758 // from RenderViewHostDelegate. | 756 // from RenderViewHostDelegate. |
| 759 virtual bool OnMessageReceived(const IPC::Message& message); | 757 virtual bool OnMessageReceived(const IPC::Message& message); |
| 760 | 758 |
| 761 private: | 759 private: |
| 762 friend class NavigationController; | 760 friend class NavigationController; |
| 763 // Used to access the child_windows_ (ConstrainedWindowList) for testing | 761 // Used to access the child_windows_ (ConstrainedWindowList) for testing |
| 764 // automation purposes. | 762 // automation purposes. |
| 765 friend class TestingAutomationProvider; | 763 friend class TestingAutomationProvider; |
| 766 | 764 |
| 767 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, NoJSMessageOnInterstitials); | 765 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, NoJSMessageOnInterstitials); |
| 768 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, UpdateTitle); | 766 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, UpdateTitle); |
| 769 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, CrossSiteCantPreemptAfterUnload); | 767 FRIEND_TEST_ALL_PREFIXES(TabContentsTest, CrossSiteCantPreemptAfterUnload); |
| 768 FRIEND_TEST_ALL_PREFIXES(FormStructureBrowserTest, HTMLFiles); |
| 770 | 769 |
| 771 // Temporary until the view/contents separation is complete. | 770 // Temporary until the view/contents separation is complete. |
| 772 friend class TabContentsView; | 771 friend class TabContentsView; |
| 773 #if defined(OS_WIN) | 772 #if defined(OS_WIN) |
| 774 friend class TabContentsViewWin; | 773 friend class TabContentsViewWin; |
| 775 #elif defined(OS_MACOSX) | 774 #elif defined(OS_MACOSX) |
| 776 friend class TabContentsViewMac; | 775 friend class TabContentsViewMac; |
| 777 #elif defined(TOOLKIT_USES_GTK) | 776 #elif defined(TOOLKIT_USES_GTK) |
| 778 friend class TabContentsViewGtk; | 777 friend class TabContentsViewGtk; |
| 779 #endif | 778 #endif |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 const std::wstring& default_prompt, | 1006 const std::wstring& default_prompt, |
| 1008 const GURL& frame_url, | 1007 const GURL& frame_url, |
| 1009 const int flags, | 1008 const int flags, |
| 1010 IPC::Message* reply_msg, | 1009 IPC::Message* reply_msg, |
| 1011 bool* did_suppress_message); | 1010 bool* did_suppress_message); |
| 1012 virtual void RunBeforeUnloadConfirm(const std::wstring& message, | 1011 virtual void RunBeforeUnloadConfirm(const std::wstring& message, |
| 1013 IPC::Message* reply_msg); | 1012 IPC::Message* reply_msg); |
| 1014 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, | 1013 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, |
| 1015 const std::string& json_arguments, | 1014 const std::string& json_arguments, |
| 1016 IPC::Message* reply_msg); | 1015 IPC::Message* reply_msg); |
| 1017 virtual void PasswordFormsFound( | |
| 1018 const std::vector<webkit_glue::PasswordForm>& forms); | |
| 1019 virtual void PasswordFormsVisible( | |
| 1020 const std::vector<webkit_glue::PasswordForm>& visible_forms); | |
| 1021 virtual void PageHasOSDD(RenderViewHost* render_view_host, | 1016 virtual void PageHasOSDD(RenderViewHost* render_view_host, |
| 1022 int32 page_id, | 1017 int32 page_id, |
| 1023 const GURL& url, | 1018 const GURL& url, |
| 1024 const ViewHostMsg_PageHasOSDD_Type& provider_type); | 1019 const ViewHostMsg_PageHasOSDD_Type& provider_type); |
| 1025 virtual GURL GetAlternateErrorPageURL() const; | 1020 virtual GURL GetAlternateErrorPageURL() const; |
| 1026 virtual RendererPreferences GetRendererPrefs(Profile* profile) const; | 1021 virtual RendererPreferences GetRendererPrefs(Profile* profile) const; |
| 1027 virtual WebPreferences GetWebkitPrefs(); | 1022 virtual WebPreferences GetWebkitPrefs(); |
| 1028 virtual void OnIgnoredUIEvent(); | 1023 virtual void OnIgnoredUIEvent(); |
| 1029 virtual void OnJSOutOfMemory(); | 1024 virtual void OnJSOutOfMemory(); |
| 1030 virtual void OnCrossSiteResponse(int new_render_process_host_id, | 1025 virtual void OnCrossSiteResponse(int new_render_process_host_id, |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 // remember it. | 1337 // remember it. |
| 1343 bool temporary_zoom_settings_; | 1338 bool temporary_zoom_settings_; |
| 1344 | 1339 |
| 1345 // A list of observers notified when page state changes. Weak references. | 1340 // A list of observers notified when page state changes. Weak references. |
| 1346 ObserverList<WebNavigationObserver> web_navigation_observers_; | 1341 ObserverList<WebNavigationObserver> web_navigation_observers_; |
| 1347 | 1342 |
| 1348 // Content restrictions, used to disable print/copy etc based on content's | 1343 // Content restrictions, used to disable print/copy etc based on content's |
| 1349 // (full-page plugins for now only) permissions. | 1344 // (full-page plugins for now only) permissions. |
| 1350 int content_restrictions_; | 1345 int content_restrictions_; |
| 1351 | 1346 |
| 1352 // All the IPC message filters for this render view. | |
| 1353 std::vector<IPC::Channel::Listener*> message_filters_; | |
| 1354 | |
| 1355 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1347 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1356 }; | 1348 }; |
| 1357 | 1349 |
| 1358 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1350 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |