| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gfx/canvas_paint.h" | 9 #include "app/gfx/canvas_paint.h" |
| 10 #include "app/gfx/gtk_util.h" | 10 #include "app/gfx/gtk_util.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 location_entry_->RevertAll(); | 458 location_entry_->RevertAll(); |
| 459 } | 459 } |
| 460 | 460 |
| 461 int LocationBarViewGtk::PageActionVisibleCount() { | 461 int LocationBarViewGtk::PageActionVisibleCount() { |
| 462 int count = 0; | 462 int count = 0; |
| 463 gtk_container_foreach(GTK_CONTAINER(page_action_hbox_), CountVisibleWidgets, | 463 gtk_container_foreach(GTK_CONTAINER(page_action_hbox_), CountVisibleWidgets, |
| 464 &count); | 464 &count); |
| 465 return count; | 465 return count; |
| 466 } | 466 } |
| 467 | 467 |
| 468 ExtensionAction* LocationBarViewGtk::GetPageAction(size_t index) { |
| 469 NOTIMPLEMENTED(); |
| 470 return NULL; |
| 471 } |
| 472 |
| 473 ExtensionAction* LocationBarViewGtk::GetVisiblePageAction(size_t index) { |
| 474 NOTIMPLEMENTED(); |
| 475 return NULL; |
| 476 } |
| 477 |
| 478 void LocationBarViewGtk::TestPageActionPressed(size_t index) { |
| 479 NOTIMPLEMENTED(); |
| 480 } |
| 481 |
| 468 void LocationBarViewGtk::Observe(NotificationType type, | 482 void LocationBarViewGtk::Observe(NotificationType type, |
| 469 const NotificationSource& source, | 483 const NotificationSource& source, |
| 470 const NotificationDetails& details) { | 484 const NotificationDetails& details) { |
| 471 DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED); | 485 DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED); |
| 472 | 486 |
| 473 if (theme_provider_->UseGtkTheme()) { | 487 if (theme_provider_->UseGtkTheme()) { |
| 474 gtk_widget_modify_bg(tab_to_search_box_, GTK_STATE_NORMAL, NULL); | 488 gtk_widget_modify_bg(tab_to_search_box_, GTK_STATE_NORMAL, NULL); |
| 475 | 489 |
| 476 GdkColor border_color = theme_provider_->GetGdkColor( | 490 GdkColor border_color = theme_provider_->GetGdkColor( |
| 477 BrowserThemeProvider::COLOR_FRAME); | 491 BrowserThemeProvider::COLOR_FRAME); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 | 851 |
| 838 std::string badge_text = view->page_action_->GetBadgeText(tab_id); | 852 std::string badge_text = view->page_action_->GetBadgeText(tab_id); |
| 839 if (badge_text.empty()) | 853 if (badge_text.empty()) |
| 840 return FALSE; | 854 return FALSE; |
| 841 | 855 |
| 842 gfx::CanvasPaint canvas(event, false); | 856 gfx::CanvasPaint canvas(event, false); |
| 843 gfx::Rect bounding_rect(widget->allocation); | 857 gfx::Rect bounding_rect(widget->allocation); |
| 844 view->page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 858 view->page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
| 845 return FALSE; | 859 return FALSE; |
| 846 } | 860 } |
| OLD | NEW |