| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" | 5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 9 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" | 9 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| 11 #include "chrome/grit/theme_resources.h" | 11 #include "chrome/grit/theme_resources.h" |
| 12 #include "components/grit/components_scaled_resources.h" | 12 #include "components/grit/components_scaled_resources.h" |
| 13 #include "components/omnibox/browser/omnibox_edit_model.h" | 13 #include "components/omnibox/browser/omnibox_edit_model.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "ui/accessibility/ax_node_data.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 16 #include "ui/base/l10n/l10n_util.h" |
| 16 #include "ui/views/controls/label.h" | 17 #include "ui/views/controls/label.h" |
| 17 | 18 |
| 18 using content::WebContents; | 19 using content::WebContents; |
| 19 | 20 |
| 20 LocationIconView::LocationIconView(const gfx::FontList& font_list, | 21 LocationIconView::LocationIconView(const gfx::FontList& font_list, |
| 21 LocationBarView* location_bar) | 22 LocationBarView* location_bar) |
| 22 : IconLabelBubbleView(font_list, true), | 23 : IconLabelBubbleView(font_list, true), |
| 23 suppress_mouse_released_action_(false), | 24 suppress_mouse_released_action_(false), |
| 24 location_bar_(location_bar), | 25 location_bar_(location_bar), |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return size; | 153 return size; |
| 153 } | 154 } |
| 154 | 155 |
| 155 void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) { | 156 void LocationIconView::OnClickOrTap(const ui::LocatedEvent& event) { |
| 156 // Do not show page info if the user has been editing the location bar or the | 157 // Do not show page info if the user has been editing the location bar or the |
| 157 // location bar is at the NTP. | 158 // location bar is at the NTP. |
| 158 if (location_bar_->GetOmniboxView()->IsEditingOrEmpty()) | 159 if (location_bar_->GetOmniboxView()->IsEditingOrEmpty()) |
| 159 return; | 160 return; |
| 160 ProcessLocatedEvent(event); | 161 ProcessLocatedEvent(event); |
| 161 } | 162 } |
| OLD | NEW |