| Index: ui/aura/env.h
|
| diff --git a/ui/aura/env.h b/ui/aura/env.h
|
| index e8cdb243ff2efa5b172238b2ece239b1a9bcf2d4..2ff423ec8486b14f8488e66400f52d3ea8ffe80f 100644
|
| --- a/ui/aura/env.h
|
| +++ b/ui/aura/env.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef UI_AURA_ENV_H_
|
| #define UI_AURA_ENV_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "base/macros.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/observer_list.h"
|
| @@ -32,14 +34,11 @@ class WindowTreeHost;
|
| // A singleton object that tracks general state within Aura.
|
| class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData {
|
| public:
|
| - // Creates the single Env instance (if it hasn't been created yet). If
|
| - // |create_event_source| is true a PlatformEventSource is created.
|
| - // TODO(sky): nuke |create_event_source|. Only necessary while mojo's
|
| - // nativeviewportservice lives in the same process as the viewmanager.
|
| - static void CreateInstance(bool create_event_source);
|
| + ~Env() override;
|
| +
|
| + static std::unique_ptr<Env> CreateInstance();
|
| static Env* GetInstance();
|
| static Env* GetInstanceDontCreate();
|
| - static void DeleteInstance();
|
|
|
| void AddObserver(EnvObserver* observer);
|
| void RemoveObserver(EnvObserver* observer);
|
| @@ -74,10 +73,8 @@ class AURA_EXPORT Env : public ui::EventTarget, public base::SupportsUserData {
|
| friend class WindowTreeHost;
|
|
|
| Env();
|
| - ~Env() override;
|
|
|
| - // See description of CreateInstance() for deatils of |create_event_source|.
|
| - void Init(bool create_event_source);
|
| + void Init();
|
|
|
| // Called by the Window when it is initialized. Notifies observers.
|
| void NotifyWindowInitialized(Window* window);
|
|
|