Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
tapted
2014/06/25 08:30:28
This separate header file might not be needed if y
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ | |
| 6 #define UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ | |
| 7 | |
| 8 #include "ui/views/controls/menu/menu_runner_impl_interface.h" | |
| 9 | |
| 10 #include "base/mac/scoped_nsobject.h" | |
|
tapted
2014/06/25 08:30:28
nit: import
| |
| 11 #include "base/time/time.h" | |
| 12 | |
| 13 @class MenuController; | |
| 14 | |
| 15 namespace views { | |
| 16 namespace internal { | |
| 17 | |
| 18 class MenuRunnerImplCocoa : public MenuRunnerImplInterface { | |
|
tapted
2014/06/25 08:30:28
nit: should proabbly have a class comment
| |
| 19 public: | |
| 20 explicit MenuRunnerImplCocoa(ui::MenuModel* menu); | |
| 21 | |
| 22 virtual bool running() const OVERRIDE; | |
| 23 virtual void Release() OVERRIDE; | |
| 24 virtual MenuRunner::RunResult RunMenuAt(Widget* parent, | |
| 25 MenuButton* button, | |
| 26 const gfx::Rect& bounds, | |
| 27 MenuAnchorPosition anchor, | |
| 28 int32 types) OVERRIDE; | |
| 29 virtual void Cancel() OVERRIDE; | |
| 30 virtual base::TimeDelta closing_event_time() const OVERRIDE; | |
| 31 | |
| 32 private: | |
| 33 virtual ~MenuRunnerImplCocoa(); | |
| 34 | |
| 35 // The Cocoa menu controller that this instance is bridging. | |
| 36 base::scoped_nsobject<MenuController> menu_controller_; | |
| 37 | |
| 38 // The timestamp of the event which closed the menu - or 0. | |
| 39 base::TimeDelta closing_event_time_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(MenuRunnerImplCocoa); | |
| 42 }; | |
| 43 | |
| 44 } // namespace internal | |
| 45 } // namespace views | |
| 46 | |
| 47 #endif // UI_VIEWS_CONTROLS_MENU_MENU_RUNNER_IMPL_COCOA_H_ | |
| OLD | NEW |