| 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/gtk_dnd_util.h" | 9 #include "app/gtk_dnd_util.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 } | 654 } |
| 655 | 655 |
| 656 void LocationBarViewGtk::SaveStateToContents(TabContents* contents) { | 656 void LocationBarViewGtk::SaveStateToContents(TabContents* contents) { |
| 657 location_entry_->SaveStateToTab(contents); | 657 location_entry_->SaveStateToTab(contents); |
| 658 } | 658 } |
| 659 | 659 |
| 660 void LocationBarViewGtk::Revert() { | 660 void LocationBarViewGtk::Revert() { |
| 661 location_entry_->RevertAll(); | 661 location_entry_->RevertAll(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 const AutocompleteEditView* LocationBarViewGtk::location_entry() const { |
| 665 return location_entry_.get(); |
| 666 } |
| 667 |
| 668 AutocompleteEditView* LocationBarViewGtk::location_entry() { |
| 669 return location_entry_.get(); |
| 670 } |
| 671 |
| 672 LocationBarTesting* LocationBarViewGtk::GetLocationBarForTesting() { |
| 673 return this; |
| 674 } |
| 675 |
| 664 int LocationBarViewGtk::PageActionVisibleCount() { | 676 int LocationBarViewGtk::PageActionVisibleCount() { |
| 665 int count = 0; | 677 int count = 0; |
| 666 gtk_container_foreach(GTK_CONTAINER(page_action_hbox_.get()), | 678 gtk_container_foreach(GTK_CONTAINER(page_action_hbox_.get()), |
| 667 CountVisibleWidgets, &count); | 679 CountVisibleWidgets, &count); |
| 668 return count; | 680 return count; |
| 669 } | 681 } |
| 670 | 682 |
| 671 ExtensionAction* LocationBarViewGtk::GetPageAction(size_t index) { | 683 ExtensionAction* LocationBarViewGtk::GetPageAction(size_t index) { |
| 672 if (index >= page_action_views_.size()) { | 684 if (index >= page_action_views_.size()) { |
| 673 NOTREACHED(); | 685 NOTREACHED(); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 | 1442 |
| 1431 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1443 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1432 if (badge_text.empty()) | 1444 if (badge_text.empty()) |
| 1433 return FALSE; | 1445 return FALSE; |
| 1434 | 1446 |
| 1435 gfx::CanvasSkiaPaint canvas(event, false); | 1447 gfx::CanvasSkiaPaint canvas(event, false); |
| 1436 gfx::Rect bounding_rect(widget->allocation); | 1448 gfx::Rect bounding_rect(widget->allocation); |
| 1437 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1449 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
| 1438 return FALSE; | 1450 return FALSE; |
| 1439 } | 1451 } |
| OLD | NEW |