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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h

Issue 885373004: Use customization mode by default in permission bubbles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fixes etc. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" 11 #include "chrome/browser/ui/website_settings/permission_bubble_view.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 13
14 #ifdef __OBJC__ 14 #ifdef __OBJC__
15 @class PermissionBubbleController; 15 @class PermissionBubbleController;
16 #else 16 #else
17 class PermissionBubbleController; 17 class PermissionBubbleController;
18 #endif 18 #endif
19 19
20 class PermissionBubbleCocoa : public PermissionBubbleView { 20 class PermissionBubbleCocoa : public PermissionBubbleView {
21 public: 21 public:
22 explicit PermissionBubbleCocoa(NSWindow* parent_window); 22 explicit PermissionBubbleCocoa(NSWindow* parent_window);
23 ~PermissionBubbleCocoa() override; 23 ~PermissionBubbleCocoa() override;
24 24
25 // PermissionBubbleView interface. 25 // PermissionBubbleView interface.
26 void Show(const std::vector<PermissionBubbleRequest*>& requests, 26 void Show(const std::vector<PermissionBubbleRequest*>& requests,
27 const std::vector<bool>& accept_state, 27 const std::vector<bool>& accept_state) override;
28 bool customization_mode) override;
29 void Hide() override; 28 void Hide() override;
30 bool IsVisible() override; 29 bool IsVisible() override;
31 void SetDelegate(Delegate* delegate) override; 30 void SetDelegate(Delegate* delegate) override;
32 bool CanAcceptRequestUpdate() override; 31 bool CanAcceptRequestUpdate() override;
33 32
34 // Called when |bubbleController_| is closing. 33 // Called when |bubbleController_| is closing.
35 void OnBubbleClosing(); 34 void OnBubbleClosing();
36 35
37 // Returns the point, in screen coordinates, to which the bubble's arrow 36 // Returns the point, in screen coordinates, to which the bubble's arrow
38 // should point. 37 // should point.
39 NSPoint GetAnchorPoint(); 38 NSPoint GetAnchorPoint();
40 39
41 // Returns the NSWindow containing the bubble. 40 // Returns the NSWindow containing the bubble.
42 NSWindow* window(); 41 NSWindow* window();
43 42
44 private: 43 private:
45 NSWindow* parent_window_; // Weak. 44 NSWindow* parent_window_; // Weak.
46 Delegate* delegate_; // Weak. 45 Delegate* delegate_; // Weak.
47 46
48 // Cocoa-side UI controller for the bubble. Weak, as it will close itself. 47 // Cocoa-side UI controller for the bubble. Weak, as it will close itself.
49 PermissionBubbleController* bubbleController_; 48 PermissionBubbleController* bubbleController_;
50 49
51 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa); 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleCocoa);
52 }; 51 };
53 52
54 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_ 53 #endif // CHROME_BROWSER_UI_COCOA_PERMISSION_BUBBLE_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698