[Extension c2s] Move PageInteractionStatus to SitePermissionsHelper class
Bug: 1289441
Change-Id: I0d5879d67954c5d305abc3f9da7ecc9cfd1ae1f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3402332
Reviewed-by: Devlin Cronin <[email protected]>
Commit-Queue: Emilia Paz <[email protected]>
Cr-Commit-Position: refs/heads/main@{#962826}
diff --git a/chrome/browser/ui/extensions/extension_action_view_controller.h b/chrome/browser/ui/extensions/extension_action_view_controller.h
index 1459dc0..a11c5dbf 100644
--- a/chrome/browser/ui/extensions/extension_action_view_controller.h
+++ b/chrome/browser/ui/extensions/extension_action_view_controller.h
@@ -10,6 +10,7 @@
#include "base/scoped_observation.h"
#include "chrome/browser/extensions/extension_action_icon_factory.h"
#include "chrome/browser/extensions/extension_context_menu_model.h"
+#include "chrome/browser/extensions/site_permissions_helper.h"
#include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_host_observer.h"
@@ -29,6 +30,7 @@
class ExtensionAction;
class ExtensionRegistry;
class ExtensionViewHost;
+class SitePermissionsHelper;
}
// The platform-independent controller for an ExtensionAction that is shown on
@@ -70,7 +72,7 @@
std::u16string GetAccessibleName(
content::WebContents* web_contents) const override;
std::u16string GetTooltip(content::WebContents* web_contents) const override;
- PageInteractionStatus GetPageInteractionStatus(
+ extensions::SitePermissionsHelper::SiteInteraction GetSiteInteraction(
content::WebContents* web_contents) const override;
bool IsEnabled(content::WebContents* web_contents) const override;
bool IsShowingPopup() const override;
@@ -169,19 +171,6 @@
content::WebContents* web_contents,
const gfx::Size& size);
- // Returns true if this extension uses the activeTab permission and would
- // probably be able to to access the given |url|. The actual checks when an
- // activeTab extension tries to run are a little more complicated and can be
- // seen in ExtensionActionRunner and ActiveTabPermissionGranter.
- // Note: The rare cases where this gets it wrong should only be for false
- // positives, where it reports that the extension wants access but it can't
- // actually be given access when it tries to run.
- bool HasActiveTabAndCanAccess(const GURL& url) const;
-
- // Returns true if this extension has been blocked on the given
- // |web_contents|.
- bool HasBeenBlocked(content::WebContents* web_contents) const;
-
// The extension associated with the action we're displaying.
scoped_refptr<const extensions::Extension> extension_;