Cleanup: Update the path to insets and point headers.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / website_settings / permission_bubble_cocoa.h
blob2eb4f2c777bc1a147753f6a023157d0f9cfb7cc6
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
8 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
12 #include "content/public/browser/web_contents.h"
14 #ifdef __OBJC__
15 @class PermissionBubbleController;
16 #else
17 class PermissionBubbleController;
18 #endif
20 class PermissionBubbleCocoa : public PermissionBubbleView {
21 public:
22 explicit PermissionBubbleCocoa(NSWindow* parent_window);
23 ~PermissionBubbleCocoa() override;
25 // PermissionBubbleView interface.
26 void Show(const std::vector<PermissionBubbleRequest*>& requests,
27 const std::vector<bool>& accept_state,
28 bool customization_mode) override;
29 void Hide() override;
30 bool IsVisible() override;
31 void SetDelegate(Delegate* delegate) override;
32 bool CanAcceptRequestUpdate() override;
34 // Called when |bubbleController_| is closing.
35 void OnBubbleClosing();
37 // Returns the point, in screen coordinates, to which the bubble's arrow
38 // should point.
39 NSPoint GetAnchorPoint();
41 // Returns the NSWindow containing the bubble.
42 NSWindow* window();
44 private:
45 NSWindow* parent_window_; // Weak.
46 Delegate* delegate_; // Weak.
48 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
49 PermissionBubbleController* bubbleController_;
51 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
54 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_