| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 if (!gtk_util::WidgetBounds(sender).Contains( | 1049 if (!gtk_util::WidgetBounds(sender).Contains( |
| 1050 gfx::Point(event->x, event->y))) { | 1050 gfx::Point(event->x, event->y))) { |
| 1051 return FALSE; | 1051 return FALSE; |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 GURL url; | 1054 GURL url; |
| 1055 if (!gtk_util::URLFromPrimarySelection(browser_->profile(), &url)) | 1055 if (!gtk_util::URLFromPrimarySelection(browser_->profile(), &url)) |
| 1056 return FALSE; | 1056 return FALSE; |
| 1057 | 1057 |
| 1058 tab->OpenURL(OpenURLParams( | 1058 tab->OpenURL(OpenURLParams( |
| 1059 url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, false)); | 1059 url, content::Referrer(), CURRENT_TAB, content::PAGE_TRANSITION_TYPED, |
| 1060 false)); |
| 1060 return TRUE; | 1061 return TRUE; |
| 1061 } | 1062 } |
| 1062 | 1063 |
| 1063 return FALSE; | 1064 return FALSE; |
| 1064 } | 1065 } |
| 1065 | 1066 |
| 1066 void LocationBarViewGtk::OnIconDragData(GtkWidget* sender, | 1067 void LocationBarViewGtk::OnIconDragData(GtkWidget* sender, |
| 1067 GdkDragContext* context, | 1068 GdkDragContext* context, |
| 1068 GtkSelectionData* data, | 1069 GtkSelectionData* data, |
| 1069 guint info, guint time) { | 1070 guint info, guint time) { |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 | 1632 |
| 1632 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1633 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1633 if (badge_text.empty()) | 1634 if (badge_text.empty()) |
| 1634 return FALSE; | 1635 return FALSE; |
| 1635 | 1636 |
| 1636 gfx::CanvasSkiaPaint canvas(event, false); | 1637 gfx::CanvasSkiaPaint canvas(event, false); |
| 1637 gfx::Rect bounding_rect(widget->allocation); | 1638 gfx::Rect bounding_rect(widget->allocation); |
| 1638 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1639 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); |
| 1639 return FALSE; | 1640 return FALSE; |
| 1640 } | 1641 } |
| OLD | NEW |