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

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

Issue 12225076: Delete most web intents code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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/web_intent_callbacks.h
diff --git a/chrome/browser/extensions/web_intent_callbacks.h b/chrome/browser/extensions/web_intent_callbacks.h
deleted file mode 100644
index 067d825d5a27cf442905e4a5f2aeda83bdd66575..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/web_intent_callbacks.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2012 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_WEB_INTENT_CALLBACKS_H_
-#define CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_
-
-#include "base/memory/singleton.h"
-#include "chrome/browser/profiles/profile_keyed_service.h"
-#include "chrome/browser/profiles/profile_keyed_service_factory.h"
-
-class Profile;
-
-namespace content {
-class WebContents;
-class WebIntentsDispatcher;
-}
-
-namespace extensions {
-class Extension;
-
-// The WebIntentCallbacks class tracks the pending callbacks for web intents
-// that have been delivered to packaged apps (i.e., new-style apps containing
-// shell windows), for a particular profile.
-class WebIntentCallbacks : public ProfileKeyedService {
- public:
- WebIntentCallbacks();
- virtual ~WebIntentCallbacks();
-
- // Returns the instance for the given profile. This is a convenience wrapper
- // around WebIntentCallbacks::Factory::GetForProfile.
- static WebIntentCallbacks* Get(Profile* profile);
-
- // Registers the callback for the Web Intent we're about to dispatch to the
- // given extension. Returns an identifier that should later be dispatched to
- // RetrieveCallback in order to invoke the callback registered here.
- // This transfers ownership of WebIntentsDispatcher to this class.
- int RegisterCallback(const Extension* extension,
- content::WebIntentsDispatcher* dispatcher,
- content::WebContents* source);
-
- // Retrieves the callback for the given identifier, for a response from the
- // specified extension. This will clear the callback. If there is no callback
- // registered under this identifier, then this will return NULL. This
- // transfers ownership of WebIntentsDispatcher to the caller.
- content::WebIntentsDispatcher* RetrieveCallback(const Extension* extension,
- int intent_id);
-
- private:
- typedef std::map<std::string, content::WebIntentsDispatcher*> CallbackMap;
-
- class Factory : public ProfileKeyedServiceFactory {
- public:
- static WebIntentCallbacks* GetForProfile(Profile* profile);
-
- static Factory* GetInstance();
- private:
- friend struct DefaultSingletonTraits<Factory>;
-
- Factory();
- virtual ~Factory();
-
- // ProfileKeyedServiceFactory
- virtual ProfileKeyedService* BuildServiceInstanceFor(
- Profile* profile) const OVERRIDE;
- };
-
- // Private method to get and clear the dispatcher for the given string key.
- // If there is no dispatcher available, this will return NULL. Otherwise, this
- // transfers ownership of the WebIntentsDispatcher to the caller.
- content::WebIntentsDispatcher* GetAndClear(const std::string& key);
-
- class SourceObserver;
-
- // Used as an incrementing ID for callback keys.
- int last_id_;
-
- // Stores all pending callbacks sent to platform apps.
- CallbackMap pending_;
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_WEB_INTENT_CALLBACKS_H_
« no previous file with comments | « chrome/browser/extensions/platform_app_launcher.cc ('k') | chrome/browser/extensions/web_intent_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698