Demonstrate the basic functionality of the File System
[chromium-blink-merge.git] / ui / views / controls / menu / menu_message_loop_aura.h
blob49e8a3928273207c0b43fd233d2226922c594c18
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_
6 #define UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_
8 #include "base/callback.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/views/controls/menu/menu_message_loop.h"
13 namespace base {
14 class MessagePumpDispatcher;
17 namespace ui {
18 class ScopedEventDispatcher;
21 namespace views {
23 class MenuMessageLoopAura : public MenuMessageLoop {
24 public:
25 MenuMessageLoopAura();
26 virtual ~MenuMessageLoopAura();
28 // Overridden from MenuMessageLoop:
29 virtual void Run(MenuController* controller,
30 Widget* owner,
31 bool nested_menu) OVERRIDE;
32 virtual bool ShouldQuitNow() const OVERRIDE;
33 virtual void QuitNow() OVERRIDE;
34 virtual void RepostEventToWindow(const ui::LocatedEvent& event,
35 gfx::NativeWindow window,
36 const gfx::Point& screen_loc) OVERRIDE;
37 virtual void ClearOwner() OVERRIDE;
39 private:
40 // Owner of child windows.
41 // WARNING: this may be NULL.
42 Widget* owner_;
44 scoped_ptr<ui::ScopedEventDispatcher> nested_dispatcher_;
45 base::Closure message_loop_quit_;
47 DISALLOW_COPY_AND_ASSIGN(MenuMessageLoopAura);
50 } // namespace views
52 #endif // UI_VIEWS_CONTROLS_MENU_MENU_MESSAGE_LOOP_AURA_H_