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

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

Issue 955473002: Move DeclarativeUserScriptManager/Master and UserScriptLoader to //extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/declarative_user_script_manager.h
diff --git a/chrome/browser/extensions/declarative_user_script_manager.h b/chrome/browser/extensions/declarative_user_script_manager.h
deleted file mode 100644
index c89698a2900106333cb12c231d02e11cb2a840fc..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/declarative_user_script_manager.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2014 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_DECLARATIVE_USER_SCRIPT_MANAGER_H_
-#define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_
-
-#include <map>
-
-#include "base/macros.h"
-#include "base/memory/linked_ptr.h"
-#include "base/scoped_observer.h"
-#include "extensions/browser/extension_registry_observer.h"
-#include "extensions/common/host_id.h"
-
-class Profile;
-
-namespace extensions {
-class DeclarativeUserScriptMaster;
-
-// Manages a set of DeclarativeUserScriptMaster objects for script injections.
-class DeclarativeUserScriptManager : public ExtensionRegistryObserver {
- public:
- explicit DeclarativeUserScriptManager(Profile* profile);
- ~DeclarativeUserScriptManager() override;
-
- // Gets the user script master for declarative scripts by the given
- // HostID; if one does not exist, a new object will be created.
- DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByID(
- const HostID& host_id);
-
- private:
- using UserScriptMasterMap =
- std::map<HostID, linked_ptr<DeclarativeUserScriptMaster>>;
-
- // ExtensionRegistryObserver:
- void OnExtensionUnloaded(content::BrowserContext* browser_context,
- const Extension* extension,
- UnloadedExtensionInfo::Reason reason) override;
-
- // Creates a DeclarativeUserScriptMaster object.
- DeclarativeUserScriptMaster* CreateDeclarativeUserScriptMaster(
- const HostID& host_id);
-
- // A map of DeclarativeUserScriptMasters for each host; each master
- // is lazily initialized.
- UserScriptMasterMap declarative_user_script_masters_;
-
- Profile* profile_;
-
- ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
- extension_registry_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptManager);
-};
-
-} // namespace extensions
-
-#endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_
« no previous file with comments | « chrome/browser/extensions/convert_user_script.cc ('k') | chrome/browser/extensions/declarative_user_script_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698