| Index: content/browser/time_zone_monitor.h
|
| diff --git a/content/browser/time_zone_monitor.h b/content/browser/time_zone_monitor.h
|
| index 95f70a39317cda74739e85d439a1c5a207f97192..aa3ac9b3007a06f4884e9d881655e4b73d79caaf 100644
|
| --- a/content/browser/time_zone_monitor.h
|
| +++ b/content/browser/time_zone_monitor.h
|
| @@ -8,6 +8,8 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| +#include "device/time_zone_monitor/public/interfaces/time_zone_monitor.mojom.h"
|
| +#include "mojo/public/cpp/bindings/binding_set.h"
|
|
|
| namespace content {
|
|
|
| @@ -28,22 +30,31 @@ namespace content {
|
| // localtime in renderer processes with custom code that calls
|
| // localtime in the browser process via Chrome IPC.
|
|
|
| -class TimeZoneMonitor {
|
| +class TimeZoneMonitor : public device::mojom::TimeZoneMonitor {
|
| public:
|
| // Returns a new TimeZoneMonitor object (likely a subclass) specific to the
|
| // platform.
|
| static std::unique_ptr<TimeZoneMonitor> Create();
|
|
|
| - virtual ~TimeZoneMonitor();
|
| + ~TimeZoneMonitor() override;
|
| +
|
| + void Bind(device::mojom::TimeZoneMonitorRequest request);
|
|
|
| protected:
|
| TimeZoneMonitor();
|
|
|
| - // Loop over all renderers and notify them that the system time zone may
|
| - // have changed.
|
| - void NotifyRenderers();
|
| + // Notify all callbacks that the system time zone may have changed.
|
| + void NotifyClients();
|
|
|
| private:
|
| + // device::mojom::device::mojom::TimeZoneMonitor:
|
| + void QueryNextTimeZoneChange(
|
| + const device::mojom::TimeZoneMonitor::QueryNextTimeZoneChangeCallback&
|
| + callback) override;
|
| +
|
| + mojo::BindingSet<device::mojom::TimeZoneMonitor> bindings_;
|
| + std::vector<device::mojom::TimeZoneMonitor::QueryNextTimeZoneChangeCallback>
|
| + on_time_zone_change_tasks_;
|
| DISALLOW_COPY_AND_ASSIGN(TimeZoneMonitor);
|
| };
|
|
|
|
|