From be04582be05890d1922a16096816e8d027b67128 Mon Sep 17 00:00:00 2001 From: "xiyuan@chromium.org" Date: Mon, 26 Jul 2010 21:56:56 +0000 Subject: Make IsPopup a const function per brett. - Make TabContentsDelegate::IsPopup a const function; - Add a default implementation for IsPopup; - Update all derived classes; - Remove the bad const_cast in tab_contents.cc; BUG=none. TEST=none. Code quality improvement and expect no changes. Review URL: http://codereview.chromium.org/3060013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53696 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc | 2 +- chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/browser/dom_ui') diff --git a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc index a2ba5eb..64d6d1c 100644 --- a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc +++ b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc @@ -85,7 +85,7 @@ void HtmlDialogTabContentsDelegate::CloseContents(TabContents* source) { // cleanup somewhere else (namely, HtmlDialogUIDelegate::OnDialogClosed()). } -bool HtmlDialogTabContentsDelegate::IsPopup(TabContents* source) { +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; diff --git a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h index d827424..f9e3ac6 100644 --- a/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h +++ b/chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h @@ -49,7 +49,7 @@ class HtmlDialogTabContentsDelegate : public TabContentsDelegate { virtual void ActivateContents(TabContents* contents); virtual void LoadingStateChanged(TabContents* source); virtual void CloseContents(TabContents* source); - virtual bool IsPopup(TabContents* source); + virtual bool IsPopup(const TabContents* source) const; virtual void URLStarredChanged(TabContents* source, bool starred); virtual void UpdateTargetURL(TabContents* source, const GURL& url); virtual bool ShouldAddNavigationToHistory() const; -- cgit v1.1