| 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/bookmark_bar_gtk.h" | 5 #include "chrome/browser/gtk/bookmark_bar_gtk.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 DCHECK(page_navigator_); | 991 DCHECK(page_navigator_); |
| 992 PopupMenuForNode(sender, node, event); | 992 PopupMenuForNode(sender, node, event); |
| 993 } | 993 } |
| 994 | 994 |
| 995 return FALSE; | 995 return FALSE; |
| 996 } | 996 } |
| 997 | 997 |
| 998 gboolean BookmarkBarGtk::OnSyncErrorButtonPressed(GtkWidget* sender, | 998 gboolean BookmarkBarGtk::OnSyncErrorButtonPressed(GtkWidget* sender, |
| 999 GdkEventButton* event) { | 999 GdkEventButton* event) { |
| 1000 if (sender == sync_error_button_) { | 1000 if (sender == sync_error_button_) { |
| 1001 DCHECK(sync_service_); | 1001 DCHECK(sync_service_ && !sync_service_->IsManaged()); |
| 1002 sync_service_->ShowLoginDialog(); | 1002 sync_service_->ShowLoginDialog(); |
| 1003 } | 1003 } |
| 1004 | 1004 |
| 1005 return FALSE; | 1005 return FALSE; |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 void BookmarkBarGtk::OnClicked(GtkWidget* sender) { | 1008 void BookmarkBarGtk::OnClicked(GtkWidget* sender) { |
| 1009 const BookmarkNode* node = GetNodeForToolButton(sender); | 1009 const BookmarkNode* node = GetNodeForToolButton(sender); |
| 1010 DCHECK(node); | 1010 DCHECK(node); |
| 1011 DCHECK(node->is_url()); | 1011 DCHECK(node->is_url()); |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 | 1365 |
| 1366 // Find the GtkWidget* for the actual target button. | 1366 // Find the GtkWidget* for the actual target button. |
| 1367 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; | 1367 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; |
| 1368 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); | 1368 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); |
| 1369 PopupForButton(folder_list[button_idx]); | 1369 PopupForButton(folder_list[button_idx]); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void BookmarkBarGtk::CloseMenu() { | 1372 void BookmarkBarGtk::CloseMenu() { |
| 1373 current_context_menu_->Cancel(); | 1373 current_context_menu_->Cancel(); |
| 1374 } | 1374 } |
| OLD | NEW |