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

Unified Diff: extensions/browser/lazy_context_id.cc

Issue 2940883007: Move lazy event dispatching code out of EventRouter. (Closed)
Patch Set: address comments Created 3 years, 6 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
« no previous file with comments | « extensions/browser/lazy_context_id.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/lazy_context_id.cc
diff --git a/extensions/browser/lazy_context_id.cc b/extensions/browser/lazy_context_id.cc
new file mode 100644
index 0000000000000000000000000000000000000000..80a4dcfacfeaa71db2283cdb2ff1d8cd8df4e5e4
--- /dev/null
+++ b/extensions/browser/lazy_context_id.cc
@@ -0,0 +1,20 @@
+// Copyright 2017 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 "extensions/browser/lazy_context_id.h"
+
+#include "extensions/browser/lazy_background_task_queue.h"
+
+namespace extensions {
+
+LazyContextId::LazyContextId(content::BrowserContext* context,
+ const ExtensionId& extension_id)
+ : type_(Type::kEventPage), context_(context), extension_id_(extension_id) {}
+
+LazyBackgroundTaskQueue* LazyContextId::GetTaskQueue() {
+ DCHECK(is_for_event_page());
+ return LazyBackgroundTaskQueue::Get(context_);
+}
+
+} // namespace extensions
« no previous file with comments | « extensions/browser/lazy_context_id.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698