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

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

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 6 #define CONTENT_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 14 matching lines...) Expand all
25 #include "net/base/load_states.h" 25 #include "net/base/load_states.h"
26 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
27 #include "webkit/glue/resource_type.h" 27 #include "webkit/glue/resource_type.h"
28 28
29 #if defined(OS_WIN) 29 #if defined(OS_WIN)
30 #include "base/win/scoped_handle.h" 30 #include "base/win/scoped_handle.h"
31 #endif 31 #endif
32 32
33 class InterstitialPageImpl; 33 class InterstitialPageImpl;
34 class LoadNotificationDetails; 34 class LoadNotificationDetails;
35 class RenderViewHost;
36 class RenderViewHostImpl;
37 class SavePackage; 35 class SavePackage;
38 class SessionStorageNamespaceImpl; 36 class SessionStorageNamespaceImpl;
39 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; 37 struct ViewHostMsg_DidFailProvisionalLoadWithError_Params;
40 38
41 namespace content { 39 namespace content {
42 class DownloadItem; 40 class DownloadItem;
43 class SiteInstance; 41 class SiteInstance;
44 class JavaScriptDialogCreator; 42 class JavaScriptDialogCreator;
43 class RenderViewHost;
44 class RenderViewHostImpl;
45 class WebContentsDelegate; 45 class WebContentsDelegate;
46 class WebContentsObserver; 46 class WebContentsObserver;
47 class WebContentsView; 47 class WebContentsView;
48 } 48 }
49 49
50 namespace webkit_glue { 50 namespace webkit_glue {
51 struct WebIntentData; 51 struct WebIntentData;
52 } 52 }
53 53
54 class CONTENT_EXPORT TabContents 54 class CONTENT_EXPORT TabContents
55 : public NON_EXPORTED_BASE(content::WebContents), 55 : public NON_EXPORTED_BASE(content::WebContents),
56 public content::RenderViewHostDelegate, 56 public content::RenderViewHostDelegate,
57 public RenderViewHostManager::Delegate { 57 public RenderViewHostManager::Delegate {
58 public: 58 public:
59 // See WebContents::Create for a description of these parameters. 59 // See WebContents::Create for a description of these parameters.
60 TabContents(content::BrowserContext* browser_context, 60 TabContents(content::BrowserContext* browser_context,
61 content::SiteInstance* site_instance, 61 content::SiteInstance* site_instance,
62 int routing_id, 62 int routing_id,
63 const TabContents* base_tab_contents, 63 const TabContents* base_tab_contents,
64 SessionStorageNamespaceImpl* session_storage_namespace); 64 SessionStorageNamespaceImpl* session_storage_namespace);
65 virtual ~TabContents(); 65 virtual ~TabContents();
66 66
67 // Returns the content specific prefs for the given RVH. 67 // Returns the content specific prefs for the given RVH.
68 static WebPreferences GetWebkitPrefs(RenderViewHost* rvh, const GURL& url); 68 static WebPreferences GetWebkitPrefs(
69 content::RenderViewHost* rvh, const GURL& url);
69 70
70 // Returns the SavePackage which manages the page saving job. May be NULL. 71 // Returns the SavePackage which manages the page saving job. May be NULL.
71 SavePackage* save_package() const { return save_package_.get(); } 72 SavePackage* save_package() const { return save_package_.get(); }
72 73
73 // Updates the max page ID for the current SiteInstance in this TabContents 74 // Updates the max page ID for the current SiteInstance in this TabContents
74 // to be at least |page_id|. 75 // to be at least |page_id|.
75 void UpdateMaxPageID(int32 page_id); 76 void UpdateMaxPageID(int32 page_id);
76 77
77 // Updates the max page ID for the given SiteInstance in this TabContents 78 // Updates the max page ID for the given SiteInstance in this TabContents
78 // to be at least |page_id|. 79 // to be at least |page_id|.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE; 129 virtual const base::PropertyBag* GetPropertyBag() const OVERRIDE;
129 virtual base::PropertyBag* GetPropertyBag() OVERRIDE; 130 virtual base::PropertyBag* GetPropertyBag() OVERRIDE;
130 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; 131 virtual content::WebContentsDelegate* GetDelegate() OVERRIDE;
131 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; 132 virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE;
132 virtual content::NavigationController& GetController() OVERRIDE; 133 virtual content::NavigationController& GetController() OVERRIDE;
133 virtual const content::NavigationController& GetController() const OVERRIDE; 134 virtual const content::NavigationController& GetController() const OVERRIDE;
134 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 135 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
135 virtual void SetViewType(content::ViewType type) OVERRIDE; 136 virtual void SetViewType(content::ViewType type) OVERRIDE;
136 virtual content::ViewType GetViewType() const OVERRIDE; 137 virtual content::ViewType GetViewType() const OVERRIDE;
137 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; 138 virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE;
138 virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; 139 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE;
139 virtual content::RenderWidgetHostView* 140 virtual content::RenderWidgetHostView*
140 GetRenderWidgetHostView() const OVERRIDE; 141 GetRenderWidgetHostView() const OVERRIDE;
141 virtual content::WebContentsView* GetView() const OVERRIDE; 142 virtual content::WebContentsView* GetView() const OVERRIDE;
142 virtual content::WebUI* CreateWebUI(const GURL& url) OVERRIDE; 143 virtual content::WebUI* CreateWebUI(const GURL& url) OVERRIDE;
143 virtual content::WebUI* GetWebUI() const OVERRIDE; 144 virtual content::WebUI* GetWebUI() const OVERRIDE;
144 virtual content::WebUI* GetCommittedWebUI() const OVERRIDE; 145 virtual content::WebUI* GetCommittedWebUI() const OVERRIDE;
145 virtual const string16& GetTitle() const OVERRIDE; 146 virtual const string16& GetTitle() const OVERRIDE;
146 virtual int32 GetMaxPageID() OVERRIDE; 147 virtual int32 GetMaxPageID() OVERRIDE;
147 virtual int32 GetMaxPageIDForSiteInstance( 148 virtual int32 GetMaxPageIDForSiteInstance(
148 content::SiteInstance* site_instance) OVERRIDE; 149 content::SiteInstance* site_instance) OVERRIDE;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // RenderViewHostDelegate ---------------------------------------------------- 226 // RenderViewHostDelegate ----------------------------------------------------
226 227
227 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE; 228 virtual content::RenderViewHostDelegate::View* GetViewDelegate() OVERRIDE;
228 virtual content::RenderViewHostDelegate::RendererManagement* 229 virtual content::RenderViewHostDelegate::RendererManagement*
229 GetRendererManagementDelegate() OVERRIDE; 230 GetRendererManagementDelegate() OVERRIDE;
230 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 231 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
231 virtual const GURL& GetURL() const OVERRIDE; 232 virtual const GURL& GetURL() const OVERRIDE;
232 virtual WebContents* GetAsWebContents() OVERRIDE; 233 virtual WebContents* GetAsWebContents() OVERRIDE;
233 virtual content::ViewType GetRenderViewType() const OVERRIDE; 234 virtual content::ViewType GetRenderViewType() const OVERRIDE;
234 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; 235 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE;
235 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; 236 virtual void RenderViewCreated(
236 virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; 237 content::RenderViewHost* render_view_host) OVERRIDE;
237 virtual void RenderViewGone(RenderViewHost* render_view_host, 238 virtual void RenderViewReady(
239 content::RenderViewHost* render_view_host) OVERRIDE;
240 virtual void RenderViewGone(content::RenderViewHost* render_view_host,
238 base::TerminationStatus status, 241 base::TerminationStatus status,
239 int error_code) OVERRIDE; 242 int error_code) OVERRIDE;
240 virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; 243 virtual void RenderViewDeleted(
244 content::RenderViewHost* render_view_host) OVERRIDE;
241 virtual void DidNavigate( 245 virtual void DidNavigate(
242 RenderViewHost* render_view_host, 246 content::RenderViewHost* render_view_host,
243 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; 247 const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE;
244 virtual void UpdateState(RenderViewHost* render_view_host, 248 virtual void UpdateState(content::RenderViewHost* render_view_host,
245 int32 page_id, 249 int32 page_id,
246 const std::string& state) OVERRIDE; 250 const std::string& state) OVERRIDE;
247 virtual void UpdateTitle(RenderViewHost* render_view_host, 251 virtual void UpdateTitle(content::RenderViewHost* render_view_host,
248 int32 page_id, 252 int32 page_id,
249 const string16& title, 253 const string16& title,
250 base::i18n::TextDirection title_direction) OVERRIDE; 254 base::i18n::TextDirection title_direction) OVERRIDE;
251 virtual void UpdateEncoding(RenderViewHost* render_view_host, 255 virtual void UpdateEncoding(content::RenderViewHost* render_view_host,
252 const std::string& encoding) OVERRIDE; 256 const std::string& encoding) OVERRIDE;
253 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; 257 virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE;
254 virtual void Close(RenderViewHost* render_view_host) OVERRIDE; 258 virtual void Close(content::RenderViewHost* render_view_host) OVERRIDE;
255 virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; 259 virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE;
256 virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; 260 virtual void SwappedOut(content::RenderViewHost* render_view_host) OVERRIDE;
257 virtual void DidStartLoading() OVERRIDE; 261 virtual void DidStartLoading() OVERRIDE;
258 virtual void DidStopLoading() OVERRIDE; 262 virtual void DidStopLoading() OVERRIDE;
259 virtual void DidCancelLoading() OVERRIDE; 263 virtual void DidCancelLoading() OVERRIDE;
260 virtual void DidChangeLoadProgress(double progress) OVERRIDE; 264 virtual void DidChangeLoadProgress(double progress) OVERRIDE;
261 virtual void DocumentAvailableInMainFrame( 265 virtual void DocumentAvailableInMainFrame(
262 RenderViewHost* render_view_host) OVERRIDE; 266 content::RenderViewHost* render_view_host) OVERRIDE;
263 virtual void DocumentOnLoadCompletedInMainFrame( 267 virtual void DocumentOnLoadCompletedInMainFrame(
264 RenderViewHost* render_view_host, 268 content::RenderViewHost* render_view_host,
265 int32 page_id) OVERRIDE; 269 int32 page_id) OVERRIDE;
266 virtual void RequestOpenURL(const GURL& url, 270 virtual void RequestOpenURL(const GURL& url,
267 const content::Referrer& referrer, 271 const content::Referrer& referrer,
268 WindowOpenDisposition disposition, 272 WindowOpenDisposition disposition,
269 int64 source_frame_id) OVERRIDE; 273 int64 source_frame_id) OVERRIDE;
270 virtual void RequestTransferURL( 274 virtual void RequestTransferURL(
271 const GURL& url, 275 const GURL& url,
272 const content::Referrer& referrer, 276 const content::Referrer& referrer,
273 WindowOpenDisposition disposition, 277 WindowOpenDisposition disposition,
274 int64 source_frame_id, 278 int64 source_frame_id,
275 const content::GlobalRequestID& transferred_global_request_id) OVERRIDE; 279 const content::GlobalRequestID& transferred_global_request_id) OVERRIDE;
276 virtual void RunJavaScriptMessage(RenderViewHost* rvh, 280 virtual void RunJavaScriptMessage(content::RenderViewHost* rvh,
277 const string16& message, 281 const string16& message,
278 const string16& default_prompt, 282 const string16& default_prompt,
279 const GURL& frame_url, 283 const GURL& frame_url,
280 ui::JavascriptMessageType type, 284 ui::JavascriptMessageType type,
281 IPC::Message* reply_msg, 285 IPC::Message* reply_msg,
282 bool* did_suppress_message) OVERRIDE; 286 bool* did_suppress_message) OVERRIDE;
283 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, 287 virtual void RunBeforeUnloadConfirm(content::RenderViewHost* rvh,
284 const string16& message, 288 const string16& message,
285 bool is_reload, 289 bool is_reload,
286 IPC::Message* reply_msg) OVERRIDE; 290 IPC::Message* reply_msg) OVERRIDE;
287 virtual content::RendererPreferences GetRendererPrefs( 291 virtual content::RendererPreferences GetRendererPrefs(
288 content::BrowserContext* browser_context) const OVERRIDE; 292 content::BrowserContext* browser_context) const OVERRIDE;
289 virtual WebPreferences GetWebkitPrefs() OVERRIDE; 293 virtual WebPreferences GetWebkitPrefs() OVERRIDE;
290 virtual void OnUserGesture() OVERRIDE; 294 virtual void OnUserGesture() OVERRIDE;
291 virtual void OnIgnoredUIEvent() OVERRIDE; 295 virtual void OnIgnoredUIEvent() OVERRIDE;
292 virtual void RendererUnresponsive(RenderViewHost* render_view_host, 296 virtual void RendererUnresponsive(content::RenderViewHost* render_view_host,
293 bool is_during_unload) OVERRIDE; 297 bool is_during_unload) OVERRIDE;
294 virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; 298 virtual void RendererResponsive(
299 content::RenderViewHost* render_view_host) OVERRIDE;
295 virtual void LoadStateChanged(const GURL& url, 300 virtual void LoadStateChanged(const GURL& url,
296 const net::LoadStateWithParam& load_state, 301 const net::LoadStateWithParam& load_state,
297 uint64 upload_position, 302 uint64 upload_position,
298 uint64 upload_size) OVERRIDE; 303 uint64 upload_size) OVERRIDE;
299 virtual void WorkerCrashed() OVERRIDE; 304 virtual void WorkerCrashed() OVERRIDE;
300 virtual void Activate() OVERRIDE; 305 virtual void Activate() OVERRIDE;
301 virtual void Deactivate() OVERRIDE; 306 virtual void Deactivate() OVERRIDE;
302 virtual void LostCapture() OVERRIDE; 307 virtual void LostCapture() OVERRIDE;
303 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 308 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
304 bool* is_keyboard_shortcut) OVERRIDE; 309 bool* is_keyboard_shortcut) OVERRIDE;
305 virtual void HandleKeyboardEvent( 310 virtual void HandleKeyboardEvent(
306 const NativeWebKeyboardEvent& event) OVERRIDE; 311 const NativeWebKeyboardEvent& event) OVERRIDE;
307 virtual void HandleMouseDown() OVERRIDE; 312 virtual void HandleMouseDown() OVERRIDE;
308 virtual void HandleMouseUp() OVERRIDE; 313 virtual void HandleMouseUp() OVERRIDE;
309 virtual void HandleMouseActivate() OVERRIDE; 314 virtual void HandleMouseActivate() OVERRIDE;
310 virtual void RunFileChooser( 315 virtual void RunFileChooser(
311 RenderViewHost* render_view_host, 316 content::RenderViewHost* render_view_host,
312 const content::FileChooserParams& params) OVERRIDE; 317 const content::FileChooserParams& params) OVERRIDE;
313 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; 318 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE;
314 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; 319 virtual bool IsFullscreenForCurrentTab() const OVERRIDE;
315 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; 320 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE;
316 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; 321 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE;
317 virtual void WebUISend(RenderViewHost* render_view_host, 322 virtual void WebUISend(content::RenderViewHost* render_view_host,
318 const GURL& source_url, 323 const GURL& source_url,
319 const std::string& name, 324 const std::string& name,
320 const base::ListValue& args) OVERRIDE; 325 const base::ListValue& args) OVERRIDE;
321 virtual void RequestToLockMouse() OVERRIDE; 326 virtual void RequestToLockMouse() OVERRIDE;
322 virtual void LostMouseLock() OVERRIDE; 327 virtual void LostMouseLock() OVERRIDE;
323 328
324 // RenderViewHostManager::Delegate ------------------------------------------- 329 // RenderViewHostManager::Delegate -------------------------------------------
325 330
326 virtual bool CreateRenderViewForRenderManager( 331 virtual bool CreateRenderViewForRenderManager(
327 RenderViewHost* render_view_host) OVERRIDE; 332 content::RenderViewHost* render_view_host) OVERRIDE;
328 virtual void BeforeUnloadFiredFromRenderManager( 333 virtual void BeforeUnloadFiredFromRenderManager(
329 bool proceed, 334 bool proceed,
330 bool* proceed_to_fire_unload) OVERRIDE; 335 bool* proceed_to_fire_unload) OVERRIDE;
331 virtual void DidStartLoadingFromRenderManager( 336 virtual void DidStartLoadingFromRenderManager(
332 RenderViewHost* render_view_host) OVERRIDE; 337 content::RenderViewHost* render_view_host) OVERRIDE;
333 virtual void RenderViewGoneFromRenderManager( 338 virtual void RenderViewGoneFromRenderManager(
334 RenderViewHost* render_view_host) OVERRIDE; 339 content::RenderViewHost* render_view_host) OVERRIDE;
335 virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE; 340 virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE;
336 virtual void NotifySwappedFromRenderManager() OVERRIDE; 341 virtual void NotifySwappedFromRenderManager() OVERRIDE;
337 virtual NavigationControllerImpl& GetControllerForRenderManager() OVERRIDE; 342 virtual NavigationControllerImpl& GetControllerForRenderManager() OVERRIDE;
338 virtual WebUIImpl* CreateWebUIForRenderManager(const GURL& url) OVERRIDE; 343 virtual WebUIImpl* CreateWebUIForRenderManager(const GURL& url) OVERRIDE;
339 virtual content::NavigationEntry* 344 virtual content::NavigationEntry*
340 GetLastCommittedNavigationEntryForRenderManager() OVERRIDE; 345 GetLastCommittedNavigationEntryForRenderManager() OVERRIDE;
341 virtual bool FocusLocationBarByDefault() OVERRIDE; 346 virtual bool FocusLocationBarByDefault() OVERRIDE;
342 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; 347 virtual void SetFocusToLocationBar(bool select_all) OVERRIDE;
343 virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) OVERRIDE; 348 virtual void CreateViewAndSetSizeForRVH(
349 content::RenderViewHost* rvh) OVERRIDE;
344 350
345 protected: 351 protected:
346 friend class content::WebContentsObserver; 352 friend class content::WebContentsObserver;
347 353
348 // Add and remove observers for page navigation notifications. Adding or 354 // Add and remove observers for page navigation notifications. Adding or
349 // removing multiple times has no effect. The order in which notifications 355 // removing multiple times has no effect. The order in which notifications
350 // are sent to observers is undefined. Clients must be sure to remove the 356 // are sent to observers is undefined. Clients must be sure to remove the
351 // observer before they go away. 357 // observer before they go away.
352 void AddObserver(content::WebContentsObserver* observer); 358 void AddObserver(content::WebContentsObserver* observer);
353 void RemoveObserver(content::WebContentsObserver* observer); 359 void RemoveObserver(content::WebContentsObserver* observer);
(...skipping 18 matching lines...) Expand all
372 friend class TabContentsViewGtk; 378 friend class TabContentsViewGtk;
373 #endif 379 #endif
374 380
375 // So InterstitialPageImpl can access SetIsLoading. 381 // So InterstitialPageImpl can access SetIsLoading.
376 friend class InterstitialPageImpl; 382 friend class InterstitialPageImpl;
377 383
378 // TODO(brettw) TestTabContents shouldn't exist! 384 // TODO(brettw) TestTabContents shouldn't exist!
379 friend class TestTabContents; 385 friend class TestTabContents;
380 386
381 // Callback function when showing JS dialogs. 387 // Callback function when showing JS dialogs.
382 void OnDialogClosed(RenderViewHost* rvh, 388 void OnDialogClosed(content::RenderViewHost* rvh,
383 IPC::Message* reply_msg, 389 IPC::Message* reply_msg,
384 bool success, 390 bool success,
385 const string16& user_input); 391 const string16& user_input);
386 392
387 // Message handlers. 393 // Message handlers.
388 void OnRegisterIntentService(const string16& action, 394 void OnRegisterIntentService(const string16& action,
389 const string16& type, 395 const string16& type,
390 const string16& href, 396 const string16& href,
391 const string16& title, 397 const string16& title,
392 const string16& disposition); 398 const string16& disposition);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // These functions are helpers for Navigate() and DidNavigate(). 458 // These functions are helpers for Navigate() and DidNavigate().
453 459
454 // Handles post-navigation tasks in DidNavigate AFTER the entry has been 460 // Handles post-navigation tasks in DidNavigate AFTER the entry has been
455 // committed to the navigation controller. Note that the navigation entry is 461 // committed to the navigation controller. Note that the navigation entry is
456 // not provided since it may be invalid/changed after being committed. The 462 // not provided since it may be invalid/changed after being committed. The
457 // current navigation entry is in the NavigationController at this point. 463 // current navigation entry is in the NavigationController at this point.
458 void DidNavigateMainFramePostCommit( 464 void DidNavigateMainFramePostCommit(
459 const content::LoadCommittedDetails& details, 465 const content::LoadCommittedDetails& details,
460 const ViewHostMsg_FrameNavigate_Params& params); 466 const ViewHostMsg_FrameNavigate_Params& params);
461 void DidNavigateAnyFramePostCommit( 467 void DidNavigateAnyFramePostCommit(
462 RenderViewHost* render_view_host, 468 content::RenderViewHost* render_view_host,
463 const content::LoadCommittedDetails& details, 469 const content::LoadCommittedDetails& details,
464 const ViewHostMsg_FrameNavigate_Params& params); 470 const ViewHostMsg_FrameNavigate_Params& params);
465 471
466 // If our controller was restored, update the max page ID associated with the 472 // If our controller was restored, update the max page ID associated with the
467 // given RenderViewHost to be larger than the number of restored entries. 473 // given RenderViewHost to be larger than the number of restored entries.
468 // This is called in CreateRenderView before any navigations in the RenderView 474 // This is called in CreateRenderView before any navigations in the RenderView
469 // have begun, to prevent any races in updating RenderView::next_page_id. 475 // have begun, to prevent any races in updating RenderView::next_page_id.
470 void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); 476 void UpdateMaxPageIDIfNecessary(content::RenderViewHost* rvh);
471 477
472 // Saves the given title to the navigation entry and does associated work. It 478 // Saves the given title to the navigation entry and does associated work. It
473 // will update history and the view for the new title, and also synthesize 479 // will update history and the view for the new title, and also synthesize
474 // titles for file URLs that have none (so we require that the URL of the 480 // titles for file URLs that have none (so we require that the URL of the
475 // entry already be set). 481 // entry already be set).
476 // 482 //
477 // This is used as the backend for state updates, which include a new title, 483 // This is used as the backend for state updates, which include a new title,
478 // or the dedicated set title message. It returns true if the new title is 484 // or the dedicated set title message. It returns true if the new title is
479 // different and was therefore updated. 485 // different and was therefore updated.
480 bool UpdateTitleForEntry(content::NavigationEntryImpl* entry, 486 bool UpdateTitleForEntry(content::NavigationEntryImpl* entry,
(...skipping 19 matching lines...) Expand all
500 // Helper functions for sending notifications. 506 // Helper functions for sending notifications.
501 void NotifySwapped(); 507 void NotifySwapped();
502 void NotifyConnected(); 508 void NotifyConnected();
503 void NotifyDisconnected(); 509 void NotifyDisconnected();
504 510
505 void SetEncoding(const std::string& encoding); 511 void SetEncoding(const std::string& encoding);
506 512
507 // Save a URL to the local filesystem. 513 // Save a URL to the local filesystem.
508 void SaveURL(const GURL& url, const GURL& referrer, bool is_main_frame); 514 void SaveURL(const GURL& url, const GURL& referrer, bool is_main_frame);
509 515
510 RenderViewHostImpl* GetRenderViewHostImpl(); 516 content::RenderViewHostImpl* GetRenderViewHostImpl();
511 517
512 // Stores random bits of data for others to associate with this object. 518 // Stores random bits of data for others to associate with this object.
513 // WARNING: this needs to be deleted after NavigationController. 519 // WARNING: this needs to be deleted after NavigationController.
514 base::PropertyBag property_bag_; 520 base::PropertyBag property_bag_;
515 521
516 // Data for core operation --------------------------------------------------- 522 // Data for core operation ---------------------------------------------------
517 523
518 // Delegate for notifying our owner about stuff. Not owned by us. 524 // Delegate for notifying our owner about stuff. Not owned by us.
519 content::WebContentsDelegate* delegate_; 525 content::WebContentsDelegate* delegate_;
520 526
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 // (full-page plugins for now only) permissions. 659 // (full-page plugins for now only) permissions.
654 int content_restrictions_; 660 int content_restrictions_;
655 661
656 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS. 662 // Our view type. Default is VIEW_TYPE_TAB_CONTENTS.
657 content::ViewType view_type_; 663 content::ViewType view_type_;
658 664
659 DISALLOW_COPY_AND_ASSIGN(TabContents); 665 DISALLOW_COPY_AND_ASSIGN(TabContents);
660 }; 666 };
661 667
662 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ 668 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_
OLDNEW
« no previous file with comments | « content/browser/tab_contents/render_view_host_manager_unittest.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698