summaryrefslogtreecommitdiffstats
path: root/widget/gtk/NativeMenuGtk.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /widget/gtk/NativeMenuGtk.h
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/gtk/NativeMenuGtk.h')
-rw-r--r--widget/gtk/NativeMenuGtk.h34
1 files changed, 31 insertions, 3 deletions
diff --git a/widget/gtk/NativeMenuGtk.h b/widget/gtk/NativeMenuGtk.h
index 3f1f3213c1..ca0f64c8ff 100644
--- a/widget/gtk/NativeMenuGtk.h
+++ b/widget/gtk/NativeMenuGtk.h
@@ -1,4 +1,3 @@
-
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -7,10 +6,13 @@
#ifndef mozilla_widget_NativeMenuGtk_h
#define mozilla_widget_NativeMenuGtk_h
+#include "mozilla/RefCounted.h"
#include "mozilla/widget/NativeMenu.h"
#include "mozilla/EventForwards.h"
#include "GRefPtr.h"
+struct xdg_dbus_annotation_v1;
+
namespace mozilla {
namespace dom {
@@ -19,7 +21,8 @@ class Element;
namespace widget {
-class MenuModel;
+class MenuModelGMenu;
+class MenubarModelDBus;
class NativeMenuGtk : public NativeMenu {
public:
@@ -54,10 +57,35 @@ class NativeMenuGtk : public NativeMenu {
bool mPoppedUp = false;
RefPtr<GtkWidget> mNativeMenu;
- RefPtr<MenuModel> mMenuModel;
+ RefPtr<MenuModelGMenu> mMenuModel;
nsTArray<NativeMenu::Observer*> mObservers;
};
+#ifdef MOZ_ENABLE_DBUS
+
+class DBusMenuBar final : public RefCounted<DBusMenuBar> {
+ public:
+ MOZ_DECLARE_REFCOUNTED_TYPENAME(DBusMenuBar)
+ static RefPtr<DBusMenuBar> Create(dom::Element*);
+ ~DBusMenuBar();
+
+ protected:
+ explicit DBusMenuBar(dom::Element* aElement);
+
+ static void NameOwnerChangedCallback(GObject*, GParamSpec*, gpointer);
+ void OnNameOwnerChanged();
+
+ nsCString mObjectPath;
+ RefPtr<MenubarModelDBus> mMenuModel;
+ RefPtr<DbusmenuServer> mServer;
+ RefPtr<GDBusProxy> mProxy;
+# ifdef MOZ_WAYLAND
+ xdg_dbus_annotation_v1* mAnnotation = nullptr;
+# endif
+};
+
+#endif
+
} // namespace widget
} // namespace mozilla