mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: devtools allow restoring saved dock state on Windows (#39734)
* fix: devtools allow restoring saved dock state on Windows * chore: address feedback
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
|
||||
#include "shell/common/application_info.h"
|
||||
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/common/chrome_version.h"
|
||||
#include "content/public/common/user_agent.h"
|
||||
#include "electron/electron_version.h"
|
||||
@@ -47,4 +49,11 @@ std::string GetApplicationUserAgent() {
|
||||
return content::BuildUserAgentFromProduct(user_agent);
|
||||
}
|
||||
|
||||
bool IsAppRTL() {
|
||||
const std::string& locale = g_browser_process->GetApplicationLocale();
|
||||
base::i18n::TextDirection text_direction =
|
||||
base::i18n::GetTextDirectionForLocaleInStartUp(locale.c_str());
|
||||
return text_direction == base::i18n::RIGHT_TO_LEFT;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -25,6 +25,8 @@ std::string GetApplicationVersion();
|
||||
// Returns the user agent of Electron.
|
||||
std::string GetApplicationUserAgent();
|
||||
|
||||
bool IsAppRTL();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
PCWSTR GetRawAppUserModelID();
|
||||
bool GetAppUserModelID(ScopedHString* app_id);
|
||||
|
||||
Reference in New Issue
Block a user