| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/location_bar_view.h" | 5 #include "chrome/browser/views/location_bar_view.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 void LocationBarView::StarView::SetToggled(bool on) { | 1432 void LocationBarView::StarView::SetToggled(bool on) { |
| 1433 SetTooltipText(l10n_util::GetString( | 1433 SetTooltipText(l10n_util::GetString( |
| 1434 on ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR)); | 1434 on ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR)); |
| 1435 // Since StarView is an ImageView, the SetTooltipText changes the accessible | 1435 // Since StarView is an ImageView, the SetTooltipText changes the accessible |
| 1436 // name. To keep the accessible name unchanged, we need to set the accessible | 1436 // name. To keep the accessible name unchanged, we need to set the accessible |
| 1437 // name right after we modify the tooltip text for this view. | 1437 // name right after we modify the tooltip text for this view. |
| 1438 SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_STAR)); | 1438 SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_STAR)); |
| 1439 SetImage(ResourceBundle::GetSharedInstance().GetBitmapNamed( | 1439 SetImage(ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 1440 on ? IDR_STARRED : IDR_STAR)); | 1440 on ? IDR_OMNIBOX_STAR_LIT : IDR_OMNIBOX_STAR)); |
| 1441 } | 1441 } |
| 1442 | 1442 |
| 1443 bool LocationBarView::StarView::GetAccessibleRole( | 1443 bool LocationBarView::StarView::GetAccessibleRole( |
| 1444 AccessibilityTypes::Role* role) { | 1444 AccessibilityTypes::Role* role) { |
| 1445 *role = AccessibilityTypes::ROLE_PUSHBUTTON; | 1445 *role = AccessibilityTypes::ROLE_PUSHBUTTON; |
| 1446 return true; | 1446 return true; |
| 1447 } | 1447 } |
| 1448 | 1448 |
| 1449 bool LocationBarView::StarView::OnMousePressed(const views::MouseEvent& event) { | 1449 bool LocationBarView::StarView::OnMousePressed(const views::MouseEvent& event) { |
| 1450 // We want to show the bubble on mouse release; that is the standard behavior | 1450 // We want to show the bubble on mouse release; that is the standard behavior |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, | 1555 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, |
| 1556 false); // inspect_with_devtools | 1556 false); // inspect_with_devtools |
| 1557 return; | 1557 return; |
| 1558 } | 1558 } |
| 1559 ++current; | 1559 ++current; |
| 1560 } | 1560 } |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 NOTREACHED(); | 1563 NOTREACHED(); |
| 1564 } | 1564 } |
| OLD | NEW |