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

Unified Diff: chrome/browser/extensions/extension_io_event_router.h

Issue 6598002: Make the ChromeNetworkDelegate use the ExtensionEventRouterForwarder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 10 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/extensions/extension_io_event_router.h
diff --git a/chrome/browser/extensions/extension_io_event_router.h b/chrome/browser/extensions/extension_io_event_router.h
deleted file mode 100644
index 765b04d3165c62c8424e294516ff8d4477354b8b..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_io_event_router.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2011 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_EXTENSIONS_EXTENSION_IO_EVENT_ROUTER_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_IO_EVENT_ROUTER_H_
-#pragma once
-
-#include <string>
-
-#include "base/ref_counted.h"
-
-class GURL;
-class Profile;
-
-// For now, this just forwards events from the IO thread to the
-// ExtensionEventRouter on the UI thread.
-// TODO(mpcomplete): eventually I want this to have its own copy of the event
-// listeners so it can bypass the jump to the UI thread.
-class ExtensionIOEventRouter
- : public base::RefCountedThreadSafe<ExtensionIOEventRouter> {
- public:
- explicit ExtensionIOEventRouter(Profile* profile);
- ~ExtensionIOEventRouter();
-
- void DestroyingProfile() { profile_ = NULL; }
-
- // Dispatch the named event to every extension listening to that event.
- void DispatchEventToExtension(const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args) const;
-
- // Same as above, except the event is sent to all extensions that have
- // sufficient permissions.
- void DispatchEventToRenderers(const std::string& event_name,
- const std::string& event_args,
- const GURL& event_url) const;
-
- private:
- void DispatchEventOnUIThread(const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args) const;
-
- void DispatchEventToRenderersOnUIThread(
- const std::string& event_name,
- const std::string& event_args,
- const GURL& event_url) const;
-
- Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionIOEventRouter);
-};
-
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_IO_EVENT_ROUTER_H_

Powered by Google App Engine
This is Rietveld 408576698