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

Unified Diff: ui/views/controls/menu/menu_host.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_event_dispatcher_linux.cc ('k') | ui/views/controls/menu/menu_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_host.h
diff --git a/ui/views/controls/menu/menu_host.h b/ui/views/controls/menu/menu_host.h
deleted file mode 100644
index 31ad7de02cf869947ed680561a97cba943927e54..0000000000000000000000000000000000000000
--- a/ui/views/controls/menu/menu_host.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
-#define UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
-
-#include "base/compiler_specific.h"
-#include "ui/gfx/rect.h"
-#include "ui/views/widget/widget.h"
-
-namespace views {
-
-class NativeWidget;
-class SubmenuView;
-class View;
-class Widget;
-
-// SubmenuView uses a MenuHost to house the SubmenuView.
-//
-// SubmenuView owns the MenuHost. When SubmenuView is done with the MenuHost
-// |DestroyMenuHost| is invoked. The one exception to this is if the native
-// OS destroys the widget out from under us, in which case |MenuHostDestroyed|
-// is invoked back on the SubmenuView and the SubmenuView then drops references
-// to the MenuHost.
-class MenuHost : public Widget {
- public:
- explicit MenuHost(SubmenuView* submenu);
- virtual ~MenuHost();
-
- // Initializes and shows the MenuHost.
- // WARNING: |parent| may be NULL.
- void InitMenuHost(Widget* parent,
- const gfx::Rect& bounds,
- View* contents_view,
- bool do_capture);
-
- // Returns true if the menu host is visible.
- bool IsMenuHostVisible();
-
- // Shows the menu host. If |do_capture| is true the menu host should do a
- // mouse grab.
- void ShowMenuHost(bool do_capture);
-
- // Hides the menu host.
- void HideMenuHost();
-
- // Destroys and deletes the menu host.
- void DestroyMenuHost();
-
- // Sets the bounds of the menu host.
- void SetMenuHostBounds(const gfx::Rect& bounds);
-
- // Releases a mouse grab installed by |ShowMenuHost|.
- void ReleaseMenuHostCapture();
-
- private:
- // Overridden from Widget:
- virtual internal::RootView* CreateRootView() override;
- virtual void OnMouseCaptureLost() override;
- virtual void OnNativeWidgetDestroyed() override;
- virtual void OnOwnerClosing() override;
- virtual void OnDragWillStart() override;
- virtual void OnDragComplete() override;
-
- // The view we contain.
- SubmenuView* submenu_;
-
- // If true, DestroyMenuHost has been invoked.
- bool destroying_;
-
- // If true and capture is lost we don't notify the delegate.
- bool ignore_capture_lost_;
-
- DISALLOW_COPY_AND_ASSIGN(MenuHost);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_CONTROLS_MENU_MENU_HOST_H_
« no previous file with comments | « ui/views/controls/menu/menu_event_dispatcher_linux.cc ('k') | ui/views/controls/menu/menu_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698