OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ |
6 #define VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ | 6 #define VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 | 10 |
11 #if defined(TOUCH_UI) | 11 #if defined(TOUCH_UI) |
(...skipping 18 matching lines...) Expand all Loading... |
30 // deleted in the nested loop. Returns true if the menu is | 30 // deleted in the nested loop. Returns true if the menu is |
31 // deleted, or false otherwise. | 31 // deleted, or false otherwise. |
32 bool RunAndSelfDestruct(); | 32 bool RunAndSelfDestruct(); |
33 | 33 |
34 // Tells the nested dispatcher that creator has been destroyed. | 34 // Tells the nested dispatcher that creator has been destroyed. |
35 void CreatorDestroyed(); | 35 void CreatorDestroyed(); |
36 | 36 |
37 private: | 37 private: |
38 virtual ~NestedDispatcherGtk() {} | 38 virtual ~NestedDispatcherGtk() {} |
39 | 39 |
| 40 #if defined(TOUCH_UI) |
| 41 virtual base::MessagePumpDispatcher::DispatchStatus Dispatch(XEvent* xevent); |
| 42 #else |
40 // Overriden from MessageLoopForUI::Dispatcher: | 43 // Overriden from MessageLoopForUI::Dispatcher: |
41 virtual bool Dispatch(GdkEvent* event); | 44 virtual bool Dispatch(GdkEvent* event); |
42 | |
43 #if defined(TOUCH_UI) | |
44 virtual base::MessagePumpGlibXDispatcher::DispatchStatus | |
45 DispatchX(XEvent* xevent); | |
46 #endif | 45 #endif |
47 | 46 |
48 // Creator of the nested loop. | 47 // Creator of the nested loop. |
49 MessageLoopForUI::Dispatcher* creator_; | 48 MessageLoopForUI::Dispatcher* creator_; |
50 | 49 |
51 // True to allow nested task in the message loop. | 50 // True to allow nested task in the message loop. |
52 bool allow_nested_task_; | 51 bool allow_nested_task_; |
53 | 52 |
54 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherGtk); | 53 DISALLOW_COPY_AND_ASSIGN(NestedDispatcherGtk); |
55 }; | 54 }; |
56 | 55 |
57 } // namespace views | 56 } // namespace views |
58 | 57 |
59 #endif // VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ | 58 #endif // VIEWS_CONTROLS_MENU_NESTED_DISPATCHER_GTK_H_ |
OLD | NEW |