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

Side by Side Diff: ui/views/controls/menu/menu_message_loop.h

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore DCHECK Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ 6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
7 7
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 13 matching lines...) Expand all
24 // showing a menu, allowing for platform specific implementations. 24 // showing a menu, allowing for platform specific implementations.
25 class MenuMessageLoop { 25 class MenuMessageLoop {
26 public: 26 public:
27 virtual ~MenuMessageLoop() {} 27 virtual ~MenuMessageLoop() {}
28 28
29 // Create a platform specific instance. 29 // Create a platform specific instance.
30 static MenuMessageLoop* Create(); 30 static MenuMessageLoop* Create();
31 31
32 // Repost |event| to |window|. 32 // Repost |event| to |window|.
33 // |screen_loc| is the event's location in screen coordinates. 33 // |screen_loc| is the event's location in screen coordinates.
34 static void RepostEventToWindow(const ui::LocatedEvent& event, 34 static void RepostEventToWindow(const ui::LocatedEvent* event,
35 gfx::NativeWindow window, 35 gfx::NativeWindow window,
36 const gfx::Point& screen_loc); 36 const gfx::Point& screen_loc);
37 37
38 // Runs the platform specific bits of the message loop. If |nested_menu| is 38 // Runs the platform specific bits of the message loop. If |nested_menu| is
39 // true we're being asked to run a menu from within a menu (eg a context 39 // true we're being asked to run a menu from within a menu (eg a context
40 // menu). 40 // menu).
41 virtual void Run(MenuController*, Widget* owner, bool nested_menu) = 0; 41 virtual void Run(MenuController*, Widget* owner, bool nested_menu) = 0;
42 42
43 // Quit an earlier call to Run(). 43 // Quit an earlier call to Run().
44 virtual void QuitNow() = 0; 44 virtual void QuitNow() = 0;
45 45
46 // Clear any references to the owner widget that was passed into the previous 46 // Clear any references to the owner widget that was passed into the previous
47 // call to Run(). 47 // call to Run().
48 virtual void ClearOwner() = 0; 48 virtual void ClearOwner() = 0;
49 }; 49 };
50 50
51 } // namespace views 51 } // namespace views
52 52
53 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_ 53 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698