Linux named notifications (#12192)

* Set name & desktop-entry on Linux notifications

* DBusMock now honors verbose mode flag

* Disable DBus Notification tests on ia32
This commit is contained in:
Charles Kerr 2018-03-12 09:33:06 +09:00 committed by GitHub
parent 9d090e00f2
commit 86af20ded0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 163 additions and 14 deletions

View file

@ -18,10 +18,15 @@
namespace {
GDesktopAppInfo* get_desktop_app_info() {
GDesktopAppInfo * ret = nullptr;
std::unique_ptr<base::Environment> env(base::Environment::Create());
const std::string desktop_id = libgtkui::GetDesktopName(env.get());
return desktop_id.empty() ? nullptr
: g_desktop_app_info_new(desktop_id.c_str());
const char * libcc_default_id = "chromium-browser.desktop";
if (!desktop_id.empty() && (desktop_id != libcc_default_id))
ret = g_desktop_app_info_new(desktop_id.c_str());
return ret;
}
} // namespace