diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 21:56:56 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-26 21:56:56 +0000 |
commit | be04582be05890d1922a16096816e8d027b67128 (patch) | |
tree | 91d208b93a14e9c3ad66e9dd472db0be4af06e80 /chrome/browser/dom_ui | |
parent | febc4ac3705e78f2d5f7b766352eb861f1a1efe1 (diff) | |
download | chromium_src-be04582be05890d1922a16096816e8d027b67128.zip chromium_src-be04582be05890d1922a16096816e8d027b67128.tar.gz chromium_src-be04582be05890d1922a16096816e8d027b67128.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_tab_contents_delegate.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h | 2 |
2 files changed, 2 insertions, 2 deletions
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; |