| Index: ui/events/platform/platform_event_source.h
|
| diff --git a/ui/events/platform/platform_event_source.h b/ui/events/platform/platform_event_source.h
|
| index 3f16bd603bc998ab49ec28962d9602b09b3ab502..b4e3084dd1fb23b36c7319c8ddd6bd03231fec04 100644
|
| --- a/ui/events/platform/platform_event_source.h
|
| +++ b/ui/events/platform/platform_event_source.h
|
| @@ -33,6 +33,7 @@ class EVENTS_EXPORT PlatformEventSource {
|
| public:
|
| virtual ~PlatformEventSource();
|
|
|
| + // Returns the thread-local singleton.
|
| static PlatformEventSource* GetInstance();
|
|
|
| // Adds a dispatcher to the dispatcher list. If a dispatcher is added during
|
| @@ -64,6 +65,7 @@ class EVENTS_EXPORT PlatformEventSource {
|
| void AddPlatformEventObserver(PlatformEventObserver* observer);
|
| void RemovePlatformEventObserver(PlatformEventObserver* observer);
|
|
|
| + // Creates PlatformEventSource and sets it as a thread-local singleton.
|
| static std::unique_ptr<PlatformEventSource> CreateDefault();
|
|
|
| protected:
|
| @@ -80,8 +82,6 @@ class EVENTS_EXPORT PlatformEventSource {
|
| friend class ScopedEventDispatcher;
|
| friend class test::PlatformEventSourceTestAPI;
|
|
|
| - static PlatformEventSource* instance_;
|
| -
|
| // This is invoked when the list of dispatchers changes (i.e. a new dispatcher
|
| // is added, or a dispatcher is removed).
|
| virtual void OnDispatcherListChanged();
|
|
|