Merge pull request #4131 from etiktin/add_is_DWM_enabled

Add API for checking if DWM composition (Aero Glass) is enabled
This commit is contained in:
Cheng Zhao 2016-01-16 14:16:22 +08:00
commit 775e475d5c
3 changed files with 43 additions and 1 deletions

View file

@ -37,6 +37,7 @@
#if defined(OS_WIN)
#include "base/strings/utf_string_conversions.h"
#include "ui/base/win/shell.h"
#endif
using atom::Browser;
@ -318,6 +319,12 @@ std::string App::GetLocale() {
return l10n_util::GetApplicationLocale("");
}
#if defined(OS_WIN)
bool App::IsAeroGlassEnabled() {
return ui::win::IsAeroGlassEnabled();
}
#endif
bool App::MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback) {
if (process_singleton_.get())
@ -361,6 +368,7 @@ mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
#if defined(OS_WIN)
.SetMethod("setUserTasks",
base::Bind(&Browser::SetUserTasks, browser))
.SetMethod("isAeroGlassEnabled", &App::IsAeroGlassEnabled)
#endif
.SetMethod("setPath", &App::SetPath)
.SetMethod("getPath", &App::GetPath)

View file

@ -88,6 +88,10 @@ class App : public AtomBrowserClient::Delegate,
const ProcessSingleton::NotificationCallback& callback);
std::string GetLocale();
#if defined(OS_WIN)
bool IsAeroGlassEnabled();
#endif
scoped_ptr<ProcessSingleton> process_singleton_;
DISALLOW_COPY_AND_ASSIGN(App);