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

Side by Side Diff: chrome/browser/chromeos/views/native_menu_domui.h

Issue 3801011: touchui: Directly process key and mouse events. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: nit Created 10 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « base/message_pump_glib_x_dispatch.h ('k') | chrome/browser/chromeos/views/native_menu_domui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
6 #define CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_ 6 #define CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "chrome/browser/chromeos/dom_ui/domui_menu_control.h" 14 #include "chrome/browser/chromeos/dom_ui/domui_menu_control.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 #include "views/controls/menu/menu_wrapper.h" 16 #include "views/controls/menu/menu_wrapper.h"
17 17
18 class SkBitmap; 18 class SkBitmap;
19 class DictionaryValue; 19 class DictionaryValue;
20 class Profile; 20 class Profile;
21 21
22 namespace menus { 22 namespace menus {
23 class MenuModel; 23 class MenuModel;
24 } // namespace menus 24 } // namespace menus
25 25
26 namespace views { 26 namespace views {
27 class NestedDispatcherGtk; 27 class NestedDispatcherGtk;
28 } // namespace views; 28 } // namespace views;
29 29
30 #if defined(TOUCH_UI)
31 typedef union _XEvent XEvent;
32 #endif
33
30 namespace chromeos { 34 namespace chromeos {
31 35
32 class MenuLocator; 36 class MenuLocator;
33 class DOMUIMenuWidget; 37 class DOMUIMenuWidget;
34 38
35 // A DOMUI implementation of MenuWrapper. 39 // A DOMUI implementation of MenuWrapper.
36 class NativeMenuDOMUI : public views::MenuWrapper, 40 class NativeMenuDOMUI : public views::MenuWrapper,
37 public DOMUIMenuControl, 41 public DOMUIMenuControl,
38 public MessageLoop::Dispatcher { 42 public MessageLoop::Dispatcher {
39 public: 43 public:
(...skipping 12 matching lines...) Expand all
52 virtual void Rebuild(); 56 virtual void Rebuild();
53 virtual void UpdateStates(); 57 virtual void UpdateStates();
54 virtual gfx::NativeMenu GetNativeMenu() const; 58 virtual gfx::NativeMenu GetNativeMenu() const;
55 virtual MenuAction GetMenuAction() const; 59 virtual MenuAction GetMenuAction() const;
56 virtual void AddMenuListener(views::MenuListener* listener); 60 virtual void AddMenuListener(views::MenuListener* listener);
57 virtual void RemoveMenuListener(views::MenuListener* listener); 61 virtual void RemoveMenuListener(views::MenuListener* listener);
58 virtual void SetMinimumWidth(int width); 62 virtual void SetMinimumWidth(int width);
59 63
60 // Overriden from MessageLoopForUI::Dispatcher: 64 // Overriden from MessageLoopForUI::Dispatcher:
61 virtual bool Dispatch(GdkEvent* event); 65 virtual bool Dispatch(GdkEvent* event);
66 #if defined(TOUCH_UI)
67 virtual bool Dispatch(XEvent* xevent);
68 #endif
62 69
63 // Overriden from DOMUIMenuControl; 70 // Overriden from DOMUIMenuControl;
64 virtual menus::MenuModel* GetMenuModel() { return model_; } 71 virtual menus::MenuModel* GetMenuModel() { return model_; }
65 virtual void Activate(menus::MenuModel* model, 72 virtual void Activate(menus::MenuModel* model,
66 int index, 73 int index,
67 ActivationMode activation_mode); 74 ActivationMode activation_mode);
68 virtual void CloseAll(); 75 virtual void CloseAll();
69 virtual void CloseSubmenu(); 76 virtual void CloseSubmenu();
70 virtual void MoveInputToParent(); 77 virtual void MoveInputToParent();
71 virtual void MoveInputToSubmenu(); 78 virtual void MoveInputToSubmenu();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // This is to deal with the menu being deleted while the nested 156 // This is to deal with the menu being deleted while the nested
150 // message loop is handled. see http://crosbug.com/7929 . 157 // message loop is handled. see http://crosbug.com/7929 .
151 views::NestedDispatcherGtk* nested_dispatcher_; 158 views::NestedDispatcherGtk* nested_dispatcher_;
152 159
153 DISALLOW_COPY_AND_ASSIGN(NativeMenuDOMUI); 160 DISALLOW_COPY_AND_ASSIGN(NativeMenuDOMUI);
154 }; 161 };
155 162
156 } // namespace chromeos 163 } // namespace chromeos
157 164
158 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_ 165 #endif // CHROME_BROWSER_CHROMEOS_VIEWS_NATIVE_MENU_DOMUI_H_
OLDNEW
« no previous file with comments | « base/message_pump_glib_x_dispatch.h ('k') | chrome/browser/chromeos/views/native_menu_domui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698