diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 21:54:49 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-18 21:54:49 +0000 |
commit | 98e94a40052f163889a5d6026a24d750edf28818 (patch) | |
tree | cc100e38a4f40b260080aad9b4713d764bd3e303 /chrome/browser | |
parent | ea4dbc90144ad244f4520ac78d87040f0ee84221 (diff) | |
download | chromium_src-98e94a40052f163889a5d6026a24d750edf28818.zip chromium_src-98e94a40052f163889a5d6026a24d750edf28818.tar.gz chromium_src-98e94a40052f163889a5d6026a24d750edf28818.tar.bz2 |
Implement fading in for the InfoBubble base class.
For bubbles that are not shown as a direct result of
a mouse click, we use fade in. This applies to
the FirstRun bubble and the extension installed
bubble.
For bubbles that have controls (buttons/links) we
fade out if interacting with those controls closes
the bubble. This applies to the first run bubble,
app launcher, extension installed bubble, bookmark
bubble and the content settings bubble.
BUG=None
TEST=Make sure the above-mentioned bubbles fade in
and out during hide and show as described above.
Review URL: http://codereview.chromium.org/2079008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47575 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/login/existing_user_controller.h | 2 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/login_manager_view.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/app_launcher.cc | 4 | ||||
-rw-r--r-- | chrome/browser/views/app_launcher.h | 16 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_bubble_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/bookmark_bubble_view.h | 13 | ||||
-rw-r--r-- | chrome/browser/views/content_blocked_bubble_contents.cc | 3 | ||||
-rw-r--r-- | chrome/browser/views/extensions/extension_installed_bubble.cc | 16 | ||||
-rw-r--r-- | chrome/browser/views/extensions/extension_installed_bubble.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/first_run_bubble.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/first_run_bubble.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/info_bubble.cc | 73 | ||||
-rw-r--r-- | chrome/browser/views/info_bubble.h | 27 | ||||
-rw-r--r-- | chrome/browser/views/location_bar/content_setting_image_view.cc | 1 | ||||
-rw-r--r-- | chrome/browser/views/location_bar/content_setting_image_view.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/location_bar/star_view.h | 2 |
16 files changed, 134 insertions, 50 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h index 8203e02..5a888d2 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.h +++ b/chrome/browser/chromeos/login/existing_user_controller.h @@ -78,7 +78,7 @@ class ExistingUserController : public WmMessageListener::Observer, bubble_ = NULL; } virtual bool CloseOnEscape() { return true; } - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return false; } // Show error message. |error_id| error message ID in resources. // If |details| string is not empty, it specify additional error text diff --git a/chrome/browser/chromeos/login/login_manager_view.h b/chrome/browser/chromeos/login/login_manager_view.h index a8502d6..6e03d3e 100644 --- a/chrome/browser/chromeos/login/login_manager_view.h +++ b/chrome/browser/chromeos/login/login_manager_view.h @@ -98,7 +98,7 @@ class LoginManagerView : public views::View, bubble_ = NULL; } virtual bool CloseOnEscape() { return true; } - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return false; } protected: // views::View overrides: diff --git a/chrome/browser/views/app_launcher.cc b/chrome/browser/views/app_launcher.cc index 5ee038d..1bb36f1 100644 --- a/chrome/browser/views/app_launcher.cc +++ b/chrome/browser/views/app_launcher.cc @@ -274,6 +274,10 @@ AppLauncher* AppLauncher::Show(Browser* browser, bounds, BubbleBorder::TOP_LEFT, bubble_anchor, app_launcher->info_bubble_content_, app_launcher); app_launcher->info_bubble_content_->BubbleShown(); + + // TODO(finnur): Change this so that we only fade out when the user launches + // something from the bubble. This will fade out on dismiss as well. + app_launcher->info_bubble_->set_fade_away_on_close(true); return app_launcher; } diff --git a/chrome/browser/views/app_launcher.h b/chrome/browser/views/app_launcher.h index 954a154..3a03f9e 100644 --- a/chrome/browser/views/app_launcher.h +++ b/chrome/browser/views/app_launcher.h @@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ #define CHROME_BROWSER_VIEWS_APP_LAUNCHER_H_ +#include <string> + #include "app/slide_animation.h" #include "base/scoped_ptr.h" #include "base/task.h" @@ -44,8 +46,8 @@ class AppLauncher : public AnimationDelegate, const std::string& hash_params); // Shows an application launcher bubble pointing to the new tab button. - // Any |hash_params| are appened to the hash of the URL that is opened in the - // launcher. + // Any |hash_params| are appended to the hash of the URL that is opened in + // the launcher. // // The caller DOES NOT OWN the AppLauncher returned. It is deleted // automatically when the AppLauncher is closed. @@ -68,15 +70,7 @@ class AppLauncher : public AnimationDelegate, virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape() { return true; } - virtual bool FadeOutOnClose() { - // If this is changed we also need to update - // AppLauncherHandler::AnimateAppIcon. -#if defined(OS_WIN) - return true; -#else - return false; -#endif - } + virtual bool FadeInOnShow() { return false; } // TabContentsDelegate. virtual void OpenURLFromTab(TabContents* source, diff --git a/chrome/browser/views/bookmark_bubble_view.cc b/chrome/browser/views/bookmark_bubble_view.cc index 101ae5a..d0ba7e9 100644 --- a/chrome/browser/views/bookmark_bubble_view.cc +++ b/chrome/browser/views/bookmark_bubble_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -148,8 +148,10 @@ void BookmarkBubbleView::Show(views::Window* parent, return; bubble_ = new BookmarkBubbleView(delegate, profile, url, newly_bookmarked); - InfoBubble::Show(parent->GetClientView()->GetWidget(), bounds, + InfoBubble* info_bubble = + InfoBubble::Show(parent->GetClientView()->GetWidget(), bounds, BubbleBorder::TOP_LEFT, bubble_, bubble_); + bubble_->set_info_bubble(info_bubble); GURL url_ptr(url); NotificationService::current()->Notify( NotificationType::BOOKMARK_BUBBLE_SHOWN, @@ -344,6 +346,7 @@ void BookmarkBubbleView::LinkActivated(Link* source, int event_flags) { remove_bookmark_ = true; apply_edits_ = false; + info_bubble_->set_fade_away_on_close(true); Close(); } @@ -391,9 +394,11 @@ void BookmarkBubbleView::HandleButtonPressed(views::Button* sender) { if (sender == edit_button_) { UserMetrics::RecordAction(UserMetricsAction("BookmarkBubble_Edit"), profile_); + info_bubble_->set_fade_away_on_close(true); ShowEditor(); } else { DCHECK(sender == close_button_); + info_bubble_->set_fade_away_on_close(true); Close(); } // WARNING: we've most likely been deleted when CloseWindow returns. diff --git a/chrome/browser/views/bookmark_bubble_view.h b/chrome/browser/views/bookmark_bubble_view.h index c8d5557b..1614ae2 100644 --- a/chrome/browser/views/bookmark_bubble_view.h +++ b/chrome/browser/views/bookmark_bubble_view.h @@ -1,10 +1,12 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H_ #define CHROME_BROWSER_VIEWS_BOOKMARK_BUBBLE_VIEW_H_ +#include <vector> + #include "app/combobox_model.h" #include "chrome/browser/views/info_bubble.h" #include "gfx/rect.h" @@ -47,7 +49,9 @@ class BookmarkBubbleView : public views::View, virtual ~BookmarkBubbleView(); - // Overriden to force a layout. + void set_info_bubble(InfoBubble* info_bubble) { info_bubble_ = info_bubble; } + + // Overridden to force a layout. virtual void DidChangeBounds(const gfx::Rect& previous, const gfx::Rect& current); @@ -118,7 +122,7 @@ class BookmarkBubbleView : public views::View, virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape(); - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return false; } // Closes the bubble. void Close(); @@ -135,6 +139,9 @@ class BookmarkBubbleView : public views::View, // The bookmark bubble, if we're showing one. static BookmarkBubbleView* bubble_; + // The InfoBubble showing us. + InfoBubble* info_bubble_; + // Delegate for the bubble, may be null. InfoBubbleDelegate* delegate_; diff --git a/chrome/browser/views/content_blocked_bubble_contents.cc b/chrome/browser/views/content_blocked_bubble_contents.cc index 71d4d7e..1f43ec1 100644 --- a/chrome/browser/views/content_blocked_bubble_contents.cc +++ b/chrome/browser/views/content_blocked_bubble_contents.cc @@ -120,6 +120,7 @@ void ContentSettingBubbleContents::ViewHierarchyChanged(bool is_add, void ContentSettingBubbleContents::ButtonPressed(views::Button* sender, const views::Event& event) { if (sender == close_button_) { + info_bubble_->set_fade_away_on_close(true); info_bubble_->Close(); // CAREFUL: This deletes us. return; } @@ -137,6 +138,7 @@ void ContentSettingBubbleContents::ButtonPressed(views::Button* sender, void ContentSettingBubbleContents::LinkActivated(views::Link* source, int event_flags) { if (source == manage_link_) { + info_bubble_->set_fade_away_on_close(true); content_setting_bubble_model_->OnManageLinkClicked(); // CAREFUL: Showing the settings window activates it, which deactivates the // info bubble, which causes it to close, which deletes us. @@ -144,6 +146,7 @@ void ContentSettingBubbleContents::LinkActivated(views::Link* source, } if (source == clear_link_) { content_setting_bubble_model_->OnClearLinkClicked(); + info_bubble_->set_fade_away_on_close(true); info_bubble_->Close(); // CAREFUL: This deletes us. return; } diff --git a/chrome/browser/views/extensions/extension_installed_bubble.cc b/chrome/browser/views/extensions/extension_installed_bubble.cc index 33f4dcf..1799ee4 100644 --- a/chrome/browser/views/extensions/extension_installed_bubble.cc +++ b/chrome/browser/views/extensions/extension_installed_bubble.cc @@ -70,7 +70,8 @@ class InstalledBubbleContent : public views::View, InstalledBubbleContent(Extension* extension, ExtensionInstalledBubble::BubbleType type, SkBitmap* icon) - : type_(type), + : info_bubble_(NULL), + type_(type), info_(NULL), create_shortcut_(false) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); @@ -134,10 +135,13 @@ class InstalledBubbleContent : public views::View, // Whether to create a shortcut once the bubble closes. bool create_shortcut() { return create_shortcut_;} + void set_info_bubble(InfoBubble* info_bubble) { info_bubble_ = info_bubble; } + virtual void ButtonPressed( views::Button* sender, const views::Event& event) { if (sender == close_button_) { + info_bubble_->set_fade_away_on_close(true); GetWidget()->Close(); } else if (sender == create_shortcut_view_) { create_shortcut_ = create_shortcut_view_->checked(); @@ -219,6 +223,9 @@ class InstalledBubbleContent : public views::View, close_button_->SetBounds(x - 1, y - 1, sz.width(), sz.height()); } + // The InfoBubble showing us. + InfoBubble* info_bubble_; + ExtensionInstalledBubble::BubbleType type_; views::ImageView* icon_; views::Label* heading_; @@ -335,8 +342,11 @@ void ExtensionInstalledBubble::ShowInternal() { bubble_content_ = new InstalledBubbleContent(extension_, type_, &icon_); - InfoBubble::Show(browser_view->GetWidget(), bounds, BubbleBorder::TOP_RIGHT, - bubble_content_, this); + InfoBubble* info_bubble = + InfoBubble::Show(browser_view->GetWidget(), bounds, + BubbleBorder::TOP_RIGHT, + bubble_content_, this); + bubble_content_->set_info_bubble(info_bubble); } // InfoBubbleDelegate diff --git a/chrome/browser/views/extensions/extension_installed_bubble.h b/chrome/browser/views/extensions/extension_installed_bubble.h index 78ca9d1..ad93996 100644 --- a/chrome/browser/views/extensions/extension_installed_bubble.h +++ b/chrome/browser/views/extensions/extension_installed_bubble.h @@ -66,7 +66,7 @@ class ExtensionInstalledBubble virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape() { return true; } - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return true; } Extension* extension_; Browser* browser_; diff --git a/chrome/browser/views/first_run_bubble.cc b/chrome/browser/views/first_run_bubble.cc index 7728888..141a12f 100644 --- a/chrome/browser/views/first_run_bubble.cc +++ b/chrome/browser/views/first_run_bubble.cc @@ -85,7 +85,7 @@ class FirstRunBubbleView : public FirstRunBubbleViewBase { virtual ~FirstRunBubbleView() {} // FirstRunBubbleViewBase: - void BubbleShown(); + virtual void BubbleShown(); // Overridden from View: virtual void ButtonPressed(views::Button* sender, const views::Event& event); @@ -160,6 +160,7 @@ void FirstRunBubbleView::ButtonPressed(views::Button* sender, const views::Event& event) { UserMetrics::RecordAction(UserMetricsAction("FirstRunBubbleView_Clicked"), profile_); + bubble_window_->set_fade_away_on_close(true); bubble_window_->Close(); if (change_button_ == sender) { UserMetrics::RecordAction( @@ -245,7 +246,7 @@ class FirstRunOEMBubbleView : public FirstRunBubbleViewBase { virtual ~FirstRunOEMBubbleView() { } // FirstRunBubbleViewBase: - void BubbleShown(); + virtual void BubbleShown(); // Overridden from View: virtual void ButtonPressed(views::Button* sender, const views::Event& event); @@ -316,6 +317,7 @@ void FirstRunOEMBubbleView::ButtonPressed(views::Button* sender, const views::Event& event) { UserMetrics::RecordAction(UserMetricsAction("FirstRunOEMBubbleView_Clicked"), profile_); + bubble_window_->set_fade_away_on_close(true); bubble_window_->Close(); } @@ -386,10 +388,10 @@ class FirstRunMinimalBubbleView : public FirstRunBubbleViewBase { explicit FirstRunMinimalBubbleView(FirstRunBubble* bubble_window); private: - virtual ~FirstRunMinimalBubbleView() { } + virtual ~FirstRunMinimalBubbleView() { } // FirstRunBubbleViewBase: - void BubbleShown(); + virtual void BubbleShown(); // Overridden from View: virtual void ButtonPressed(views::Button* sender, diff --git a/chrome/browser/views/first_run_bubble.h b/chrome/browser/views/first_run_bubble.h index 65037c4..adee35a 100644 --- a/chrome/browser/views/first_run_bubble.h +++ b/chrome/browser/views/first_run_bubble.h @@ -39,7 +39,7 @@ class FirstRunBubble : public InfoBubble, virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape() { return true; } - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return true; } // Whether we have already been activated. bool has_been_activated_; diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc index 495ee2b..230fcb6 100644 --- a/chrome/browser/views/info_bubble.cc +++ b/chrome/browser/views/info_bubble.cc @@ -249,24 +249,35 @@ InfoBubble* InfoBubble::Show(views::Widget* parent, } void InfoBubble::Close() { - if (!delegate_ || !delegate_->FadeOutOnClose()) - Close(false); - else + if (fade_away_on_close_) FadeOut(); + else + Close(false); } void InfoBubble::AnimationEnded(const Animation* animation) { - Close(false); + if (static_cast<int>(animation_->GetCurrentValue()) == 0) { + // When fading out we just need to close the bubble at the end + Close(false); + } else { +#if defined(OS_WIN) + // When fading in we need to remove the layered window style flag, since + // that style prevents some bubble content from working properly. + SetWindowLong(GWL_EXSTYLE, GetWindowLong(GWL_EXSTYLE) & ~WS_EX_LAYERED); +#endif + } } void InfoBubble::AnimationProgressed(const Animation* animation) { #if defined(OS_WIN) + // Set the opacity for the main contents window. unsigned char opacity = static_cast<unsigned char>( animation_->GetCurrentValue() * 255); SetLayeredWindowAttributes(GetNativeView(), 0, static_cast<byte>(opacity), LWA_ALPHA); + contents_->SchedulePaint(); - // Also fade out the bubble border window. + // Also fade in/out the bubble border window. border_->SetOpacity(opacity); border_->border_contents()->SchedulePaint(); #else @@ -283,7 +294,8 @@ InfoBubble::InfoBubble() border_(NULL), #endif delegate_(NULL), - closed_(false) { + closed_(false), + fade_away_on_close_(false) { } void InfoBubble::Init(views::Widget* parent, @@ -302,10 +314,22 @@ void InfoBubble::Init(views::Widget* parent, if (parent_window) parent_window->DisableInactiveRendering(); set_window_style(WS_POPUP | WS_CLIPCHILDREN); - set_window_ex_style(WS_EX_TOOLWINDOW); + int extended_style = WS_EX_TOOLWINDOW; + // During FadeIn we need to turn on the layered window style to deal with + // transparency. This flag needs to be reset after fading in is complete. + bool fade_in = delegate_ && delegate_->FadeInOnShow(); + if (fade_in) + extended_style |= WS_EX_LAYERED; + set_window_ex_style(extended_style); DCHECK(!border_); border_ = new BorderWidget(); + + if (fade_in) { + border_->SetOpacity(0); + SetOpacity(0); + } + border_->Init(CreateBorderContents(), parent->GetNativeView()); // We make the BorderWidget the owner of the InfoBubble HWND, so that the @@ -383,6 +407,8 @@ void InfoBubble::Init(views::Widget* parent, #if defined(OS_WIN) border_->ShowWindow(SW_SHOW); ShowWindow(SW_SHOW); + if (fade_in) + FadeIn(); #elif defined(OS_LINUX) views::WidgetGtk::Show(); #endif @@ -416,11 +442,10 @@ void InfoBubble::SizeToContents() { #if defined(OS_WIN) void InfoBubble::OnActivate(UINT action, BOOL minimized, HWND window) { // The popup should close when it is deactivated. - if (action == WA_INACTIVE && !closed_) { - if (!delegate_ || !delegate_->FadeOutOnClose()) - Close(); - else - FadeOut(); + if (action == WA_INACTIVE) { + if (closed_ || (animation_.get() && animation_->IsClosing())) + return; + Close(); } else if (action == WA_ACTIVE) { DCHECK(GetRootView()->GetChildViewCount() > 0); GetRootView()->GetChildViewAt(0)->RequestFocus(); @@ -448,20 +473,34 @@ void InfoBubble::Close(bool closed_by_escape) { #endif } +void InfoBubble::FadeIn() { + Fade(true); // |fade_in|. +} + void InfoBubble::FadeOut() { #if defined(OS_WIN) - // The contents window cannot be created layered, since its content doesn't - // always work inside a layered window, but when animating it is ok to set - // that style on the window for the purpose of fading it out. + // The contents window cannot have the layered flag on by default, since its + // content doesn't always work inside a layered window, but when animating it + // is ok to set that style on the window for the purpose of fading it out. SetWindowLong(GWL_EXSTYLE, GetWindowLong(GWL_EXSTYLE) | WS_EX_LAYERED); + // This must be the very next call, otherwise we can get flicker on close. + SetLayeredWindowAttributes(GetNativeView(), 0, + static_cast<byte>(255), LWA_ALPHA); #endif + Fade(false); // |fade_in|. +} + +void InfoBubble::Fade(bool fade_in) { animation_.reset(new SlideAnimation(this)); animation_->SetSlideDuration(kHideFadeDurationMS); animation_->SetTweenType(Tween::LINEAR); - animation_->Reset(1.0); - animation_->Hide(); + animation_->Reset(fade_in ? 0.0 : 1.0); + if (fade_in) + animation_->Show(); + else + animation_->Hide(); } bool InfoBubble::AcceleratorPressed(const views::Accelerator& accelerator) { diff --git a/chrome/browser/views/info_bubble.h b/chrome/browser/views/info_bubble.h index 40994af..a26c21b 100644 --- a/chrome/browser/views/info_bubble.h +++ b/chrome/browser/views/info_bubble.h @@ -156,8 +156,13 @@ class InfoBubbleDelegate { // Whether the InfoBubble should be closed when the Esc key is pressed. virtual bool CloseOnEscape() = 0; - // Whether the InfoBubble should fade away when closing. - virtual bool FadeOutOnClose() = 0; + // Whether the InfoBubble should fade in when opening. When trying to + // determine whether to use FadeIn, consider whether the bubble is shown as a + // direct result of a user action or not. For example, if the bubble is being + // shown as a direct result of a mouse-click, we should not use FadeIn. + // However, if the bubble appears as a notification that something happened + // in the background, we use FadeIn. + virtual bool FadeInOnShow() = 0; }; // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the @@ -192,6 +197,14 @@ class InfoBubble // contents preferred size. void SizeToContents(); + // Whether the InfoBubble should fade away when it closes. Generally speaking, + // we use FadeOut when the user selects something within the bubble that + // causes the bubble to dismiss. We don't use it when the bubble gets + // deactivated as a result of clicking outside the bubble. + void set_fade_away_on_close(bool fade_away_on_close) { + fade_away_on_close_ = fade_away_on_close; + } + // Overridden from WidgetWin: virtual void Close(); @@ -237,9 +250,14 @@ class InfoBubble // the close is the result of pressing escape. void Close(bool closed_by_escape); - // Fade out on close. + // Animates to a visible state. + void FadeIn(); + // Animates to a hidden state. void FadeOut(); + // Animates to a visible/hidden state (visible if |fade_in| is true). + void Fade(bool fade_in); + // Overridden from AcceleratorTarget: virtual bool AcceleratorPressed(const views::Accelerator& accelerator); @@ -252,6 +270,9 @@ class InfoBubble // Have we been closed? bool closed_; + // Whether to fade away when the bubble closes. + bool fade_away_on_close_; + gfx::Rect position_relative_to_; BubbleBorder::ArrowLocation arrow_location_; diff --git a/chrome/browser/views/location_bar/content_setting_image_view.cc b/chrome/browser/views/location_bar/content_setting_image_view.cc index 747af48..fa087fa 100644 --- a/chrome/browser/views/location_bar/content_setting_image_view.cc +++ b/chrome/browser/views/location_bar/content_setting_image_view.cc @@ -70,7 +70,6 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event, tab_contents, profile_, content_setting_image_model_->get_content_settings_type()), profile_, tab_contents); - DCHECK(!info_bubble_); info_bubble_ = InfoBubble::Show(GetWidget(), screen_bounds, BubbleBorder::TOP_LEFT, bubble_contents, this); diff --git a/chrome/browser/views/location_bar/content_setting_image_view.h b/chrome/browser/views/location_bar/content_setting_image_view.h index 6d4c6ac..c641daa 100644 --- a/chrome/browser/views/location_bar/content_setting_image_view.h +++ b/chrome/browser/views/location_bar/content_setting_image_view.h @@ -41,7 +41,7 @@ class ContentSettingImageView : public views::ImageView, virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape(); - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return false; } scoped_ptr<ContentSettingImageModel> content_setting_image_model_; diff --git a/chrome/browser/views/location_bar/star_view.h b/chrome/browser/views/location_bar/star_view.h index 19533b3..ce8aadc3 100644 --- a/chrome/browser/views/location_bar/star_view.h +++ b/chrome/browser/views/location_bar/star_view.h @@ -33,7 +33,7 @@ class StarView : public views::ImageView, public InfoBubbleDelegate { virtual void InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape); virtual bool CloseOnEscape(); - virtual bool FadeOutOnClose() { return false; } + virtual bool FadeInOnShow() { return false; } // The CommandUpdater for the Browser object that owns the location bar. CommandUpdater* command_updater_; |