Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/tab_contents/tab_contents.h

Issue 6025009: Get rid of RenderViewHostDelegate::Resource and dispatch the IPC messages dir... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ssl/ssl_manager.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 namespace history { 45 namespace history {
46 class HistoryAddPageArgs; 46 class HistoryAddPageArgs;
47 } 47 }
48 48
49 namespace printing { 49 namespace printing {
50 class PrintViewManager; 50 class PrintViewManager;
51 } 51 }
52 52
53 namespace IPC {
54 class Message;
55 }
56
57 namespace webkit_glue { 53 namespace webkit_glue {
58 struct PasswordForm; 54 struct PasswordForm;
59 } 55 }
60 56
61 class AutocompleteHistoryManager; 57 class AutocompleteHistoryManager;
62 class AutoFillManager; 58 class AutoFillManager;
63 class BlockedContentContainer; 59 class BlockedContentContainer;
64 class DOMUI; 60 class DOMUI;
65 class DownloadItem; 61 class DownloadItem;
66 class Extension; 62 class Extension;
(...skipping 19 matching lines...) Expand all
86 struct ViewHostMsg_FrameNavigate_Params; 82 struct ViewHostMsg_FrameNavigate_Params;
87 class WebNavigationObserver; 83 class WebNavigationObserver;
88 struct WebPreferences; 84 struct WebPreferences;
89 85
90 // Describes what goes in the main content area of a tab. TabContents is 86 // Describes what goes in the main content area of a tab. TabContents is
91 // the only type of TabContents, and these should be merged together. 87 // the only type of TabContents, and these should be merged together.
92 class TabContents : public PageNavigator, 88 class TabContents : public PageNavigator,
93 public NotificationObserver, 89 public NotificationObserver,
94 public RenderViewHostDelegate, 90 public RenderViewHostDelegate,
95 public RenderViewHostDelegate::BrowserIntegration, 91 public RenderViewHostDelegate::BrowserIntegration,
96 public RenderViewHostDelegate::Resource,
97 public RenderViewHostManager::Delegate, 92 public RenderViewHostManager::Delegate,
98 public JavaScriptAppModalDialogDelegate, 93 public JavaScriptAppModalDialogDelegate,
99 public ImageLoadingTracker::Observer, 94 public ImageLoadingTracker::Observer,
100 public TabSpecificContentSettings::Delegate { 95 public TabSpecificContentSettings::Delegate {
101 public: 96 public:
102 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it 97 // Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it
103 // what has changed. Combine them to update more than one thing. 98 // what has changed. Combine them to update more than one thing.
104 enum InvalidateTypes { 99 enum InvalidateTypes {
105 INVALIDATE_URL = 1 << 0, // The URL has changed. 100 INVALIDATE_URL = 1 << 0, // The URL has changed.
106 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed 101 INVALIDATE_TAB = 1 << 1, // The favicon, app icon, or crashed
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 772
778 // TODO(brettw) TestTabContents shouldn't exist! 773 // TODO(brettw) TestTabContents shouldn't exist!
779 friend class TestTabContents; 774 friend class TestTabContents;
780 775
781 // Used to access the CreateHistoryAddPageArgs member function. 776 // Used to access the CreateHistoryAddPageArgs member function.
782 friend class ExternalTabContainer; 777 friend class ExternalTabContainer;
783 778
784 // Used to access RVH Delegates. 779 // Used to access RVH Delegates.
785 friend class PrerenderManager; 780 friend class PrerenderManager;
786 781
782 // Message handlers.
783 void OnDidStartProvisionalLoadForFrame(int64 frame_id,
784 bool main_frame,
785 const GURL& url);
786 void OnDidRedirectProvisionalLoad(int32 page_id,
787 const GURL& source_url,
788 const GURL& target_url);
789 void OnDidFailProvisionalLoadWithError(int64 frame_id,
790 bool main_frame,
791 int error_code,
792 const GURL& url,
793 bool showing_repost_interstitial);
794 void OnDidLoadResourceFromMemoryCache(const GURL& url,
795 const std::string& frame_origin,
796 const std::string& main_frame_origin,
797 const std::string& security_info);
798 void OnDidDisplayInsecureContent();
799 void OnDidRunInsecureContent(const std::string& security_origin);
800 void OnDocumentLoadedInFrame(int64 frame_id);
801 void OnDidFinishLoad(int64 frame_id);
802
787 // Changes the IsLoading state and notifies delegate as needed 803 // Changes the IsLoading state and notifies delegate as needed
788 // |details| is used to provide details on the load that just finished 804 // |details| is used to provide details on the load that just finished
789 // (but can be null if not applicable). Can be overridden. 805 // (but can be null if not applicable). Can be overridden.
790 void SetIsLoading(bool is_loading, 806 void SetIsLoading(bool is_loading,
791 LoadNotificationDetails* details); 807 LoadNotificationDetails* details);
792 808
793 // Adds the incoming |new_contents| to the |blocked_contents_| container. 809 // Adds the incoming |new_contents| to the |blocked_contents_| container.
794 void AddPopup(TabContents* new_contents, 810 void AddPopup(TabContents* new_contents,
795 const gfx::Rect& initial_pos); 811 const gfx::Rect& initial_pos);
796 812
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 const std::string& language, 928 const std::string& language,
913 bool page_translatable); 929 bool page_translatable);
914 virtual void OnPageTranslated(int32 page_id, 930 virtual void OnPageTranslated(int32 page_id,
915 const std::string& original_lang, 931 const std::string& original_lang,
916 const std::string& translated_lang, 932 const std::string& translated_lang,
917 TranslateErrors::Type error_type); 933 TranslateErrors::Type error_type);
918 virtual void OnSetSuggestions(int32 page_id, 934 virtual void OnSetSuggestions(int32 page_id,
919 const std::vector<std::string>& suggestions); 935 const std::vector<std::string>& suggestions);
920 virtual void OnInstantSupportDetermined(int32 page_id, bool result); 936 virtual void OnInstantSupportDetermined(int32 page_id, bool result);
921 937
922 // RenderViewHostDelegate::Resource implementation.
923 virtual void DidStartProvisionalLoadForFrame(RenderViewHost* render_view_host,
924 int64 frame_id,
925 bool is_main_frame,
926 bool is_error_page,
927 const GURL& url);
928 virtual void DidStartReceivingResourceResponse(
929 const ResourceRequestDetails& details);
930 virtual void DidRedirectProvisionalLoad(int32 page_id,
931 const GURL& source_url,
932 const GURL& target_url);
933 virtual void DidRedirectResource(
934 const ResourceRedirectDetails& details);
935 virtual void DidLoadResourceFromMemoryCache(
936 const GURL& url,
937 const std::string& frame_origin,
938 const std::string& main_frame_origin,
939 const std::string& security_info);
940 virtual void DidDisplayInsecureContent();
941 virtual void DidRunInsecureContent(const std::string& security_origin);
942 virtual void DidFailProvisionalLoadWithError(
943 RenderViewHost* render_view_host,
944 int64 frame_id,
945 bool is_main_frame,
946 int error_code,
947 const GURL& url,
948 bool showing_repost_interstitial);
949 virtual void DocumentLoadedInFrame(int64 frame_id);
950 virtual void DidFinishLoad(int64 frame_id);
951
952 // RenderViewHostDelegate implementation. 938 // RenderViewHostDelegate implementation.
953 virtual RenderViewHostDelegate::View* GetViewDelegate(); 939 virtual RenderViewHostDelegate::View* GetViewDelegate();
954 virtual RenderViewHostDelegate::RendererManagement* 940 virtual RenderViewHostDelegate::RendererManagement*
955 GetRendererManagementDelegate(); 941 GetRendererManagementDelegate();
956 virtual RenderViewHostDelegate::BrowserIntegration* 942 virtual RenderViewHostDelegate::BrowserIntegration*
957 GetBrowserIntegrationDelegate(); 943 GetBrowserIntegrationDelegate();
958 virtual RenderViewHostDelegate::Resource* GetResourceDelegate();
959 virtual RenderViewHostDelegate::ContentSettings* GetContentSettingsDelegate(); 944 virtual RenderViewHostDelegate::ContentSettings* GetContentSettingsDelegate();
960 virtual RenderViewHostDelegate::Save* GetSaveDelegate(); 945 virtual RenderViewHostDelegate::Save* GetSaveDelegate();
961 virtual RenderViewHostDelegate::Printing* GetPrintingDelegate(); 946 virtual RenderViewHostDelegate::Printing* GetPrintingDelegate();
962 virtual RenderViewHostDelegate::FavIcon* GetFavIconDelegate(); 947 virtual RenderViewHostDelegate::FavIcon* GetFavIconDelegate();
963 virtual RenderViewHostDelegate::Autocomplete* GetAutocompleteDelegate(); 948 virtual RenderViewHostDelegate::Autocomplete* GetAutocompleteDelegate();
964 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate(); 949 virtual RenderViewHostDelegate::AutoFill* GetAutoFillDelegate();
965 virtual RenderViewHostDelegate::SSL* GetSSLDelegate(); 950 virtual RenderViewHostDelegate::SSL* GetSSLDelegate();
966 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate(); 951 virtual RenderViewHostDelegate::FileSelect* GetFileSelectDelegate();
967 virtual AutomationResourceRoutingDelegate* 952 virtual AutomationResourceRoutingDelegate*
968 GetAutomationResourceRoutingDelegate(); 953 GetAutomationResourceRoutingDelegate();
969 virtual TabContents* GetAsTabContents(); 954 virtual TabContents* GetAsTabContents();
955 virtual bool OnMessageReceived(const IPC::Message& message);
970 virtual ViewType::Type GetRenderViewType() const; 956 virtual ViewType::Type GetRenderViewType() const;
971 virtual int GetBrowserWindowID() const; 957 virtual int GetBrowserWindowID() const;
972 virtual void RenderViewCreated(RenderViewHost* render_view_host); 958 virtual void RenderViewCreated(RenderViewHost* render_view_host);
973 virtual void RenderViewReady(RenderViewHost* render_view_host); 959 virtual void RenderViewReady(RenderViewHost* render_view_host);
974 virtual void RenderViewGone(RenderViewHost* render_view_host, 960 virtual void RenderViewGone(RenderViewHost* render_view_host,
975 base::TerminationStatus status, 961 base::TerminationStatus status,
976 int error_code); 962 int error_code);
977 virtual void RenderViewDeleted(RenderViewHost* render_view_host); 963 virtual void RenderViewDeleted(RenderViewHost* render_view_host);
978 virtual void DidNavigate(RenderViewHost* render_view_host, 964 virtual void DidNavigate(RenderViewHost* render_view_host,
979 const ViewHostMsg_FrameNavigate_Params& params); 965 const ViewHostMsg_FrameNavigate_Params& params);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 // Content restrictions, used to disable print/copy etc based on content's 1334 // Content restrictions, used to disable print/copy etc based on content's
1349 // (full-page plugins for now only) permissions. 1335 // (full-page plugins for now only) permissions.
1350 int content_restrictions_; 1336 int content_restrictions_;
1351 1337
1352 // --------------------------------------------------------------------------- 1338 // ---------------------------------------------------------------------------
1353 1339
1354 DISALLOW_COPY_AND_ASSIGN(TabContents); 1340 DISALLOW_COPY_AND_ASSIGN(TabContents);
1355 }; 1341 };
1356 1342
1357 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 1343 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_manager.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698