mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Only init WMState on Linux.
This commit is contained in:
@@ -17,11 +17,11 @@
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_ui.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#include "ui/wm/core/wm_state.h"
|
||||
#endif
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
#include "browser/views/views_delegate.h"
|
||||
#include "ui/wm/core/wm_state.h"
|
||||
#endif
|
||||
|
||||
namespace brightray {
|
||||
@@ -45,11 +45,11 @@ void BrowserMainParts::PreEarlyInitialization() {
|
||||
void BrowserMainParts::ToolkitInitialized() {
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
views::LinuxUI::instance()->Initialize();
|
||||
wm_state_.reset(new wm::WMState);
|
||||
#endif
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
views_delegate_.reset(new ViewsDelegate);
|
||||
wm_state_.reset(new wm::WMState);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
namespace brightray {
|
||||
class ViewsDelegate;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
namespace wm {
|
||||
class WMState;
|
||||
}
|
||||
@@ -58,6 +60,9 @@ class BrowserMainParts : public content::BrowserMainParts {
|
||||
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
scoped_ptr<ViewsDelegate> views_delegate_;
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA) && defined(USE_X11)
|
||||
scoped_ptr<wm::WMState> wm_state_;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user