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

Unified Diff: chrome/browser/previews/previews_service.h

Issue 2300213002: Adding an IO Data and keyed service to previews/ (Closed)
Patch Set: adding an owners file Created 4 years, 3 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/previews/previews_service.h
diff --git a/chrome/browser/previews/previews_service.h b/chrome/browser/previews/previews_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..eca67907410dbca343f2be8693cee45da2a48819
--- /dev/null
+++ b/chrome/browser/previews/previews_service.h
@@ -0,0 +1,37 @@
+// Copyright 2016 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_PREVIEWS_PREVIEWS_SERVICE_H_
+#define CHROME_BROWSER_PREVIEWS_PREVIEWS_SERVICE_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "components/keyed_service/core/keyed_service.h"
+
+namespace previews {
+class PreviewsUIService;
+}
+
+// Keyed service that owns a previews::PreviewsUIService.
Lei Zhang 2016/09/08 19:06:23 Can you mention "PreviewsService lives on the UI t
RyanSturm 2016/09/08 20:19:09 Done.
+class PreviewsService : public KeyedService {
+ public:
+ PreviewsService();
+ ~PreviewsService() override;
+
+ // The UI-thread portion of previews/ inter-thread communication.
Lei Zhang 2016/09/08 19:06:23 This comment doesn't make as much sense.
RyanSturm 2016/09/08 20:19:09 Done.
+ void set_previews_ui_service(
+ std::unique_ptr<previews::PreviewsUIService> previews_ui_service);
+ previews::PreviewsUIService* previews_ui_service() {
+ return previews_ui_service_.get();
+ }
+
+ private:
+ // The UI thread portion of previews/ inter-thread communication.
+ std::unique_ptr<previews::PreviewsUIService> previews_ui_service_;
+
+ DISALLOW_COPY_AND_ASSIGN(PreviewsService);
+};
+
+#endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698