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

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

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.cc
diff --git a/chrome/browser/extensions/extension_io_event_router.cc b/chrome/browser/extensions/extension_io_event_router.cc
deleted file mode 100644
index 2c9f234f6d029a0d36dfbe7cd454858b18dc40df..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_io_event_router.cc
+++ /dev/null
@@ -1,69 +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.
-
-#include "chrome/browser/extensions/extension_io_event_router.h"
-
-#include "googleurl/src/gurl.h"
-#include "chrome/browser/browser_thread.h"
-#include "chrome/browser/extensions/extension_event_router.h"
-#include "chrome/browser/profiles/profile.h"
-
-ExtensionIOEventRouter::ExtensionIOEventRouter(Profile* profile)
- : profile_(profile) {
-}
-
-ExtensionIOEventRouter::~ExtensionIOEventRouter() {
-}
-
-void ExtensionIOEventRouter::DispatchEventToExtension(
- const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- NewRunnableMethod(this,
- &ExtensionIOEventRouter::DispatchEventOnUIThread,
- extension_id, event_name, event_args));
-}
-
-void ExtensionIOEventRouter::DispatchEventToRenderers(
- const std::string& event_name,
- const std::string& event_args,
- const GURL& event_url) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- NewRunnableMethod(this,
- &ExtensionIOEventRouter::DispatchEventToRenderersOnUIThread,
- event_name, event_args, event_url));
-}
-
-void ExtensionIOEventRouter::DispatchEventOnUIThread(
- const std::string& extension_id,
- const std::string& event_name,
- const std::string& event_args) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- // If the profile has gone away, we're shutting down. If there's no event
- // router, the extension system hasn't been initialized.
- if (!profile_ || !profile_->GetExtensionEventRouter())
- return;
-
- profile_->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id, event_name, event_args, profile_, GURL());
-}
-
-void ExtensionIOEventRouter::DispatchEventToRenderersOnUIThread(
- const std::string& event_name,
- const std::string& event_args,
- const GURL& event_url) const {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- // If the profile has gone away, we're shutting down. If there's no event
- // router, the extension system hasn't been initialized.
- if (!profile_ || !profile_->GetExtensionEventRouter())
- return;
-
- profile_->GetExtensionEventRouter()->DispatchEventToRenderers(
- event_name, event_args, profile_, event_url);
-}
« no previous file with comments | « chrome/browser/extensions/extension_io_event_router.h ('k') | chrome/browser/extensions/extension_proxy_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698