// static
GlobalMenuBarRegistrarX11* GlobalMenuBarRegistrarX11::GetInstance() {
- return Singleton<GlobalMenuBarRegistrarX11>::get();
+ return base::Singleton<GlobalMenuBarRegistrarX11>::get();
}
void GlobalMenuBarRegistrarX11::OnWindowMapped(unsigned long xid) {
}
GlobalMenuBarRegistrarX11::GlobalMenuBarRegistrarX11()
- : registrar_proxy_(NULL) {
+ : registrar_proxy_(nullptr) {
// libdbusmenu uses the gio version of dbus; I tried using the code in dbus/,
// but it looks like that's isn't sharing the bus name with the gio version,
// even when |connection_type| is set to SHARED.
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS |
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START),
- NULL,
+ nullptr,
kAppMenuRegistrarName,
kAppMenuRegistrarPath,
kAppMenuRegistrarName,
- NULL, // TODO: Probalby want a real cancelable.
+ nullptr, // TODO: Probalby want a real cancelable.
static_cast<GAsyncReadyCallback>(OnProxyCreatedThunk),
this);
}
void GlobalMenuBarRegistrarX11::RegisterXID(unsigned long xid) {
DCHECK(registrar_proxy_);
- std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid);
+ std::string path = GlobalMenuBarX11::GetPathForWindow(xid);
ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087
// TODO(erg): The mozilla implementation goes to a lot of callback trouble
"RegisterWindow",
g_variant_new("(uo)", xid, path.c_str()),
G_DBUS_CALL_FLAGS_NONE, -1,
- NULL,
- NULL,
- NULL);
+ nullptr,
+ nullptr,
+ nullptr);
}
void GlobalMenuBarRegistrarX11::UnregisterXID(unsigned long xid) {
DCHECK(registrar_proxy_);
- std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid);
+ std::string path = GlobalMenuBarX11::GetPathForWindow(xid);
ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087
// TODO(erg): The mozilla implementation goes to a lot of callback trouble
"UnregisterWindow",
g_variant_new("(u)", xid),
G_DBUS_CALL_FLAGS_NONE, -1,
- NULL,
- NULL,
- NULL);
+ nullptr,
+ nullptr,
+ nullptr);
}
void GlobalMenuBarRegistrarX11::OnProxyCreated(GObject* source,
GAsyncResult* result) {
- GError* error = NULL;
+ GError* error = nullptr;
GDBusProxy* proxy = g_dbus_proxy_new_for_bus_finish(result, &error);
if (error) {
g_error_free(error);
g_signal_connect(registrar_proxy_, "notify::g-name-owner",
G_CALLBACK(OnNameOwnerChangedThunk), this);
- OnNameOwnerChanged(NULL, NULL);
+ OnNameOwnerChanged(nullptr, nullptr);
}
void GlobalMenuBarRegistrarX11::OnNameOwnerChanged(GObject* /* ignored */,