| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_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 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/browser/tab_contents/infobar_delegate.h" | 27 #include "chrome/browser/tab_contents/infobar_delegate.h" |
| 28 #include "chrome/browser/tab_contents/navigation_controller.h" | 28 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 29 #include "chrome/browser/tab_contents/page_navigator.h" | 29 #include "chrome/browser/tab_contents/page_navigator.h" |
| 30 #include "chrome/browser/tab_contents/render_view_host_manager.h" | 30 #include "chrome/browser/tab_contents/render_view_host_manager.h" |
| 31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
| 32 #include "chrome/common/gears_api.h" | 32 #include "chrome/common/gears_api.h" |
| 33 #include "chrome/common/navigation_types.h" | 33 #include "chrome/common/navigation_types.h" |
| 34 #include "chrome/common/notification_registrar.h" | 34 #include "chrome/common/notification_registrar.h" |
| 35 #include "chrome/common/page_action.h" | 35 #include "chrome/common/page_action.h" |
| 36 #include "chrome/common/property_bag.h" | 36 #include "chrome/common/property_bag.h" |
| 37 #include "chrome/common/renderer_preferences.h" | |
| 38 #include "net/base/load_states.h" | 37 #include "net/base/load_states.h" |
| 39 #include "webkit/glue/password_form.h" | 38 #include "webkit/glue/password_form.h" |
| 40 #include "webkit/glue/webpreferences.h" | 39 #include "webkit/glue/webpreferences.h" |
| 41 | 40 |
| 42 #if defined(OS_MACOSX) || defined(OS_LINUX) | 41 #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 43 // Remove when we've finished porting the supporting classes. | 42 // Remove when we've finished porting the supporting classes. |
| 44 #include "chrome/common/temp_scaffolding_stubs.h" | 43 #include "chrome/common/temp_scaffolding_stubs.h" |
| 45 #elif defined(OS_WIN) | 44 #elif defined(OS_WIN) |
| 46 #include "chrome/browser/printing/print_view_manager.h" | 45 #include "chrome/browser/printing/print_view_manager.h" |
| 47 #endif | 46 #endif |
| (...skipping 23 matching lines...) Expand all Loading... |
| 71 class AutofillManager; | 70 class AutofillManager; |
| 72 class BlockedPopupContainer; | 71 class BlockedPopupContainer; |
| 73 class DOMUI; | 72 class DOMUI; |
| 74 class DOMUIContents; | 73 class DOMUIContents; |
| 75 class DownloadItem; | 74 class DownloadItem; |
| 76 class LoadNotificationDetails; | 75 class LoadNotificationDetails; |
| 77 class PageAction; | 76 class PageAction; |
| 78 class PasswordManager; | 77 class PasswordManager; |
| 79 class PluginInstaller; | 78 class PluginInstaller; |
| 80 class Profile; | 79 class Profile; |
| 80 struct RendererPreferences; |
| 81 class RenderViewHost; | 81 class RenderViewHost; |
| 82 class TabContentsDelegate; | 82 class TabContentsDelegate; |
| 83 class TabContentsFactory; | 83 class TabContentsFactory; |
| 84 class SkBitmap; | 84 class SkBitmap; |
| 85 class SiteInstance; | 85 class SiteInstance; |
| 86 class TabContentsView; | 86 class TabContentsView; |
| 87 struct ThumbnailScore; | 87 struct ThumbnailScore; |
| 88 struct ViewHostMsg_FrameNavigate_Params; | 88 struct ViewHostMsg_FrameNavigate_Params; |
| 89 struct ViewHostMsg_DidPrintPage_Params; | 89 struct ViewHostMsg_DidPrintPage_Params; |
| 90 class TabContents; | 90 class TabContents; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 // Override the encoding and reload the page by sending down | 555 // Override the encoding and reload the page by sending down |
| 556 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 556 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda |
| 557 // the opposite of this, by which 'browser' is notified of | 557 // the opposite of this, by which 'browser' is notified of |
| 558 // the encoding of the current tab from 'renderer' (determined by | 558 // the encoding of the current tab from 'renderer' (determined by |
| 559 // auto-detect, http header, meta, bom detection, etc). | 559 // auto-detect, http header, meta, bom detection, etc). |
| 560 void override_encoding(const std::wstring& encoding) { | 560 void override_encoding(const std::wstring& encoding) { |
| 561 set_encoding(encoding); | 561 set_encoding(encoding); |
| 562 render_view_host()->SetPageEncoding(encoding); | 562 render_view_host()->SetPageEncoding(encoding); |
| 563 } | 563 } |
| 564 | 564 |
| 565 void CrossSiteNavigationCanceled() { | |
| 566 render_manager_.CrossSiteNavigationCanceled(); | |
| 567 } | |
| 568 | |
| 569 void WindowMoveOrResizeStarted() { | 565 void WindowMoveOrResizeStarted() { |
| 570 render_view_host()->WindowMoveOrResizeStarted(); | 566 render_view_host()->WindowMoveOrResizeStarted(); |
| 571 } | 567 } |
| 572 | 568 |
| 573 BlockedPopupContainer* blocked_popup_container() const { | 569 BlockedPopupContainer* blocked_popup_container() const { |
| 574 return blocked_popups_; | 570 return blocked_popups_; |
| 575 } | 571 } |
| 576 | 572 |
| 577 private: | 573 private: |
| 578 friend class NavigationController; | 574 friend class NavigationController; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 void NotifySwapped(); | 728 void NotifySwapped(); |
| 733 void NotifyConnected(); | 729 void NotifyConnected(); |
| 734 void NotifyDisconnected(); | 730 void NotifyDisconnected(); |
| 735 | 731 |
| 736 // If params has a searchable form, this tries to create a new keyword. | 732 // If params has a searchable form, this tries to create a new keyword. |
| 737 void GenerateKeywordIfNecessary( | 733 void GenerateKeywordIfNecessary( |
| 738 const ViewHostMsg_FrameNavigate_Params& params); | 734 const ViewHostMsg_FrameNavigate_Params& params); |
| 739 | 735 |
| 740 // RenderViewHostDelegate ---------------------------------------------------- | 736 // RenderViewHostDelegate ---------------------------------------------------- |
| 741 | 737 |
| 742 virtual RendererPreferences GetRendererPrefs() const; | |
| 743 virtual RenderViewHostDelegate::View* GetViewDelegate() const; | 738 virtual RenderViewHostDelegate::View* GetViewDelegate() const; |
| 744 virtual RenderViewHostDelegate::Save* GetSaveDelegate() const; | 739 virtual RenderViewHostDelegate::Save* GetSaveDelegate() const; |
| 745 virtual TabContents* GetAsTabContents(); | 740 virtual TabContents* GetAsTabContents(); |
| 746 virtual void RenderViewCreated(RenderViewHost* render_view_host); | 741 virtual void RenderViewCreated(RenderViewHost* render_view_host); |
| 747 virtual void RenderViewReady(RenderViewHost* render_view_host); | 742 virtual void RenderViewReady(RenderViewHost* render_view_host); |
| 748 virtual void RenderViewGone(RenderViewHost* render_view_host); | 743 virtual void RenderViewGone(RenderViewHost* render_view_host); |
| 749 virtual void DidNavigate(RenderViewHost* render_view_host, | 744 virtual void DidNavigate(RenderViewHost* render_view_host, |
| 750 const ViewHostMsg_FrameNavigate_Params& params); | 745 const ViewHostMsg_FrameNavigate_Params& params); |
| 751 virtual void UpdateState(RenderViewHost* render_view_host, | 746 virtual void UpdateState(RenderViewHost* render_view_host, |
| 752 int32 page_id, | 747 int32 page_id, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form); | 821 virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form); |
| 827 virtual void GetAutofillSuggestions(const std::wstring& field_name, | 822 virtual void GetAutofillSuggestions(const std::wstring& field_name, |
| 828 const std::wstring& user_text, int64 node_id, int request_id); | 823 const std::wstring& user_text, int64 node_id, int request_id); |
| 829 virtual void RemoveAutofillEntry(const std::wstring& field_name, | 824 virtual void RemoveAutofillEntry(const std::wstring& field_name, |
| 830 const std::wstring& value); | 825 const std::wstring& value); |
| 831 virtual void PageHasOSDD(RenderViewHost* render_view_host, | 826 virtual void PageHasOSDD(RenderViewHost* render_view_host, |
| 832 int32 page_id, const GURL& url, bool autodetected); | 827 int32 page_id, const GURL& url, bool autodetected); |
| 833 virtual void DidGetPrintedPagesCount(int cookie, int number_pages); | 828 virtual void DidGetPrintedPagesCount(int cookie, int number_pages); |
| 834 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params); | 829 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params); |
| 835 virtual GURL GetAlternateErrorPageURL() const; | 830 virtual GURL GetAlternateErrorPageURL() const; |
| 831 virtual RendererPreferences GetRendererPrefs() const; |
| 836 virtual WebPreferences GetWebkitPrefs(); | 832 virtual WebPreferences GetWebkitPrefs(); |
| 837 virtual void OnMissingPluginStatus(int status); | 833 virtual void OnMissingPluginStatus(int status); |
| 838 virtual void OnCrashedPlugin(const FilePath& plugin_path); | 834 virtual void OnCrashedPlugin(const FilePath& plugin_path); |
| 839 virtual void OnCrashedWorker(); | 835 virtual void OnCrashedWorker(); |
| 840 virtual void OnJSOutOfMemory(); | 836 virtual void OnJSOutOfMemory(); |
| 841 virtual void ShouldClosePage(bool proceed); | 837 virtual void ShouldClosePage(bool proceed); |
| 842 void OnCrossSiteResponse(int new_render_process_host_id, | 838 virtual void OnCrossSiteResponse(int new_render_process_host_id, |
| 843 int new_request_id); | 839 int new_request_id); |
| 840 virtual void OnCrossSiteNavigationCanceled(); |
| 844 virtual bool CanBlur() const; | 841 virtual bool CanBlur() const; |
| 845 virtual gfx::Rect GetRootWindowResizerRect() const; | 842 virtual gfx::Rect GetRootWindowResizerRect() const; |
| 846 virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 843 virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
| 847 bool is_during_unload); | 844 bool is_during_unload); |
| 848 virtual void RendererResponsive(RenderViewHost* render_view_host); | 845 virtual void RendererResponsive(RenderViewHost* render_view_host); |
| 849 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state); | 846 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state); |
| 850 virtual void OnDidGetApplicationInfo( | 847 virtual void OnDidGetApplicationInfo( |
| 851 int32 page_id, | 848 int32 page_id, |
| 852 const webkit_glue::WebApplicationInfo& info); | 849 const webkit_glue::WebApplicationInfo& info); |
| 853 virtual void OnUserGesture(); | 850 virtual void OnUserGesture(); |
| 851 virtual bool IsExternalTabContainer() const; |
| 854 virtual void OnFindReply(int request_id, | 852 virtual void OnFindReply(int request_id, |
| 855 int number_of_matches, | 853 int number_of_matches, |
| 856 const gfx::Rect& selection_rect, | 854 const gfx::Rect& selection_rect, |
| 857 int active_match_ordinal, | 855 int active_match_ordinal, |
| 858 bool final_update); | 856 bool final_update); |
| 859 virtual bool IsExternalTabContainer() const; | 857 virtual void DidInsertCSS(); |
| 860 | 858 |
| 861 // SelectFileDialog::Listener ------------------------------------------------ | 859 // SelectFileDialog::Listener ------------------------------------------------ |
| 862 | 860 |
| 863 virtual void FileSelected(const FilePath& path, int index, void* params); | 861 virtual void FileSelected(const FilePath& path, int index, void* params); |
| 864 virtual void MultiFilesSelected(const std::vector<FilePath>& files, | 862 virtual void MultiFilesSelected(const std::vector<FilePath>& files, |
| 865 void* params); | 863 void* params); |
| 866 virtual void FileSelectionCanceled(void* params); | 864 virtual void FileSelectionCanceled(void* params); |
| 867 | 865 |
| 868 // RenderViewHostManager::Delegate ------------------------------------------- | 866 // RenderViewHostManager::Delegate ------------------------------------------- |
| 869 | 867 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 // True if the user has decided to block future javascript messages. This is | 1083 // True if the user has decided to block future javascript messages. This is |
| 1086 // reset on navigations to false on navigations. | 1084 // reset on navigations to false on navigations. |
| 1087 bool suppress_javascript_messages_; | 1085 bool suppress_javascript_messages_; |
| 1088 | 1086 |
| 1089 // --------------------------------------------------------------------------- | 1087 // --------------------------------------------------------------------------- |
| 1090 | 1088 |
| 1091 DISALLOW_COPY_AND_ASSIGN(TabContents); | 1089 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 1092 }; | 1090 }; |
| 1093 | 1091 |
| 1094 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 1092 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |