Fix build and ensure no breaking change
This commit is contained in:
parent
1c43768104
commit
9676c0a4f9
3 changed files with 9 additions and 21 deletions
|
@ -11,11 +11,7 @@
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
#include "atom/browser/browser.h"
|
|
||||||
#include "base/environment.h"
|
#include "base/environment.h"
|
||||||
=======
|
|
||||||
>>>>>>> Fix build and ensure no breaking change
|
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "brightray/browser/notification_delegate.h"
|
#include "brightray/browser/notification_delegate.h"
|
||||||
#include "brightray/browser/win/notification_presenter_win.h"
|
#include "brightray/browser/win/notification_presenter_win.h"
|
||||||
|
@ -33,22 +29,14 @@ using ABI::Windows::Data::Xml::Dom::IXmlText;
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
bool GetAppUserModelId(ScopedHString* app_id) {
|
|
||||||
app_id->Reset(atom::api::Browser::Get()->GetAppUserModelID());
|
|
||||||
return app_id->success();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsDebuggingNotifications() {
|
bool IsDebuggingNotifications() {
|
||||||
return base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS");
|
return base::Environment::Create()->HasVar("ELECTRON_DEBUG_NOTIFICATIONS");
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> Fix build and ensure no breaking change
|
|
||||||
// static
|
// static
|
||||||
ComPtr<ABI::Windows::UI::Notifications::IToastNotificationManagerStatics>
|
ComPtr<ABI::Windows::UI::Notifications::IToastNotificationManagerStatics>
|
||||||
WindowsToastNotification::toast_manager_;
|
WindowsToastNotification::toast_manager_;
|
||||||
|
|
|
@ -4,15 +4,15 @@ namespace brightray {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
std::string g_overriden_application_name;
|
std::string overriden_application_name_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverrideApplicationName(const std::string& name) {
|
void OverrideApplicationName(const std::string& name) {
|
||||||
g_overriden_application_name = name;
|
overriden_application_name_ = name;
|
||||||
}
|
}
|
||||||
std::string GetOverridenApplicationName() {
|
std::string GetOverridenApplicationName() {
|
||||||
return g_overriden_application_name;
|
return overriden_application_name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace brightray
|
} // namespace brightray
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace brightray {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
base::string16 g_app_user_model_id;
|
base::string16 app_user_model_id_;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,15 +37,15 @@ std::string GetApplicationVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetAppUserModelID(const base::string16& name) {
|
void SetAppUserModelID(const base::string16& name) {
|
||||||
g_app_user_model_id = name;
|
app_user_model_id_ = name;
|
||||||
SetCurrentProcessExplicitAppUserModelID(g_app_user_model_id.c_str());
|
SetCurrentProcessExplicitAppUserModelID(app_user_model_id_.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
PCWSTR GetRawAppUserModelID() {
|
PCWSTR GetRawAppUserModelID() {
|
||||||
if (g_app_user_model_id.empty()) {
|
if (app_user_model_id_.empty()) {
|
||||||
PWSTR current_app_id;
|
PWSTR current_app_id;
|
||||||
if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(¤t_app_id))) {
|
if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(¤t_app_id))) {
|
||||||
g_app_user_model_id = current_app_id;
|
app_user_model_id_ = current_app_id;
|
||||||
} else {
|
} else {
|
||||||
std::string name = GetOverridenApplicationName();
|
std::string name = GetOverridenApplicationName();
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
|
@ -58,7 +58,7 @@ PCWSTR GetRawAppUserModelID() {
|
||||||
CoTaskMemFree(current_app_id);
|
CoTaskMemFree(current_app_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_app_user_model_id.c_str();
|
return app_user_model_id_.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GetAppUserModelID(ScopedHString* app_id) {
|
bool GetAppUserModelID(ScopedHString* app_id) {
|
||||||
|
|
Loading…
Reference in a new issue