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

Unified Diff: views/controls/menu/nested_dispatcher_gtk.cc

Issue 7250001: Refactor the glib message-pump, and use it as the base for a gtk message pump and an X message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/menu/nested_dispatcher_gtk.cc
diff --git a/views/controls/menu/nested_dispatcher_gtk.cc b/views/controls/menu/nested_dispatcher_gtk.cc
index 9cdc1a6a945cbdf84a021dff20ab9ed7c578c274..1ee21581722dc8054b2ed9023934867ec8b6c79a 100644
--- a/views/controls/menu/nested_dispatcher_gtk.cc
+++ b/views/controls/menu/nested_dispatcher_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -32,24 +32,18 @@ void NestedDispatcherGtk::CreatorDestroyed() {
creator_ = NULL;
}
-bool NestedDispatcherGtk::Dispatch(GdkEvent* event) {
- if (creator_ != NULL) {
#if defined(TOUCH_UI)
- return static_cast<base::MessagePumpForUI::Dispatcher*>
- (creator_)->Dispatch(event);
+base::MessagePumpDispatcher::DispatchStatus
+ NestedDispatcherGtk::DispatchX(XEvent* xevent) {
+ return creator_->DispatchX(xevent);
+}
#else
+bool NestedDispatcherGtk::Dispatch(GdkEvent* event) {
+ if (creator_ != NULL)
sky 2011/06/24 15:27:12 nit: return creator_ && creator_->Dispatch(event);
sadrul 2011/06/24 17:14:01 Done.
return creator_->Dispatch(event);
-#endif
- } else {
+ else
return false;
- }
}
-
-#if defined(TOUCH_UI)
-base::MessagePumpGlibXDispatcher::DispatchStatus
- NestedDispatcherGtk::DispatchX(XEvent* xevent) {
- return creator_->DispatchX(xevent);
-}
-#endif
+#endif // defined(TOUCH_UI)
} // namespace views

Powered by Google App Engine
This is Rietveld 408576698