Commit caf5161e authored by sky@chromium.org's avatar sky@chromium.org

Fixes use after free in BrowserView, and cleans up a couple of style

nits I noticed along the way.

BUG=104387
TEST=none
R=ben@chromium.org


Review URL: http://codereview.chromium.org/8586033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110579 0039d316-1c4b-4281-b951-d872f2087c98
parent 03c41c9e
......@@ -322,8 +322,7 @@ BrowserView::BrowserView(Browser* browser)
hung_window_detector_(&hung_plugin_action_),
ticker_(0),
#endif
force_location_bar_focus_(false)
{
force_location_bar_focus_(false) {
browser_->tabstrip_model()->AddObserver(this);
registrar_.Add(
......@@ -333,6 +332,12 @@ BrowserView::BrowserView(Browser* browser)
}
BrowserView::~BrowserView() {
#if defined(USE_AURA)
// Destroy LauncherIconUpdater early on as it listens to the TabstripModel,
// which is destroyed by the browser.
icon_updater_.reset();
#endif
browser_->tabstrip_model()->RemoveObserver(this);
#if defined(OS_WIN) && !defined(USE_AURA)
......
......@@ -64,6 +64,8 @@ class FullscreenExitBubbleViews::FullscreenExitView
views::NativeTextButton* accept_button_;
views::NativeTextButton* deny_button_;
const string16 browser_fullscreen_exit_accelerator_;
DISALLOW_COPY_AND_ASSIGN(FullscreenExitView);
};
FullscreenExitBubbleViews::FullscreenExitView::FullscreenExitView(
......
......@@ -53,6 +53,10 @@ class FullscreenExitBubbleViews : public views::LinkListener,
// views::LinkListener:
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
// ui::AnimationDelegate:
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
// The root view containing us.
views::View* root_view_;
......@@ -61,10 +65,6 @@ class FullscreenExitBubbleViews : public views::LinkListener,
// Animation controlling sliding into/out of the top of the screen.
scoped_ptr<ui::SlideAnimation> size_animation_;
// ui::AnimationDelegate:
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
// The contents of the popup.
FullscreenExitView* view_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment