1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_DECLARATIVE_CONTENT_CONDITION_TRACKER_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_DECLARATIVE_CONTENT_CONDITION_TRACKER_DELEGATE_H_
8 #include "base/macros.h"
15 namespace extensions
{
17 // Interface that allows the declarative content condition trackers to request
18 // condition evaluation.
19 class DeclarativeContentConditionTrackerDelegate
{
21 // Requests re-evaluation of conditions for |contents|. This must be called
22 // whenever the URL or page state changes, even if the value of the condition
23 // itself doesn't change.
24 virtual void RequestEvaluation(content::WebContents
* contents
) = 0;
26 // Returns true if the evaluator should manage condition state for |context|.
27 virtual bool ShouldManageConditionsForBrowserContext(
28 content::BrowserContext
* context
) = 0;
31 DeclarativeContentConditionTrackerDelegate();
32 virtual ~DeclarativeContentConditionTrackerDelegate();
35 DISALLOW_COPY_AND_ASSIGN(DeclarativeContentConditionTrackerDelegate
);
38 } // namespace extensions
40 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_DECLARATIVE_CONTENT_CONDITION_TRACKER_DELEGATE_H_