chromium/chrome/browser/extensions/user_script_listener.h

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_
#define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_

#include <list>
#include <map>

#include "base/containers/circular_deque.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_multi_source_observation.h"
#include "base/scoped_observation.h"
#include "chrome/browser/profiles/profile_manager_observer.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_registry_observer.h"

class GURL;
class URLPattern;
class ProfileManager;

namespace content {
class BrowserContext;
class NavigationHandle;
class NavigationThrottle;
}

namespace extensions {
class Extension;

// This class handles delaying of resource loads that depend on unloaded user
// scripts. For each request that comes in, we check if its url pattern matches
// one that user scripts will be injected into. If at least one matching user
// script has not been loaded yet, then we delay the request.
//
// This class lives on the UI thread.
class UserScriptListener : public ExtensionRegistryObserver,
                           public ProfileManagerObserver {};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_LISTENER_H_