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

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

Issue 155071: Do some refactoring of renderer_host.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
OLDNEW
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 #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Called when tab traversing. 84 // Called when tab traversing.
85 void FocusThroughTabTraversal(bool reverse); 85 void FocusThroughTabTraversal(bool reverse);
86 86
87 protected: 87 protected:
88 // NotificationObserver method: 88 // NotificationObserver method:
89 virtual void Observe(NotificationType type, 89 virtual void Observe(NotificationType type,
90 const NotificationSource& source, 90 const NotificationSource& source,
91 const NotificationDetails& details); 91 const NotificationDetails& details);
92 92
93 // RenderViewHostDelegate implementation: 93 // RenderViewHostDelegate implementation:
94 virtual const GURL& GetURL() const { return url_; } 94 virtual View* GetViewDelegate() const;
95 virtual WebPreferences GetWebkitPrefs() { 95 virtual Save* GetSaveDelegate() const { return NULL; }
96 return WebPreferences(); 96 virtual const GURL& GetURL() const;
97 } 97 virtual TabContents* GetAsTabContents() { return NULL; }
98 virtual void RenderViewCreated(RenderViewHost* render_view_host) {}
99 virtual void RenderViewReady(RenderViewHost* render_view_host) {}
100 virtual void RenderViewGone(RenderViewHost* render_view_host);
98 virtual void DidNavigate(RenderViewHost* render_view_host, 101 virtual void DidNavigate(RenderViewHost* render_view_host,
99 const ViewHostMsg_FrameNavigate_Params& params); 102 const ViewHostMsg_FrameNavigate_Params& params);
100 virtual void RenderViewGone(RenderViewHost* render_view_host); 103 virtual void UpdateState(RenderViewHost* render_view_host,
101 virtual void DomOperationResponse(const std::string& json_string, 104 int32 page_id,
102 int automation_id); 105 const std::string& state) {}
103 virtual void UpdateTitle(RenderViewHost* render_view_host, 106 virtual void UpdateTitle(RenderViewHost* render_view_host,
104 int32 page_id, 107 int32 page_id,
105 const std::wstring& title); 108 const std::wstring& title);
106 virtual View* GetViewDelegate() const; 109 virtual void UpdateEncoding(RenderViewHost* render_view_host,
110 const std::wstring& encoding) {}
111 virtual void UpdateTargetURL(int32 page_id, const GURL& url) {}
112 virtual void UpdateThumbnail(const GURL& url,
113 const SkBitmap& bitmap,
114 const ThumbnailScore& score) {}
115 virtual void UpdateInspectorSettings(const std::wstring& raw_settings) {}
116 virtual void Close(RenderViewHost* render_view_host) {}
117 virtual void RequestMove(const gfx::Rect& new_bounds) {}
118 virtual void DidStartLoading(RenderViewHost* render_view_host) {}
119 virtual void DidStopLoading(RenderViewHost* render_view_host) {}
120 virtual void DidStartProvisionalLoadForFrame(RenderViewHost* render_view_host,
121 bool is_main_frame,
122 const GURL& url) {}
123 virtual void DidStartReceivingResourceResponse(
124 ResourceRequestDetails* details) {}
125 virtual void DidRedirectProvisionalLoad(int32 page_id,
126 const GURL& source_url,
127 const GURL& target_url) {}
128 virtual void DidRedirectResource(ResourceRequestDetails* details) {}
129 virtual void DidLoadResourceFromMemoryCache(
130 const GURL& url,
131 const std::string& frame_origin,
132 const std::string& main_frame_origin,
133 const std::string& security_info) {}
134 virtual void DidFailProvisionalLoadWithError(
135 RenderViewHost* render_view_host,
136 bool is_main_frame,
137 int error_code,
138 const GURL& url,
139 bool showing_repost_interstitial) {}
140 virtual void UpdateFavIconURL(RenderViewHost* render_view_host,
141 int32 page_id, const GURL& icon_url) {}
142 virtual void DidDownloadImage(RenderViewHost* render_view_host,
143 int id,
144 const GURL& image_url,
145 bool errored,
146 const SkBitmap& image) {}
147 virtual void RequestOpenURL(const GURL& url,
148 const GURL& referrer,
149 WindowOpenDisposition disposition) {}
150 virtual void DomOperationResponse(const std::string& json_string,
151 int automation_id);
152 virtual void ProcessDOMUIMessage(const std::string& message,
153 const std::string& content,
154 int request_id,
155 bool has_callback) {}
156 virtual void ProcessExternalHostMessage(const std::string& message,
157 const std::string& origin,
158 const std::string& target) {}
159 virtual void DocumentLoadedInFrame() {}
160 virtual void GoToEntryAtOffset(int offset) {}
161 virtual void GetHistoryListCount(int* back_list_count,
162 int* forward_list_count) {}
163 virtual void RunFileChooser(bool multiple_files,
164 const string16& title,
165 const FilePath& default_file) {}
166 virtual void RunJavaScriptMessage(const std::wstring& message,
167 const std::wstring& default_prompt,
168 const GURL& frame_url,
169 const int flags,
170 IPC::Message* reply_msg,
171 bool* did_suppress_message) {}
172 virtual void RunBeforeUnloadConfirm(const std::wstring& message,
173 IPC::Message* reply_msg) {}
174 virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
175 const std::string& json_arguments,
176 IPC::Message* reply_msg) {}
177 virtual void PasswordFormsSeen(
178 const std::vector<webkit_glue::PasswordForm>& forms) {}
179 virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form) {}
180 virtual void GetAutofillSuggestions(const std::wstring& field_name,
181 const std::wstring& user_text,
182 int64 node_id,
183 int request_id) {}
184 virtual void RemoveAutofillEntry(const std::wstring& field_name,
185 const std::wstring& value) {}
186 virtual void PageHasOSDD(RenderViewHost* render_view_host,
187 int32 page_id, const GURL& doc_url,
188 bool autodetected) {}
189 virtual void DidGetPrintedPagesCount(int cookie, int number_pages) {}
190 virtual void DidPrintPage(const ViewHostMsg_DidPrintPage_Params& params) {}
191 virtual GURL GetAlternateErrorPageURL() const;
192 virtual RendererPreferences GetRendererPrefs() const;
193 virtual WebPreferences GetWebkitPrefs();
194 virtual void OnMissingPluginStatus(int status) {}
195 virtual void OnCrashedPlugin(const FilePath& plugin_path) {}
196 virtual void OnCrashedWorker() {}
197 virtual void OnJSOutOfMemory() {}
198 virtual void ShouldClosePage(bool proceed) {}
199 virtual void OnCrossSiteResponse(int new_render_process_host_id,
200 int new_request_id) {}
201 virtual void OnCrossSiteNavigationCanceled() {}
202 virtual bool CanBlur() const { return true; }
203 virtual gfx::Rect GetRootWindowResizerRect() const;
204 virtual void RendererUnresponsive(RenderViewHost* render_view_host,
205 bool is_during_unload) {}
206 virtual void RendererResponsive(RenderViewHost* render_view_host) {}
207 virtual void LoadStateChanged(const GURL& url, net::LoadState load_state) {}
208 virtual void OnDidGetApplicationInfo(
209 int32 page_id,
210 const webkit_glue::WebApplicationInfo& app_info) {}
211 virtual void OnUserGesture() {}
212 virtual bool IsExternalTabContainer() const { return false; }
213 virtual void OnFindReply(int request_id,
214 int number_of_matches,
215 const gfx::Rect& selection_rect,
216 int active_match_ordinal,
217 bool final_update) {}
218 virtual void DidInsertCSS() {}
107 219
108 // Invoked when the page sent a command through DOMAutomation. 220 // Invoked when the page sent a command through DOMAutomation.
109 virtual void CommandReceived(const std::string& command) { } 221 virtual void CommandReceived(const std::string& command) {}
110 222
111 // Invoked with the NavigationEntry that is going to be added to the 223 // Invoked with the NavigationEntry that is going to be added to the
112 // navigation controller. 224 // navigation controller.
113 // Gives an opportunity to sub-classes to set states on the |entry|. 225 // Gives an opportunity to sub-classes to set states on the |entry|.
114 // Note that this is only called if the InterstitialPage was constructed with 226 // Note that this is only called if the InterstitialPage was constructed with
115 // |create_navigation_entry| set to true. 227 // |create_navigation_entry| set to true.
116 virtual void UpdateEntry(NavigationEntry* entry) { } 228 virtual void UpdateEntry(NavigationEntry* entry) {}
117 229
118 TabContents* tab() const { return tab_; } 230 TabContents* tab() const { return tab_; }
119 const GURL& url() const { return url_; } 231 const GURL& url() const { return url_; }
120 RenderViewHost* render_view_host() const { return render_view_host_; } 232 RenderViewHost* render_view_host() const { return render_view_host_; }
121 233
122 // Creates the RenderViewHost containing the interstitial content. 234 // Creates the RenderViewHost containing the interstitial content.
123 // Overriden in unit tests. 235 // Overriden in unit tests.
124 virtual RenderViewHost* CreateRenderViewHost(); 236 virtual RenderViewHost* CreateRenderViewHost();
125 237
126 // Creates the TabContentsView that shows the interstitial RVH. 238 // Creates the TabContentsView that shows the interstitial RVH.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 311
200 // We keep a map of the various blocking pages shown as the UI tests need to 312 // We keep a map of the various blocking pages shown as the UI tests need to
201 // be able to retrieve them. 313 // be able to retrieve them.
202 typedef std::map<TabContents*,InterstitialPage*> InterstitialPageMap; 314 typedef std::map<TabContents*,InterstitialPage*> InterstitialPageMap;
203 static InterstitialPageMap* tab_to_interstitial_page_; 315 static InterstitialPageMap* tab_to_interstitial_page_;
204 316
205 DISALLOW_COPY_AND_ASSIGN(InterstitialPage); 317 DISALLOW_COPY_AND_ASSIGN(InterstitialPage);
206 }; 318 };
207 319
208 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_ 320 #endif // #ifndef CHROME_BROWSER_TAB_CONTENTS_INTERSTITIAL_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698