| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bookmarks/bookmark_bar_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 const BookmarkNode* node = GetNodeForToolButton(sender); | 1179 const BookmarkNode* node = GetNodeForToolButton(sender); |
| 1180 DCHECK(node); | 1180 DCHECK(node); |
| 1181 DCHECK(node->is_url()); | 1181 DCHECK(node->is_url()); |
| 1182 DCHECK(page_navigator_); | 1182 DCHECK(page_navigator_); |
| 1183 | 1183 |
| 1184 RecordAppLaunch(browser_->profile(), node->url()); | 1184 RecordAppLaunch(browser_->profile(), node->url()); |
| 1185 chrome::OpenAll(window_->GetNativeWindow(), page_navigator_, node, | 1185 chrome::OpenAll(window_->GetNativeWindow(), page_navigator_, node, |
| 1186 event_utils::DispositionForCurrentButtonPressEvent(), | 1186 event_utils::DispositionForCurrentButtonPressEvent(), |
| 1187 browser_->profile()); | 1187 browser_->profile()); |
| 1188 | 1188 |
| 1189 RecordBookmarkLaunch(GetBookmarkLaunchLocation()); | 1189 RecordBookmarkLaunch(node, GetBookmarkLaunchLocation()); |
| 1190 } | 1190 } |
| 1191 | 1191 |
| 1192 void BookmarkBarGtk::OnButtonDragBegin(GtkWidget* button, | 1192 void BookmarkBarGtk::OnButtonDragBegin(GtkWidget* button, |
| 1193 GdkDragContext* drag_context) { | 1193 GdkDragContext* drag_context) { |
| 1194 GtkWidget* button_parent = gtk_widget_get_parent(button); | 1194 GtkWidget* button_parent = gtk_widget_get_parent(button); |
| 1195 | 1195 |
| 1196 // The parent tool item might be removed during the drag. Ref it so |button| | 1196 // The parent tool item might be removed during the drag. Ref it so |button| |
| 1197 // won't get destroyed. | 1197 // won't get destroyed. |
| 1198 g_object_ref(button_parent); | 1198 g_object_ref(button_parent); |
| 1199 | 1199 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1508 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { | 1508 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { |
| 1509 GtkDestDefaults dest_defaults = | 1509 GtkDestDefaults dest_defaults = |
| 1510 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : | 1510 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : |
| 1511 GTK_DEST_DEFAULT_DROP; | 1511 GTK_DEST_DEFAULT_DROP; |
| 1512 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); | 1512 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); |
| 1513 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, | 1513 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, |
| 1514 NULL, 0, kDragAction); | 1514 NULL, 0, kDragAction); |
| 1515 ui::SetDestTargetList(overflow_button_, kDestTargetList); | 1515 ui::SetDestTargetList(overflow_button_, kDestTargetList); |
| 1516 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); | 1516 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); |
| 1517 } | 1517 } |
| OLD | NEW |