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 1543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1554 return; | 1554 return; |
1555 } | 1555 } |
1556 | 1556 |
1557 ExecuteAction(button, false); // inspect_with_devtools | 1557 ExecuteAction(button, false); // inspect_with_devtools |
1558 } | 1558 } |
1559 | 1559 |
1560 void LocationBarView::PageActionImageView::ShowInfoBubble() { | 1560 void LocationBarView::PageActionImageView::ShowInfoBubble() { |
1561 ShowInfoBubbleImpl(ASCIIToWide(tooltip_), GetColor(false, TEXT)); | 1561 ShowInfoBubbleImpl(ASCIIToWide(tooltip_), GetColor(false, TEXT)); |
1562 } | 1562 } |
1563 | 1563 |
1564 void LocationBarView::PageActionImageView::OnImageLoaded(SkBitmap* image, | 1564 void LocationBarView::PageActionImageView::OnImageLoaded( |
1565 size_t index) { | 1565 ImageLoadingTracker* source, SkBitmap* image, size_t index) { |
1566 // We loaded icons()->size() icons, plus one extra if the page action had | 1566 // We loaded icons()->size() icons, plus one extra if the page action had |
1567 // a default icon. | 1567 // a default icon. |
1568 size_t total_icons = page_action_->icon_paths()->size(); | 1568 size_t total_icons = page_action_->icon_paths()->size(); |
1569 if (!page_action_->default_icon_path().empty()) | 1569 if (!page_action_->default_icon_path().empty()) |
1570 total_icons++; | 1570 total_icons++; |
1571 DCHECK(index < total_icons); | 1571 DCHECK(index < total_icons); |
1572 | 1572 |
1573 // Map the index of the loaded image back to its name. If we ever get an | 1573 // Map the index of the loaded image back to its name. If we ever get an |
1574 // index greater than the number of icons, it must be the default icon. | 1574 // index greater than the number of icons, it must be the default icon. |
1575 if (image) { | 1575 if (image) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, | 1739 page_action_views_[i]->image_view()->ExecuteAction(kLeftMouseButton, |
1740 false); // inspect_with_devtools | 1740 false); // inspect_with_devtools |
1741 return; | 1741 return; |
1742 } | 1742 } |
1743 ++current; | 1743 ++current; |
1744 } | 1744 } |
1745 } | 1745 } |
1746 | 1746 |
1747 NOTREACHED(); | 1747 NOTREACHED(); |
1748 } | 1748 } |
OLD | NEW |