BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / task_management / providers / task_provider.cc
blob1d08d8d7b9baf87f7e1f8ce58177accb28d5d081
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/task_management/providers/task_provider.h"
7 namespace task_management {
9 TaskProvider::TaskProvider()
10 : observer_(nullptr) {
13 TaskProvider::~TaskProvider() {
16 void TaskProvider::SetObserver(TaskProviderObserver* observer) {
17 DCHECK(observer);
18 DCHECK(!observer_);
19 observer_ = observer;
20 StartUpdating();
23 void TaskProvider::ClearObserver() {
24 DCHECK(observer_);
25 observer_ = nullptr;
26 StopUpdating();
29 void TaskProvider::NotifyObserverTaskAdded(Task* task) const {
30 DCHECK(observer_);
31 observer_->TaskAdded(task);
34 void TaskProvider::NotifyObserverTaskRemoved(Task* task) const {
35 DCHECK(observer_);
36 observer_->TaskRemoved(task);
39 } // namespace task_management