diff options
Diffstat (limited to 'content/browser/tab_contents')
31 files changed, 135 insertions, 94 deletions
diff --git a/content/browser/tab_contents/interstitial_page_impl.cc b/content/browser/tab_contents/interstitial_page_impl.cc index 4a29a22..a01cbf5 100644 --- a/content/browser/tab_contents/interstitial_page_impl.cc +++ b/content/browser/tab_contents/interstitial_page_impl.cc @@ -41,7 +41,11 @@ using content::InterstitialPageDelegate; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderViewHostDelegate; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SiteInstance; diff --git a/content/browser/tab_contents/interstitial_page_impl.h b/content/browser/tab_contents/interstitial_page_impl.h index 6f1f27a..0bfdbf8 100644 --- a/content/browser/tab_contents/interstitial_page_impl.h +++ b/content/browser/tab_contents/interstitial_page_impl.h @@ -16,11 +16,11 @@ #include "content/public/common/renderer_preferences.h" #include "googleurl/src/gurl.h" -class RenderViewHostImpl; class TabContents; namespace content { class NavigationEntry; +class RenderViewHostImpl; class WebContentsView; } @@ -53,7 +53,7 @@ class CONTENT_EXPORT InterstitialPageImpl virtual void Hide() OVERRIDE; virtual void DontProceed() OVERRIDE; virtual void Proceed() OVERRIDE; - virtual RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; + virtual content::RenderViewHost* GetRenderViewHostForTesting() const OVERRIDE; virtual content::InterstitialPageDelegate* GetDelegateForTesting() OVERRIDE; virtual void DontCreateViewForTesting() OVERRIDE; virtual void SetSize(const gfx::Size& size) OVERRIDE; @@ -83,13 +83,13 @@ class CONTENT_EXPORT InterstitialPageImpl // RenderViewHostDelegate implementation: virtual View* GetViewDelegate() OVERRIDE; virtual const GURL& GetURL() const OVERRIDE; - virtual void RenderViewGone(RenderViewHost* render_view_host, + virtual void RenderViewGone(content::RenderViewHost* render_view_host, base::TerminationStatus status, int error_code) OVERRIDE; virtual void DidNavigate( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; - virtual void UpdateTitle(RenderViewHost* render_view_host, + virtual void UpdateTitle(content::RenderViewHost* render_view_host, int32 page_id, const string16& title, base::i18n::TextDirection title_direction) OVERRIDE; @@ -109,7 +109,7 @@ class CONTENT_EXPORT InterstitialPageImpl // Creates the RenderViewHost containing the interstitial content. // Overriden in unit tests. - virtual RenderViewHost* CreateRenderViewHost(); + virtual content::RenderViewHost* CreateRenderViewHost(); // Creates the WebContentsView that shows the interstitial RVH. // Overriden in unit tests. @@ -160,7 +160,7 @@ class CONTENT_EXPORT InterstitialPageImpl ActionState action_taken_; // The RenderViewHost displaying the interstitial contents. - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; // The IDs for the Render[View|Process]Host hidden by this interstitial. int original_child_id_; diff --git a/content/browser/tab_contents/navigation_controller_impl.cc b/content/browser/tab_contents/navigation_controller_impl.cc index 0073e64..1f2d8a6 100644 --- a/content/browser/tab_contents/navigation_controller_impl.cc +++ b/content/browser/tab_contents/navigation_controller_impl.cc @@ -40,6 +40,7 @@ using content::GlobalRequestID; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHostImpl; using content::SessionStorageNamespace; using content::SiteInstance; using content::UserMetricsAction; diff --git a/content/browser/tab_contents/navigation_controller_impl_unittest.cc b/content/browser/tab_contents/navigation_controller_impl_unittest.cc index 71c5de5..57758f2 100644 --- a/content/browser/tab_contents/navigation_controller_impl_unittest.cc +++ b/content/browser/tab_contents/navigation_controller_impl_unittest.cc @@ -38,6 +38,7 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; // NavigationControllerTest ---------------------------------------------------- diff --git a/content/browser/tab_contents/popup_menu_helper_mac.h b/content/browser/tab_contents/popup_menu_helper_mac.h index 74f6f6a..1c10a9e 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.h +++ b/content/browser/tab_contents/popup_menu_helper_mac.h @@ -12,15 +12,18 @@ #include "content/public/browser/notification_registrar.h" #include "ui/gfx/rect.h" +struct WebMenuItem; + +namespace content { class RenderViewHost; class RenderViewHostImpl; -struct WebMenuItem; +} class PopupMenuHelper : public content::NotificationObserver { public: // Creates a PopupMenuHelper that will notify |render_view_host| when a user // selects or cancels the popup. - explicit PopupMenuHelper(RenderViewHost* render_view_host); + explicit PopupMenuHelper(content::RenderViewHost* render_view_host); // Shows the popup menu and notifies the RenderViewHost of the selection/ // cancel. @@ -40,7 +43,7 @@ class PopupMenuHelper : public content::NotificationObserver { content::NotificationRegistrar notification_registrar_; - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; DISALLOW_COPY_AND_ASSIGN(PopupMenuHelper); }; diff --git a/content/browser/tab_contents/popup_menu_helper_mac.mm b/content/browser/tab_contents/popup_menu_helper_mac.mm index 02e29a4..0d7aaf2 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.mm +++ b/content/browser/tab_contents/popup_menu_helper_mac.mm @@ -16,6 +16,10 @@ #import "ui/base/cocoa/base_view.h" #include "webkit/glue/webmenurunner_mac.h" +using content::RenderViewHost; +using content::RenderViewHostImpl; +using content::RenderWidgetHost; + PopupMenuHelper::PopupMenuHelper(RenderViewHost* render_view_host) : render_view_host_(static_cast<RenderViewHostImpl*>(render_view_host)) { notification_registrar_.Add( diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc index 3d7b9c5..8b76009 100644 --- a/content/browser/tab_contents/render_view_host_manager.cc +++ b/content/browser/tab_contents/render_view_host_manager.cc @@ -30,6 +30,8 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SiteInstance; diff --git a/content/browser/tab_contents/render_view_host_manager.h b/content/browser/tab_contents/render_view_host_manager.h index 179a400..1f02a22 100644 --- a/content/browser/tab_contents/render_view_host_manager.h +++ b/content/browser/tab_contents/render_view_host_manager.h @@ -17,14 +17,14 @@ class InterstitialPageImpl; class NavigationControllerImpl; -class RenderViewHost; -class RenderViewHostImpl; class WebUIImpl; namespace content { class BrowserContext; class NavigationEntry; class NavigationEntryImpl; +class RenderViewHost; +class RenderViewHostImpl; class RenderWidgetHostView; } @@ -55,13 +55,13 @@ class CONTENT_EXPORT RenderViewHostManager // If you are attaching to an already-existing RenderView, you should call // InitWithExistingID. virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void BeforeUnloadFiredFromRenderManager( bool proceed, bool* proceed_to_fire_unload) = 0; virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void RenderViewGoneFromRenderManager( - RenderViewHost* render_view_host) = 0; + content::RenderViewHost* render_view_host) = 0; virtual void UpdateRenderViewSizeForRenderManager() = 0; virtual void NotifySwappedFromRenderManager() = 0; virtual NavigationControllerImpl& GetControllerForRenderManager() = 0; @@ -85,7 +85,7 @@ class CONTENT_EXPORT RenderViewHostManager virtual void SetFocusToLocationBar(bool select_all) = 0; // Creates a view and sets the size for the specified RVH. - virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) = 0; + virtual void CreateViewAndSetSizeForRVH(content::RenderViewHost* rvh) = 0; protected: virtual ~Delegate() {} @@ -110,14 +110,14 @@ class CONTENT_EXPORT RenderViewHostManager // This will be non-NULL between Init() and Shutdown(). You may want to NULL // check it in many cases, however. Windows can send us messages during the // destruction process after it has been shut down. - RenderViewHostImpl* current_host() const; + content::RenderViewHostImpl* current_host() const; // Returns the view associated with the current RenderViewHost, or NULL if // there is no current one. content::RenderWidgetHostView* GetRenderWidgetHostView() const; // Returns the pending render view host, or NULL if there is no pending one. - RenderViewHostImpl* pending_render_view_host() const; + content::RenderViewHostImpl* pending_render_view_host() const; // Returns the current committed Web UI or NULL if none applies. WebUIImpl* web_ui() const { return web_ui_.get(); } @@ -129,7 +129,8 @@ class CONTENT_EXPORT RenderViewHostManager // navigation entry. It may create a new RenderViewHost or re-use an existing // one. The RenderViewHost to navigate will be returned. Returns NULL if one // could not be created. - RenderViewHostImpl* Navigate(const content::NavigationEntryImpl& entry); + content::RenderViewHostImpl* Navigate( + const content::NavigationEntryImpl& entry); // Instructs the various live views to stop. Called when the user directed the // page to stop loading. @@ -146,7 +147,7 @@ class CONTENT_EXPORT RenderViewHostManager bool ShouldCloseTabOnUnresponsiveRenderer(); // Called when a renderer's main frame navigates. - void DidNavigateMainFrame(RenderViewHost* render_view_host); + void DidNavigateMainFrame(content::RenderViewHost* render_view_host); // Set the WebUI after committing a page load. This is useful for navigations // initiated from a renderer, where we want to give the new renderer WebUI @@ -154,7 +155,8 @@ class CONTENT_EXPORT RenderViewHostManager void SetWebUIPostCommit(WebUIImpl* web_ui); // Called when a provisional load on the given renderer is aborted. - void RendererAbortedProvisionalLoad(RenderViewHost* render_view_host); + void RendererAbortedProvisionalLoad( + content::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 @@ -189,11 +191,11 @@ class CONTENT_EXPORT RenderViewHostManager const content::NotificationDetails& details) OVERRIDE; // Called when a RenderViewHost is about to be deleted. - void RenderViewDeleted(RenderViewHost* rvh); + void RenderViewDeleted(content::RenderViewHost* rvh); // Returns whether the given RenderViewHost is on the list of swapped out // RenderViewHosts. - bool IsSwappedOut(RenderViewHost* rvh); + bool IsSwappedOut(content::RenderViewHost* rvh); private: friend class TestTabContents; @@ -228,7 +230,7 @@ class CONTENT_EXPORT RenderViewHostManager // Sets up the necessary state for a new RenderViewHost navigating to the // given entry. - bool InitRenderView(RenderViewHost* render_view_host, + bool InitRenderView(content::RenderViewHost* render_view_host, const content::NavigationEntryImpl& entry); // Sets the pending RenderViewHost/WebUI to be the active one. Note that this @@ -239,7 +241,7 @@ class CONTENT_EXPORT RenderViewHostManager // Helper method to terminate the pending RenderViewHost. void CancelPending(); - RenderViewHostImpl* UpdateRendererStateForNavigate( + content::RenderViewHostImpl* UpdateRendererStateForNavigate( const content::NavigationEntryImpl& entry); // Called when a renderer process is starting to close. We should not @@ -261,7 +263,7 @@ class CONTENT_EXPORT RenderViewHostManager // Our RenderView host and its associated Web UI (if any, will be NULL for // non-DOM-UI pages). This object is responsible for all communication with // a child RenderView instance. - RenderViewHostImpl* render_view_host_; + content::RenderViewHostImpl* render_view_host_; scoped_ptr<WebUIImpl> web_ui_; // A RenderViewHost used to load a cross-site page. This remains hidden @@ -273,11 +275,11 @@ class CONTENT_EXPORT RenderViewHostManager // is. This will happen when we're transitioning between two Web UI pages: // the RVH won't be swapped, so the pending pointer will be unused, but there // will be a pending Web UI associated with the navigation. - RenderViewHostImpl* pending_render_view_host_; + content::RenderViewHostImpl* pending_render_view_host_; scoped_ptr<WebUIImpl> pending_web_ui_; // A map of site instance ID to swapped out RenderViewHosts. - typedef base::hash_map<int32, RenderViewHostImpl*> RenderViewHostMap; + typedef base::hash_map<int32, content::RenderViewHostImpl*> RenderViewHostMap; RenderViewHostMap swapped_out_hosts_; // The intersitial page currently shown if any, not own by this class diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc index 7d29909..1cd01cb 100644 --- a/content/browser/tab_contents/render_view_host_manager_unittest.cc +++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc @@ -34,7 +34,10 @@ using content::BrowserThreadImpl; using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; using content::WebUI; using content::WebUIController; diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 85a55f2..239ec8e 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -123,7 +123,10 @@ using content::NavigationController; using content::NavigationEntry; using content::NavigationEntryImpl; using content::OpenURLParams; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::RenderViewHostDelegate; +using content::RenderWidgetHost; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::SessionStorageNamespace; diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h index dd1cb8b..b2bca01 100644 --- a/content/browser/tab_contents/tab_contents.h +++ b/content/browser/tab_contents/tab_contents.h @@ -32,8 +32,6 @@ class InterstitialPageImpl; class LoadNotificationDetails; -class RenderViewHost; -class RenderViewHostImpl; class SavePackage; class SessionStorageNamespaceImpl; struct ViewHostMsg_DidFailProvisionalLoadWithError_Params; @@ -42,6 +40,8 @@ namespace content { class DownloadItem; class SiteInstance; class JavaScriptDialogCreator; +class RenderViewHost; +class RenderViewHostImpl; class WebContentsDelegate; class WebContentsObserver; class WebContentsView; @@ -65,7 +65,8 @@ class CONTENT_EXPORT TabContents virtual ~TabContents(); // Returns the content specific prefs for the given RVH. - static WebPreferences GetWebkitPrefs(RenderViewHost* rvh, const GURL& url); + static WebPreferences GetWebkitPrefs( + content::RenderViewHost* rvh, const GURL& url); // Returns the SavePackage which manages the page saving job. May be NULL. SavePackage* save_package() const { return save_package_.get(); } @@ -135,7 +136,7 @@ class CONTENT_EXPORT TabContents virtual void SetViewType(content::ViewType type) OVERRIDE; virtual content::ViewType GetViewType() const OVERRIDE; virtual content::RenderProcessHost* GetRenderProcessHost() const OVERRIDE; - virtual RenderViewHost* GetRenderViewHost() const OVERRIDE; + virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE; virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const OVERRIDE; virtual content::WebContentsView* GetView() const OVERRIDE; @@ -232,36 +233,39 @@ class CONTENT_EXPORT TabContents virtual WebContents* GetAsWebContents() OVERRIDE; virtual content::ViewType GetRenderViewType() const OVERRIDE; virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE; - virtual void RenderViewGone(RenderViewHost* render_view_host, + 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, base::TerminationStatus status, int error_code) OVERRIDE; - virtual void RenderViewDeleted(RenderViewHost* render_view_host) OVERRIDE; + virtual void RenderViewDeleted( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidNavigate( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const ViewHostMsg_FrameNavigate_Params& params) OVERRIDE; - virtual void UpdateState(RenderViewHost* render_view_host, + virtual void UpdateState(content::RenderViewHost* render_view_host, int32 page_id, const std::string& state) OVERRIDE; - virtual void UpdateTitle(RenderViewHost* render_view_host, + virtual void UpdateTitle(content::RenderViewHost* render_view_host, int32 page_id, const string16& title, base::i18n::TextDirection title_direction) OVERRIDE; - virtual void UpdateEncoding(RenderViewHost* render_view_host, + virtual void UpdateEncoding(content::RenderViewHost* render_view_host, const std::string& encoding) OVERRIDE; virtual void UpdateTargetURL(int32 page_id, const GURL& url) OVERRIDE; - virtual void Close(RenderViewHost* render_view_host) OVERRIDE; + virtual void Close(content::RenderViewHost* render_view_host) OVERRIDE; virtual void RequestMove(const gfx::Rect& new_bounds) OVERRIDE; - virtual void SwappedOut(RenderViewHost* render_view_host) OVERRIDE; + virtual void SwappedOut(content::RenderViewHost* render_view_host) OVERRIDE; virtual void DidStartLoading() OVERRIDE; virtual void DidStopLoading() OVERRIDE; virtual void DidCancelLoading() OVERRIDE; virtual void DidChangeLoadProgress(double progress) OVERRIDE; virtual void DocumentAvailableInMainFrame( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void DocumentOnLoadCompletedInMainFrame( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, int32 page_id) OVERRIDE; virtual void RequestOpenURL(const GURL& url, const content::Referrer& referrer, @@ -273,14 +277,14 @@ class CONTENT_EXPORT TabContents WindowOpenDisposition disposition, int64 source_frame_id, const content::GlobalRequestID& transferred_global_request_id) OVERRIDE; - virtual void RunJavaScriptMessage(RenderViewHost* rvh, + virtual void RunJavaScriptMessage(content::RenderViewHost* rvh, const string16& message, const string16& default_prompt, const GURL& frame_url, ui::JavascriptMessageType type, IPC::Message* reply_msg, bool* did_suppress_message) OVERRIDE; - virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, + virtual void RunBeforeUnloadConfirm(content::RenderViewHost* rvh, const string16& message, bool is_reload, IPC::Message* reply_msg) OVERRIDE; @@ -289,9 +293,10 @@ class CONTENT_EXPORT TabContents virtual WebPreferences GetWebkitPrefs() OVERRIDE; virtual void OnUserGesture() OVERRIDE; virtual void OnIgnoredUIEvent() OVERRIDE; - virtual void RendererUnresponsive(RenderViewHost* render_view_host, + virtual void RendererUnresponsive(content::RenderViewHost* render_view_host, bool is_during_unload) OVERRIDE; - virtual void RendererResponsive(RenderViewHost* render_view_host) OVERRIDE; + virtual void RendererResponsive( + content::RenderViewHost* render_view_host) OVERRIDE; virtual void LoadStateChanged(const GURL& url, const net::LoadStateWithParam& load_state, uint64 upload_position, @@ -308,30 +313,30 @@ class CONTENT_EXPORT TabContents virtual void HandleMouseUp() OVERRIDE; virtual void HandleMouseActivate() OVERRIDE; virtual void RunFileChooser( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const content::FileChooserParams& params) OVERRIDE; virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; virtual bool IsFullscreenForCurrentTab() const OVERRIDE; virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; - virtual void WebUISend(RenderViewHost* render_view_host, - const GURL& source_url, - const std::string& name, - const base::ListValue& args) OVERRIDE; + virtual void WebUISend(content::RenderViewHost* render_view_host, + const GURL& source_url, + const std::string& name, + const base::ListValue& args) OVERRIDE; virtual void RequestToLockMouse() OVERRIDE; virtual void LostMouseLock() OVERRIDE; // RenderViewHostManager::Delegate ------------------------------------------- virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void BeforeUnloadFiredFromRenderManager( bool proceed, bool* proceed_to_fire_unload) OVERRIDE; virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderViewGoneFromRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE; virtual void NotifySwappedFromRenderManager() OVERRIDE; virtual NavigationControllerImpl& GetControllerForRenderManager() OVERRIDE; @@ -340,7 +345,8 @@ class CONTENT_EXPORT TabContents GetLastCommittedNavigationEntryForRenderManager() OVERRIDE; virtual bool FocusLocationBarByDefault() OVERRIDE; virtual void SetFocusToLocationBar(bool select_all) OVERRIDE; - virtual void CreateViewAndSetSizeForRVH(RenderViewHost* rvh) OVERRIDE; + virtual void CreateViewAndSetSizeForRVH( + content::RenderViewHost* rvh) OVERRIDE; protected: friend class content::WebContentsObserver; @@ -379,7 +385,7 @@ class CONTENT_EXPORT TabContents friend class TestTabContents; // Callback function when showing JS dialogs. - void OnDialogClosed(RenderViewHost* rvh, + void OnDialogClosed(content::RenderViewHost* rvh, IPC::Message* reply_msg, bool success, const string16& user_input); @@ -459,7 +465,7 @@ class CONTENT_EXPORT TabContents const content::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params); void DidNavigateAnyFramePostCommit( - RenderViewHost* render_view_host, + content::RenderViewHost* render_view_host, const content::LoadCommittedDetails& details, const ViewHostMsg_FrameNavigate_Params& params); @@ -467,7 +473,7 @@ class CONTENT_EXPORT TabContents // 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(RenderViewHost* rvh); + void UpdateMaxPageIDIfNecessary(content::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 @@ -507,7 +513,7 @@ class CONTENT_EXPORT TabContents // Save a URL to the local filesystem. void SaveURL(const GURL& url, const GURL& referrer, bool is_main_frame); - RenderViewHostImpl* GetRenderViewHostImpl(); + content::RenderViewHostImpl* GetRenderViewHostImpl(); // Stores random bits of data for others to associate with this object. // WARNING: this needs to be deleted after NavigationController. diff --git a/content/browser/tab_contents/tab_contents_unittest.cc b/content/browser/tab_contents/tab_contents_unittest.cc index 57c4844..f36cb80f 100644 --- a/content/browser/tab_contents/tab_contents_unittest.cc +++ b/content/browser/tab_contents/tab_contents_unittest.cc @@ -33,6 +33,7 @@ using content::InterstitialPage; using content::NavigationEntry; using content::NavigationEntryImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; using content::WebUI; using content::WebUIController; @@ -201,7 +202,7 @@ class TestInterstitialPage : public InterstitialPageImpl { } protected: - virtual RenderViewHost* CreateRenderViewHost() OVERRIDE { + virtual content::RenderViewHost* CreateRenderViewHost() OVERRIDE { return new TestRenderViewHost( SiteInstance::Create(tab()->GetBrowserContext()), this, MSG_ROUTING_NONE); diff --git a/content/browser/tab_contents/tab_contents_view_gtk.cc b/content/browser/tab_contents/tab_contents_view_gtk.cc index 83079a9..49fd71e 100644 --- a/content/browser/tab_contents/tab_contents_view_gtk.cc +++ b/content/browser/tab_contents/tab_contents_view_gtk.cc @@ -30,6 +30,7 @@ using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; +using content::RenderWidgetHost; using content::WebContents; namespace { @@ -202,7 +203,7 @@ void TabContentsViewGtk::SizeContents(const gfx::Size& size) { rwhv->SetSize(size); } -void TabContentsViewGtk::RenderViewCreated(RenderViewHost* host) { +void TabContentsViewGtk::RenderViewCreated(content::RenderViewHost* host) { } void TabContentsViewGtk::Focus() { diff --git a/content/browser/tab_contents/tab_contents_view_gtk.h b/content/browser/tab_contents/tab_contents_view_gtk.h index c5b8499..877c87d 100644 --- a/content/browser/tab_contents/tab_contents_view_gtk.h +++ b/content/browser/tab_contents/tab_contents_view_gtk.h @@ -53,7 +53,7 @@ class CONTENT_EXPORT TabContentsViewGtk : public WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; @@ -63,7 +63,7 @@ class CONTENT_EXPORT TabContentsViewGtk : public WebContentsView { virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/tab_contents_view_helper.cc b/content/browser/tab_contents/tab_contents_view_helper.cc index 98817e6..2edfab2 100644 --- a/content/browser/tab_contents/tab_contents_view_helper.cc +++ b/content/browser/tab_contents/tab_contents_view_helper.cc @@ -16,6 +16,9 @@ #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_view.h" +using content::RenderViewHostImpl; +using content::RenderWidgetHost; +using content::RenderWidgetHostImpl; using content::RenderWidgetHostView; using content::RenderWidgetHostViewPort; using content::WebContents; diff --git a/content/browser/tab_contents/tab_contents_view_win.cc b/content/browser/tab_contents/tab_contents_view_win.cc index 91d0e5e..e2678a5 100644 --- a/content/browser/tab_contents/tab_contents_view_win.cc +++ b/content/browser/tab_contents/tab_contents_view_win.cc @@ -74,7 +74,7 @@ void TabContentsViewWin::CreateView(const gfx::Size& initial_size) { } RenderWidgetHostView* TabContentsViewWin::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that @@ -142,7 +142,7 @@ void TabContentsViewWin::SizeContents(const gfx::Size& size) { } } -void TabContentsViewWin::RenderViewCreated(RenderViewHost* host) { +void TabContentsViewWin::RenderViewCreated(content::RenderViewHost* host) { } void TabContentsViewWin::Focus() { diff --git a/content/browser/tab_contents/tab_contents_view_win.h b/content/browser/tab_contents/tab_contents_view_win.h index 568a71d..f4f958c 100644 --- a/content/browser/tab_contents/tab_contents_view_win.h +++ b/content/browser/tab_contents/tab_contents_view_win.h @@ -29,7 +29,7 @@ class TabContentsViewWin : public content::WebContentsView, // Overridden from WebContentsView: virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; @@ -38,7 +38,7 @@ class TabContentsViewWin : public content::WebContentsView, virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/test_tab_contents.cc b/content/browser/tab_contents/test_tab_contents.cc index a29f716..fc6bf57 100644 --- a/content/browser/tab_contents/test_tab_contents.cc +++ b/content/browser/tab_contents/test_tab_contents.cc @@ -18,7 +18,10 @@ #include "webkit/forms/password_form.h" using content::NavigationEntry; +using content::RenderViewHost; +using content::RenderViewHostImpl; using content::SiteInstance; +using content::TestRenderViewHost; using content::WebContents; TestTabContents::TestTabContents(content::BrowserContext* browser_context, diff --git a/content/browser/tab_contents/test_tab_contents.h b/content/browser/tab_contents/test_tab_contents.h index 7f3a073..9842038 100644 --- a/content/browser/tab_contents/test_tab_contents.h +++ b/content/browser/tab_contents/test_tab_contents.h @@ -11,7 +11,10 @@ #include "webkit/glue/webpreferences.h" class SiteInstanceImpl; + +namespace content { class TestRenderViewHost; +} // Subclass TabContents to ensure it creates TestRenderViewHosts and does // not do anything involving views. @@ -21,7 +24,7 @@ class TestTabContents : public TabContents { content::SiteInstance* instance); virtual ~TestTabContents(); - TestRenderViewHost* pending_rvh() const; + content::TestRenderViewHost* pending_rvh() const; // State accessor. bool cross_navigation_pending() { @@ -32,11 +35,11 @@ class TestTabContents : public TabContents { // alternatives without using command-line switches. bool ShouldTransitionCrossSite() { return transition_cross_site; } - void TestDidNavigate(RenderViewHost* render_view_host, + void TestDidNavigate(content::RenderViewHost* render_view_host, int page_id, const GURL& url, content::PageTransition transition); - void TestDidNavigateWithReferrer(RenderViewHost* render_view_host, + void TestDidNavigateWithReferrer(content::RenderViewHost* render_view_host, int page_id, const GURL& url, const content::Referrer& referrer, @@ -49,7 +52,7 @@ class TestTabContents : public TabContents { // Prevent interaction with views. virtual bool CreateRenderViewForRenderManager( - RenderViewHost* render_view_host) OVERRIDE; + content::RenderViewHost* render_view_host) OVERRIDE; virtual void UpdateRenderViewSizeForRenderManager() OVERRIDE {} // Returns a clone of this TestTabContents. The returned object is also a diff --git a/content/browser/tab_contents/web_contents_view_android.cc b/content/browser/tab_contents/web_contents_view_android.cc index 4c26f73..cc67789 100644 --- a/content/browser/tab_contents/web_contents_view_android.cc +++ b/content/browser/tab_contents/web_contents_view_android.cc @@ -20,7 +20,7 @@ void WebContentsViewAndroid::CreateView(const gfx::Size& initial_size) { } content::RenderWidgetHostView* WebContentsViewAndroid::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { NOTIMPLEMENTED(); return NULL; } @@ -57,7 +57,7 @@ void WebContentsViewAndroid::SizeContents(const gfx::Size& size) { NOTIMPLEMENTED(); } -void WebContentsViewAndroid::RenderViewCreated(RenderViewHost* host) { +void WebContentsViewAndroid::RenderViewCreated(content::RenderViewHost* host) { NOTIMPLEMENTED(); } diff --git a/content/browser/tab_contents/web_contents_view_android.h b/content/browser/tab_contents/web_contents_view_android.h index 02b728d..72e8530 100644 --- a/content/browser/tab_contents/web_contents_view_android.h +++ b/content/browser/tab_contents/web_contents_view_android.h @@ -17,7 +17,7 @@ class WebContentsViewAndroid : public content::WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; @@ -27,7 +27,7 @@ class WebContentsViewAndroid : public content::WebContentsView { virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void Focus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE; diff --git a/content/browser/tab_contents/web_contents_view_mac.h b/content/browser/tab_contents/web_contents_view_mac.h index 1d2a21e..5a4acc9 100644 --- a/content/browser/tab_contents/web_contents_view_mac.h +++ b/content/browser/tab_contents/web_contents_view_mac.h @@ -66,12 +66,12 @@ class WebContentsViewMac : public content::WebContentsView { virtual void CreateView(const gfx::Size& initial_size) OVERRIDE; virtual content::RenderWidgetHostView* CreateViewForWidget( - RenderWidgetHost* render_widget_host) OVERRIDE; + content::RenderWidgetHost* render_widget_host) OVERRIDE; virtual gfx::NativeView GetNativeView() const OVERRIDE; virtual gfx::NativeView GetContentNativeView() const OVERRIDE; virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; - virtual void RenderViewCreated(RenderViewHost* host) OVERRIDE; + virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void SetPageTitle(const string16& title) OVERRIDE; virtual void OnTabCrashed(base::TerminationStatus status, int error_code) OVERRIDE; diff --git a/content/browser/tab_contents/web_contents_view_mac.mm b/content/browser/tab_contents/web_contents_view_mac.mm index 419f297..89e5cf25 100644 --- a/content/browser/tab_contents/web_contents_view_mac.mm +++ b/content/browser/tab_contents/web_contents_view_mac.mm @@ -90,7 +90,7 @@ void WebContentsViewMac::CreateView(const gfx::Size& initial_size) { } RenderWidgetHostView* WebContentsViewMac::CreateViewForWidget( - RenderWidgetHost* render_widget_host) { + content::RenderWidgetHost* render_widget_host) { if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that @@ -185,7 +185,7 @@ void WebContentsViewMac::StartDragging( offset:offset]; } -void WebContentsViewMac::RenderViewCreated(RenderViewHost* host) { +void WebContentsViewMac::RenderViewCreated(content::RenderViewHost* host) { // We want updates whenever the intrinsic width of the webpage changes. // Put the RenderView into that mode. The preferred width is used for example // when the "zoom" button in the browser window is clicked. diff --git a/content/browser/tab_contents/web_drag_dest_gtk.cc b/content/browser/tab_contents/web_drag_dest_gtk.cc index 27022c6..213cd32 100644 --- a/content/browser/tab_contents/web_drag_dest_gtk.cc +++ b/content/browser/tab_contents/web_drag_dest_gtk.cc @@ -20,6 +20,7 @@ #include "ui/base/dragdrop/gtk_dnd_util.h" #include "ui/base/gtk/gtk_screen_utils.h" +using content::RenderViewHostImpl; using WebKit::WebDragOperation; using WebKit::WebDragOperationNone; diff --git a/content/browser/tab_contents/web_drag_dest_gtk.h b/content/browser/tab_contents/web_drag_dest_gtk.h index 23d8bcc..7790604 100644 --- a/content/browser/tab_contents/web_drag_dest_gtk.h +++ b/content/browser/tab_contents/web_drag_dest_gtk.h @@ -16,10 +16,9 @@ #include "ui/base/gtk/gtk_signal.h" #include "webkit/glue/webdropdata.h" -class RenderViewHostImpl; - namespace content { +class RenderViewHostImpl; class WebContents; class WebDragDestDelegate; @@ -42,7 +41,7 @@ class CONTENT_EXPORT WebDragDestGtk { void set_delegate(WebDragDestDelegate* delegate) { delegate_ = delegate; } private: - RenderViewHostImpl* GetRenderViewHost() const; + content::RenderViewHostImpl* GetRenderViewHost() const; // Called when a system drag crosses over the render view. As there is no drag // enter event, we treat it as an enter event (and not a regular motion event) diff --git a/content/browser/tab_contents/web_drag_dest_mac.h b/content/browser/tab_contents/web_drag_dest_mac.h index 78d5418..db55174 100644 --- a/content/browser/tab_contents/web_drag_dest_mac.h +++ b/content/browser/tab_contents/web_drag_dest_mac.h @@ -6,16 +6,16 @@ #include "base/string16.h" -class RenderViewHost; class TabContents; struct WebDropData; namespace content { +class RenderViewHost; class WebDragDestDelegate; } // A typedef for a RenderViewHost used for comparison purposes only. -typedef RenderViewHost* RenderViewHostIdentifier; +typedef content::RenderViewHost* RenderViewHostIdentifier; // A class that handles tracking and event processing for a drag and drop // over the content area. Assumes something else initiates the drag, this is diff --git a/content/browser/tab_contents/web_drag_dest_win.h b/content/browser/tab_contents/web_drag_dest_win.h index 037e688..8bb16c2 100644 --- a/content/browser/tab_contents/web_drag_dest_win.h +++ b/content/browser/tab_contents/web_drag_dest_win.h @@ -12,9 +12,9 @@ #include "ui/base/dragdrop/drop_target.h" class InterstitialDropTarget; -class RenderViewHost; namespace content { +class RenderViewHost; class WebContents; class WebDragDestDelegate; } @@ -62,7 +62,7 @@ class CONTENT_EXPORT WebDragDest : public ui::DropTarget { // during a drag, we need to re-send the DragEnter message. WARNING: // this pointer should never be dereferenced. We only use it for comparing // pointers. - RenderViewHost* current_rvh_; + content::RenderViewHost* current_rvh_; // Used to determine what cursor we should display when dragging over web // content area. This can be updated async during a drag operation. diff --git a/content/browser/tab_contents/web_drag_source_gtk.cc b/content/browser/tab_contents/web_drag_source_gtk.cc index f750db1..88a3928 100644 --- a/content/browser/tab_contents/web_drag_source_gtk.cc +++ b/content/browser/tab_contents/web_drag_source_gtk.cc @@ -29,10 +29,11 @@ #include "ui/gfx/gtk_util.h" #include "webkit/glue/webdropdata.h" +using content::RenderViewHostImpl; +using content::WebContents; using WebKit::WebDragOperation; using WebKit::WebDragOperationsMask; using WebKit::WebDragOperationNone; -using content::WebContents; namespace content { diff --git a/content/browser/tab_contents/web_drag_source_gtk.h b/content/browser/tab_contents/web_drag_source_gtk.h index 83ea99d..929c84d 100644 --- a/content/browser/tab_contents/web_drag_source_gtk.h +++ b/content/browser/tab_contents/web_drag_source_gtk.h @@ -20,12 +20,12 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" -class RenderViewHostImpl; class SkBitmap; struct WebDropData; namespace content { +class RenderViewHostImpl; class WebContents; // WebDragSourceGtk takes care of managing the drag from a WebContents @@ -59,7 +59,7 @@ class CONTENT_EXPORT WebDragSourceGtk : public MessageLoopForUI::Observer { CHROMEGTK_CALLBACK_1(WebDragSourceGtk, gboolean, OnDragIconExpose, GdkEventExpose*); - RenderViewHostImpl* GetRenderViewHost() const; + content::RenderViewHostImpl* GetRenderViewHost() const; gfx::NativeView GetContentNativeView() const; // The tab we're manging the drag for. diff --git a/content/browser/tab_contents/web_drag_source_mac.mm b/content/browser/tab_contents/web_drag_source_mac.mm index dd78e12..68f4696 100644 --- a/content/browser/tab_contents/web_drag_source_mac.mm +++ b/content/browser/tab_contents/web_drag_source_mac.mm @@ -32,6 +32,7 @@ using base::SysNSStringToUTF8; using base::SysUTF8ToNSString; using base::SysUTF16ToNSString; using content::BrowserThread; +using content::RenderViewHostImpl; using net::FileStream; namespace { diff --git a/content/browser/tab_contents/web_drag_source_win.h b/content/browser/tab_contents/web_drag_source_win.h index 06580c2..68316b6 100644 --- a/content/browser/tab_contents/web_drag_source_win.h +++ b/content/browser/tab_contents/web_drag_source_win.h @@ -13,9 +13,8 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" -class RenderViewHost; - namespace content { +class RenderViewHost; class WebContents; } @@ -58,7 +57,7 @@ class WebDragSource : public ui::DragSource, // We use this as a channel to the renderer to tell it about various drag // drop events that it needs to know about (such as when a drag operation it // initiated terminates). - RenderViewHost* render_view_host_; + content::RenderViewHost* render_view_host_; content::NotificationRegistrar registrar_; |