| 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/bookmark_bar_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmark_bar_gtk.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "chrome/browser/ui/gtk/gtk_util.h" | 31 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 32 #include "chrome/browser/ui/gtk/hover_controller_gtk.h" | 32 #include "chrome/browser/ui/gtk/hover_controller_gtk.h" |
| 33 #include "chrome/browser/ui/gtk/import_dialog_gtk.h" | 33 #include "chrome/browser/ui/gtk/import_dialog_gtk.h" |
| 34 #include "chrome/browser/ui/gtk/menu_gtk.h" | 34 #include "chrome/browser/ui/gtk/menu_gtk.h" |
| 35 #include "chrome/browser/ui/gtk/rounded_window.h" | 35 #include "chrome/browser/ui/gtk/rounded_window.h" |
| 36 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 36 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 37 #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" | 37 #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" |
| 38 #include "chrome/browser/ui/gtk/view_id_util.h" | 38 #include "chrome/browser/ui/gtk/view_id_util.h" |
| 39 #include "chrome/common/notification_service.h" | 39 #include "chrome/common/notification_service.h" |
| 40 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
| 41 #include "gfx/canvas_skia_paint.h" | |
| 42 #include "gfx/gtk_util.h" | |
| 43 #include "grit/app_resources.h" | 41 #include "grit/app_resources.h" |
| 44 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
| 45 #include "grit/theme_resources.h" | 43 #include "grit/theme_resources.h" |
| 46 #include "ui/base/animation/slide_animation.h" | 44 #include "ui/base/animation/slide_animation.h" |
| 47 #include "ui/base/dragdrop/gtk_dnd_util.h" | 45 #include "ui/base/dragdrop/gtk_dnd_util.h" |
| 48 #include "ui/base/resource/resource_bundle.h" | 46 #include "ui/base/resource/resource_bundle.h" |
| 47 #include "ui/gfx/canvas_skia_paint.h" |
| 48 #include "ui/gfx/gtk_util.h" |
| 49 | 49 |
| 50 namespace { | 50 namespace { |
| 51 | 51 |
| 52 // The showing height of the bar. | 52 // The showing height of the bar. |
| 53 const int kBookmarkBarHeight = 29; | 53 const int kBookmarkBarHeight = 29; |
| 54 | 54 |
| 55 // Padding for when the bookmark bar is floating. | 55 // Padding for when the bookmark bar is floating. |
| 56 const int kTopBottomNTPPadding = 12; | 56 const int kTopBottomNTPPadding = 12; |
| 57 const int kLeftRightNTPPadding = 8; | 57 const int kLeftRightNTPPadding = 8; |
| 58 | 58 |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 | 1417 |
| 1418 // Find the GtkWidget* for the actual target button. | 1418 // Find the GtkWidget* for the actual target button. |
| 1419 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; | 1419 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; |
| 1420 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); | 1420 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); |
| 1421 PopupForButton(folder_list[button_idx]); | 1421 PopupForButton(folder_list[button_idx]); |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 void BookmarkBarGtk::CloseMenu() { | 1424 void BookmarkBarGtk::CloseMenu() { |
| 1425 current_context_menu_->Cancel(); | 1425 current_context_menu_->Cancel(); |
| 1426 } | 1426 } |
| OLD | NEW |