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