Index: chrome/browser/ui/views/location_bar/content_setting_image_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc |
index e56e40e6826eedff12a0f8e8f991b6c98e426586..0d798fe29d27f23fb6538799d10488a5e9fbba81 100644 |
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc |
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc |
@@ -6,7 +6,7 @@ |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/content_settings/tab_specific_content_settings.h" |
-#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/browser_show_actions.h" |
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
#include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
@@ -51,12 +51,14 @@ const double kAnimatingFraction = kOpenTimeMs * 1.0 / kMoveTimeMs; |
ContentSettingImageView::ContentSettingImageView( |
ContentSettingsType content_type, |
- LocationBarView* parent) |
+ LocationBarView* parent, |
+ BrowserShowContentRelated* delegate) |
: content_setting_image_model_( |
ContentSettingImageModel::CreateContentSettingImageModel( |
content_type)), |
bubble_widget_(NULL), |
parent_(parent), |
+ delegate_(delegate), |
pause_animation_(false), |
text_size_(0), |
visible_text_size_(0) { |
@@ -179,10 +181,10 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) { |
pause_animation_ = true; |
} |
- Profile* profile = parent_->browser()->profile(); |
+ Profile* profile = parent_->profile(); |
ContentSettingBubbleContents* bubble = new ContentSettingBubbleContents( |
ContentSettingBubbleModel::CreateContentSettingBubbleModel( |
- parent_->browser(), |
+ delegate_, |
tab_contents, |
profile, |
content_setting_image_model_->get_content_settings_type()), |
@@ -190,7 +192,7 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) { |
tab_contents->web_contents(), |
this, |
views::BubbleBorder::TOP_RIGHT); |
- bubble_widget_ = browser::CreateViewsBubble(bubble); |
+ bubble_widget_ = parent_->CreateViewsBubble(bubble); |
bubble_widget_->AddObserver(this); |
bubble->Show(); |
} |