diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-26 21:53:05 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-26 21:53:05 +0000 |
commit | ebd884350e8699d8ac0d08f1bc1e60707ef37efc (patch) | |
tree | 276691c54224a28e8cd60fb7f49ad44708b7ca4d /views | |
parent | 49a38cf500d59f65b25443d383d2218069fd95e5 (diff) | |
download | chromium_src-ebd884350e8699d8ac0d08f1bc1e60707ef37efc.zip chromium_src-ebd884350e8699d8ac0d08f1bc1e60707ef37efc.tar.gz chromium_src-ebd884350e8699d8ac0d08f1bc1e60707ef37efc.tar.bz2 |
Remove MessageLoopForUI::Observer in WidgetGtk.
This seems to be inherited from windows code and not necessary.
All worked fine without this.
I left "#include "base/message_loop.h" in widget_gtk.h as many users
of widget_gtk (and widget_win) expects it's included here.
BUG=none
TEST=manual: all painting shoudl work fine after this modification.
Review URL: http://codereview.chromium.org/1705007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/widget_gtk.cc | 22 | ||||
-rw-r--r-- | views/widget/widget_gtk.h | 5 |
2 files changed, 0 insertions, 27 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index cec72fd..11af0a1 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -16,7 +16,6 @@ #include "app/os_exchange_data_provider_gtk.h" #include "base/auto_reset.h" #include "base/compiler_specific.h" -#include "base/message_loop.h" #include "base/utf_string_conversions.h" #include "gfx/path.h" #include "views/widget/default_theme_provider.h" @@ -171,7 +170,6 @@ WidgetGtk::~WidgetGtk() { DCHECK(delete_on_destroy_ || widget_ == NULL); if (type_ != TYPE_CHILD) ActiveWindowWatcherX::RemoveObserver(this); - MessageLoopForUI::current()->RemoveObserver(this); // Defer focus manager's destruction. This is for the case when the // focus manager is referenced by a child WidgetGtk (e.g. TabbedPane in a @@ -397,8 +395,6 @@ void WidgetGtk::Init(GtkWidget* parent, GDK_KEY_RELEASE_MASK); SetRootViewForWidget(widget_, root_view_.get()); - MessageLoopForUI::current()->AddObserver(this); - g_signal_connect_after(G_OBJECT(window_contents_), "size_allocate", G_CALLBACK(&OnSizeAllocateThunk), this); g_signal_connect(window_contents_, "expose_event", @@ -727,24 +723,6 @@ bool WidgetGtk::ContainsNativeView(gfx::NativeView native_view) { } //////////////////////////////////////////////////////////////////////////////// -// WidgetGtk, MessageLoopForUI::Observer implementation: - -void WidgetGtk::WillProcessEvent(GdkEvent* event) { -} - -void WidgetGtk::DidProcessEvent(GdkEvent* event) { - // Under gtk 2.18.6 (also observed in 2.18.3), gdk_window_process_updates() - // ued in PaintNow() method may issue another exposure event and drive - // nested message loop, which causes recursive call to PaintNow on the same - // WidgetGtk instance. - // Invoke PaintNow only if the event is originated from this WidgetGtk's - // window_contents_. See bug://crbug.com/42235 for details. - if (window_contents_ && event->any.window == window_contents_->window && - root_view_->NeedsPainting(true)) - PaintNow(root_view_->GetScheduledPaintRect()); -} - -//////////////////////////////////////////////////////////////////////////////// // WidgetGtk, FocusTraversable implementation: View* WidgetGtk::FindNextFocusableView( diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 5ce37e6..cb5f103 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -32,7 +32,6 @@ class WindowGtk; // Widget implementation for GTK. class WidgetGtk : public Widget, - public MessageLoopForUI::Observer, public FocusTraversable, public ActiveWindowWatcherX::Observer { public: @@ -192,10 +191,6 @@ class WidgetGtk virtual bool ContainsNativeView(gfx::NativeView native_view); - // Overridden from MessageLoopForUI::Observer: - virtual void WillProcessEvent(GdkEvent* event); - virtual void DidProcessEvent(GdkEvent* event); - // Overridden from FocusTraversable: virtual View* FindNextFocusableView(View* starting_view, bool reverse, |