123456789101112131415161718192021222324252627282930 |
- // Copyright 2018 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- #include "ash/system/model/tracing_model.h"
- namespace ash {
- TracingModel::TracingModel() = default;
- TracingModel::~TracingModel() = default;
- void TracingModel::AddObserver(TracingObserver* observer) {
- observers_.AddObserver(observer);
- }
- void TracingModel::RemoveObserver(TracingObserver* observer) {
- observers_.RemoveObserver(observer);
- }
- void TracingModel::SetIsTracing(bool is_tracing) {
- is_tracing_ = is_tracing;
- NotifyChanged();
- }
- void TracingModel::NotifyChanged() {
- for (auto& observer : observers_)
- observer.OnTracingModeChanged();
- }
- } // namespace ash
|