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

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

Issue 6840068: GTK: Add Recently Closed tabs to the History menu in the global menu bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add bookmark menu stub for string freeze reasons Created 9 years, 8 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
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/browser_window_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <string> 10 #include <string>
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 // This vbox encompasses all of the widgets within the browser. This is 1580 // This vbox encompasses all of the widgets within the browser. This is
1581 // everything except the custom frame border. 1581 // everything except the custom frame border.
1582 window_vbox_ = gtk_vbox_new(FALSE, 0); 1582 window_vbox_ = gtk_vbox_new(FALSE, 0);
1583 gtk_widget_show(window_vbox_); 1583 gtk_widget_show(window_vbox_);
1584 1584
1585 // We hold an always hidden GtkMenuBar inside our browser window simply to 1585 // We hold an always hidden GtkMenuBar inside our browser window simply to
1586 // fool the Unity desktop, which will mirror the contents of the first 1586 // fool the Unity desktop, which will mirror the contents of the first
1587 // GtkMenuBar it sees into the global menu bar. (It doesn't seem to check the 1587 // GtkMenuBar it sees into the global menu bar. (It doesn't seem to check the
1588 // visibility of the GtkMenuBar, so we can just permanently hide it.) 1588 // visibility of the GtkMenuBar, so we can just permanently hide it.)
1589 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGlobalGnomeMenu)) { 1589 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGlobalGnomeMenu)) {
1590 global_menu_bar_.reset(new GlobalMenuBar(browser_.get(), this)); 1590 global_menu_bar_.reset(new GlobalMenuBar(browser_.get()));
1591 gtk_container_add(GTK_CONTAINER(window_vbox_), global_menu_bar_->widget()); 1591 gtk_container_add(GTK_CONTAINER(window_vbox_), global_menu_bar_->widget());
1592 } 1592 }
1593 1593
1594 // The window container draws the custom browser frame. 1594 // The window container draws the custom browser frame.
1595 window_container_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); 1595 window_container_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
1596 gtk_widget_set_name(window_container_, "chrome-custom-frame-border"); 1596 gtk_widget_set_name(window_container_, "chrome-custom-frame-border");
1597 gtk_widget_set_app_paintable(window_container_, TRUE); 1597 gtk_widget_set_app_paintable(window_container_, TRUE);
1598 gtk_widget_set_double_buffered(window_container_, FALSE); 1598 gtk_widget_set_double_buffered(window_container_, FALSE);
1599 gtk_widget_set_redraw_on_allocate(window_container_, TRUE); 1599 gtk_widget_set_redraw_on_allocate(window_container_, TRUE);
1600 g_signal_connect(window_container_, "expose-event", 1600 g_signal_connect(window_container_, "expose-event",
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 // special-case the ones where the custom frame should be used. These names 2340 // special-case the ones where the custom frame should be used. These names
2341 // are taken from the WMs' source code. 2341 // are taken from the WMs' source code.
2342 return (wm_name == "Blackbox" || 2342 return (wm_name == "Blackbox" ||
2343 wm_name == "compiz" || 2343 wm_name == "compiz" ||
2344 wm_name == "e16" || // Enlightenment DR16 2344 wm_name == "e16" || // Enlightenment DR16
2345 wm_name == "Metacity" || 2345 wm_name == "Metacity" ||
2346 wm_name == "Mutter" || 2346 wm_name == "Mutter" ||
2347 wm_name == "Openbox" || 2347 wm_name == "Openbox" ||
2348 wm_name == "Xfwm4"); 2348 wm_name == "Xfwm4");
2349 } 2349 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698