Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: chrome/browser/task_management/providers/task_provider_observer.h

Issue 1038033002: New Task Manager - Phase 1.1: Implement Browser Process Task Providing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Lei Zhang's comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/task_management/providers/task_provider_observer.h
diff --git a/chrome/browser/task_management/providers/task_provider_observer.h b/chrome/browser/task_management/providers/task_provider_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5aa292fe286654f226ab0e9d2bc21b4b1def1e42
--- /dev/null
+++ b/chrome/browser/task_management/providers/task_provider_observer.h
@@ -0,0 +1,32 @@
+// Copyright 2015 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.
+
+#ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_PROVIDER_OBSERVER_H_
+#define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_PROVIDER_OBSERVER_H_
+
+#include "chrome/browser/task_management/providers/task.h"
+
+namespace task_management {
+
+// Defines an interface for observing tasks addition / removal.
+class TaskProviderObserver {
+ public:
+ TaskProviderObserver() {}
+ virtual ~TaskProviderObserver() {}
+
+ // This notifies of the event that a new |task| has been created.
+ virtual void TaskAdded(Task* task) = 0;
+
+ // This notifies of the event that a |task| is about to be removed. The task
+ // is still valid during this call, after that it may never be used again by
+ // the observer and and references to it must not be kept.
Lei Zhang 2015/04/03 02:39:37 typo: and and
afakhry 2015/04/03 16:04:27 Done.
+ virtual void TaskRemoved(Task* task) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TaskProviderObserver);
+};
+
+} // namespace task_management
+
+#endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_PROVIDER_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698