Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/gtk/bookmark_bar_gtk.cc

Issue 6078009: gtk: Cleanup BookmarkBarGtk class. (Closed)
Patch Set: Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/bookmark_bar_gtk.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/slide_animation.h" 10 #include "app/slide_animation.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // the toolbar. 68 // the toolbar.
69 const int kBookmarkBarMinimumHeight = 3; 69 const int kBookmarkBarMinimumHeight = 3;
70 70
71 // Left-padding for the instructional text. 71 // Left-padding for the instructional text.
72 const int kInstructionsPadding = 6; 72 const int kInstructionsPadding = 6;
73 73
74 // Padding around the "Other Bookmarks" button. 74 // Padding around the "Other Bookmarks" button.
75 const int kOtherBookmarksPaddingHorizontal = 2; 75 const int kOtherBookmarksPaddingHorizontal = 2;
76 const int kOtherBookmarksPaddingVertical = 1; 76 const int kOtherBookmarksPaddingVertical = 1;
77 77
78 // Middle color of the separator gradient.
79 const double kSeparatorColor[] =
80 { 194.0 / 255.0, 205.0 / 255.0, 212.0 / 212.0 };
81 // Top color of the separator gradient.
82 const double kTopBorderColor[] =
83 { 222.0 / 255.0, 234.0 / 255.0, 248.0 / 255.0 };
84
85 // The targets accepted by the toolbar and folder buttons for DnD. 78 // The targets accepted by the toolbar and folder buttons for DnD.
86 const int kDestTargetList[] = { gtk_dnd_util::CHROME_BOOKMARK_ITEM, 79 const int kDestTargetList[] = { gtk_dnd_util::CHROME_BOOKMARK_ITEM,
87 gtk_dnd_util::CHROME_NAMED_URL, 80 gtk_dnd_util::CHROME_NAMED_URL,
88 gtk_dnd_util::TEXT_URI_LIST, 81 gtk_dnd_util::TEXT_URI_LIST,
89 gtk_dnd_util::NETSCAPE_URL, 82 gtk_dnd_util::NETSCAPE_URL,
90 gtk_dnd_util::TEXT_PLAIN, -1 }; 83 gtk_dnd_util::TEXT_PLAIN, -1 };
91 84
92 // Acceptable drag actions for the bookmark bar drag destinations. 85 // Acceptable drag actions for the bookmark bar drag destinations.
93 const GdkDragAction kDragAction = 86 const GdkDragAction kDragAction =
94 GdkDragAction(GDK_ACTION_MOVE | GDK_ACTION_COPY); 87 GdkDragAction(GDK_ACTION_MOVE | GDK_ACTION_COPY);
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 1409
1417 // Find the GtkWidget* for the actual target button. 1410 // Find the GtkWidget* for the actual target button.
1418 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; 1411 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1;
1419 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); 1412 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size();
1420 PopupForButton(folder_list[button_idx]); 1413 PopupForButton(folder_list[button_idx]);
1421 } 1414 }
1422 1415
1423 void BookmarkBarGtk::CloseMenu() { 1416 void BookmarkBarGtk::CloseMenu() {
1424 current_context_menu_->Cancel(); 1417 current_context_menu_->Cancel();
1425 } 1418 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/bookmark_bar_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698