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

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: Apply 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..11721929a64a77bab5aac0c750fbd3165c6ded6b
--- /dev/null
+++ b/chrome/browser/ui/website_settings/permission_bubble_delegate.h
@@ -0,0 +1,37 @@
+// 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 "base/callback.h"
+#include "components/bubble/bubble_delegate.h"
+
+class PermissionBubbleManager;
+class PermissionBubbleRequest;
+
+class PermissionBubbleDelegate : public BubbleDelegate {
+ public:
+ PermissionBubbleDelegate(
+ base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory,
+ PermissionBubbleManager* manager);
+ ~PermissionBubbleDelegate() override;
+
+ // BubbleDelegate:
+ void DidClose() override;
+ bool ShouldCloseOnHide() const override;
+ scoped_ptr<BubbleUI> BuildBubbleUI() override;
+ void* GetContext() const override;
+
+ // Define this function in the platform specific bubble UI implementation.
msw 2015/08/13 03:37:21 Is this a TODO? Otherwise reword this comment to s
+ static scoped_ptr<BubbleUI> CreateBubble(PermissionBubbleManager* manager);
+
+ private:
+ base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory_;
+ PermissionBubbleManager* manager_; // Weak.
+
+ DISALLOW_COPY_AND_ASSIGN(PermissionBubbleDelegate);
+};
+
+#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698