summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/location_bar
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 19:56:14 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-22 19:56:14 +0000
commitf72298c8e0ce1427e8ed682ca5dad0573d6c2763 (patch)
tree842b5af9151d68cb51acf5c113d09e43fca703a8 /chrome/browser/ui/views/location_bar
parent6d81b488e8cc5e10eaeca0a4ee4819dc3f469a24 (diff)
downloadchromium_src-f72298c8e0ce1427e8ed682ca5dad0573d6c2763.zip
chromium_src-f72298c8e0ce1427e8ed682ca5dad0573d6c2763.tar.gz
chromium_src-f72298c8e0ce1427e8ed682ca5dad0573d6c2763.tar.bz2
Add an icon to the omnibox when a page is prerendered.
This will only show up for users who have prerendering enabled (mainly via about:flags) This CL does not include the logic for displaying whether prerender failed on the referring page. BUG=73065 TEST=Start Chrome with prerendering enabled, go to a page with a <link rel=prefetch> element, navigate to the referred page, and see icon appear. Review URL: http://codereview.chromium.org/6529031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/location_bar')
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.cc9
1 files changed, 7 insertions, 2 deletions
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 66ddcda..6237c4a 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
@@ -136,6 +136,12 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event,
if (!tab_contents)
return;
+ // Prerender does not have a bubble.
+ ContentSettingsType content_settings_type =
+ content_setting_image_model_->get_content_settings_type();
+ if (content_settings_type == CONTENT_SETTINGS_TYPE_PRERENDER)
+ return;
+
gfx::Rect screen_bounds(GetImageBounds());
gfx::Point origin(screen_bounds.origin());
views::View::ConvertPointToScreen(this, &origin);
@@ -143,8 +149,7 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event,
ContentSettingBubbleContents* bubble_contents =
new ContentSettingBubbleContents(
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
- tab_contents, profile_,
- content_setting_image_model_->get_content_settings_type()),
+ tab_contents, profile_, content_settings_type),
profile_, tab_contents);
info_bubble_ = InfoBubble::Show(GetWidget(), screen_bounds,
BubbleBorder::TOP_RIGHT, bubble_contents, this);