Index: content/browser/web_contents/web_contents_impl.h |
=================================================================== |
--- content/browser/web_contents/web_contents_impl.h (revision 163514) |
+++ content/browser/web_contents/web_contents_impl.h (working copy) |
@@ -33,18 +33,22 @@ |
#include "base/win/scoped_handle.h" |
#endif |
-class InterstitialPageImpl; |
class SavePackage; |
class SessionStorageNamespaceImpl; |
-class WebContentsImpl; |
struct BrowserPluginHostMsg_ResizeGuest_Params; |
struct ViewMsg_PostMessage_Params; |
+namespace webkit_glue { |
+struct WebIntentData; |
+struct WebIntentServiceData; |
+} |
+ |
namespace content { |
class BrowserPluginEmbedder; |
class BrowserPluginGuest; |
class ColorChooser; |
class DownloadItem; |
+class InterstitialPageImpl; |
class JavaScriptDialogCreator; |
class RenderViewHost; |
class RenderViewHostDelegateView; |
@@ -53,6 +57,7 @@ |
class SiteInstance; |
class TestWebContents; |
class WebContentsDelegate; |
+class WebContentsImpl; |
class WebContentsObserver; |
class WebContentsView; |
class WebContentsViewDelegate; |
@@ -65,56 +70,49 @@ |
WebContentsViewDelegate* delegate, |
RenderViewHostDelegateView** render_view_host_delegate_view); |
-} // namespace content |
- |
-namespace webkit_glue { |
-struct WebIntentData; |
-struct WebIntentServiceData; |
-} |
- |
class CONTENT_EXPORT WebContentsImpl |
- : public NON_EXPORTED_BASE(content::WebContents), |
- public content::RenderViewHostDelegate, |
- public content::RenderWidgetHostDelegate, |
+ : public NON_EXPORTED_BASE(WebContents), |
+ public RenderViewHostDelegate, |
+ public RenderWidgetHostDelegate, |
public RenderViewHostManager::Delegate, |
- public content::NotificationObserver { |
+ public NotificationObserver { |
public: |
virtual ~WebContentsImpl(); |
static WebContentsImpl* Create( |
- content::BrowserContext* browser_context, |
- content::SiteInstance* site_instance, |
+ BrowserContext* browser_context, |
+ SiteInstance* site_instance, |
int routing_id, |
const WebContentsImpl* base_web_contents); |
static WebContentsImpl* CreateWithOpener( |
- content::BrowserContext* browser_context, |
- content::SiteInstance* site_instance, |
+ BrowserContext* browser_context, |
+ SiteInstance* site_instance, |
int routing_id, |
const WebContentsImpl* base_web_contents, |
WebContentsImpl* opener); |
// Creates a WebContents to be used as a browser plugin guest. |
- static WebContentsImpl* CreateGuest(content::BrowserContext* browser_context, |
+ static WebContentsImpl* CreateGuest(BrowserContext* browser_context, |
const std::string& host, |
int guest_instance_id); |
// Returns the content specific prefs for the given RVH. |
static webkit_glue::WebPreferences GetWebkitPrefs( |
- content::RenderViewHost* rvh, const GURL& url); |
+ RenderViewHost* rvh, const GURL& url); |
// Creates a swapped out RenderView. This is used by the browser plugin to |
// create a swapped out RenderView in the embedder render process for the |
// guest, to expose the guest's window object to the embedder. |
// This returns the routing ID of the newly created swapped out RenderView. |
- int CreateSwappedOutRenderView(content::SiteInstance* instance); |
+ int CreateSwappedOutRenderView(SiteInstance* instance); |
// Complex initialization here. Specifically needed to avoid having |
// members call back into our virtual functions in the constructor. |
- virtual void Init(content::BrowserContext* browser_context, |
- content::SiteInstance* site_instance, |
+ virtual void Init(BrowserContext* browser_context, |
+ SiteInstance* site_instance, |
int routing_id, |
- const content::WebContents* base_web_contents); |
+ const WebContents* base_web_contents); |
// Returns the SavePackage which manages the page saving job. May be NULL. |
SavePackage* save_package() const { return save_package_.get(); } |
@@ -125,7 +123,7 @@ |
// Updates the max page ID for the given SiteInstance in this WebContentsImpl |
// to be at least |page_id|. |
- void UpdateMaxPageIDForSiteInstance(content::SiteInstance* site_instance, |
+ void UpdateMaxPageIDForSiteInstance(SiteInstance* site_instance, |
int32 page_id); |
// Copy the current map of SiteInstance ID to max page ID from another tab. |
@@ -143,12 +141,10 @@ |
// |
// If this method returns false, then the navigation is discarded (equivalent |
// to calling DiscardPendingEntry on the NavigationController). |
- bool NavigateToPendingEntry( |
- content::NavigationController::ReloadType reload_type); |
+ bool NavigateToPendingEntry(NavigationController::ReloadType reload_type); |
// Called by InterstitialPageImpl when it creates a RenderViewHost. |
- void RenderViewForInterstitialPageCreated( |
- content::RenderViewHost* render_view_host); |
+ void RenderViewForInterstitialPageCreated(RenderViewHost* render_view_host); |
// Sets the passed passed interstitial as the currently showing interstitial. |
// |interstitial_page| should be non NULL (use the remove_interstitial_page |
@@ -163,7 +159,7 @@ |
render_manager_.remove_interstitial_page(); |
} |
- void set_opener_web_ui_type(content::WebUI::TypeID opener_web_ui_type) { |
+ void set_opener_web_ui_type(WebUI::TypeID opener_web_ui_type) { |
opener_web_ui_type_ = opener_web_ui_type; |
} |
@@ -171,7 +167,7 @@ |
return java_bridge_dispatcher_host_manager_.get(); |
} |
- content::old::BrowserPluginHost* old_browser_plugin_host() const { |
+ old::BrowserPluginHost* old_browser_plugin_host() const { |
return old_browser_plugin_host_.get(); |
} |
@@ -180,34 +176,33 @@ |
// Returns guest browser plugin object, or NULL if this WebContents is not a |
// guest. |
- content::BrowserPluginGuest* GetBrowserPluginGuest(); |
+ BrowserPluginGuest* GetBrowserPluginGuest(); |
// Returns embedder browser plugin object, or NULL if this WebContents is not |
// an embedder. |
- content::BrowserPluginEmbedder* GetBrowserPluginEmbedder(); |
+ BrowserPluginEmbedder* GetBrowserPluginEmbedder(); |
- // content::WebContents ------------------------------------------------------ |
- virtual content::WebContentsDelegate* GetDelegate() OVERRIDE; |
- virtual void SetDelegate(content::WebContentsDelegate* delegate) OVERRIDE; |
+ // WebContents ------------------------------------------------------ |
+ virtual WebContentsDelegate* GetDelegate() OVERRIDE; |
+ virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE; |
virtual NavigationControllerImpl& GetController() OVERRIDE; |
virtual const NavigationControllerImpl& GetController() const OVERRIDE; |
- virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
- virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; |
- virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; |
+ virtual BrowserContext* GetBrowserContext() const OVERRIDE; |
+ virtual RenderProcessHost* GetRenderProcessHost() const OVERRIDE; |
+ virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; |
virtual int GetRoutingID() const OVERRIDE; |
- virtual content::RenderWidgetHostView* |
- GetRenderWidgetHostView() const OVERRIDE; |
- virtual content::WebContentsView* GetView() const OVERRIDE; |
- virtual content::WebUI* CreateWebUI(const GURL& url) OVERRIDE; |
- virtual content::WebUI* GetWebUI() const OVERRIDE; |
- virtual content::WebUI* GetCommittedWebUI() const OVERRIDE; |
+ virtual RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; |
+ virtual WebContentsView* GetView() const OVERRIDE; |
+ virtual WebUI* CreateWebUI(const GURL& url) OVERRIDE; |
+ virtual WebUI* GetWebUI() const OVERRIDE; |
+ virtual WebUI* GetCommittedWebUI() const OVERRIDE; |
virtual void SetUserAgentOverride(const std::string& override) OVERRIDE; |
virtual const std::string& GetUserAgentOverride() const OVERRIDE; |
virtual const string16& GetTitle() const OVERRIDE; |
virtual int32 GetMaxPageID() OVERRIDE; |
virtual int32 GetMaxPageIDForSiteInstance( |
- content::SiteInstance* site_instance) OVERRIDE; |
- virtual content::SiteInstance* GetSiteInstance() const OVERRIDE; |
- virtual content::SiteInstance* GetPendingSiteInstance() const OVERRIDE; |
+ SiteInstance* site_instance) OVERRIDE; |
+ virtual SiteInstance* GetSiteInstance() const OVERRIDE; |
+ virtual SiteInstance* GetPendingSiteInstance() const OVERRIDE; |
virtual bool IsLoading() const OVERRIDE; |
virtual bool IsWaitingForResponse() const OVERRIDE; |
virtual const net::LoadStateWithParam& GetLoadState() const OVERRIDE; |
@@ -228,19 +223,19 @@ |
virtual void WasHidden() OVERRIDE; |
virtual bool NeedToFireBeforeUnload() OVERRIDE; |
virtual void Stop() OVERRIDE; |
- virtual content::WebContents* Clone() OVERRIDE; |
+ virtual WebContents* Clone() OVERRIDE; |
virtual gfx::NativeView GetContentNativeView() const OVERRIDE; |
virtual gfx::NativeView GetNativeView() const OVERRIDE; |
virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; |
virtual void Focus() OVERRIDE; |
virtual void FocusThroughTabTraversal(bool reverse) OVERRIDE; |
virtual bool ShowingInterstitialPage() const OVERRIDE; |
- virtual content::InterstitialPage* GetInterstitialPage() const OVERRIDE; |
+ virtual InterstitialPage* GetInterstitialPage() const OVERRIDE; |
virtual bool IsSavable() OVERRIDE; |
virtual void OnSavePage() OVERRIDE; |
virtual bool SavePage(const FilePath& main_file, |
const FilePath& dir_path, |
- content::SavePageType save_type) OVERRIDE; |
+ SavePageType save_type) OVERRIDE; |
virtual void GenerateMHTML( |
const FilePath& file, |
const base::Callback<void(const FilePath&, int64)>& callback) OVERRIDE; |
@@ -250,7 +245,7 @@ |
virtual bool WillNotifyDisconnection() const OVERRIDE; |
virtual void SetOverrideEncoding(const std::string& encoding) OVERRIDE; |
virtual void ResetOverrideEncoding() OVERRIDE; |
- virtual content::RendererPreferences* GetMutableRendererPrefs() OVERRIDE; |
+ virtual RendererPreferences* GetMutableRendererPrefs() OVERRIDE; |
virtual void SetNewTabStartTime(const base::TimeTicks& time) OVERRIDE; |
virtual base::TimeTicks GetNewTabStartTime() const OVERRIDE; |
virtual void Close() OVERRIDE; |
@@ -270,8 +265,8 @@ |
virtual int GetMaximumZoomPercent() const OVERRIDE; |
virtual gfx::Size GetPreferredSize() const OVERRIDE; |
virtual int GetContentRestrictions() const OVERRIDE; |
- virtual content::WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
- virtual content::WebUI* GetWebUIForCurrentState() OVERRIDE; |
+ virtual WebUI::TypeID GetWebUITypeForCurrentState() OVERRIDE; |
+ virtual WebUI* GetWebUIForCurrentState() OVERRIDE; |
virtual bool GotResponseToLockMouseRequest(bool allowed) OVERRIDE; |
virtual bool HasOpener() const OVERRIDE; |
virtual void DidChooseColorInColorChooser(int color_chooser_id, |
@@ -279,99 +274,93 @@ |
virtual void DidEndColorChooser(int color_chooser_id) OVERRIDE; |
// Implementation of PageNavigator. |
- virtual content::WebContents* OpenURL( |
- const content::OpenURLParams& params) OVERRIDE; |
+ virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; |
// Implementation of IPC::Sender. |
virtual bool Send(IPC::Message* message) OVERRIDE; |
// RenderViewHostDelegate ---------------------------------------------------- |
- virtual content::RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
- virtual content::RenderViewHostDelegate::RendererManagement* |
+ virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
+ virtual RenderViewHostDelegate::RendererManagement* |
GetRendererManagementDelegate() OVERRIDE; |
- virtual bool OnMessageReceived(content::RenderViewHost* render_view_host, |
+ virtual bool OnMessageReceived(RenderViewHost* render_view_host, |
const IPC::Message& message) OVERRIDE; |
virtual const GURL& GetURL() const OVERRIDE; |
- virtual content::WebContents* GetAsWebContents() OVERRIDE; |
+ virtual WebContents* GetAsWebContents() OVERRIDE; |
virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; |
- virtual void RenderViewCreated( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
- virtual void RenderViewReady( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
- virtual void RenderViewGone(content::RenderViewHost* render_view_host, |
+ virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void RenderViewGone(RenderViewHost* render_view_host, |
base::TerminationStatus status, |
int error_code) OVERRIDE; |
- virtual void RenderViewDeleted( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; |
virtual void DidStartProvisionalLoadForFrame( |
- content::RenderViewHost* render_view_host, |
+ RenderViewHost* render_view_host, |
int64 frame_id, |
int64 parent_frame_id, |
bool main_frame, |
const GURL& opener_url, |
const GURL& url) OVERRIDE; |
virtual void DidRedirectProvisionalLoad( |
- content::RenderViewHost* render_view_host, |
+ RenderViewHost* render_view_host, |
int32 page_id, |
const GURL& opener_url, |
const GURL& source_url, |
const GURL& target_url) OVERRIDE; |
virtual void DidFailProvisionalLoadWithError( |
- content::RenderViewHost* render_view_host, |
+ RenderViewHost* render_view_host, |
const ViewHostMsg_DidFailProvisionalLoadWithError_Params& params) |
OVERRIDE; |
virtual void DidNavigate( |
- content::RenderViewHost* render_view_host, |
+ RenderViewHost* render_view_host, |
const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; |
- virtual void UpdateState(content::RenderViewHost* render_view_host, |
+ virtual void UpdateState(RenderViewHost* render_view_host, |
int32 page_id, |
const std::string& state) OVERRIDE; |
- virtual void UpdateTitle(content::RenderViewHost* render_view_host, |
+ virtual void UpdateTitle(RenderViewHost* render_view_host, |
int32 page_id, |
const string16& title, |
base::i18n::TextDirection title_direction) OVERRIDE; |
- virtual void UpdateEncoding(content::RenderViewHost* render_view_host, |
+ virtual void UpdateEncoding(RenderViewHost* render_view_host, |
const std::string& encoding) OVERRIDE; |
virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; |
- virtual void Close(content::RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void Close(RenderViewHost* render_view_host) OVERRIDE; |
virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; |
- virtual void SwappedOut(content::RenderViewHost* render_view_host) OVERRIDE; |
- virtual void DidStartLoading( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
- virtual void DidStopLoading( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void DidStartLoading(RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void DidStopLoading(RenderViewHost* render_view_host) OVERRIDE; |
virtual void DidCancelLoading() OVERRIDE; |
virtual void DidChangeLoadProgress(double progress) OVERRIDE; |
- virtual void DidUpdateFrameTree(content::RenderViewHost* rvh) OVERRIDE; |
+ virtual void DidUpdateFrameTree(RenderViewHost* rvh) OVERRIDE; |
virtual void DocumentAvailableInMainFrame( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
+ RenderViewHost* render_view_host) OVERRIDE; |
virtual void DocumentOnLoadCompletedInMainFrame( |
- content::RenderViewHost* render_view_host, |
+ RenderViewHost* render_view_host, |
int32 page_id) OVERRIDE; |
- virtual void RequestOpenURL(content::RenderViewHost* rvh, |
+ virtual void RequestOpenURL(RenderViewHost* rvh, |
const GURL& url, |
- const content::Referrer& referrer, |
+ const Referrer& referrer, |
WindowOpenDisposition disposition, |
int64 source_frame_id) OVERRIDE; |
virtual void RequestTransferURL( |
const GURL& url, |
- const content::Referrer& referrer, |
+ const Referrer& referrer, |
WindowOpenDisposition disposition, |
int64 source_frame_id, |
- const content::GlobalRequestID& transferred_global_request_id) OVERRIDE; |
- virtual void RouteCloseEvent(content::RenderViewHost* rvh) OVERRIDE; |
+ const GlobalRequestID& transferred_global_request_id) OVERRIDE; |
+ virtual void RouteCloseEvent(RenderViewHost* rvh) OVERRIDE; |
virtual void RouteMessageEvent( |
- content::RenderViewHost* rvh, |
+ RenderViewHost* rvh, |
const ViewMsg_PostMessage_Params& params) OVERRIDE; |
- virtual void RunJavaScriptMessage(content::RenderViewHost* rvh, |
+ virtual void RunJavaScriptMessage(RenderViewHost* rvh, |
const string16& message, |
const string16& default_prompt, |
const GURL& frame_url, |
- content::JavaScriptMessageType type, |
+ JavaScriptMessageType type, |
IPC::Message* reply_msg, |
bool* did_suppress_message) OVERRIDE; |
- virtual void RunBeforeUnloadConfirm(content::RenderViewHost* rvh, |
+ virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, |
const string16& message, |
bool is_reload, |
IPC::Message* reply_msg) OVERRIDE; |
@@ -379,15 +368,14 @@ |
const string16& message, |
int32 line_no, |
const string16& source_id) OVERRIDE; |
- virtual content::RendererPreferences GetRendererPrefs( |
- content::BrowserContext* browser_context) const OVERRIDE; |
+ virtual RendererPreferences GetRendererPrefs( |
+ BrowserContext* browser_context) const OVERRIDE; |
virtual webkit_glue::WebPreferences GetWebkitPrefs() OVERRIDE; |
virtual void OnUserGesture() OVERRIDE; |
virtual void OnIgnoredUIEvent() OVERRIDE; |
- virtual void RendererUnresponsive(content::RenderViewHost* render_view_host, |
+ virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
bool is_during_unload) OVERRIDE; |
- virtual void RendererResponsive( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
+ virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; |
virtual void LoadStateChanged(const GURL& url, |
const net::LoadStateWithParam& load_state, |
uint64 upload_position, |
@@ -402,8 +390,8 @@ |
virtual void HandleGestureBegin() OVERRIDE; |
virtual void HandleGestureEnd() OVERRIDE; |
virtual void RunFileChooser( |
- content::RenderViewHost* render_view_host, |
- const content::FileChooserParams& params) OVERRIDE; |
+ RenderViewHost* render_view_host, |
+ const FileChooserParams& params) OVERRIDE; |
virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; |
virtual bool IsFullscreenForCurrentTab() const OVERRIDE; |
virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
@@ -414,7 +402,7 @@ |
virtual void CreateNewWindow( |
int route_id, |
const ViewHostMsg_CreateWindow_Params& params, |
- content::SessionStorageNamespace* session_storage_namespace) OVERRIDE; |
+ SessionStorageNamespace* session_storage_namespace) OVERRIDE; |
virtual void CreateNewWidget(int route_id, |
WebKit::WebPopupType popup_type) OVERRIDE; |
virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; |
@@ -426,11 +414,11 @@ |
const gfx::Rect& initial_pos) OVERRIDE; |
virtual void ShowCreatedFullscreenWidget(int route_id) OVERRIDE; |
virtual void ShowContextMenu( |
- const content::ContextMenuParams& params, |
- content::ContextMenuSourceType type) OVERRIDE; |
+ const ContextMenuParams& params, |
+ ContextMenuSourceType type) OVERRIDE; |
virtual void RequestMediaAccessPermission( |
- const content::MediaStreamRequest* request, |
- const content::MediaResponseCallback& callback) OVERRIDE; |
+ const MediaStreamRequest* request, |
+ const MediaResponseCallback& callback) OVERRIDE; |
#if defined(OS_ANDROID) |
virtual void AttachLayer(WebKit::WebLayer* layer) OVERRIDE; |
@@ -440,46 +428,46 @@ |
// RenderWidgetHostDelegate -------------------------------------------------- |
virtual void RenderWidgetDeleted( |
- content::RenderWidgetHostImpl* render_widget_host) OVERRIDE; |
+ RenderWidgetHostImpl* render_widget_host) OVERRIDE; |
virtual bool PreHandleKeyboardEvent( |
- const content::NativeWebKeyboardEvent& event, |
+ const NativeWebKeyboardEvent& event, |
bool* is_keyboard_shortcut) OVERRIDE; |
virtual void HandleKeyboardEvent( |
- const content::NativeWebKeyboardEvent& event) OVERRIDE; |
+ const NativeWebKeyboardEvent& event) OVERRIDE; |
// RenderViewHostManager::Delegate ------------------------------------------- |
virtual bool CreateRenderViewForRenderManager( |
- content::RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; |
+ RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; |
virtual void BeforeUnloadFiredFromRenderManager( |
bool proceed, const base::TimeTicks& proceed_time, |
bool* proceed_to_fire_unload) OVERRIDE; |
virtual void RenderViewGoneFromRenderManager( |
- content::RenderViewHost* render_view_host) OVERRIDE; |
+ RenderViewHost* render_view_host) OVERRIDE; |
virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE; |
virtual void NotifySwappedFromRenderManager() OVERRIDE; |
virtual int CreateOpenerRenderViewsForRenderManager( |
- content::SiteInstance* instance) OVERRIDE; |
- virtual NavigationControllerImpl& GetControllerForRenderManager() OVERRIDE; |
+ SiteInstance* instance) OVERRIDE; |
+ virtual NavigationControllerImpl& |
+ GetControllerForRenderManager() OVERRIDE; |
virtual WebUIImpl* CreateWebUIForRenderManager(const GURL& url) OVERRIDE; |
- virtual content::NavigationEntry* |
+ virtual NavigationEntry* |
GetLastCommittedNavigationEntryForRenderManager() OVERRIDE; |
virtual bool FocusLocationBarByDefault() OVERRIDE; |
virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; |
- virtual void CreateViewAndSetSizeForRVH( |
- content::RenderViewHost* rvh) OVERRIDE; |
+ virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) OVERRIDE; |
- // content::NotificationObserver --------------------------------------------- |
+ // NotificationObserver ------------------------------------------------------ |
virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
+ const NotificationSource& source, |
+ const NotificationDetails& details) OVERRIDE; |
private: |
friend class NavigationControllerImpl; |
- friend class content::WebContentsObserver; |
- friend class content::WebContents; // To implement factory methods. |
+ friend class WebContentsObserver; |
+ friend class WebContents; // To implement factory methods. |
FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, NoJSMessageOnInterstitials); |
FRIEND_TEST_ALL_PREFIXES(WebContentsImplTest, UpdateTitle); |
@@ -493,24 +481,24 @@ |
friend class InterstitialPageImpl; |
// TODO(brettw) TestWebContents shouldn't exist! |
- friend class content::TestWebContents; |
+ friend class TestWebContents; |
// See WebContents::Create for a description of these parameters. |
- WebContentsImpl(content::BrowserContext* browser_context, |
+ WebContentsImpl(BrowserContext* browser_context, |
WebContentsImpl* opener); |
// Add and remove observers for page navigation notifications. Adding or |
// removing multiple times has no effect. The order in which notifications |
// are sent to observers is undefined. Clients must be sure to remove the |
// observer before they go away. |
- void AddObserver(content::WebContentsObserver* observer); |
- void RemoveObserver(content::WebContentsObserver* observer); |
+ void AddObserver(WebContentsObserver* observer); |
+ void RemoveObserver(WebContentsObserver* observer); |
// Clears this tab's opener if it has been closed. |
- void OnWebContentsDestroyed(content::WebContents* web_contents); |
+ void OnWebContentsDestroyed(WebContents* web_contents); |
// Callback function when showing JS dialogs. |
- void OnDialogClosed(content::RenderViewHost* rvh, |
+ void OnDialogClosed(RenderViewHost* rvh, |
IPC::Message* reply_msg, |
bool success, |
const string16& user_input); |
@@ -546,7 +534,7 @@ |
void OnUpdateZoomLimits(int minimum_percent, |
int maximum_percent, |
bool remember); |
- void OnSaveURL(const GURL& url, const content::Referrer& referrer); |
+ void OnSaveURL(const GURL& url, const Referrer& referrer); |
void OnEnumerateDirectory(int request_id, const FilePath& path); |
void OnJSOutOfMemory(); |
@@ -586,7 +574,7 @@ |
// |details| is used to provide details on the load that just finished |
// (but can be null if not applicable). Can be overridden. |
void SetIsLoading(bool is_loading, |
- content::LoadNotificationDetails* details); |
+ LoadNotificationDetails* details); |
// Called by derived classes to indicate that we're no longer waiting for a |
// response. This won't actually update the throbber, but it will get picked |
@@ -602,18 +590,18 @@ |
// not provided since it may be invalid/changed after being committed. The |
// current navigation entry is in the NavigationController at this point. |
void DidNavigateMainFramePostCommit( |
- const content::LoadCommittedDetails& details, |
+ const LoadCommittedDetails& details, |
const ViewHostMsg_FrameNavigate_Params& params); |
void DidNavigateAnyFramePostCommit( |
- content::RenderViewHost* render_view_host, |
- const content::LoadCommittedDetails& details, |
+ RenderViewHost* render_view_host, |
+ const LoadCommittedDetails& details, |
const ViewHostMsg_FrameNavigate_Params& params); |
// If our controller was restored, update the max page ID associated with the |
// given RenderViewHost to be larger than the number of restored entries. |
// This is called in CreateRenderView before any navigations in the RenderView |
// have begun, to prevent any races in updating RenderView::next_page_id. |
- void UpdateMaxPageIDIfNecessary(content::RenderViewHost* rvh); |
+ void UpdateMaxPageIDIfNecessary(RenderViewHost* rvh); |
// Saves the given title to the navigation entry and does associated work. It |
// will update history and the view for the new title, and also synthesize |
@@ -623,21 +611,21 @@ |
// This is used as the backend for state updates, which include a new title, |
// or the dedicated set title message. It returns true if the new title is |
// different and was therefore updated. |
- bool UpdateTitleForEntry(content::NavigationEntryImpl* entry, |
+ bool UpdateTitleForEntry(NavigationEntryImpl* entry, |
const string16& title); |
// Causes the WebContentsImpl to navigate in the right renderer to |entry|, |
// which must be already part of the entries in the navigation controller. |
// This does not change the NavigationController state. |
- bool NavigateToEntry(const content::NavigationEntryImpl& entry, |
- content::NavigationController::ReloadType reload_type); |
+ bool NavigateToEntry(const NavigationEntryImpl& entry, |
+ NavigationController::ReloadType reload_type); |
// Sets the history for this WebContentsImpl to |history_length| entries, and |
// moves the current page_id to the last entry in the list if it's valid. |
// This is mainly used when a prerendered page is swapped into the current |
// tab. The method is virtual for testing. |
virtual void SetHistoryLengthAndPrune( |
- const content::SiteInstance* site_instance, |
+ const SiteInstance* site_instance, |
int merge_history_length, |
int32 minimum_page_id); |
@@ -645,7 +633,7 @@ |
// (including this tab) in the given SiteInstance, allowing other tabs to send |
// cross-process JavaScript calls to their opener(s). Returns the route ID of |
// this tab's RenderView for |instance|. |
- int CreateOpenerRenderViews(content::SiteInstance* instance); |
+ int CreateOpenerRenderViews(SiteInstance* instance); |
// Helper for CreateNewWidget/CreateNewFullscreenWidget. |
void CreateNewWidget(int route_id, |
@@ -659,7 +647,7 @@ |
// Finds the new RenderWidgetHost and returns it. Note that this can only be |
// called once as this call also removes it from the internal map. |
- content::RenderWidgetHostView* GetCreatedWidget(int route_id); |
+ RenderWidgetHostView* GetCreatedWidget(int route_id); |
// Finds the new WebContentsImpl by route_id, initializes it for |
// renderer-initiated creation, and returns it. Note that this can only be |
@@ -677,12 +665,12 @@ |
// Save a URL to the local filesystem. |
void SaveURL(const GURL& url, |
- const content::Referrer& referrer, |
+ const Referrer& referrer, |
bool is_main_frame); |
- content::RenderViewHostImpl* GetRenderViewHostImpl(); |
+ RenderViewHostImpl* GetRenderViewHostImpl(); |
- void GetBrowserPluginEmbedderInfo(content::RenderViewHost* render_view_host, |
+ void GetBrowserPluginEmbedderInfo(RenderViewHost* render_view_host, |
std::string* embedder_channel_name, |
int* embedder_container_id); |
@@ -692,18 +680,18 @@ |
// Data for core operation --------------------------------------------------- |
// Delegate for notifying our owner about stuff. Not owned by us. |
- content::WebContentsDelegate* delegate_; |
+ WebContentsDelegate* delegate_; |
// Handles the back/forward list and loading. |
NavigationControllerImpl controller_; |
// The corresponding view. |
- scoped_ptr<content::WebContentsView> view_; |
+ scoped_ptr<WebContentsView> view_; |
// The view of the RVHD. Usually this is our WebContentsView implementation, |
// but if an embedder uses a different WebContentsView, they'll need to |
// provide this. |
- content::RenderViewHostDelegateView* render_view_host_delegate_view_; |
+ RenderViewHostDelegateView* render_view_host_delegate_view_; |
// Tracks created WebContentsImpl objects that have not been shown yet. They |
// are identified by the route ID passed to CreateNewWindow. |
@@ -712,14 +700,14 @@ |
// These maps hold on to the widgets that we created on behalf of the renderer |
// that haven't shown yet. |
- typedef std::map<int, content::RenderWidgetHostView*> PendingWidgetViews; |
+ typedef std::map<int, RenderWidgetHostView*> PendingWidgetViews; |
PendingWidgetViews pending_widget_views_; |
// A list of observers notified when page state changes. Weak references. |
// This MUST be listed above render_manager_ since at destruction time the |
// latter might cause RenderViewHost's destructor to call us and we might use |
// the observer list then. |
- ObserverList<content::WebContentsObserver> observers_; |
+ ObserverList<WebContentsObserver> observers_; |
// The tab that opened this tab, if any. Will be set to null if the opener |
// is closed. |
@@ -738,7 +726,7 @@ |
// TODO(fsamuel): Remove this once upstreaming of the new browser plugin |
// implementation is complete. |
// Manages the browser plugin instances hosted by this WebContents. |
- scoped_ptr<content::old::BrowserPluginHost> old_browser_plugin_host_; |
+ scoped_ptr<old::BrowserPluginHost> old_browser_plugin_host_; |
// SavePackage, lazily created. |
scoped_refptr<SavePackage> save_package_; |
@@ -804,7 +792,7 @@ |
// Pointer to the JavaScript dialog creator, lazily assigned. Used because the |
// delegate of this WebContentsImpl is nulled before its destructor is called. |
- content::JavaScriptDialogCreator* dialog_creator_; |
+ JavaScriptDialogCreator* dialog_creator_; |
#if defined(OS_WIN) |
// Handle to an event that's set when the page is showing a message box (or |
@@ -819,11 +807,11 @@ |
bool is_showing_before_unload_dialog_; |
// Settings that get passed to the renderer process. |
- content::RendererPreferences renderer_preferences_; |
+ RendererPreferences renderer_preferences_; |
// If this tab was created from a renderer using window.open, this will be |
// non-NULL and represent the WebUI of the opening renderer. |
- content::WebUI::TypeID opener_web_ui_type_; |
+ WebUI::TypeID opener_web_ui_type_; |
// The time that we started to create the new tab page. |
base::TimeTicks new_tab_start_time_; |
@@ -856,28 +844,30 @@ |
int content_restrictions_; |
// Color chooser that was opened by this tab. |
- content::ColorChooser* color_chooser_; |
+ ColorChooser* color_chooser_; |
// Manages the embedder state for browser plugins, if this WebContents is an |
// embedder; NULL otherwise. |
- scoped_ptr<content::BrowserPluginEmbedder> browser_plugin_embedder_; |
+ scoped_ptr<BrowserPluginEmbedder> browser_plugin_embedder_; |
// Manages the guest state for browser plugin, if this WebContents is a guest; |
// NULL otherwise. |
- scoped_ptr<content::BrowserPluginGuest> browser_plugin_guest_; |
+ scoped_ptr<BrowserPluginGuest> browser_plugin_guest_; |
// This must be at the end, or else we might get notifications and use other |
// member variables that are gone. |
- content::NotificationRegistrar registrar_; |
+ NotificationRegistrar registrar_; |
// Used during IPC message dispatching so that the handlers can get a pointer |
// to the RVH through which the message was received. |
- content::RenderViewHost* message_source_; |
+ RenderViewHost* message_source_; |
// All live RenderWidgetHostImpls that are created by this object and may |
// outlive it. |
- std::set<content::RenderWidgetHostImpl*> created_widgets_; |
+ std::set<RenderWidgetHostImpl*> created_widgets_; |
DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
}; |
+} // namespace content |
+ |
#endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |