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

Unified Diff: chrome/browser/ui/website_settings/permission_bubble_view.h

Issue 121113007: [WebsiteSettings] API for permissions bubbles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: destructor Created 6 years, 11 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/ui/website_settings/permission_bubble_manager.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/permission_bubble_view.h
diff --git a/chrome/browser/ui/website_settings/permission_bubble_view.h b/chrome/browser/ui/website_settings/permission_bubble_view.h
new file mode 100644
index 0000000000000000000000000000000000000000..c94c34cc4696000e6df2a0cd1b903fc6295a3a36
--- /dev/null
+++ b/chrome/browser/ui/website_settings/permission_bubble_view.h
@@ -0,0 +1,41 @@
+// Copyright (c) 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_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
+#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
+
+#include <vector>
+
+class PermissionBubbleDelegate;
+class PermissionBubbleManager;
+
+// This class is the platform-independent base class which the
+// manager uses to communicate to the UI surface. The UI toolkit
+// must set the manager to the view for each tab change caused
+// in the window.
+class PermissionBubbleView {
+ public:
+ class Delegate {
+ virtual void ToggleAccept(int index, bool new_value) = 0;
+ virtual void Accept() = 0;
+ virtual void Deny() = 0;
+ virtual void Closing() = 0;
+ };
+
+ // Set the delegate which will receive UI events forwarded from the bubble.
+ virtual void SetDelegate(Delegate* delegate) = 0;
+
+ // Used for live updates to the bubble.
+ virtual void AddPermissionBubbleDelegate(
+ PermissionBubbleDelegate* delegate) = 0;
+ virtual void RemovePermissionBubbleDelegate(
+ PermissionBubbleDelegate* delegate) = 0;
+
+ virtual void Show(
+ const std::vector<PermissionBubbleDelegate*>& delegates,
+ const std::vector<bool>& accept_state) = 0;
+ virtual void Hide() = 0;
+};
+
+#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698