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

Unified Diff: chrome/browser/permissions/grouped_permission_infobar_delegate.h

Issue 2319443002: Add InfoBarIdentifier to GroupedPermissionInfoBarDelegate (Closed)
Patch Set: minor change in comments Created 4 years, 3 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/grouped_permission_infobar_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/grouped_permission_infobar_delegate.h
diff --git a/chrome/browser/permissions/grouped_permission_infobar_delegate.h b/chrome/browser/permissions/grouped_permission_infobar_delegate.h
deleted file mode 100644
index 70dc48d5dbf3c514d40cca8242c8411a79097512..0000000000000000000000000000000000000000
--- a/chrome/browser/permissions/grouped_permission_infobar_delegate.h
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2016 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_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_H_
-#define CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_H_
-
-#include <memory>
-
-#include "base/callback.h"
-#include "components/content_settings/core/common/content_settings_types.h"
-#include "components/infobars/core/confirm_infobar_delegate.h"
-
-class GURL;
-class InfoBarService;
-
-namespace infobars {
-class InfoBarManager;
-}
-
-// Configures an InfoBar to display a group of permission requests, each of
-// which can be allowed or blocked independently.
-// TODO(tsergeant): Expand this class so it can be used without subclassing.
-class GroupedPermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
- public:
- // Implementation is in platform-specific infobar file.
- static std::unique_ptr<infobars::InfoBar> CreateInfoBar(
- infobars::InfoBarManager* infobar_manager,
- std::unique_ptr<GroupedPermissionInfoBarDelegate> delegate);
-
- GroupedPermissionInfoBarDelegate(
- const GURL& requesting_origin,
- const std::vector<ContentSettingsType>& types);
- ~GroupedPermissionInfoBarDelegate() override;
-
- bool ShouldShowPersistenceToggle() const;
- bool persist() const { return persist_; }
- void set_persist(bool persist) { persist_ = persist; }
-
- base::string16 GetMessageText() const override;
-
- int GetPermissionCount() const;
- ContentSettingsType GetContentSettingType(int index) const;
- int GetIconIdForPermission(int index) const;
- // Message text to display for an individual permission at |index|.
- base::string16 GetMessageTextFragment(int index) const;
-
- void ToggleAccept(int position, bool new_value);
-
- protected:
- bool GetAcceptState(int position);
-
- private:
- // ConfirmInfoBarDelegate:
- base::string16 GetButtonLabel(InfoBarButton button) const override;
- int GetButtons() const override;
-
- // InfoBarDelegate:
- Type GetInfoBarType() const override;
-
- const GURL requesting_origin_;
- const std::vector<ContentSettingsType> types_;
- std::vector<bool> accept_states_;
- bool persist_;
-
- DISALLOW_COPY_AND_ASSIGN(GroupedPermissionInfoBarDelegate);
-};
-
-#endif // CHROME_BROWSER_PERMISSIONS_GROUPED_PERMISSION_INFOBAR_DELEGATE_H_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/grouped_permission_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698