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

Side by Side Diff: chrome/browser/ui/gtk/global_history_menu.cc

Issue 7252001: GTK: Remove the global bookmarks menu. It can't be implemented efficiently. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debugging code Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/global_menu_bar.h » ('j') | 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) 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/global_history_menu.h" 5 #include "chrome/browser/ui/gtk/global_history_menu.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 14 matching lines...) Expand all
25 #include "content/common/notification_service.h" 25 #include "content/common/notification_service.h"
26 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
27 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/base/text/text_elider.h" 28 #include "ui/base/text/text_elider.h"
29 #include "ui/gfx/codec/png_codec.h" 29 #include "ui/gfx/codec/png_codec.h"
30 #include "ui/gfx/gtk_util.h" 30 #include "ui/gfx/gtk_util.h"
31 31
32 namespace { 32 namespace {
33 33
34 // The maximum number of most visited items to display. 34 // The maximum number of most visited items to display.
35 const unsigned int kMostVisitedCount = 12; 35 const unsigned int kMostVisitedCount = 8;
36 36
37 // The number of recently closed items to get. 37 // The number of recently closed items to get.
38 const unsigned int kRecentlyClosedCount = 10; 38 const unsigned int kRecentlyClosedCount = 8;
39 39
40 // Menus more than this many chars long will get trimmed. 40 // Menus more than this many chars long will get trimmed.
41 const int kMaximumMenuWidthInChars = 50; 41 const int kMaximumMenuWidthInChars = 50;
42 42
43 } // namespace 43 } // namespace
44 44
45 struct GlobalHistoryMenu::ClearMenuClosure { 45 struct GlobalHistoryMenu::ClearMenuClosure {
46 GtkWidget* container; 46 GtkWidget* container;
47 GlobalHistoryMenu* menu_bar; 47 GlobalHistoryMenu* menu_bar;
48 int tag; 48 int tag;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 tab_restore_service_->LoadTabsFromLastSession(); 527 tab_restore_service_->LoadTabsFromLastSession();
528 tab_restore_service_->AddObserver(this); 528 tab_restore_service_->AddObserver(this);
529 529
530 // If LoadTabsFromLastSession doesn't load tabs, it won't call 530 // If LoadTabsFromLastSession doesn't load tabs, it won't call
531 // TabRestoreServiceChanged(). This ensures that all new windows after 531 // TabRestoreServiceChanged(). This ensures that all new windows after
532 // the first one will have their menus populated correctly. 532 // the first one will have their menus populated correctly.
533 TabRestoreServiceChanged(tab_restore_service_); 533 TabRestoreServiceChanged(tab_restore_service_);
534 } 534 }
535 } 535 }
536 } 536 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/global_menu_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698