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

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

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Partial Feedback Created 5 years, 4 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
Index: chrome/browser/ui/website_settings/permission_bubble_delegate.h
diff --git a/chrome/browser/ui/website_settings/permission_bubble_delegate.h b/chrome/browser/ui/website_settings/permission_bubble_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..0a71e9456272d4af2483e7adaba2ee0c26201249
--- /dev/null
+++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h
@@ -0,0 +1,43 @@
+// Copyright 2015 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_DELEGATE_H_
+#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_
+
+#include "components/bubble/bubble_delegate.h"
+#include "chrome/browser/ui/website_settings/permission_bubble_view.h"
+
+class PermissionBubbleManager;
+class PermissionBubbleRequest;
+
+class PermissionBubbleDelegate : public BubbleDelegate {
+ public:
+ PermissionBubbleDelegate(PermissionBubbleManager* manager,
+ PermissionBubbleView::Factory view_factory);
+ ~PermissionBubbleDelegate() override;
+
+ // BubbleDelegate:
+ void Finalize() override;
please use gerrit instead 2015/08/07 23:02:27 DidClose().
hcarmona 2015/08/11 02:35:45 Done.
+ bool CloseOnHide() override;
please use gerrit instead 2015/08/07 23:02:27 ShouldCloseOnHide().
hcarmona 2015/08/11 02:35:45 Done.
+ scoped_ptr<BubbleUI> BuildBubbleUI() override;
+ void* GetContext() override;
+
+ // Callbacks to the PermissionBubbleManager.
+ void ToggleAccept(int index, bool new_value);
+ void Accept();
+ void Deny();
+ void Closing();
+
+ // Bubbles should not hold a reference to these values.
+ const std::vector<PermissionBubbleRequest*>& GetRequests();
+ const std::vector<bool>& GetAcceptStates();
+
+ private:
+ PermissionBubbleManager* manager_;
please use gerrit instead 2015/08/07 23:02:27 be wevy wevy careful
hcarmona 2015/08/11 02:35:46 Acknowledged.
+ PermissionBubbleView::Factory view_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate);
+};
+
+#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698