Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 5 |
| 6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 6 #ifndef VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| 7 #define VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 7 #define VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| 8 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include "views/controls/menu/menu_host.h" | 10 #include "views/controls/menu/menu_host.h" |
| 11 #include "views/widget/widget_gtk.h" | 11 #include "views/widget/widget_gtk.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 | 14 |
| 15 class SubmenuView; | 15 class SubmenuView; |
| 16 | 16 |
| 17 // MenuHost implementation for Gtk. | 17 // MenuHost implementation for Gtk. |
| 18 class MenuHostGtk : public WidgetGtk, public MenuHost { | 18 class MenuHostGtk : public WidgetGtk, public MenuHost { |
| 19 public: | 19 public: |
| 20 explicit MenuHostGtk(SubmenuView* submenu); | 20 explicit MenuHostGtk(SubmenuView* submenu); |
| 21 virtual ~MenuHostGtk(); | 21 virtual ~MenuHostGtk(); |
| 22 | 22 |
| 23 // MenuHost overrides. | 23 // MenuHost overrides. |
| 24 void Init(gfx::NativeWindow parent, | 24 virtual void Init(gfx::NativeWindow parent, |
|
Nico
2011/03/04 22:53:02
I renamed this to InitMenuHost
| |
| 25 const gfx::Rect& bounds, | 25 const gfx::Rect& bounds, |
| 26 View* contents_view, | 26 View* contents_view, |
| 27 bool do_capture); | 27 bool do_capture); |
| 28 virtual bool IsMenuHostVisible(); | 28 virtual bool IsMenuHostVisible(); |
| 29 virtual void ShowMenuHost(bool do_capture); | 29 virtual void ShowMenuHost(bool do_capture); |
| 30 virtual void HideMenuHost(); | 30 virtual void HideMenuHost(); |
| 31 virtual void DestroyMenuHost(); | 31 virtual void DestroyMenuHost(); |
| 32 virtual void SetMenuHostBounds(const gfx::Rect& bounds); | 32 virtual void SetMenuHostBounds(const gfx::Rect& bounds); |
| 33 virtual void ReleaseMenuHostCapture(); | 33 virtual void ReleaseMenuHostCapture(); |
| 34 virtual gfx::NativeWindow GetMenuHostWindow(); | 34 virtual gfx::NativeWindow GetMenuHostWindow(); |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 virtual RootView* CreateRootView(); | 37 virtual RootView* CreateRootView(); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 57 | 57 |
| 58 // Have we done input grab? | 58 // Have we done input grab? |
| 59 bool did_input_grab_; | 59 bool did_input_grab_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); | 61 DISALLOW_COPY_AND_ASSIGN(MenuHostGtk); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace views | 64 } // namespace views |
| 65 | 65 |
| 66 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ | 66 #endif // VIEWS_CONTROLS_MENU_MENU_HOST_GTK_H_ |
| OLD | NEW |