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

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: media.gyp update 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
« no previous file with comments | « views/controls/menu/nested_dispatcher_gtk.h ('k') | views/focus/accelerator_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..383447c8d208a5dea0b4c8f23e28a1fc6c6e55ab 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,15 @@ 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);
-#else
- return creator_->Dispatch(event);
-#endif
- } else {
- return false;
- }
+base::MessagePumpDispatcher::DispatchStatus
+ NestedDispatcherGtk::Dispatch(XEvent* xevent) {
+ return creator_->Dispatch(xevent);
}
-
-#if defined(TOUCH_UI)
-base::MessagePumpGlibXDispatcher::DispatchStatus
- NestedDispatcherGtk::DispatchX(XEvent* xevent) {
- return creator_->DispatchX(xevent);
+#else
+bool NestedDispatcherGtk::Dispatch(GdkEvent* event) {
+ return creator_ && creator_->Dispatch(event);
}
-#endif
+#endif // defined(TOUCH_UI)
} // namespace views
« no previous file with comments | « views/controls/menu/nested_dispatcher_gtk.h ('k') | views/focus/accelerator_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698