summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc16
-rw-r--r--chrome/browser/gtk/browser_window_gtk.h5
2 files changed, 2 insertions, 19 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 5a04c61..bf441a5 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -273,8 +273,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser)
: browser_(browser),
// TODO(port): make this a pref.
custom_frame_(false),
- full_screen_(false),
- method_factory_(this) {
+ full_screen_(false) {
window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
SetWindowIcon();
SetGeometryHints();
@@ -783,18 +782,7 @@ gboolean BrowserWindowGtk::OnGtkAccelerator(GtkAccelGroup* accel_group,
GdkModifierType modifier,
BrowserWindowGtk* browser_window) {
int command_id = GetCommandId(keyval, modifier);
- // We have to delay certain commands that may try to destroy widgets to which
- // GTK is currently holding a reference. (For now the only such command is
- // tab closing.) GTK will hold a reference on the RWHV widget when the
- // event came through on that widget but GTK focus was elsewhere.
- if (IDC_CLOSE_TAB == command_id) {
- MessageLoop::current()->PostTask(FROM_HERE,
- browser_window->method_factory_.NewRunnableMethod(
- &BrowserWindowGtk::ExecuteBrowserCommand,
- command_id));
- } else {
- browser_window->ExecuteBrowserCommand(command_id);
- }
+ browser_window->ExecuteBrowserCommand(command_id);
return TRUE;
}
diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h
index cb6e0d5..f292cdf 100644
--- a/chrome/browser/gtk/browser_window_gtk.h
+++ b/chrome/browser/gtk/browser_window_gtk.h
@@ -9,7 +9,6 @@
#include "base/gfx/rect.h"
#include "base/scoped_ptr.h"
-#include "base/task.h"
#include "base/timer.h"
#include "chrome/browser/browser_window.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -187,10 +186,6 @@ class BrowserWindowGtk : public BrowserWindow,
// The container for info bars. Always non-NULL.
scoped_ptr<InfoBarContainerGtk> infobar_container_;
- // When it goes out of scope during our destruction, |method_factory_| will
- // cancel its pending tasks (which depend on us still existing).
- ScopedRunnableMethodFactory<BrowserWindowGtk> method_factory_;
-
// The timer used to update frames for the Loading Animation.
base::RepeatingTimer<BrowserWindowGtk> loading_animation_timer_;