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 |