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

Unified Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h

Issue 1292353006: Mac Changes for BubbleManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mcdb-mac-3.gitbr
Patch Set: 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/cocoa/website_settings/permission_bubble_cocoa.h
diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h
index 18cbaaf2eeaeb9a5cd2e820d685896cc84c2a814..34cc1f1a064c3c7f749142a72eb258e65b972884 100644
--- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h
+++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h
@@ -12,36 +12,26 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/cocoa/info_bubble_view.h"
-#include "chrome/browser/ui/website_settings/permission_bubble_view.h"
+#include "components/bubble/bubble_ui.h"
#include "content/public/browser/web_contents.h"
-class Browser;
+class PermissionBubbleManager;
@class PermissionBubbleController;
-class PermissionBubbleCocoa : public PermissionBubbleView {
+class PermissionBubbleCocoa : public BubbleUI {
public:
- explicit PermissionBubbleCocoa(Browser* browser);
+ explicit PermissionBubbleCocoa(PermissionBubbleManager* manager);
~PermissionBubbleCocoa() override;
- // PermissionBubbleView interface.
- void Show(const std::vector<PermissionBubbleRequest*>& requests,
- const std::vector<bool>& accept_state) override;
+ // BubbleUI interface.
+ void Show() override;
void Hide() override;
- bool IsVisible() override;
- void SetDelegate(Delegate* delegate) override;
- bool CanAcceptRequestUpdate() override;
void UpdateAnchorPosition() override;
- gfx::NativeWindow GetNativeWindow() override;
+ bool CanAcceptUpdate() const override;
// Called when |bubbleController_| is closing.
void OnBubbleClosing();
- // Returns the point, in screen coordinates, to which the bubble's arrow
- // should point.
- NSPoint GetAnchorPoint();
-
- info_bubble::BubbleArrowLocation GetArrowLocation();
-
private:
FRIEND_TEST_ALL_PREFIXES(PermissionBubbleBrowserTest,
HasLocationBarByDefault);
@@ -51,15 +41,10 @@ class PermissionBubbleCocoa : public PermissionBubbleView {
FRIEND_TEST_ALL_PREFIXES(PermissionBubbleKioskBrowserTest,
KioskHasNoLocationBar);
- Browser* browser_; // Weak.
- Delegate* delegate_; // Weak.
+ PermissionBubbleManager* manager_; // Weak.
// Cocoa-side UI controller for the bubble. Weak, as it will close itself.
PermissionBubbleController* bubbleController_;
- virtual bool HasLocationBar();
-
- // Will get the intended parent window for the bubble and will not be NULL.
- NSWindow* GetParentWindow();
DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
};

Powered by Google App Engine
This is Rietveld 408576698