summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-01 19:45:54 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-01 19:45:54 +0000
commitbd021ddd2306afe3e4293a9ba9bde8fdadc8c740 (patch)
treec54b8a7ff72522bcfeba7ac1d8e759058a917e8c /chrome/browser
parent69e148de891638a541275a1f25d4b3a52487e9aa (diff)
downloadchromium_src-bd021ddd2306afe3e4293a9ba9bde8fdadc8c740.zip
chromium_src-bd021ddd2306afe3e4293a9ba9bde8fdadc8c740.tar.gz
chromium_src-bd021ddd2306afe3e4293a9ba9bde8fdadc8c740.tar.bz2
Removes pure virtual methods from TabContentsDelegate and removes all
empty implementations. BUG=none TEST=none R=brettw@chromium.org Review URL: http://codereview.chromium.org/7302001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/chromeos/login/enterprise_enrollment_view.cc17
-rw-r--r--chrome/browser/chromeos/login/eula_view.h17
-rw-r--r--chrome/browser/chromeos/login/html_page_screen.cc4
-rw-r--r--chrome/browser/chromeos/login/html_page_screen.h2
-rw-r--r--chrome/browser/chromeos/login/registration_screen.h3
-rw-r--r--chrome/browser/chromeos/login/web_page_screen.h17
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.cc37
-rw-r--r--chrome/browser/chromeos/login/webui_login_view.h18
-rw-r--r--chrome/browser/external_tab_container_win.cc9
-rw-r--r--chrome/browser/external_tab_container_win.h3
-rw-r--r--chrome/browser/instant/instant_loader.cc57
-rw-r--r--chrome/browser/instant/instant_unload_handler.cc21
-rw-r--r--chrome/browser/prerender/prerender_contents.cc19
-rw-r--r--chrome/browser/prerender/prerender_manager.cc13
-rw-r--r--chrome/browser/sidebar/sidebar_container.h22
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_container.h15
-rw-r--r--chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm1
-rw-r--r--chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.cc5
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.h1
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc25
-rw-r--r--chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h9
-rw-r--r--chrome/browser/ui/views/constrained_html_delegate_gtk.cc1
-rw-r--r--chrome/browser/ui/views/constrained_html_delegate_win.cc1
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.cc25
-rw-r--r--chrome/browser/ui/views/tabs/dragged_tab_controller.h10
-rw-r--r--chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc30
-rw-r--r--chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h11
-rw-r--r--chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc2
29 files changed, 8 insertions, 388 deletions
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
index d53196f..24a5a9d 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
@@ -48,29 +48,12 @@ class EnrollmentDomView : public WebPageDomView,
}
// TabContentsDelegate implementation:
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {}
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
- virtual void LoadingStateChanged(TabContents* source) {}
- virtual void CloseContents(TabContents* source) {}
virtual bool IsPopup(TabContents* source) { return false; }
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type) {
return false;
}
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
virtual bool HandleContextMenu(const ContextMenuParams& params) {
return true;
}
diff --git a/chrome/browser/chromeos/login/eula_view.h b/chrome/browser/chromeos/login/eula_view.h
index 7d1be91..d45e972 100644
--- a/chrome/browser/chromeos/login/eula_view.h
+++ b/chrome/browser/chromeos/login/eula_view.h
@@ -39,27 +39,10 @@ class EULATabContentsDelegate : public TabContentsDelegate {
protected:
// TabContentsDelegate implementation:
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {}
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
- virtual void LoadingStateChanged(TabContents* source) {}
- virtual void CloseContents(TabContents* source) {}
virtual bool IsPopup(TabContents* source);
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type);
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
virtual bool HandleContextMenu(const ContextMenuParams& params);
private:
diff --git a/chrome/browser/chromeos/login/html_page_screen.cc b/chrome/browser/chromeos/login/html_page_screen.cc
index 45f888d..7834b45 100644
--- a/chrome/browser/chromeos/login/html_page_screen.cc
+++ b/chrome/browser/chromeos/login/html_page_screen.cc
@@ -84,10 +84,6 @@ void HTMLPageScreen::LoadingStateChanged(TabContents* source) {
}
}
-void HTMLPageScreen::NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {
-}
-
void HTMLPageScreen::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
HandleWebKeyboardEvent(view()->GetWidget(), event);
}
diff --git a/chrome/browser/chromeos/login/html_page_screen.h b/chrome/browser/chromeos/login/html_page_screen.h
index cd64ae1..ba964414 100644
--- a/chrome/browser/chromeos/login/html_page_screen.h
+++ b/chrome/browser/chromeos/login/html_page_screen.h
@@ -69,8 +69,6 @@ class HTMLPageScreen : public ViewScreen<HTMLPageView>,
virtual HTMLPageView* AllocateView();
virtual void LoadingStateChanged(TabContents* source);
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
// WebPageScreen implementation:
diff --git a/chrome/browser/chromeos/login/registration_screen.h b/chrome/browser/chromeos/login/registration_screen.h
index c2fc3bc..d6adc82 100644
--- a/chrome/browser/chromeos/login/registration_screen.h
+++ b/chrome/browser/chromeos/login/registration_screen.h
@@ -84,9 +84,6 @@ class RegistrationScreen : public ViewScreen<RegistrationView>,
virtual RegistrationView* AllocateView();
// TabContentsDelegate implementation:
- virtual void LoadingStateChanged(TabContents* source) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
virtual void OpenURLFromTab(TabContents* source,
const GURL& url,
const GURL& referrer,
diff --git a/chrome/browser/chromeos/login/web_page_screen.h b/chrome/browser/chromeos/login/web_page_screen.h
index edd4bad..e1c581e 100644
--- a/chrome/browser/chromeos/login/web_page_screen.h
+++ b/chrome/browser/chromeos/login/web_page_screen.h
@@ -25,27 +25,10 @@ class WebPageScreen : public TabContentsDelegate {
protected:
// TabContentsDelegate implementation:
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) = 0;
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {}
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
- virtual void LoadingStateChanged(TabContents* source) = 0;
- virtual void CloseContents(TabContents* source) {}
virtual bool IsPopup(TabContents* source);
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type);
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
virtual bool HandleContextMenu(const ContextMenuParams& params);
// Called by |timeout_timer_|. Stops page fetching and closes screen.
diff --git a/chrome/browser/chromeos/login/webui_login_view.cc b/chrome/browser/chromeos/login/webui_login_view.cc
index 0e32c20..e3687ae 100644
--- a/chrome/browser/chromeos/login/webui_login_view.cc
+++ b/chrome/browser/chromeos/login/webui_login_view.cc
@@ -149,43 +149,6 @@ void WebUILoginView::InitStatusArea() {
AddChildView(status_area_);
}
-void WebUILoginView::OpenURLFromTab(TabContents* source,
- const GURL& url,
- const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {
-}
-
-void WebUILoginView::NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {
-}
-
-void WebUILoginView::AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {
-}
-
-void WebUILoginView::ActivateContents(TabContents* contents) {
-}
-
-void WebUILoginView::DeactivateContents(TabContents* contents) {
-}
-
-void WebUILoginView::LoadingStateChanged(TabContents* source) {
-}
-
-void WebUILoginView::CloseContents(TabContents* source) {
-}
-
-void WebUILoginView::MoveContents(TabContents* source,
- const gfx::Rect& pos) {
-}
-
-void WebUILoginView::UpdateTargetURL(TabContents* source, const GURL& url) {
-}
-
bool WebUILoginView::HandleContextMenu(const ContextMenuParams& params) {
// Do not show the context menu.
return true;
diff --git a/chrome/browser/chromeos/login/webui_login_view.h b/chrome/browser/chromeos/login/webui_login_view.h
index c99e667..30f3f9e 100644
--- a/chrome/browser/chromeos/login/webui_login_view.h
+++ b/chrome/browser/chromeos/login/webui_login_view.h
@@ -73,24 +73,6 @@ class WebUILoginView : public views::View,
void InitStatusArea();
// Overridden from TabContentsDelegate.
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url,
- const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) OVERRIDE;
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) OVERRIDE;
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) OVERRIDE;
- virtual void ActivateContents(TabContents* contents) OVERRIDE;
- virtual void DeactivateContents(TabContents* contents) OVERRIDE;
- virtual void LoadingStateChanged(TabContents* source) OVERRIDE;
- virtual void CloseContents(TabContents* source) OVERRIDE;
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE;
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE;
virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
Profile* profile_;
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 2ade918..e10523f 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -474,15 +474,6 @@ void ExternalTabContainer::TabContentsCreated(TabContents* new_contents) {
RegisterRenderViewHostForAutomation(rvh, true);
}
-void ExternalTabContainer::ActivateContents(TabContents* contents) {
-}
-
-void ExternalTabContainer::DeactivateContents(TabContents* contents) {
-}
-
-void ExternalTabContainer::LoadingStateChanged(TabContents* source) {
-}
-
void ExternalTabContainer::CloseContents(TabContents* source) {
if (!automation_)
return;
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index c47e014..c043c9e 100644
--- a/chrome/browser/external_tab_container_win.h
+++ b/chrome/browser/external_tab_container_win.h
@@ -129,9 +129,6 @@ class ExternalTabContainer : public TabContentsDelegate,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture);
- virtual void ActivateContents(TabContents* contents);
- virtual void DeactivateContents(TabContents* contents);
- virtual void LoadingStateChanged(TabContents* source);
virtual void CloseContents(TabContents* source);
virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
virtual bool IsPopup(const TabContents* source) const;
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 5963965..00d8654 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -181,28 +181,11 @@ class InstantLoader::TabContentsDelegateImpl
const NotificationDetails& details) OVERRIDE;
// TabContentsDelegate:
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) OVERRIDE;
virtual void NavigationStateChanged(const TabContents* source,
unsigned changed_flags) OVERRIDE;
virtual std::string GetNavigationHeaders(const GURL& url) OVERRIDE;
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) OVERRIDE;
- virtual void ActivateContents(TabContents* contents) OVERRIDE;
- virtual void DeactivateContents(TabContents* contents) OVERRIDE;
- virtual void LoadingStateChanged(TabContents* source) OVERRIDE;
- virtual void CloseContents(TabContents* source) OVERRIDE;
- virtual void MoveContents(TabContents* source,
- const gfx::Rect& pos) OVERRIDE;
virtual bool ShouldFocusConstrainedWindow() OVERRIDE;
virtual void WillShowConstrainedWindow(TabContents* source) OVERRIDE;
- virtual void UpdateTargetURL(TabContents* source,
- const GURL& url) OVERRIDE;
virtual bool ShouldSuppressDialogs() OVERRIDE;
virtual void BeforeUnloadFired(TabContents* tab,
bool proceed,
@@ -417,13 +400,6 @@ void InstantLoader::TabContentsDelegateImpl::Observe(
}
}
-void InstantLoader::TabContentsDelegateImpl::OpenURLFromTab(
- TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {
-}
-
void InstantLoader::TabContentsDelegateImpl::NavigationStateChanged(
const TabContents* source,
unsigned changed_flags) {
@@ -450,35 +426,6 @@ std::string InstantLoader::TabContentsDelegateImpl::GetNavigationHeaders(
return header;
}
-void InstantLoader::TabContentsDelegateImpl::AddNewContents(
- TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {
-}
-
-void InstantLoader::TabContentsDelegateImpl::ActivateContents(
- TabContents* contents) {
-}
-
-void InstantLoader::TabContentsDelegateImpl::DeactivateContents(
- TabContents* contents) {
-}
-
-void InstantLoader::TabContentsDelegateImpl::LoadingStateChanged(
- TabContents* source) {
-}
-
-void InstantLoader::TabContentsDelegateImpl::CloseContents(
- TabContents* source) {
-}
-
-void InstantLoader::TabContentsDelegateImpl::MoveContents(
- TabContents* source,
- const gfx::Rect& pos) {
-}
-
bool InstantLoader::TabContentsDelegateImpl::ShouldFocusConstrainedWindow() {
// Return false so that constrained windows are not initially focused. If
// we did otherwise the preview would prematurely get committed when focus
@@ -496,10 +443,6 @@ void InstantLoader::TabContentsDelegateImpl::WillShowConstrainedWindow(
}
}
-void InstantLoader::TabContentsDelegateImpl::UpdateTargetURL(
- TabContents* source, const GURL& url) {
-}
-
bool InstantLoader::TabContentsDelegateImpl::ShouldSuppressDialogs() {
// Any message shown during instant cancels instant, so we suppress them.
return true;
diff --git a/chrome/browser/instant/instant_unload_handler.cc b/chrome/browser/instant/instant_unload_handler.cc
index fd2a1a0..d4e8e78 100644
--- a/chrome/browser/instant/instant_unload_handler.cc
+++ b/chrome/browser/instant/instant_unload_handler.cc
@@ -47,29 +47,10 @@ class InstantUnloadHandler::TabContentsDelegateImpl
return true; // Return true so dialogs are suppressed.
}
- virtual void CloseContents(TabContents* source) {
+ virtual void CloseContents(TabContents* source) OVERRIDE {
handler_->Destroy(this);
}
- // All of the following are overriden to do nothing (they are pure
- // virtual). When we're attemping to close the tab, none of this matters.
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {}
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
- virtual void LoadingStateChanged(TabContents* source) {}
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
-
private:
InstantUnloadHandler* handler_;
scoped_ptr<TabContentsWrapper> tab_contents_;
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index 19df577..d6e3709 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -79,25 +79,6 @@ class PrerenderContents::TabContentsDelegateImpl
}
// TabContentsDelegate implementation:
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url, const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) OVERRIDE {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) OVERRIDE {}
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) OVERRIDE {}
- virtual void ActivateContents(TabContents* contents) OVERRIDE {}
- virtual void DeactivateContents(TabContents* contents) OVERRIDE {}
- virtual void LoadingStateChanged(TabContents* source) OVERRIDE {}
- virtual void CloseContents(TabContents* source) OVERRIDE {}
- virtual void MoveContents(TabContents* source,
- const gfx::Rect& pos) OVERRIDE {}
- virtual void UpdateTargetURL(TabContents* source,
- const GURL& url) OVERRIDE {}
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type) OVERRIDE {
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index e3a93e6..f369f6f 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -86,19 +86,6 @@ class PrerenderManager::OnCloseTabContentsDeleter : public TabContentsDelegate {
return true;
}
- // TabContentsDelegate implementation (pure virtual methods). Since we are
- // waiting for the tab to close, none of this matters.
- virtual void OpenURLFromTab(TabContents*, const GURL&, const GURL&,
- WindowOpenDisposition, PageTransition::Type) OVERRIDE {}
- virtual void NavigationStateChanged(const TabContents*, unsigned) OVERRIDE {}
- virtual void AddNewContents(TabContents*, TabContents*, WindowOpenDisposition,
- const gfx::Rect&, bool) OVERRIDE {}
- virtual void ActivateContents(TabContents*) OVERRIDE {}
- virtual void DeactivateContents(TabContents*) OVERRIDE {}
- virtual void LoadingStateChanged(TabContents*) OVERRIDE {}
- virtual void MoveContents(TabContents*, const gfx::Rect&) OVERRIDE {}
- virtual void UpdateTargetURL(TabContents*, const GURL&) OVERRIDE {}
-
private:
PrerenderManager* manager_;
scoped_ptr<TabContentsWrapper> tab_;
diff --git a/chrome/browser/sidebar/sidebar_container.h b/chrome/browser/sidebar/sidebar_container.h
index f7b527e..f368a73 100644
--- a/chrome/browser/sidebar/sidebar_container.h
+++ b/chrome/browser/sidebar/sidebar_container.h
@@ -94,27 +94,9 @@ class SidebarContainer
private:
// Overridden from TabContentsDelegate.
- virtual void OpenURLFromTab(TabContents* source,
- const GURL& url,
- const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition) {}
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
- virtual void AddNewContents(TabContents* source,
- TabContents* new_contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture) {}
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
- virtual void LoadingStateChanged(TabContents* source) {}
- virtual void CloseContents(TabContents* source) {}
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
virtual bool IsPopup(const TabContents* source) const;
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
- virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator()
- OVERRIDE;
+ virtual content::JavaScriptDialogCreator*
+ GetJavaScriptDialogCreator() OVERRIDE;
// Overridden from ImageLoadingTracker::Observer.
virtual void OnImageLoaded(SkBitmap* image,
diff --git a/chrome/browser/ui/blocked_content/blocked_content_container.h b/chrome/browser/ui/blocked_content/blocked_content_container.h
index d1c2cf6..e1cd388 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_container.h
+++ b/chrome/browser/ui/blocked_content/blocked_content_container.h
@@ -62,10 +62,6 @@ class BlockedContentContainer : public BlockedContentTabHelperDelegate,
WindowOpenDisposition disposition,
PageTransition::Type transition);
- // Ignored; BlockedContentContainer doesn't display a throbber.
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags) {}
-
// Forwards AddNewContents to our |owner_|.
virtual void AddNewContents(TabContents* source,
TabContents* new_contents,
@@ -73,14 +69,6 @@ class BlockedContentContainer : public BlockedContentTabHelperDelegate,
const gfx::Rect& initial_position,
bool user_gesture);
- // Ignore activation/deactivation requests from the TabContents we're
- // blocking.
- virtual void ActivateContents(TabContents* contents) {}
- virtual void DeactivateContents(TabContents* contents) {}
-
- // Ignored; BlockedContentContainer doesn't display a throbber.
- virtual void LoadingStateChanged(TabContents* source) {}
-
// Removes |source| from our internal list of blocked contents.
virtual void CloseContents(TabContents* source);
@@ -90,9 +78,6 @@ class BlockedContentContainer : public BlockedContentTabHelperDelegate,
// Always returns true.
virtual bool IsPopup(const TabContents* source) const;
- // Ignored; BlockedContentContainer doesn't display a URL bar.
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) {}
-
// Always returns true.
virtual bool ShouldSuppressDialogs();
diff --git a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
index d3cabc5..bcf45b1 100644
--- a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
@@ -39,7 +39,6 @@ class ConstrainedHtmlDelegateMac :
virtual void OnDialogClose();
// HtmlDialogTabContentsDelegate ---------------------------------------------
- void MoveContents(TabContents* source, const gfx::Rect& pos) {}
void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
void set_window(ConstrainedWindow* window) {
diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
index 0b9cde6..445575d 100644
--- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
+++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
@@ -46,7 +46,6 @@ class ConstrainedHtmlDelegateGtk : public ConstrainedWindowGtkDelegate,
}
// HtmlDialogTabContentsDelegate ---------------------------------------------
- void MoveContents(TabContents* source, const gfx::Rect& pos) {}
void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
void set_window(ConstrainedWindow* window) {
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.cc b/chrome/browser/ui/gtk/html_dialog_gtk.cc
index 8cfe1e0..cec5ae1 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.cc
@@ -103,11 +103,6 @@ bool HtmlDialogGtk::ShouldShowDialogTitle() const {
////////////////////////////////////////////////////////////////////////////////
// TabContentsDelegate implementation:
-void HtmlDialogGtk::MoveContents(TabContents* source, const gfx::Rect& pos) {
- // The contained web page wishes to resize itself. We let it do this because
- // if it's a dialog we know about, we trust it not to be mean to the user.
-}
-
// A simplified version of BrowserWindowGtk::HandleKeyboardEvent().
// We don't handle global keyboard shortcuts here, but that's fine since
// they're all browser-specific. (This may change in the future.)
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.h b/chrome/browser/ui/gtk/html_dialog_gtk.h
index 9cbfb09..45a2b1e 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.h
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.h
@@ -47,7 +47,6 @@ class HtmlDialogGtk : public HtmlDialogTabContentsDelegate,
virtual bool ShouldShowDialogTitle() const;
// Overridden from TabContentsDelegate:
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
private:
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
index c836bf0..8f017e7 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -145,14 +145,6 @@ void DraggedTabControllerGtk::AddNewContents(TabContents* source,
}
}
-void DraggedTabControllerGtk::ActivateContents(TabContents* contents) {
- // Ignored.
-}
-
-void DraggedTabControllerGtk::DeactivateContents(TabContents* contents) {
- // Ignored.
-}
-
void DraggedTabControllerGtk::LoadingStateChanged(TabContents* source) {
// TODO(jhawkins): It would be nice to respond to this message by changing the
// screen shot in the dragged tab.
@@ -160,27 +152,10 @@ void DraggedTabControllerGtk::LoadingStateChanged(TabContents* source) {
dragged_tab_->Update();
}
-void DraggedTabControllerGtk::CloseContents(TabContents* source) {
- // Theoretically could be called by a window. Should be ignored
- // because window.close() is ignored (usually, even though this
- // method gets called.)
-}
-
-void DraggedTabControllerGtk::MoveContents(TabContents* source,
- const gfx::Rect& pos) {
- // Theoretically could be called by a web page trying to move its
- // own window. Should be ignored since we're moving the window...
-}
-
bool DraggedTabControllerGtk::IsPopup(const TabContents* source) const {
return false;
}
-void DraggedTabControllerGtk::UpdateTargetURL(TabContents* source,
- const GURL& url) {
- // Ignored.
-}
-
content::JavaScriptDialogCreator*
DraggedTabControllerGtk::GetJavaScriptDialogCreator() {
return GetJavaScriptDialogCreatorInstance();
diff --git a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
index 5249a18..41c732d 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/ui/gtk/tabs/dragged_tab_controller_gtk.h
@@ -82,15 +82,10 @@ class DraggedTabControllerGtk : public NotificationObserver,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture);
- virtual void ActivateContents(TabContents* contents);
- virtual void DeactivateContents(TabContents* contents);
virtual void LoadingStateChanged(TabContents* source);
- virtual void CloseContents(TabContents* source);
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
virtual bool IsPopup(const TabContents* source) const;
- virtual void UpdateTargetURL(TabContents* source, const GURL& url);
- virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator()
- OVERRIDE;
+ virtual content::JavaScriptDialogCreator*
+ GetJavaScriptDialogCreator() OVERRIDE;
// Overridden from NotificationObserver:
virtual void Observe(NotificationType type,
diff --git a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
index cc0588b..12e686d 100644
--- a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
+++ b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
@@ -50,7 +50,6 @@ class ConstrainedHtmlDelegateGtk : public views::NativeWidgetGtk,
}
// HtmlDialogTabContentsDelegate interface.
- void MoveContents(TabContents* source, const gfx::Rect& pos) {}
void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {}
void set_window(ConstrainedWindow* window) {
diff --git a/chrome/browser/ui/views/constrained_html_delegate_win.cc b/chrome/browser/ui/views/constrained_html_delegate_win.cc
index 0e6c984..f4477da 100644
--- a/chrome/browser/ui/views/constrained_html_delegate_win.cc
+++ b/chrome/browser/ui/views/constrained_html_delegate_win.cc
@@ -43,7 +43,6 @@ class ConstrainedHtmlDelegateWin : public TabContentsContainer,
}
// HtmlDialogTabContentsDelegate interface.
- void MoveContents(TabContents* source, const gfx::Rect& pos) OVERRIDE {}
void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) OVERRIDE {}
// Overridden from TabContentsContainer.
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 31d6ec9..2af3101 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -449,14 +449,6 @@ void DraggedTabController::AddNewContents(TabContents* source,
}
}
-void DraggedTabController::ActivateContents(TabContents* contents) {
- // Ignored.
-}
-
-void DraggedTabController::DeactivateContents(TabContents* contents) {
- // Ignored.
-}
-
void DraggedTabController::LoadingStateChanged(TabContents* source) {
// It would be nice to respond to this message by changing the
// screen shot in the dragged tab.
@@ -464,23 +456,6 @@ void DraggedTabController::LoadingStateChanged(TabContents* source) {
view_->Update();
}
-void DraggedTabController::CloseContents(TabContents* source) {
- // Theoretically could be called by a window. Should be ignored
- // because window.close() is ignored (usually, even though this
- // method gets called.)
-}
-
-void DraggedTabController::MoveContents(TabContents* source,
- const gfx::Rect& pos) {
- // Theoretically could be called by a web page trying to move its
- // own window. Should be ignored since we're moving the window...
-}
-
-void DraggedTabController::UpdateTargetURL(TabContents* source,
- const GURL& url) {
- // Ignored.
-}
-
bool DraggedTabController::ShouldSuppressDialogs() {
// When a dialog is about to be shown we revert the drag. Otherwise a modal
// dialog might appear and attempt to parent itself to a hidden tabcontents.
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.h b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
index c2d8bda..c59aad7 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.h
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.h
@@ -140,16 +140,10 @@ class DraggedTabController : public TabContentsDelegate,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture) OVERRIDE;
- virtual void ActivateContents(TabContents* contents) OVERRIDE;
- virtual void DeactivateContents(TabContents* contents) OVERRIDE;
virtual void LoadingStateChanged(TabContents* source) OVERRIDE;
- virtual void CloseContents(TabContents* source) OVERRIDE;
- virtual void MoveContents(TabContents* source,
- const gfx::Rect& pos) OVERRIDE;
- virtual void UpdateTargetURL(TabContents* source, const GURL& url) OVERRIDE;
virtual bool ShouldSuppressDialogs() OVERRIDE;
- virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator()
- OVERRIDE;
+ virtual content::JavaScriptDialogCreator*
+ GetJavaScriptDialogCreator() OVERRIDE;
// Overridden from NotificationObserver:
virtual void Observe(NotificationType type,
diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc
index 45fff80..c0b3970 100644
--- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc
+++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc
@@ -49,12 +49,6 @@ void HtmlDialogTabContentsDelegate::OpenURLFromTab(
}
}
-void HtmlDialogTabContentsDelegate::NavigationStateChanged(
- const TabContents* source, unsigned changed_flags) {
- // We shouldn't receive any NavigationStateChanged except the first
- // one, which we ignore because we're a dialog box.
-}
-
void HtmlDialogTabContentsDelegate::AddNewContents(
TabContents* source, TabContents* new_contents,
WindowOpenDisposition disposition, const gfx::Rect& initial_pos,
@@ -77,36 +71,12 @@ void HtmlDialogTabContentsDelegate::AddNewContents(
}
}
-void HtmlDialogTabContentsDelegate::ActivateContents(TabContents* contents) {
- // We don't do anything here because there's only one TabContents in
- // this frame and we don't have a TabStripModel.
-}
-
-void HtmlDialogTabContentsDelegate::DeactivateContents(TabContents* contents) {
- // We don't care about this notification (called when a user gesture triggers
- // a call to window.blur()).
-}
-
-void HtmlDialogTabContentsDelegate::LoadingStateChanged(TabContents* source) {
- // We don't care about this notification.
-}
-
-void HtmlDialogTabContentsDelegate::CloseContents(TabContents* source) {
- // We receive this message but don't handle it because we really do the
- // cleanup somewhere else (namely, HtmlDialogUIDelegate::OnDialogClosed()).
-}
-
bool HtmlDialogTabContentsDelegate::IsPopup(const TabContents* source) const {
// This needs to return true so that we are allowed to be resized by our
// contents.
return true;
}
-void HtmlDialogTabContentsDelegate::UpdateTargetURL(TabContents* source,
- const GURL& url) {
- // Ignored.
-}
-
bool HtmlDialogTabContentsDelegate::ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type) {
diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
index 934997a..445327e 100644
--- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
+++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate.h
@@ -31,27 +31,18 @@ class HtmlDialogTabContentsDelegate : public TabContentsDelegate {
// calls to profile() return NULL.
void Detach();
- // TabContentsDelegate declarations. Subclasses of this still need to
- // override:
- // virtual void MoveContents(TabContents* source, const gfx::Rect& pos);
+ // TabContentsDelegate declarations.
virtual void OpenURLFromTab(TabContents* source,
const GURL& url, const GURL& referrer,
WindowOpenDisposition disposition,
PageTransition::Type transition);
- virtual void NavigationStateChanged(const TabContents* source,
- unsigned changed_flags);
virtual void AddNewContents(TabContents* source,
TabContents* new_contents,
WindowOpenDisposition disposition,
const gfx::Rect& initial_pos,
bool user_gesture);
- virtual void ActivateContents(TabContents* contents);
- virtual void DeactivateContents(TabContents* contents);
- virtual void LoadingStateChanged(TabContents* source);
- virtual void CloseContents(TabContents* source);
virtual bool IsPopup(const TabContents* source) const;
- virtual void UpdateTargetURL(TabContents* source, const GURL& url);
virtual bool ShouldAddNavigationToHistory(
const history::HistoryAddPageArgs& add_page_args,
NavigationType::Type navigation_type);
diff --git a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc
index be126ec..82c5de0 100644
--- a/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc
+++ b/chrome/browser/ui/webui/html_dialog_tab_contents_delegate_unittest.cc
@@ -31,8 +31,6 @@ class TestTabContentsDelegate : public HtmlDialogTabContentsDelegate {
virtual ~TestTabContentsDelegate() {
}
- virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
-
private:
DISALLOW_COPY_AND_ASSIGN(TestTabContentsDelegate);
};